Refactoring: moved the ooze prevention logic into a separate class with hooks

This commit is contained in:
Alessandro Ranellucci 2014-10-18 17:58:14 +02:00
parent e521475b7e
commit f8967418b9
4 changed files with 61 additions and 27 deletions

View file

@ -842,7 +842,11 @@ sub write_gcode {
$s->translate(map scale($_), @{$self->config->get_at('extruder_offset', $extruder_id)});
}
my $convex_hull = convex_hull([ map @$_, @skirts ]);
$gcodegen->standby_points([ map $_->clone, map @$_, map $_->subdivide(scale 10), @{offset([$convex_hull], scale 3)} ]);
my $oozeprev = Slic3r::GCode::OozePrevention->new(
standby_points => [ map $_->clone, map @$_, map $_->subdivide(scale 10), @{offset([$convex_hull], scale 3)} ],
);
$gcodegen->ooze_prevention($oozeprev);
}
}