Adapt SectionCut to the new APIs

This commit is contained in:
Alessandro Ranellucci 2014-12-26 18:57:21 +01:00
parent 5dc635b0b1
commit b5b0df2426

View File

@ -84,14 +84,14 @@ sub _plot {
foreach my $copy (@{$object->_shifted_copies}) {
foreach my $layer (@{$object->layers}, @{$object->support_layers}) {
# get all ExtrusionPath objects
my @paths =
map { $_->isa('Slic3r::ExtrusionLoop') ? $_->split_at_first_point : $_->clone }
map { $_->isa('Slic3r::ExtrusionPath::Collection') ? @$_ : $_ }
my @paths = map $_->clone,
map { ($_->isa('Slic3r::ExtrusionLoop') || $_->isa('Slic3r::ExtrusionPath::Collection')) ? @$_ : $_ }
grep defined $_,
$filter->($layer);
$_->polyline->translate(@$copy) for @paths;
if (0) {
require "Slic3r/SVG.pm";
Slic3r::SVG::output(
"line.svg",
@ -102,6 +102,7 @@ sub _plot {
red_polylines => [ map $_->polyline, @paths ],
);
exit;
}
foreach my $path (@paths) {
foreach my $line (@{$path->lines}) {