Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/xs
diff options
context:
space:
mode:
authorEnrico Turri <enricoturri@seznam.cz>2018-09-24 16:21:18 +0300
committerEnrico Turri <enricoturri@seznam.cz>2018-09-24 16:21:18 +0300
commite3d44b07fec13e1a9ead40bb954f48914cac6ad1 (patch)
treeb140de002d56ded37cef3e7c1a79f5e57a1457de /xs
parent270341300fb2af96ea3e3db9662fe48aeaf76ea8 (diff)
Fixed arrange for objects with 3D rotations
Diffstat (limited to 'xs')
-rw-r--r--xs/src/libslic3r/ModelArrange.hpp3
-rw-r--r--xs/xsp/Model.xsp4
2 files changed, 3 insertions, 4 deletions
diff --git a/xs/src/libslic3r/ModelArrange.hpp b/xs/src/libslic3r/ModelArrange.hpp
index 9f983ee9f..b203193ef 100644
--- a/xs/src/libslic3r/ModelArrange.hpp
+++ b/xs/src/libslic3r/ModelArrange.hpp
@@ -687,8 +687,7 @@ void applyResult(
// write the transformation data into the model instance
#if ENABLE_MODELINSTANCE_3D_ROTATION
- // CHECK_ME -> Is the following correct ?
- inst_ptr->set_rotation(Vec3d(0.0, 0.0, rot));
+ inst_ptr->set_rotation(Z, rot);
#else
inst_ptr->rotation = rot;
#endif // ENABLE_MODELINSTANCE_3D_ROTATION
diff --git a/xs/xsp/Model.xsp b/xs/xsp/Model.xsp
index 892ecd861..d5192cf8e 100644
--- a/xs/xsp/Model.xsp
+++ b/xs/xsp/Model.xsp
@@ -365,8 +365,8 @@ ModelMaterial::attributes()
%code%{ RETVAL = THIS->get_object(); %};
#if ENABLE_MODELINSTANCE_3D_ROTATION
- double rotation()
- %code%{ RETVAL = THIS->get_rotation(Z); %};
+ Vec3d* rotation()
+ %code%{ RETVAL = new Vec3d(THIS->get_rotation(X), THIS->get_rotation(Y), THIS->get_rotation(Z)); %};
#else
double rotation()
%code%{ RETVAL = THIS->rotation; %};