Refactoring to Model API for making it stricter and safer

This commit is contained in:
Alessandro Ranellucci 2014-05-09 14:24:35 +02:00
parent bc023c2d51
commit 7ba08c90cf
17 changed files with 316 additions and 317 deletions

View file

@ -18,7 +18,7 @@ $ARGV[0] or usage(1);
if (-e $ARGV[0]) {
my $model = Slic3r::Format::STL->read_file($ARGV[0]);
$model->objects->[0]->add_instance(offset => [0,0]);
$model->objects->[0]->add_instance(offset => Slic3r::Pointf->new(0,0));
my $mesh = $model->mesh;
$mesh->repair;
printf "VERTICES = %s\n", join ',', map "[$_->[0],$_->[1],$_->[2]]", @{$mesh->vertices};