TriangleMeshSlicer is now initialized by const-pointer to the mesh, responsibility for calling require_shared_vertices is left to the caller

This commit is contained in:
Lukas Matena committed 2019-04-16 09:04:04 +02:00
1 parent a177a7e1da
commit f33e9bf609
8 files changed
+18 -9

No files matched your search

+1
View File
@@ -1189,6 +1189,7 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b
volume->mesh.transform(instance_matrix * volume_matrix, true);
// Perform cut
volume->mesh.require_shared_vertices(); // TriangleMeshSlicer needs this
TriangleMeshSlicer tms(&volume->mesh);
tms.cut(float(z), &upper_mesh, &lower_mesh);