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 2019-04-15 21:58:13 +02:00
parent a177a7e1da
commit f33e9bf609
8 changed files with 18 additions and 9 deletions
src/libslic3r

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);