mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Added method ModelObject::full_raw_mesh()
This commit is contained in:
parent
334f747fa9
commit
a394e55e07
2 changed files with 21 additions and 0 deletions
|
@ -809,6 +809,25 @@ TriangleMesh ModelObject::raw_mesh() const
|
||||||
return mesh;
|
return mesh;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Non-transformed (non-rotated, non-scaled, non-translated) sum of all object volumes.
|
||||||
|
TriangleMesh ModelObject::full_raw_mesh() const
|
||||||
|
{
|
||||||
|
TriangleMesh mesh;
|
||||||
|
for (const ModelVolume *v : this->volumes)
|
||||||
|
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||||
|
{
|
||||||
|
TriangleMesh vol_mesh(v->mesh);
|
||||||
|
vol_mesh.transform(v->get_matrix());
|
||||||
|
mesh.merge(vol_mesh);
|
||||||
|
}
|
||||||
|
#else
|
||||||
|
{
|
||||||
|
mesh.merge(v->mesh);
|
||||||
|
}
|
||||||
|
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||||
|
return mesh;
|
||||||
|
}
|
||||||
|
|
||||||
// A transformed snug bounding box around the non-modifier object volumes, without the translation applied.
|
// A transformed snug bounding box around the non-modifier object volumes, without the translation applied.
|
||||||
// This bounding box is only used for the actual slicing.
|
// This bounding box is only used for the actual slicing.
|
||||||
BoundingBoxf3 ModelObject::raw_bounding_box() const
|
BoundingBoxf3 ModelObject::raw_bounding_box() const
|
||||||
|
|
|
@ -218,6 +218,8 @@ public:
|
||||||
// Non-transformed (non-rotated, non-scaled, non-translated) sum of non-modifier object volumes.
|
// Non-transformed (non-rotated, non-scaled, non-translated) sum of non-modifier object volumes.
|
||||||
// Currently used by ModelObject::mesh() and to calculate the 2D envelope for 2D platter.
|
// Currently used by ModelObject::mesh() and to calculate the 2D envelope for 2D platter.
|
||||||
TriangleMesh raw_mesh() const;
|
TriangleMesh raw_mesh() const;
|
||||||
|
// Non-transformed (non-rotated, non-scaled, non-translated) sum of all object volumes.
|
||||||
|
TriangleMesh full_raw_mesh() const;
|
||||||
// A transformed snug bounding box around the non-modifier object volumes, without the translation applied.
|
// A transformed snug bounding box around the non-modifier object volumes, without the translation applied.
|
||||||
// This bounding box is only used for the actual slicing.
|
// This bounding box is only used for the actual slicing.
|
||||||
BoundingBoxf3 raw_bounding_box() const;
|
BoundingBoxf3 raw_bounding_box() const;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue