Convert Circle to Curve

Dear all,

I need to calculate the intersection between a circle and a surface. I’m using this.

ci = Rhino.Geometry.Intersect.Intersection.CurveSurface(c, panelSrf[i], tolerance, tolerance);
for(int k = 0 ; k < ci.Count; k++)
Rhino.Geometry.Intersect.IntersectionEvent ptOnSrf = ci[k];

Nevertheless my input for the curve is a circle. And I’m converting the circle like this:

Curve c;
c = (Curve)baseCircle[i];

but is not working.
How can I convert the circle to a point?

thanks in advance

Hi Carlos,

There’s circle.ToNurbsCurve method.

thank you very much!

Its not always advantageous to convert simple curve structures, such as lines, arcs, circles, etc. to NURBS curves. You might just want to them to remain the simple curves that they are. In this case, you can create simple curve objects from their struct counterparts.

For example, for circles, you can do this:

Circle circle = new Circle(Plane.WorldXY, 5.0);
ArcCurve circle_curve = new ArcCurve(circle);