diff options
author | tamasmeszaros <meszaros.q@gmail.com> | 2019-11-06 15:38:43 +0300 |
---|---|---|
committer | tamasmeszaros <meszaros.q@gmail.com> | 2019-11-06 15:38:43 +0300 |
commit | bdf6f7342ef539a3f198aa0446311b3add9bd820 (patch) | |
tree | 8af25b2e44dfba20c9d7b45b0fdf8fa3e9433ab3 /src/libslic3r/Model.cpp | |
parent | f913be2d93ff69c0fdf2f6db36cb735ed7f48fb3 (diff) |
Hollowing step in SLAPrint process, PrintConfig params added.
Diffstat (limited to 'src/libslic3r/Model.cpp')
-rw-r--r-- | src/libslic3r/Model.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/libslic3r/Model.cpp b/src/libslic3r/Model.cpp index 061c5bd50..607f11bc6 100644 --- a/src/libslic3r/Model.cpp +++ b/src/libslic3r/Model.cpp @@ -1142,7 +1142,8 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b if (keep_upper) { upper->add_volume(*volume); } if (keep_lower) { lower->add_volume(*volume); } } - else { + else if (! volume->mesh().empty()) { + TriangleMesh upper_mesh, lower_mesh; // Transform the mesh by the combined transformation matrix. @@ -1150,7 +1151,9 @@ ModelObjectPtrs ModelObject::cut(size_t instance, coordf_t z, bool keep_upper, b TriangleMesh mesh(volume->mesh()); mesh.transform(instance_matrix * volume_matrix, true); volume->reset_mesh(); - + + mesh.require_shared_vertices(); + // Perform cut TriangleMeshSlicer tms(&mesh); tms.cut(float(z), &upper_mesh, &lower_mesh); |