[PATCH 5/7] BRepFill_Filling: Don't even attempt to build with empty boundary
authorblobfish <blobfish@gmx.com>
Fri, 24 May 2024 17:00:24 +0000 (19:00 +0200)
committerTobias Frost <tobi@debian.org>
Fri, 24 May 2024 17:00:24 +0000 (19:00 +0200)
Gbp-Pq: Name 0005-BRepFill_Filling-Don-t-even-attempt-to-build-with-em.patch

src/BRepFill/BRepFill_Filling.cxx

index 2eff8526949835bf78ec6fc6751f59476d16a825..0e617bbd2e951ce7c685246b2b6ca7faf23b1af2 100644 (file)
@@ -577,8 +577,15 @@ void BRepFill_Filling::FindExtremitiesOfHoles(const TopTools_ListOfShape& WireLi
 //======================================================================
 void BRepFill_Filling::Build()
 {
-  myBuilder.reset (new GeomPlate_BuildPlateSurface (myDegree, myNbPtsOnCur, myNbIter,
-                                                    myTol2d, myTol3d, myTolAng, myTolCurv, myAnisotropie));
+  auto thebuild = new GeomPlate_BuildPlateSurface (myDegree, myNbPtsOnCur, myNbIter,
+                                                    myTol2d, myTol3d, myTolAng, myTolCurv, myAnisotropie);
+  if (myBoundary.IsEmpty())
+  {
+    myIsDone = Standard_False;
+    return;
+  }
+
+  myBuilder.reset(thebuild);
   TopoDS_Edge CurEdge;
   TopoDS_Face CurFace;
   Standard_Integer i, j;