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];
if(ptOnSrf.IsPoint)
intersectPt.Add(ptOnSrf.PointA);

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
C

Hi Carlos,

There’s circle.ToNurbsCurve method.

Sorry,
thank you very much!
c

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);
2 Likes