Grasshopper

algorithmic modeling for Rhino

Hi everyone,

I have made a series of surfaces that I wanted to rearrange according to its centroid's closest point to the a point.

The current arrangement of the surfaces

The arrangement of the centroids after checking for its closeness to a point

However, I have some trouble in trying to rearrange the surfaces according to the new point arrangements. Do any of you know how to do this? Thank you in advance for your help. I will appreciate it very much.

Views: 1029

Attachments:

Replies to This Discussion

Looks like it was arranged based on a point. So what exactly else are you trying to do?

Hi Michael,

Thank you for your reply. What I wanted to do is to arrange the surfaces according to the arrangement of the points which is shown in the second image. Because right now, the surfaces are arranged the way as shown in the first image.

You only need one more component in order to achieve this, that is the sort component.

Sort asks for two things, a list of objects to sort, and a variable to sort them by. So we sort our list of points according to their distance away from the key point.

Attachments:

Dear Daniel,

Wow, I didn't think about that. Thank you very much for your help. I appreciate it very much.

Dear Daniel,

I apologize for asking again, I have tried sorting the surfaces through the distance. However, I am not sure why the arrangements are different from the one made by the arrangement of the closest points. Do you know what I might have did wrong? Thank you very much for your help. I appreciate it.

Attachments:

Using Daniel's code instead of yours, you can add another "channel" to 'Sort' for the surfaces:

Attachments:

Dear Joseph,

Thank you for your reply and thank you for your help. It's working perfectly now.

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service