Test.pm modified to use ModelInstance full 3D transform

This commit is contained in:
Enrico Turri 2018-09-25 09:21:38 +02:00
parent 0e1843a871
commit 197600d452

View File

@ -158,8 +158,12 @@ sub model {
$object->add_volume(mesh => $mesh, material_id => $model_name); $object->add_volume(mesh => $mesh, material_id => $model_name);
$object->add_instance( $object->add_instance(
offset => Slic3r::Pointf->new(0,0), offset => Slic3r::Pointf->new(0,0),
rotation => $params{rotation} // 0, # 3D full transform
scaling_factor => $params{scale} // 1, rotation => Slic3r::Pointf3->new(0, 0, $params{rotation} // 0),
scaling_factor => Slic3r::Pointf3->new($params{scale} // 1, $params{scale} // 1, $params{scale} // 1),
# old transform
# rotation => $params{rotation} // 0,
# scaling_factor => $params{scale} // 1,
); );
return $model; return $model;
} }