BRepAlgoAPI_Section::PCurveOn1() removed

Release 6.6.0 release notes state in revision 23881 "Methods ::PCurveOn1() and ::PCurveOn2() have been removed from classes BRepAlgo_Section and BRepAlgoAPI_Section, as the Pcurve can be obtained from the ancestor face by methods of BRep_Tool class." Can someone please elaborate on how one is to do this now? I have looked at the methods in 6.5.3, but it seems redundant to simply implement these in my code just as they were in OpenCASCADE. Why were they removed and what is now different?

William Jones's picture

Here is one implementation to replicate PCurveOn1()

Handle(Geom2d_Curve) hPCurv = Sec.PCurveOn1(Edge);

becomes something like

TopoDS_Face Face;
if (Section.HasAncestorFaceOn1(Edge, Face)) {
Standard_Real First, Last;
BRep_Tool::Range(Edge, First, Last);
Handle(Geom2d_Curve) hPCurv = BRep_Tool::CurveOnSurface(Edge, Face, First, Last);
}