diff --git a/src/ifcgeom/IfcGeomFaces.cpp b/src/ifcgeom/IfcGeomFaces.cpp index 2b7a14c93e..7e5d2efadf 100644 --- a/src/ifcgeom/IfcGeomFaces.cpp +++ b/src/ifcgeom/IfcGeomFaces.cpp @@ -409,7 +409,7 @@ bool IfcGeom::Kernel::convert(const IfcSchema::IfcArbitraryProfileDefWithVoids* } ShapeFix_Shape sfs(mf.Face()); sfs.Perform(); - face = TopoDS::Face(sfs.Shape()); + face = sfs.Shape(); return true; } diff --git a/src/ifcgeom/IfcGeomFunctions.cpp b/src/ifcgeom/IfcGeomFunctions.cpp index 3b5a23aa60..5db4491b62 100644 --- a/src/ifcgeom/IfcGeomFunctions.cpp +++ b/src/ifcgeom/IfcGeomFunctions.cpp @@ -325,11 +325,19 @@ namespace { Bnd_Box A; BRepBndLib::Add(a, A); + if (A.IsVoid()) { + return; + } + TopTools_ListIteratorOfListOfShape it(b); for (; it.More(); it.Next()) { Bnd_Box B; BRepBndLib::Add(it.Value(), B); + if (B.IsVoid()) { + continue; + } + if (A.Distance(B) < p) { c.Append(it.Value()); }