mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-08-07 05:54:03 -06:00
Ported ExtrusionPath::Collection->chained_path
This commit is contained in:
parent
ea1d138c95
commit
bd7b0e2aed
11 changed files with 170 additions and 57 deletions
8
t/fill.t
8
t/fill.t
|
@ -115,7 +115,7 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
|
|||
Slic3r::Polyline->new([0,10], [0,8], [0,5]),
|
||||
]);
|
||||
is_deeply
|
||||
[ map $_->[Y], map @$_, $collection->chained_path(Slic3r::Point->new(0,30)) ],
|
||||
[ map $_->[Y], map @$_, $collection->chained_path(Slic3r::Point->new(0,30), 0) ],
|
||||
[20, 18, 15, 10, 8, 5],
|
||||
'chained path';
|
||||
}
|
||||
|
@ -126,7 +126,7 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
|
|||
Slic3r::Polyline->new([10,5], [15,5], [20,5]),
|
||||
]);
|
||||
is_deeply
|
||||
[ map $_->[X], map @$_, $collection->chained_path(Slic3r::Point->new(30,0)) ],
|
||||
[ map $_->[X], map @$_, $collection->chained_path(Slic3r::Point->new(30,0), 0) ],
|
||||
[reverse 4, 10, 15, 10, 15, 20],
|
||||
'chained path';
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
|
|||
Slic3r::Polyline->new([0,10], [0,8], [0,5]),
|
||||
);
|
||||
is_deeply
|
||||
[ map $_->[Y], map @{$_->polyline}, $collection->chained_path(Slic3r::Point->new(0,30)) ],
|
||||
[ map $_->[Y], map @{$_->polyline}, @{$collection->chained_path_from(Slic3r::Point->new(0,30), 0)} ],
|
||||
[20, 18, 15, 10, 8, 5],
|
||||
'chained path';
|
||||
}
|
||||
|
@ -150,7 +150,7 @@ sub scale_points (@) { map [scale $_->[X], scale $_->[Y]], @_ }
|
|||
Slic3r::Polyline->new([10,5], [15,5], [20,5]),
|
||||
);
|
||||
is_deeply
|
||||
[ map $_->[X], map @{$_->polyline}, $collection->chained_path(Slic3r::Point->new(30,0)) ],
|
||||
[ map $_->[X], map @{$_->polyline}, @{$collection->chained_path_from(Slic3r::Point->new(30,0), 0)} ],
|
||||
[reverse 4, 10, 15, 10, 15, 20],
|
||||
'chained path';
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue