mirror of
https://git.mirrors.martin98.com/https://github.com/slic3r/Slic3r.git
synced 2025-08-04 07:20:41 +08:00
debug prints
This commit is contained in:
parent
eca35851c4
commit
dfee4477b3
@ -609,7 +609,7 @@ TriangleMesh
|
||||
ModelObject::mesh() const
|
||||
{
|
||||
TriangleMesh mesh;
|
||||
|
||||
|
||||
for (ModelInstancePtrs::const_iterator i = this->instances.begin(); i != this->instances.end(); ++i) {
|
||||
TransformationMatrix instance_trafo = (*i)->get_trafo_matrix();
|
||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||
@ -731,6 +731,20 @@ ModelObject::translate(coordf_t x, coordf_t y, coordf_t z)
|
||||
{
|
||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||
(*v)->trafo.translate(x, y, z);
|
||||
printf("Translate obj trafo: %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f\n",
|
||||
((*v)->trafo.m11),
|
||||
((*v)->trafo.m12),
|
||||
((*v)->trafo.m13),
|
||||
((*v)->trafo.m14),
|
||||
((*v)->trafo.m21),
|
||||
((*v)->trafo.m22),
|
||||
((*v)->trafo.m23),
|
||||
((*v)->trafo.m24),
|
||||
((*v)->trafo.m31),
|
||||
((*v)->trafo.m32),
|
||||
((*v)->trafo.m33),
|
||||
((*v)->trafo.m34)
|
||||
);
|
||||
}
|
||||
if (this->_bounding_box_valid) this->_bounding_box.translate(x, y, z);
|
||||
}
|
||||
@ -747,6 +761,20 @@ ModelObject::scale(const Pointf3 &versor)
|
||||
if (versor.x == 1 && versor.y == 1 && versor.z == 1) return;
|
||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||
(*v)->trafo.scale(versor.x, versor.y, versor.z);
|
||||
printf("Scale obj trafo: %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f\n",
|
||||
((*v)->trafo.m11),
|
||||
((*v)->trafo.m12),
|
||||
((*v)->trafo.m13),
|
||||
((*v)->trafo.m14),
|
||||
((*v)->trafo.m21),
|
||||
((*v)->trafo.m22),
|
||||
((*v)->trafo.m23),
|
||||
((*v)->trafo.m24),
|
||||
((*v)->trafo.m31),
|
||||
((*v)->trafo.m32),
|
||||
((*v)->trafo.m33),
|
||||
((*v)->trafo.m34)
|
||||
);
|
||||
}
|
||||
|
||||
// reset origin translation since it doesn't make sense anymore
|
||||
@ -774,6 +802,20 @@ ModelObject::rotate(float angle, const Axis &axis)
|
||||
if (angle == 0) return;
|
||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||
(*v)->trafo.rotate(angle, axis);
|
||||
printf("Rotation obj trafo: %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f\n",
|
||||
((*v)->trafo.m11),
|
||||
((*v)->trafo.m12),
|
||||
((*v)->trafo.m13),
|
||||
((*v)->trafo.m14),
|
||||
((*v)->trafo.m21),
|
||||
((*v)->trafo.m22),
|
||||
((*v)->trafo.m23),
|
||||
((*v)->trafo.m24),
|
||||
((*v)->trafo.m31),
|
||||
((*v)->trafo.m32),
|
||||
((*v)->trafo.m33),
|
||||
((*v)->trafo.m34)
|
||||
);
|
||||
}
|
||||
this->origin_translation = Pointf3(0,0,0);
|
||||
this->invalidate_bounding_box();
|
||||
@ -784,6 +826,20 @@ ModelObject::mirror(const Axis &axis)
|
||||
{
|
||||
for (ModelVolumePtrs::const_iterator v = this->volumes.begin(); v != this->volumes.end(); ++v) {
|
||||
(*v)->trafo.mirror(axis);
|
||||
printf("Mirror obj trafo: %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f; %.1f, %.1f, %.1f, %.1f\n",
|
||||
((*v)->trafo.m11),
|
||||
((*v)->trafo.m12),
|
||||
((*v)->trafo.m13),
|
||||
((*v)->trafo.m14),
|
||||
((*v)->trafo.m21),
|
||||
((*v)->trafo.m22),
|
||||
((*v)->trafo.m23),
|
||||
((*v)->trafo.m24),
|
||||
((*v)->trafo.m31),
|
||||
((*v)->trafo.m32),
|
||||
((*v)->trafo.m33),
|
||||
((*v)->trafo.m34)
|
||||
);
|
||||
}
|
||||
this->origin_translation = Pointf3(0,0,0);
|
||||
this->invalidate_bounding_box();
|
||||
|
Loading…
x
Reference in New Issue
Block a user