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());
|
||||
for (indexed_triangle_set &m : itss) {
|
||||
// The TriangleMesh constructor shall fill in the mesh statistics including volume.
|
||||
out.emplace_back(std::move(m));
|
||||
if (TriangleMesh &triangle_mesh = out.back(); triangle_mesh.volume() < 0)
|
||||
// Some source mesh parts may be incorrectly oriented. Correct them.
|
||||
triangle_mesh.flip_triangles();
|
||||
|
||||
TriangleMesh temp_triangle_mesh(std::move(m));
|
||||
if (abs(temp_triangle_mesh.volume()< 0.01)) {//0.01mm^3
|
||||
continue;
|
||||
}
|
||||
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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue