From b9975a5e14ea1f6c8d709dbdc74e2b52ea5954c0 Mon Sep 17 00:00:00 2001 From: wmayer Date: Mon, 1 Jan 2018 16:45:06 +0100 Subject: [PATCH] fix OpenSCAD importer --- src/Base/Rotation.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/Base/Rotation.cpp b/src/Base/Rotation.cpp index fbb66e65e4..cb64d809b8 100644 --- a/src/Base/Rotation.cpp +++ b/src/Base/Rotation.cpp @@ -51,7 +51,6 @@ Rotation::Rotation(const Vector3d& axis, const double fAngle) Rotation::Rotation(const Matrix4D& matrix) { - _axis.Set(0.0, 0.0, 1.0); this->setValue(matrix); } @@ -61,8 +60,6 @@ Rotation::Rotation(const Matrix4D& matrix) */ Rotation::Rotation(const double q[4]) { - _axis.Set(0.0, 0.0, 1.0); - _angle = 0.0; this->setValue(q); } @@ -72,15 +69,11 @@ Rotation::Rotation(const double q[4]) */ Rotation::Rotation(const double q0, const double q1, const double q2, const double q3) { - _axis.Set(0.0, 0.0, 1.0); - _angle = 0.0; this->setValue(q0, q1, q2, q3); } Rotation::Rotation(const Vector3d & rotateFrom, const Vector3d & rotateTo) { - _axis.Set(0.0, 0.0, 1.0); - _angle = 0.0; this->setValue(rotateFrom, rotateTo); } @@ -94,7 +87,7 @@ Rotation::Rotation(const Rotation& rot) this->_axis[0] = rot._axis[0]; this->_axis[1] = rot._axis[1]; this->_axis[2] = rot._axis[2]; - this->_angle = rot._angle; + this->_angle = rot._angle; } const double * Rotation::getValue(void) const @@ -126,12 +119,9 @@ void Rotation::evaluateVector() this->_axis.z = this->quat[2] * l / scale; _angle = rfAngle; - if (_angle >= D_PI) { - _angle -= 2 * D_PI; - } } else { - // the vector stays unchanged + _axis.Set(0.0, 0.0, 1.0); _angle = 0.0; } }