Refactoring: move ooze prevention, wipe and avoid crossing perimeters into nested classes for better isolation

This commit is contained in:
Alessandro Ranellucci 2014-11-23 15:13:40 +01:00
parent 3605289bbc
commit c1e26a70f8
5 changed files with 207 additions and 170 deletions

View file

@ -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);
}
}