Merge remote-tracking branch 'PRIVATE/master' into ys_cut

This commit is contained in:
YuSanka 2022-10-03 11:30:49 +02:00
commit b4f38883a8
40 changed files with 2703 additions and 3057 deletions

View file

@ -1619,7 +1619,7 @@ void ModelObject::split(ModelObjectPtrs* new_objects)
size_t counter = 1;
for (TriangleMesh &mesh : meshes) {
// FIXME: crashes if not satisfied
if (mesh.facets_count() < 3)
if (mesh.facets_count() < 3 || mesh.has_zero_volume())
continue;
// XXX: this seems to be the only real usage of m_model, maybe refactor this so that it's not needed?
@ -2093,7 +2093,7 @@ size_t ModelVolume::split(unsigned int max_extruders)
const Vec3d offset = this->get_offset();
for (TriangleMesh &mesh : meshes) {
if (mesh.empty())
if (mesh.empty() || mesh.has_zero_volume())
// Repair may have removed unconnected triangles, thus emptying the mesh.
continue;