mirror of
https://github.com/Open-Cascade-SAS/OCCT.git
synced 2026-07-10 04:17:44 +08:00
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.
This commit is contained in:
@@ -1578,19 +1578,22 @@ static TopoDS_Edge GlueEdgesWithPCurves(const NCollection_Sequence<TopoDS_Shape>
|
||||
NCollection_Sequence<occ::handle<Geom_Surface>> SurfSeq;
|
||||
NCollection_Sequence<TopLoc_Location> LocSeq;
|
||||
|
||||
for (int aCurveIndex = 1;; aCurveIndex++)
|
||||
{
|
||||
occ::handle<Geom2d_Curve> aCurve;
|
||||
occ::handle<Geom_Surface> 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<Geom2d_Curve> aCurve;
|
||||
// occ::handle<Geom_Surface> 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);
|
||||
|
||||
Reference in New Issue
Block a user