Reorder object copies using a nearest neighbor search

This commit is contained in:
Alessandro Ranellucci 2013-03-16 20:56:14 +01:00
parent cf5adca928
commit 25554a345f
2 changed files with 11 additions and 3 deletions

View file

@ -134,7 +134,7 @@ sub add_model {
if ($object->instances) {
# replace the default [0,0] instance with the custom ones
@{$print_object->copies} = map [ scale $_->offset->[X], scale $_->offset->[Y] ], @{$object->instances};
$print_object->copies([ map [ scale $_->offset->[X], scale $_->offset->[Y] ], @{$object->instances} ]);
}
}
}