Removed chained_path_items()

This commit is contained in:
Alessandro Ranellucci 2013-11-23 21:47:33 +01:00
parent 0045f84ed2
commit 30297ee4dc
3 changed files with 9 additions and 23 deletions

View file

@ -10,15 +10,15 @@ our @EXPORT_OK = qw(offset offset_ex
intersection intersection_pl diff_pl union CLIPPER_OFFSET_SCALE);
use Slic3r::Geometry qw(scale);
use Slic3r::Geometry qw(chained_path);
sub traverse_pt {
my ($polynodes) = @_;
# use a nearest neighbor search to order these children
# TODO: supply second argument to chained_path_items() too?
my @nodes = @{Slic3r::Geometry::chained_path_items(
[ map [ ($_->{outer} ? $_->{outer}[0] : $_->{hole}[0]), $_ ], @$polynodes ],
)};
# TODO: supply second argument to chained_path() too?
my @ordering_points = map { ($_->{outer} // $_->{hole})->first_point } @$polynodes;
my @nodes = @$polynodes[ @{chained_path(\@ordering_points)} ];
my @polygons = ();
foreach my $polynode (@$polynodes) {