Sorting Breps

Hello everyone,
I’m relatively new to grasshopper. Is there a way to randomly sort and multiply breps along a given curve without them intersecting?
Thanks in advance!

Seems to me I’ve done things like this multiple times but am having a hard time locating them this morning. These might be combined?


RecursiveBrick_2016_Jan2b.gh (25.2 KB)

I found this one (using a list of shapes) on my PC but can’t it on the forum:


array_along_crv_2017Jul13b.gh (20.2 KB)

Instead of searching for old examples, I might have just written another one but you didn’t post a GH file with geometry, as recommended when starting a thread. :frowning:

3. Attach minimal versions of all the relevant files

2 Likes

This was more difficult than I expected. Tried many different ways… :sweat_smile:

The ‘step’ slider is also wired to the Clash ‘D’ input, though they could be different values. But I see a bug when they are… :roll_eyes: Apparently the flaw is also with large ‘step’ values. Or something… To Be Continued, later.


breps_along_crv_2024Jul27a.gh (41.9 KB)

Fixed by adding red group that compares Evaluate Length ‘L’ input to curve length. Stops BOTH loops when ‘L’ value is greater than curve length. Also added separate slider for ‘Separation’ distance. When ‘step’ value is low (like 0.1), it’s slow, regardless of ‘Separation’.


breps_along_crv_2024Jul27b.gh (42.7 KB)

Hello!
Thank you so much for responding and working on fixing my problem! I did not think someone would respond that fast. Your code works perfectly fine so far and I can make adjustements as I go if I need to. I like your approach and I am very thankful!
I did not post a gh file because I don’t have one, I just don’t know where to start. Basically, it’s for an architecture project, where we have to build an element (f.e. a wall) out of small reclaimed timber pieces, and I really want to try to make it parametric.
Greetings