the parameter range of a circle

Hi,
I found that the parameter range of a circle (GeomAbs_Circle) is not within 2*PI. Deos anyone know how to the range of how normalize the parameter of a vertex on the circle within 2*PI?

I am so urgent to get the method. Thanks a lot.

François Lauzon's picture

Hello Ming,
where did you find that? Parameter range of a Geom_Circle and all TopoDS_Edge based on Geom_Circle should be [0,2*PI[.

Francois.

Ming's picture

Francois,

I got a point on a Geom_Curve (I absolutely know it is a circle). And then compute its parameter using GeomAPI_ProjectPointOnCurve class. Finally, I found the corresponding parameter is greater than 2*PI.

Is there particular method to compute the parameter of a point on a circle? If so, how to convert a Geom_Curve to Geom_Circle?

Thanks.

Ming

Rob Bachrach's picture

GeomAPI_ProjectPointOnCurve finds a point on the infinite curve. A circle is periodic. Therefore, if the returned parameter is greater than 2*PI, it simply means it computed it on a period beyond the first. You should be able to find the parameter you want by simply taking the modulus with 2*PI (or subtracting 2*PI until it is in range).

François Lauzon's picture

Hello Ming,
so if you do something like
if (aCurve->IsKind(STANDARD_TYPE(Geom_Circle)))
std::cout << "It's a circle"<

Ming's picture

I got the curve handle from an edge, which has been known to be an arc.
Thanks a lot for your help.

Ming