Skip to content

Commit

Permalink
Implemented Outer/Outer/inner wall sequence for classic slicer as Out…
Browse files Browse the repository at this point in the history
…er/Inner mode, but first and second external perimeters are swapped. This improves overhang performance at the cost of a slight decrease in print quality
  • Loading branch information
skuep committed Jan 23, 2024
1 parent ef9be5c commit d1fad01
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/libslic3r/PerimeterGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1738,6 +1738,24 @@ void PerimeterGenerator::process_classic()
this->object_config->brim_type == BrimType::btOuterOnly &&
this->object_config->brim_width.value > 0))
entities.reverse();
else if (this->config->wall_sequence == WallSequence::OuterOuterInner)
if (entities.entities.size() > 1) {
entities.reverse();

int swapped = 0;
int index;

for (index=0; index < entities.entities.size(); index++) {
if (entities.entities[index]->role() == erExternalPerimeter) {
if (swapped == 0 && (index+1) < entities.entities.size()) {
std::swap(entities.entities[index], entities.entities[index+1]);
swapped = 1;
}
} else {
swapped = 0;
}
}
}
// SoftFever: sandwich mode
else if (this->config->wall_sequence == WallSequence::InnerOuterInner)
if (entities.entities.size() > 1){
Expand Down

0 comments on commit d1fad01

Please sign in to comment.