
Wed, 06/19/2013 - 20:30
Forums:
Hi everyone.
I have a TopoDS_edge exported from IGES file. Is there a way to know the type of this Edge? Arc, line, etc.? And if yes, how will I can get points of that edge besides first and last?
Best regards, Max.
Thu, 06/20/2013 - 13:28
You can get the curve by BRep_Tool::Curve() and check the type by DynamicType() or IsInstance()
Thu, 06/20/2013 - 13:48
Alternatively, you can use the GetType mehtod of BRepAdaptor_Curve to get to know the curve type.
For getting points of an edge you can use BRep_Tool.Curve(E, First, Last) to get a Geom_Curve from the edge and then use the Geom_Curve.Value(u) method to get points. Take into account that the iso parameter u is bound by the First and Last parameter you received from BRep_Tool.Curve.
You can also have a look at GCPnts_AbscissaPoint.