For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

[Feature request] BRep_Tool::CurveOnSurface() to not compute pcurve on planes

Roman Lygin's picture
Forums: 

For edges lying on a plane BRep_Tool::CurveOnSurface() returns a pcurve even if it is not stored in the edge curve list (it computes it on the fly). In some cases, a need is just to check whether the edge has a pcurve or not. Knowing this behavior specifics the developer has to write a work-around that would duplicate a code and avoid computing a pcurve on the fly.

The better approach would be to add an extra boolean parameter that would control this behavior.
For instance:

static Handle_Geom2d_Curve CurveOnSurface (
const TopoDS_Edge& E,
const TopoDS_Face& F,
Standard_Real& First,
Standard_Real& Last,
const Standard_Boolean ComputeForPlane = Standard_True) ;

The parameter should have default value that would ensure source compatibility and preserve current behavior.

NOTE: ShapeAnalysis_Edge::HasPCurve() would have to use similar additional parameter.

Thank you in advance folks,
Roman

---
opencascade.blogspot.com - the Open CASCADE blog
www.cadexchanger.com - CAD Exchanger, your 3D data translator