Swoosh Pavillion script is not working

Hello everyone,

I recreated the Swoosh Pavilion script that was shown in a YouTube tutorial (https://www.youtube.com/watch?v=I4AofPk0Mss&t=7s). Most parts work as expected, but the cross members do not behave like in the video. Their orientation and spacing change in a way that I cannot control.

I checked every step of the definition and compared it with the tutorial. I have not found the point where the issue starts. I would like to know what usually causes this problem in similar setups and where I should look more closely in the script.

Here is the file

Swoosh.3dm (274.2 KB)

Swoosh.gh (28.5 KB)

Thank you for any advice.

Swoosh a.gh (44.4 KB)

thank you so much! this helps a lot