FIX:mesh's volume <0.01mm^3,should ignore
jira: STUDIO-7808 Change-Id: Ie6d1b60314cc2303c96f2f29a08eedc6ee66b06c
This commit is contained in:
parent
4bf4e1bb91
commit
438d9201fc
|
@ -394,11 +394,14 @@ std::vector<TriangleMesh> TriangleMesh::split() const
|
||||||
out.reserve(itss.size());
|
out.reserve(itss.size());
|
||||||
for (indexed_triangle_set &m : itss) {
|
for (indexed_triangle_set &m : itss) {
|
||||||
// The TriangleMesh constructor shall fill in the mesh statistics including volume.
|
// The TriangleMesh constructor shall fill in the mesh statistics including volume.
|
||||||
out.emplace_back(std::move(m));
|
TriangleMesh temp_triangle_mesh(std::move(m));
|
||||||
if (TriangleMesh &triangle_mesh = out.back(); triangle_mesh.volume() < 0)
|
if (abs(temp_triangle_mesh.volume()< 0.01)) {//0.01mm^3
|
||||||
// Some source mesh parts may be incorrectly oriented. Correct them.
|
continue;
|
||||||
triangle_mesh.flip_triangles();
|
}
|
||||||
|
if (temp_triangle_mesh.volume() < 0) {// Some source mesh parts may be incorrectly oriented. Correct them.
|
||||||
|
temp_triangle_mesh.flip_triangles();
|
||||||
|
}
|
||||||
|
out.emplace_back(temp_triangle_mesh);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue