Debugging code: Storing the test STLs inlined in the Perl code into a file.

This commit is contained in:
bubnikv 2016-09-13 09:48:29 +02:00
parent 068f71847e
commit 6dfe4c0b96

View file

@ -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,