Grasshopper

algorithmic modeling for Rhino

Hi All

I have a boundary curve set up with randomly populated 2D points inside. On these points I place rectangular breps. Once I change the random seed, I need to evaluate the distance between the breps (ideally in 2 directions, but could just be 1) and if this distance is less than a specified amount (say 1200mm) I want to move the breps to make the distance between 1200mm or more.

Does anyone have an idea of how to do this? Any help is greatly appreciated.

I have attached my file and screenshots.

Thanks

Natalie

Views: 420

Attachments:

Replies to This Discussion

This is fairly difficult as it involves a lot of conditional checking and iteration, neither of which Grasshopper is particularly good at. Do you want to move both objects away from each other when they are too close together? If so, that may push either of them back towards another neighbour.

I attached a file that keeps two curves at least 10 units apart (unless they intersect, then the logic breaks down). But I doubt you'll be able to apply it to your four rectangles...

Attachments:

RSS

About

Translate

Search

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service