mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-10-04 01:36:46 +08:00
change some parameters from float to double
This commit is contained in:
parent
52306da16d
commit
c2021aa1df
@ -737,7 +737,7 @@ ModelObject::translate(coordf_t x, coordf_t y, coordf_t z)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ModelObject::scale(float factor)
|
ModelObject::scale(double factor)
|
||||||
{
|
{
|
||||||
this->scale(Pointf3(factor, factor, factor));
|
this->scale(Pointf3(factor, factor, factor));
|
||||||
}
|
}
|
||||||
@ -759,7 +759,7 @@ void
|
|||||||
ModelObject::scale_to_fit(const Sizef3 &size)
|
ModelObject::scale_to_fit(const Sizef3 &size)
|
||||||
{
|
{
|
||||||
Sizef3 orig_size = this->bounding_box().size();
|
Sizef3 orig_size = this->bounding_box().size();
|
||||||
float factor = fminf(
|
double factor = fminf(
|
||||||
size.x / orig_size.x,
|
size.x / orig_size.x,
|
||||||
fminf(
|
fminf(
|
||||||
size.y / orig_size.y,
|
size.y / orig_size.y,
|
||||||
@ -770,7 +770,7 @@ ModelObject::scale_to_fit(const Sizef3 &size)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
ModelObject::rotate(float angle, const Axis &axis)
|
ModelObject::rotate(double angle, const Axis &axis)
|
||||||
{
|
{
|
||||||
if (angle == 0) return;
|
if (angle == 0) return;
|
||||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||||
|
@ -371,8 +371,8 @@ class ModelObject
|
|||||||
|
|
||||||
/// Scale the current ModelObject by scaling its ModelVolumes.
|
/// Scale the current ModelObject by scaling its ModelVolumes.
|
||||||
/// This function calls scale(const Pointf3 &versor) to scale every TriangleMesh in each ModelVolume.
|
/// This function calls scale(const Pointf3 &versor) to scale every TriangleMesh in each ModelVolume.
|
||||||
/// \param factor float the scaling factor
|
/// \param factor double the scaling factor
|
||||||
void scale(float factor);
|
void scale(double factor);
|
||||||
|
|
||||||
/// Scale the current ModelObject by scaling its ModelVolumes.
|
/// Scale the current ModelObject by scaling its ModelVolumes.
|
||||||
/// \param versor Pointf3 the scaling factor in a 3d vector.
|
/// \param versor Pointf3 the scaling factor in a 3d vector.
|
||||||
@ -384,9 +384,9 @@ class ModelObject
|
|||||||
void scale_to_fit(const Sizef3 &size);
|
void scale_to_fit(const Sizef3 &size);
|
||||||
|
|
||||||
/// Rotate the current ModelObject by rotating ModelVolumes.
|
/// 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
|
/// \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.
|
/// Mirror the current Model around a certain axis.
|
||||||
/// \param axis Axis enum member
|
/// \param axis Axis enum member
|
||||||
|
Loading…
x
Reference in New Issue
Block a user