From: blobfish Date: Wed, 2 Oct 2024 20:00:00 +0000 (+0200) Subject: [PATCH 6/7] BRepOffset_Tool: TryProject: Check return of BRepLib::BuildCurve3d. Might... X-Git-Tag: archive/raspbian/7.8.1+dfsg1-3+rpi1^2~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=7c3b2e60f54a6cf2ce6cc553ea25edd089b974b8;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 6c08941e1..40bd489b9 100644 --- a/src/BRepOffset/BRepOffset_Tool.cxx +++ b/src/BRepOffset/BRepOffset_Tool.cxx @@ -1879,7 +1879,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); if (C.IsNull()) {