1
0
mirror of https://github.com/FULU-Foundation/OrcaSlicer-bambulab.git synced 2026-07-25 10:15:50 +00:00

Code cleanup

This commit is contained in:
Enrico Turri
2018-09-13 16:08:19 +02:00
parent af19713a27
commit 3faaff85d5
14 changed files with 2 additions and 164 deletions
-8
View File
@@ -1252,17 +1252,13 @@ namespace Slic3r {
// we extract from the given matrix only the values currently used
// translation
//################################################################################################################################
#if ENABLE_MODELINSTANCE_3D_OFFSET
Vec3d offset(transform(0, 3), transform(1, 3), transform(2, 3));
#else
//################################################################################################################################
double offset_x = transform(0, 3);
double offset_y = transform(1, 3);
double offset_z = transform(2, 3);
//################################################################################################################################
#endif // ENABLE_MODELINSTANCE_3D_OFFSET
//################################################################################################################################
// scale
double sx = ::sqrt(sqr(transform(0, 0)) + sqr(transform(1, 0)) + sqr(transform(2, 0)));
@@ -1295,16 +1291,12 @@ namespace Slic3r {
double angle_z = (rotation.axis() == Vec3d::UnitZ()) ? rotation.angle() : -rotation.angle();
//################################################################################################################################
#if ENABLE_MODELINSTANCE_3D_OFFSET
instance.set_offset(offset);
#else
//################################################################################################################################
instance.offset(0) = offset_x;
instance.offset(1) = offset_y;
//################################################################################################################################
#endif // ENABLE_MODELINSTANCE_3D_OFFSET
//################################################################################################################################
instance.scaling_factor = sx;
instance.rotation = angle_z;
}