From 6dfe4c0b964a7063bf2d52b2bd89cdbbed59a2c1 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Tue, 13 Sep 2016 09:48:29 +0200 Subject: [PATCH] Debugging code: Storing the test STLs inlined in the Perl code into a file. --- lib/Slic3r/Test.pm | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/Slic3r/Test.pm b/lib/Slic3r/Test.pm index 1d8431b14e..f41b181f33 100644 --- a/lib/Slic3r/Test.pm +++ b/lib/Slic3r/Test.pm @@ -139,11 +139,15 @@ sub mesh { sub model { my ($model_name, %params) = @_; + + my $input_file = "${model_name}.stl"; + my $mesh = mesh($model_name, %params); +# $mesh->write_ascii("out/$input_file"); my $model = Slic3r::Model->new; - my $object = $model->add_object(input_file => "${model_name}.stl"); + my $object = $model->add_object(input_file => $input_file); $model->set_material($model_name); - $object->add_volume(mesh => mesh($model_name, %params), material_id => $model_name); + $object->add_volume(mesh => $mesh, material_id => $model_name); $object->add_instance( offset => Slic3r::Pointf->new(0,0), rotation => $params{rotation} // 0,