mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Fixed regression introduced by the recent PerimeterGenerator refactoring causing spiral vase not to be correctly skipped on multi-loop layers. Includes regression test. #2761
This commit is contained in:
parent
901716adc8
commit
1f8ef2a63c
7 changed files with 46 additions and 4 deletions
|
@ -121,6 +121,22 @@ ExtrusionEntityCollection::grow() const
|
|||
return pp;
|
||||
}
|
||||
|
||||
/* Recursively count paths and loops contained in this collection */
|
||||
size_t
|
||||
ExtrusionEntityCollection::items_count() const
|
||||
{
|
||||
size_t count = 0;
|
||||
for (ExtrusionEntitiesPtr::const_iterator it = this->entities.begin(); it != this->entities.end(); ++it) {
|
||||
if ((*it)->is_collection()) {
|
||||
ExtrusionEntityCollection* collection = dynamic_cast<ExtrusionEntityCollection*>(*it);
|
||||
count += collection->items_count();
|
||||
} else {
|
||||
++count;
|
||||
}
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
#ifdef SLIC3RXS
|
||||
// there is no ExtrusionLoop::Collection or ExtrusionEntity::Collection
|
||||
REGISTER_CLASS(ExtrusionEntityCollection, "ExtrusionPath::Collection");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue