[PATCH 5/7] BRepFill_Filling: Don't even attempt to build with empty boundary
authorblobfish <blobfish@gmx.com>
Thu, 20 Oct 2022 20:08:48 +0000 (21:08 +0100)
committerTobias Frost <tobi@debian.org>
Thu, 20 Oct 2022 20:08:48 +0000 (21:08 +0100)
Gbp-Pq: Name 0005-BRepFill_Filling-Don-t-even-attempt-to-build-with-em.patch

src/BRepFill/BRepFill_Filling.cxx

index 8c1b773335ad3a06d1569fce10c5865aba4270c5..2d4e41b05c13c0424bbc31c32fc67ae4b525d2e5 100644 (file)
@@ -586,8 +586,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;