Vertical slats gradient with min distance

A solution that would work with this specific geometry (won’t work for most other cases) is to calculate use this formula for the spacing
spacing to slat_1 = cos(theta) * slat_width + clearance + small_tolerance

where theta is the angle between the tangent direction of the curve at slat_0 and the vector to your anchor point

the easies way to accomplish this is through a simple script

try it out, and if needed, i’ll help you out when i have some time

Thank you @adel.albloushi, I tried what you said, but I get similar results. I still have some distances way above 0.9m.
[fixed and simplified] Rutina lamas orientadas a punto rotando en punto central_JFA2.gh (18.9 KB)
In any case, the distance cannot be a fixed value for all the slats, since they keep rotating and with that the distance between them.

here’s the fixed code. added custom CSharp component. but it’s not generalizable to other geometries, so use with care.
the good news. the clearance is paramteric and exact. so is the panel width

[fixed but not generalizable ] Rutina lamas orientadas a punto rotando en punto central_JFA1.gh (22.1 KB)

I modified the Anemone loop to get a more accurate result but still found 23 slat positions (60 thru 83) that are very slightly off. So I implemented an insane but extremely precise fix (kludge / nudge, gray group) that works well. The text panel on the right (‘Separation Deviance’) shows the remaining difference between intended gap (0.9 meters) and actual length of the white lines.


slats_2024Apr15a.gh (36.9 KB)

Nothing trivial about this. It’s not perfect, there are numerous opportunities for off-by-one errors.

2 Likes

it’s impressive how you can keep track of so many wires. you’re a true Italian chef

btw, in anemone, can you specify a bool condition for the loop to end?

Hi @adel.albloushi,
I could not successfully open your file:


Which component are you using there?
Thanks

it’s a C# script i made.
what rhino version are you using?

That is great.
Thank you @Joseph_Oster!
I was doing some tests with Anemone also, I think it is a great feature.
I generate small gaps/jumps and then cull those that are bellow 0.9m, however when I tried to generate the loop it stops after the second iteration. I am not sure what am I doing wrong.
I know I am generating lots of unnecessary geometries, but I though it was worth trying.
Do you have any recommendations on how to achieve that?
Slats Loop test.gh (25 KB)

Thanks

The 7 SR10
image

try this r7 version of that script.
also consider updating to r7 sr36 (which is the one i have)
[fixed but not generalizable R7] Rutina lamas orientadas a punto rotando en punto central_JFA1.gh (13.3 KB)

1 Like

It stops because the “>=” condition was reached. I don’t know why.
I spent enough time already debugging my own code so please don’t ask me to debug yours.

Note that I (temporarily) added an extra output to Anemone so I could see all the values encountered during the loop. That can be done for any number of loop “variables”. I used that technique extensively.

1 Like

Thank you again @Joseph_Oster
This tip is very useful to me.

I just noticed that my code doesn’t correctly handle reducing the gap distance… oh well. :thinking:

@julioamodia89 were you able to open and test the GH file?

Hi @adel.albloushi,
Yes, it works great.
Thank you, it is exactly what I was looking for!

1 Like

I have successfully made the loop work, it is not perfect but it does the job. I am sharing it here in case anyone is interested.
Slats Loop test 2.gh (28.2 KB)

The brute force “shotgun” method often works well enough. Better than code you don’t understand.

1 Like