mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-15 02:37:51 -06:00
Include thin walls in general top-level perimeter sorting to get more efficient paths
This commit is contained in:
parent
2a73ab988f
commit
7f5442265e
11 changed files with 130 additions and 94 deletions
|
@ -47,6 +47,8 @@ ExtrusionEntityCollection::chained_path_from(Point* start_near, bool no_reverse)
|
|||
{
|
||||
if (this->no_sort) return this->clone();
|
||||
ExtrusionEntityCollection* retval = new ExtrusionEntityCollection;
|
||||
retval->entities.reserve(this->entities.size());
|
||||
retval->orig_indices.reserve(this->entities.size());
|
||||
|
||||
ExtrusionEntitiesPtr my_paths;
|
||||
for (ExtrusionEntitiesPtr::const_iterator it = this->entities.begin(); it != this->entities.end(); ++it) {
|
||||
|
@ -71,6 +73,7 @@ ExtrusionEntityCollection::chained_path_from(Point* start_near, bool no_reverse)
|
|||
my_paths.at(path_index)->reverse();
|
||||
}
|
||||
retval->entities.push_back(my_paths.at(path_index));
|
||||
retval->orig_indices.push_back(path_index);
|
||||
my_paths.erase(my_paths.begin() + path_index);
|
||||
endpoints.erase(endpoints.begin() + 2*path_index, endpoints.begin() + 2*path_index + 2);
|
||||
start_near = retval->entities.back()->last_point();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue