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
@@ -1897,7 +1897,8 @@
     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()) // not 3d curve, can be degenerated, need to skip
       {
