Skip to content

Commit a509566

Browse files
authored
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.
1 parent c020fc2 commit a509566

1 file changed

Lines changed: 16 additions & 13 deletions

File tree

src/ModelingAlgorithms/TKShHealing/ShapeUpgrade/ShapeUpgrade_UnifySameDomain.cxx

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1578,19 +1578,22 @@ static TopoDS_Edge GlueEdgesWithPCurves(const NCollection_Sequence<TopoDS_Shape>
15781578
NCollection_Sequence<occ::handle<Geom_Surface>> SurfSeq;
15791579
NCollection_Sequence<TopLoc_Location> LocSeq;
15801580

1581-
for (int aCurveIndex = 1;; aCurveIndex++)
1582-
{
1583-
occ::handle<Geom2d_Curve> aCurve;
1584-
occ::handle<Geom_Surface> aSurface;
1585-
TopLoc_Location aLocation;
1586-
double aFirst, aLast;
1587-
BRep_Tool::CurveOnSurface(FirstEdge, aCurve, aSurface, aLocation, aFirst, aLast, aCurveIndex);
1588-
if (aCurve.IsNull())
1589-
break;
1590-
1591-
SurfSeq.Append(aSurface);
1592-
LocSeq.Append(aLocation);
1593-
}
1581+
// TODO: Issue (#966) Code is not working correctly
1582+
// All previous versions were relying that that loop never reach end and break on start,
1583+
// because it was starting from 0 and 0st is not existing curve index.
1584+
// for (int aCurveIndex = 1;; aCurveIndex++)
1585+
// {
1586+
// occ::handle<Geom2d_Curve> aCurve;
1587+
// occ::handle<Geom_Surface> aSurface;
1588+
// TopLoc_Location aLocation;
1589+
// double aFirst, aLast;
1590+
// BRep_Tool::CurveOnSurface(FirstEdge, aCurve, aSurface, aLocation, aFirst, aLast,
1591+
// aCurveIndex); if (aCurve.IsNull())
1592+
// continue;
1593+
1594+
// SurfSeq.Append(aSurface);
1595+
// LocSeq.Append(aLocation);
1596+
// }
15941597

15951598
double fpar, lpar;
15961599
BRep_Tool::Range(FirstEdge, fpar, lpar);

0 commit comments

Comments
 (0)