Skip to content

Commit

Permalink
Bug fix: Inner Outer Inner failed to reorder in certain edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
igiannakas committed Oct 16, 2024
1 parent fb032cd commit 0cfbe3f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/libslic3r/PerimeterGenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3114,10 +3114,10 @@ void PerimeterGenerator::process_arachne()
std::vector<PerimeterGeneratorArachneExtrusion> reordered_extrusions;

// Get searching thresholds. For an external perimeter we take the middle of the external perimeter width, split it in two, add the spacing to the internal perimeter and add half the internal perimeter width.
// This should get us to the middle of the internal perimeter. We then scale by 10% up for safety margin.
coord_t threshold_external = (this->ext_perimeter_flow.scaled_width()/2+this->ext_perimeter_flow.scaled_spacing()+this->perimeter_flow.scaled_width()/2) * 1.1;
// For the intenal perimeter threshold, the distance is the perimeter width plus the spacing, scaled by 10% for safety margin.
coord_t threshold_internal = (this->perimeter_flow.scaled_width()+this->perimeter_flow.scaled_spacing()) * 1.1;
// This should get us to the middle of the internal perimeter. We then scale by 2% up for safety margin.
coord_t threshold_external = (this->ext_perimeter_flow.scaled_width()/2+this->ext_perimeter_flow.scaled_spacing()+this->perimeter_flow.scaled_width()/2)*1.02;
// For the intenal perimeter threshold, the distance is the perimeter width plus the spacing, scaled by 2% for safety margin.
coord_t threshold_internal = (this->perimeter_flow.scaled_width()+this->perimeter_flow.scaled_spacing()) * 1.02;

// Re-order extrusions based on distance
// Alorithm will aggresively optimise for the appearance of the outermost perimeter
Expand Down

0 comments on commit 0cfbe3f

Please sign in to comment.