File: 0006-BRepOffset_Tool-TryProject-Check-return-of-BRepLib-B.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 (22 lines) | stat: -rw-r--r-- 762 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
Subject: [PATCH 6/7] BRepOffset_Tool: TryProject: Check return of BRepLib::BuildCurve3d. Might be degenerate edge, so no curve
From: blobfish <blobfish@gmx.com>

Date: Mon, 18 Jan 2021 22:26:33 -0500


---
 src/BRepOffset/BRepOffset_Tool.cxx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/src/BRepOffset/BRepOffset_Tool.cxx
+++ b/src/BRepOffset/BRepOffset_Tool.cxx
@@ -1879,7 +1879,8 @@
     TopoDS_Edge CurE     = TopoDS::Edge(it.Value());
     Handle(Geom_Curve) C = BRep_Tool::Curve(CurE,L,f,l);
     if (C.IsNull()) {
-      BRepLib::BuildCurve3d(CurE,BRep_Tool::Tolerance(CurE));
+      if (!BRepLib::BuildCurve3d(CurE,BRep_Tool::Tolerance(CurE)))
+        continue;
       C  = BRep_Tool::Curve(CurE,L,f,l);
       if (C.IsNull())
       {