Grasshopper

algorithmic modeling for Rhino

Hi people.

I've been working on this for a while, and can't seem to find any answer on the forum.

I need to sort these points, grouping together the ones contained in the same plane.

Any ideas would be much appreciated.

Cheers

Views: 609

Replies to This Discussion

How can you expect an answer without posting any code?

Closest point to plane or surface or mesh ? 

Then sort by distance.

But it looks like you just divided curves by n points, therefore flip matrix would do the job without sorting.

Thanks Petras.

Yes you are right indeed. The problem is a simplified the example too much.

In the code I've just posted, I added a random reduce (eliminating points), in which case, flip matrix wasn't useful. 

And I sorted by angle, which is what I was trying to do.

Thanks for your help! 

By retaining the original data tree structure (avoiding 'Flatten'), the original sequences are preserved so there is no need to sort anything.  I've included my "Tree/List Viewer" tool in this copy (attached) that allows you to select branch (the 'path idx' slider) and item ('list idx' slider) so you can better visualize geometry results:

P.S.  I just looked at your code again and noticed that some of the "columns" of points have zero at the bottom while others have zero at the top?

Attachments:

Hmmm...

Acutally after days thinking about it I just came up with the solution.

I post the code, in case it might be of interest to someone else.

Attachments:

Instead of using surfaces, this approach uses planes.  And as Petras suggested, it uses flip matrix.  'Reduce' is performed after that, in the blue group.  The green group lets you choose between "All" or "Reduced":

Attachments:

That was really useful.

Thank you very much Joseph.

I appreciate your help.

Regards

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