From c2021aa1dfc0430f84f4ba0ff7114c538e3f977c Mon Sep 17 00:00:00 2001 From: Michael Kirsch Date: Sun, 26 May 2019 19:19:30 +0200 Subject: [PATCH] change some parameters from float to double --- xs/src/libslic3r/Model.cpp | 6 +++--- xs/src/libslic3r/Model.hpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/xs/src/libslic3r/Model.cpp b/xs/src/libslic3r/Model.cpp index 68c3d2b05..e9f0965a9 100644 --- a/xs/src/libslic3r/Model.cpp +++ b/xs/src/libslic3r/Model.cpp @@ -737,7 +737,7 @@ ModelObject::translate(coordf_t x, coordf_t y, coordf_t z) } void -ModelObject::scale(float factor) +ModelObject::scale(double factor) { this->scale(Pointf3(factor, factor, factor)); } @@ -759,7 +759,7 @@ void ModelObject::scale_to_fit(const Sizef3 &size) { Sizef3 orig_size = this->bounding_box().size(); - float factor = fminf( + double factor = fminf( size.x / orig_size.x, fminf( size.y / orig_size.y, @@ -770,7 +770,7 @@ ModelObject::scale_to_fit(const Sizef3 &size) } void -ModelObject::rotate(float angle, const Axis &axis) +ModelObject::rotate(double angle, const Axis &axis) { if (angle == 0) return; for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) { diff --git a/xs/src/libslic3r/Model.hpp b/xs/src/libslic3r/Model.hpp index 34d1b2a32..d0c4d6517 100644 --- a/xs/src/libslic3r/Model.hpp +++ b/xs/src/libslic3r/Model.hpp @@ -371,8 +371,8 @@ class ModelObject /// Scale the current ModelObject by scaling its ModelVolumes. /// This function calls scale(const Pointf3 &versor) to scale every TriangleMesh in each ModelVolume. - /// \param factor float the scaling factor - void scale(float factor); + /// \param factor double the scaling factor + void scale(double factor); /// Scale the current ModelObject by scaling its ModelVolumes. /// \param versor Pointf3 the scaling factor in a 3d vector. @@ -384,9 +384,9 @@ class ModelObject void scale_to_fit(const Sizef3 &size); /// Rotate the current ModelObject by rotating ModelVolumes. - /// \param angle float the angle in radians + /// \param angle double the angle in radians /// \param axis Axis the axis to be rotated around - void rotate(float angle, const Axis &axis); + void rotate(double angle, const Axis &axis); /// Mirror the current Model around a certain axis. /// \param axis Axis enum member