Fixed splitting of triangle meshes, where the splitting function

may produce a single triangle, which is then removed by the repair function.
This commit is contained in:
Vojtech Bubnik 2021-07-29 15:02:16 +02:00
parent ee96282ffc
commit 1659e4c77f

View File

@ -1699,6 +1699,10 @@ size_t ModelVolume::split(unsigned int max_extruders)
for (TriangleMesh *mesh : meshptrs) {
mesh->repair();
if (mesh->empty())
// Repair may have removed unconnected triangles, thus emptying the mesh.
continue;
if (idx == 0)
{
this->set_mesh(std::move(*mesh));