Hello,
I have an ellipse with 2 points in the curve. How could I trim the curve between this 2 points?
Hello,
I have an ellipse with 2 points in the curve. How could I trim the curve between this 2 points?
In all likelihood an ellipse in GH is a NurbsCurve. Closed nurbs curves have seams, which is where the start and end of the curve meet. You can trim a curve to a subdomain on its interior, but that subdomain cannot include the seam.
What you will have to do to guarantee this works is adjust the seam to be on top of one of the points, then and only then figure out the closest parameters of both points and then trim the adjusted ellipse.
But even now of course the question is whether you get the short portion of the ellipse or the long one.
Alternatively, your approach could be more like _Split instead. You get forget about seams, just find the parameters on the ellipse closest to your points, shatter your ellipse at those parameters (the Shatter component is smart enough to take seams into account), then figure out which of the two remaining elliptical segments you want to keep. The shortest? The longest? The one closest to some other point?
Thank you very much. Maybe I wasn’t enough specific. What I want to get is the short segment curve of the ellipse (between the 2 points).
I am trying to did what you proposed. I post the files in case you find the solution before than me. Thanks again.Delphinarium Hall.3dm (30.8 KB)
Delphinariu Hall_Grasshopper.gh (18.9 KB)