Grasshopper attractor help - setting maximum values that work with changing density

Hello guys,
I am posting here after hours of searching through forums and tutorials, hoping someone could help figure this out.

Background: In the model, there are several curves that represent the paths of a fence. In one specific part of the fence, I am trying to change the density of the slats. I realize that if I obtain a list of points from the “standard” fence section (slat gap=.4m), I cannot attract those fence points AND keep maximum gap distance at .4m because there are exact number of points to be spaced apart at .4m. To this end, I have tried to decrease the standard gap for this specific section only to produce more points to work with. But alas, my elementary Grasshopper skills are not good enough to figure out how to make scan the remap values and put a maximum gap distance for the points farthest from the attractor point.

Issue: I am trying to figure out how to control the maximum gap distance between slats so that the maximum gap is no larger than .4m.

I would be grateful if anyone with grasshopper knowledge can help me figure this out! If you need any additional info please let me know!


partial fence script.gh (26.7 KB) fence curve 1.3dm (86.5 KB)

THANK YOU!

1 Like

I think this will do. I had to shatter the base curve in two pieces to assure that the area with the highest density doesn’t shift along the base curve. (It works but I was hoping for a better solution).
The number of elements (controlled by the initial distance sliders) can be set manually or by the help of Galapagos. If it runs for 20 seconds it returns nice settings for the sliders. partial fence script[1992]_ME.gh (42.7 KB)

Thank you for the reply! The result is something I was looking for. I just looked through the script and it will definitely require me to sit and study it for a bit of time, but it is exciting that it results in what I want and will be worth the time. I really appreciate your help on this and will definitely be asking questions about certain parts of it in the next few days when I am studying it (this is a side task for work so I am putting in time when I can). Thank you again :smiley:

1 Like