Grasshopper

algorithmic modeling for Rhino

Sub Curve. How do I get both sides of the Elipse I "split"?

Hi all,

I have a Line and an Elipse. I intersected them and I want to get the two Sub Curves of the "split" elipse. How ever I am only getting one curve out of the Elipse. I actualy get two and then join them but they are both always on the one side of the Line I used to intersect the Elipse. I can't get the second Sub Curve.

Any help please? Thanks

Views: 702

Replies to This Discussion

I'm not sure why that's being done. The "solution" is to use the Shatter component and pass the two parameters in from Line/Curve intersection. The only problem with this is that since the line probably does not intersect through the exact start point, you will actually get 3 curves one from the start point to the first split parameter, a second between the supplied split parameters, and one from the last split parameter to the end point.

You can get around this by joining the two smaller segments, which involves sorting the curves by length, joining the 2 shortest ones, then merging the other curve back into the stream.

HTH
Attachments:
Thanks for the reply, your reasoning is right, the purpose is actualy to split it which I did and luckily the two short curves are always the same numbers in the list so a default selection number can be used and no conditional statements are needed to select them and join.

But in the future I think I will want to, for whatever reason it may be, be able to select that other Sub Curve. And it bugs me that I can't do it now.

Thanks for you reply.
Yea, something's up with sub curve...it might be "auto sorting" the domains, which is "good" for non-closed curves, but for closed curves it actually makes sense to go from a higher parameter to a lower one.

There really aren't any "conditional statements" within that definition, but my personal advice would be to leave it as is and let it always be right as opposed to potentially causing incorrect results if the structure of the geometry changes. Parametric solutions tend to be much more resilient when they don't make assumptions about the structure of data.
Yes what I meant to say was setting the definition up that it will always select the two short curves to join. I tried testing it by moving the line and elipse around atempting to create all posible future scenarios and the result remained consistant (for now), but yes I will remain aware of it incase something goes wrong.

cheers
Try intersetcing the line with elipse, u ll get the intersection points, then use the shutter component to split the line, so instead of curves u use points to split the line.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service