How to detect a non-linear edge (a circular one for example)

i'd like to know simply, if i can detect a non-linear edge, and if so, how ???

thanks,

Benedicte Martin's picture

hi,

use BRepAdaptor_Curve.

For example, try :

TopoDS_Edge anEdge;
BRepAdaptor_Curve anAdaptorCurve(anEdge);

if (anAdaptorCurve.GetType() != GeomAbs_Line)
cout << " non-linear edge " << endl;

Benedicte Martin's picture

hi,

use BRepAdaptor_Curve.

For example, try :

TopoDS_Edge anEdge;
BRepAdaptor_Curve anAdaptorCurve(anEdge);

if (anAdaptorCurve.GetType() != GeomAbs_Line)
cout << " non-linear edge " << endl;