mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-10 06:00:51 +00:00
Don't do brute-force edge sewing in case of non-manifold faceset from wire intersections or triangulations
This commit is contained in:
@@ -501,19 +501,22 @@ bool IfcGeom::Kernel::create_solid_from_faces(const TopTools_ListOfShape& face_l
|
|||||||
bool has_shared_edges = false;
|
bool has_shared_edges = false;
|
||||||
TopTools_MapOfShape edge_set;
|
TopTools_MapOfShape edge_set;
|
||||||
|
|
||||||
if (!faceset_helper_ || !faceset_helper_->non_manifold()) {
|
// In case there are wire interesections or failures in non-planar wire triangulations
|
||||||
for (face_iterator.Initialize(face_list); face_iterator.More(); face_iterator.Next()) {
|
// the idea is to let occt do an exhaustive search of edge partners. But we have not
|
||||||
// As soon as is detected one of the edges is shared, the assumption is made no
|
// found a case where this actually improves boolean ops later on.
|
||||||
// additional sewing is necessary.
|
// if (!faceset_helper_ || !faceset_helper_->non_manifold()) {
|
||||||
if (!has_shared_edges) {
|
|
||||||
TopExp_Explorer exp(face_iterator.Value(), TopAbs_EDGE);
|
for (face_iterator.Initialize(face_list); face_iterator.More(); face_iterator.Next()) {
|
||||||
for (; exp.More(); exp.Next()) {
|
// As soon as is detected one of the edges is shared, the assumption is made no
|
||||||
if (edge_set.Contains(exp.Current())) {
|
// additional sewing is necessary.
|
||||||
has_shared_edges = true;
|
if (!has_shared_edges) {
|
||||||
break;
|
TopExp_Explorer exp(face_iterator.Value(), TopAbs_EDGE);
|
||||||
}
|
for (; exp.More(); exp.Next()) {
|
||||||
edge_set.Add(exp.Current());
|
if (edge_set.Contains(exp.Current())) {
|
||||||
|
has_shared_edges = true;
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
edge_set.Add(exp.Current());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user