From: blobfish Date: Tue, 2 Aug 2022 13:06:17 +0000 (+0100) Subject: [PATCH 6/7] BRepOffset_Tool: TryProject: Check return of BRepLib::BuildCurve3d. Might... X-Git-Tag: archive/raspbian/7.6.3+dfsg1-2+rpi1^2~2 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=6f9a9fddbcb4d5c3eaf1cb0347ceb5cc53cb9f42;p=opencascade.git [PATCH 6/7] BRepOffset_Tool: TryProject: Check return of BRepLib::BuildCurve3d. Might be degenerate edge, so no curve Gbp-Pq: Name 0006-BRepOffset_Tool-TryProject-Check-return-of-BRepLib-B.patch --- diff --git a/src/BRepOffset/BRepOffset_Tool.cxx b/src/BRepOffset/BRepOffset_Tool.cxx index 97cc14cd2..0f1d4f056 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -1891,7 +1891,8 @@ Standard_Boolean BRepOffset_Tool::TryProject 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);