mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-24 23:23:59 -06:00
Refactoring: move ooze prevention, wipe and avoid crossing perimeters into nested classes for better isolation
This commit is contained in:
parent
3605289bbc
commit
c1e26a70f8
5 changed files with 207 additions and 170 deletions
|
@ -552,7 +552,7 @@ sub write_gcode {
|
|||
}
|
||||
}
|
||||
}
|
||||
$gcodegen->init_external_mp(union_ex([ map @$_, @islands ]));
|
||||
$gcodegen->avoid_crossing_perimeters->init_external_mp(union_ex([ map @$_, @islands ]));
|
||||
}
|
||||
|
||||
# calculate wiping points if needed
|
||||
|
@ -567,10 +567,10 @@ sub write_gcode {
|
|||
}
|
||||
my $convex_hull = convex_hull([ map @$_, @skirts ]);
|
||||
|
||||
my $oozeprev = Slic3r::GCode::OozePrevention->new(
|
||||
standby_points => [ map $_->clone, map @$_, map $_->subdivide(scale 10), @{offset([$convex_hull], scale 3)} ],
|
||||
$gcodegen->ooze_prevention->enable(1);
|
||||
$gcodegen->ooze_prevention->standby_points(
|
||||
[ map $_->clone, map @$_, map $_->subdivide(scale 10), @{offset([$convex_hull], scale 3)} ]
|
||||
);
|
||||
$gcodegen->ooze_prevention($oozeprev);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue