Coding - Fix unnecessary loop iteration in BRepLib::BuildCurve3d (#921)

BRep_Tool::CurveOnSurface expects Index >= 1, but the loop started
  from ii = 0, resulting in a wasted iteration that always returned
  a null pointer.

Fixes #0032371
This commit is contained in:
Pasukhin Dmitry
2025-12-16 09:22:48 +00:00
committed by GitHub
parent fff55ee5fc
commit 4a9f416b8c

View File

@@ -371,7 +371,8 @@ Standard_Boolean BRepLib::BuildCurve3d(const TopoDS_Edge& AnEdge,
if (!BRep_Tool::Degenerated(AnEdge))
{
jj = 0;
for (ii = 0; ii < 3; ii++)
// BRep_Tool::CurveOnSurface expects Index >= 1, so start from 1.
for (ii = 1; ii < 3; ii++)
{
BRep_Tool::CurveOnSurface(TopoDS::Edge(AnEdge),
Curve2dPtr,