Grasshopper

algorithmic modeling for Rhino

I have a set of curves stacked vertically that are out of order (see image). How can I reorder them to fall into a sequence based on their heights?

Views: 1438

Attachments:

Replies to This Discussion

Hi Sameer,

you generate a point somewhere on the curve that is guaranteed to give you the correct order. From your image it looks like the start or end point would work fine. Then you extract the Z coordinate from all these points, so that you get a list of numbers.

Finally you use the Sort component to sort these numbers while sorting the curves synchronously. So plug the numbers into the K input and plug the curves into the A input.

--
David Rutten
david@mcneel.com
Seattle, WA
perfect! thank you very much.
What about reordering faces from the box componant output?
I'm trying to create cage/lattice style geometry morph, but the bounding box faces are ordered differently...
What order do you expect the faces to be in?
Sorry for the delay in reply, the process failed so I dropped off the forum for a while while I jcontinued.

Wouldn't mind finding out still though:
The two 'boxes' i'm comparing are a bounding box and capped loft. Unfortunately the when 'morphing' to the new box the faces are mismatched. I ended up matching them the long way (putting a panel of integers into a list item component).

In the end, it still didn't work anyway though as it only effected certain parts of the overall bounds, as discussed here:
http://www.grasshopper3d.com/forum/topics/spatial-deform-correct

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service