From a509566a2833b2be0a1ea550905908d2df4f8b21 Mon Sep 17 00:00:00 2001 From: Pasukhin Dmitry Date: Mon, 29 Dec 2025 15:15:10 +0000 Subject: [PATCH] Shape Healing - Unstable PCurve Processing (#967) Added hot fix to keep old logic (loop were skipped). Added TODO to fix for the ongoing release. The ticket is added #966 in GH Issues. --- .../ShapeUpgrade_UnifySameDomain.cxx | 27 ++++++++++--------- 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx b/src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx index 2b8b07325a..d08ba8bec6 100644 --- a/src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx +++ b/src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx @@ -1578,19 +1578,22 @@ static TopoDS_Edge GlueEdgesWithPCurves(const NCollection_Sequence NCollection_Sequence> SurfSeq; NCollection_Sequence LocSeq; - for (int aCurveIndex = 1;; aCurveIndex++) - { - occ::handle aCurve; - occ::handle aSurface; - TopLoc_Location aLocation; - double aFirst, aLast; - BRep_Tool::CurveOnSurface(FirstEdge, aCurve, aSurface, aLocation, aFirst, aLast, aCurveIndex); - if (aCurve.IsNull()) - break; + // TODO: Issue (#966) Code is not working correctly + // All previous versions were relying that that loop never reach end and break on start, + // because it was starting from 0 and 0st is not existing curve index. + // for (int aCurveIndex = 1;; aCurveIndex++) + // { + // occ::handle aCurve; + // occ::handle aSurface; + // TopLoc_Location aLocation; + // double aFirst, aLast; + // BRep_Tool::CurveOnSurface(FirstEdge, aCurve, aSurface, aLocation, aFirst, aLast, + // aCurveIndex); if (aCurve.IsNull()) + // continue; - SurfSeq.Append(aSurface); - LocSeq.Append(aLocation); - } + // SurfSeq.Append(aSurface); + // LocSeq.Append(aLocation); + // } double fpar, lpar; BRep_Tool::Range(FirstEdge, fpar, lpar);