File: 0005-BRepFill_Filling-Don-t-even-attempt-to-build-with-em.patch

package info (click to toggle)
opencascade 7.8.1%2Bdfsg1-4~exp1
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 293,944 kB
  • sloc: cpp: 1,249,635; tcl: 15,974; cs: 5,173; java: 1,554; sh: 1,354; ansic: 821; xml: 737; makefile: 27; javascript: 22
file content (30 lines) | stat: -rw-r--r-- 1,035 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
Subject: [PATCH 5/7] BRepFill_Filling: Don't even attempt to build with empty boundary
From: blobfish <blobfish@gmx.com>

Date: Thu, 1 Oct 2020 10:06:35 -0400


---
 src/BRepFill/BRepFill_Filling.cxx | 6 ++++++
 1 file changed, 6 insertions(+)

--- a/src/BRepFill/BRepFill_Filling.cxx
+++ b/src/BRepFill/BRepFill_Filling.cxx
@@ -577,8 +577,15 @@
 //======================================================================
 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;