#2237 workaround for openings on extrusions of compound profiles

This commit is contained in:
Thomas Krijnen
2022-06-11 15:48:04 +02:00
parent bf3eb68b67
commit 0f85890c72
4 changed files with 122 additions and 83 deletions
+17 -1
View File
@@ -353,4 +353,20 @@ bool IfcGeom::Kernel::is_manifold(const TopoDS_Shape& a) {
return true;
}
}
}
bool IfcGeom::util::is_nested_compound_of_solid(const TopoDS_Shape& s, int depth) {
if (s.ShapeType() == TopAbs_COMPOUND) {
TopoDS_Iterator it(s);
for (; it.More(); it.Next()) {
if (!is_nested_compound_of_solid(it.Value(), depth + 1)) {
return false;
}
}
return true;
} else if (s.ShapeType() == TopAbs_SOLID) {
return depth > 0;
} else {
return false;
}
}