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
@@ -1894,7 +1894,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);
     }
     C = new Geom_TrimmedCurve(C,f,l);
