I have a self-intersecting curve. How do I find the intersection point of that curve? Rhino Student Needs Help!

I made a program that graphs a figure 8 using equations, and it outputs a single curve. I have the option to change the bounds, so I can print out a half finished 8 or just a half of the 8, but I didn’t make a maximum/minimum value for the bounds, so theoretically I could make the curve draw over itself an infinite number of times.

  1. How do I find the self intersection of the curve?
  2. How do I trim of the excess so the curve doesn’t draw over itself?

Thanks!

Rhino.Geometry.Intersect.Intersection.CurveSelf

Rhino.Geometry.Curve.Trim

1 Like

I can’t believe I missed this method. Thank you so much!

I’ve been trying to learn how to use the Trim methods, but I don’t quite understand how to initialize and use a variable of type “Interval”. Are there any examples or tutorials that explain this?

https://en.wikipedia.org/wiki/Interval_(mathematics)

The Trim function wants an interval that falls within the domain of the curve.

Sorry I meant what is the “Interval” type? How do I initialize it? Is it basically a List with two elements?

Iirc: Rhino.Geometry.Interval