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
diff options
context:
space:
mode:
authorenricoturri1966 <enricoturri@seznam.cz>2022-05-12 13:07:27 +0300
committerenricoturri1966 <enricoturri@seznam.cz>2022-06-06 11:17:43 +0300
commit3fcfd04921a4eed5fca2b7e16d46eb92fd0de26e (patch)
treea4f1b880fabe5c82792f19a31f9c2483ee745be4
parentfd45d0eeed99df3f9c5f0aa50e55db2d667cbaad (diff)
Tech ENABLE_TRANSFORMATIONS_BY_MATRICES - Fixed translation of volumes in local coordinate system
Fixed conflicts during rebase with master
-rw-r--r--src/slic3r/GUI/Selection.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/slic3r/GUI/Selection.cpp b/src/slic3r/GUI/Selection.cpp
index 346d0fe9b..b6d9cfbd4 100644
--- a/src/slic3r/GUI/Selection.cpp
+++ b/src/slic3r/GUI/Selection.cpp
@@ -783,8 +783,11 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor
else
assert(false);
}
- else
- transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(displacement));
+ else {
+ const Vec3d offset = transformation_type.local() ?
+ volume_data.get_volume_transform().get_rotation_matrix() * displacement : displacement;
+ transform_volume_relative(v, volume_data, transformation_type, Geometry::translation_transform(offset));
+ }
}
#if !DISABLE_INSTANCES_SYNCH