Merge branch 'tm_openvdb_integration' into lm_tm_hollowing

* Refactor file names in SLA dir
This commit is contained in:
tamasmeszaros 2019-11-11 11:41:14 +01:00
commit c22423a219
55 changed files with 1644 additions and 592 deletions
src/libslic3r

View file

@ -1146,7 +1146,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.
@ -1154,7 +1155,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);