mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-05-16 18:12:10 +00:00
Translation of ModelVolume as transformation component (without modifying the mesh)
This commit is contained in:
@@ -1601,7 +1601,15 @@ std::vector<ExPolygons> PrintObject::_slice_volumes(const std::vector<float> &z,
|
||||
//FIXME better to perform slicing over each volume separately and then to use a Boolean operation to merge them.
|
||||
TriangleMesh mesh;
|
||||
for (const ModelVolume *v : volumes)
|
||||
mesh.merge(v->mesh);
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
{
|
||||
TriangleMesh vol_mesh(v->mesh);
|
||||
vol_mesh.transform(v->get_matrix().cast<float>());
|
||||
mesh.merge(vol_mesh);
|
||||
}
|
||||
#else
|
||||
mesh.merge(v->mesh);
|
||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||
if (mesh.stl.stats.number_of_facets > 0) {
|
||||
mesh.transform(m_trafo.cast<float>());
|
||||
// apply XY shift
|
||||
|
||||
Reference in New Issue
Block a user