mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-19 20:57:53 -06:00
Ported filament shrinkage compensation for XY and independent Z from Prusa Slicer (fixing MMU painting, seam painting, support painting issues) (#6507)
* Ported filament shrinkage compensation from Prusa Slicer. Updated logic to be 100 = no shrinkage to be consistent with orca definitions * Code comments update * Merge branch 'main' into Filament-Shrinkage-compension---port-from-Prusa-slicer * Merge remote-tracking branch 'upstream/main' into Filament-Shrinkage-compension---port-from-Prusa-slicer * Merge branch 'main' into Filament-Shrinkage-compension---port-from-Prusa-slicer
This commit is contained in:
parent
d1e7bb2762
commit
0ba4181a06
17 changed files with 198 additions and 52 deletions
|
@ -449,22 +449,6 @@ static std::vector<std::vector<ExPolygons>> slices_to_regions(
|
|||
});
|
||||
}
|
||||
|
||||
// SoftFever: ported from SuperSlicer
|
||||
// filament shrink
|
||||
for (const std::unique_ptr<PrintRegion>& pr : print_object_regions.all_regions) {
|
||||
if (pr.get()) {
|
||||
std::vector<ExPolygons>& region_polys = slices_by_region[pr->print_object_region_id()];
|
||||
const size_t extruder_id = pr->extruder(FlowRole::frPerimeter) - 1;
|
||||
double scale = print_config.filament_shrink.values[extruder_id] * 0.01;
|
||||
if (scale != 1) {
|
||||
scale = 1 / scale;
|
||||
for (ExPolygons& polys : region_polys)
|
||||
for (ExPolygon& poly : polys)
|
||||
poly.scale(scale);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return slices_by_region;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue