Mon, 11/28/2005 - 19:31

Forums:

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.

Mon, 11/28/2005 - 23:12

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.

Mon, 11/28/2005 - 23:21

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

Tue, 11/29/2005 - 15:08

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).

Tue, 11/29/2005 - 18:57

Hello Ming,

so if you do something like

if (aCurve->IsKind(STANDARD_TYPE(Geom_Circle)))

std::cout << "It's a circle"<

Tue, 11/29/2005 - 21:58

I got the curve handle from an edge, which has been known to be an arc.

Thanks a lot for your help.

Ming