Fix T92355: Quadriflow crashes with zero length edges
Add a check for zero length edges to the manifold check as quadriflow doesn't handle meshes with these.
This commit is contained in:
parent
91b4c1841a
commit
10fb5cc58d
Notes:
blender-bot
2023-02-14 06:00:50 +01:00
Referenced by issue #88449: Blender LTS: Maintenance Task 2.93 Referenced by issue #88449, Blender LTS: Maintenance Task 2.93 Referenced by issue #92484, Blender 2.93. crashes with meshes with zero length edges Referenced by issue #92355, Remesh-bug.crash
|
@ -708,12 +708,19 @@ static bool mesh_is_manifold_consistent(Mesh *mesh)
|
|||
}
|
||||
|
||||
if (is_manifold_consistent) {
|
||||
/* check for wire edges */
|
||||
for (uint i = 0; i < mesh->totedge; i++) {
|
||||
/* Check for wire edges. */
|
||||
if (edge_faces[i] == 0) {
|
||||
is_manifold_consistent = false;
|
||||
break;
|
||||
}
|
||||
/* Check for zero length edges */
|
||||
MVert *v1 = &mesh->mvert[mesh->medge[i].v1];
|
||||
MVert *v2 = &mesh->mvert[mesh->medge[i].v2];
|
||||
if (compare_v3v3(v1->co, v2->co, 1e-4f)) {
|
||||
is_manifold_consistent = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue