### Author Topic: Windows type with "shutters"  (Read 270 times)

#### raistlin

• Jr. Member
• Posts: 60
##### Windows type with "shutters"
« on: December 09, 2022, 01:02:31 PM »
Hello Paul, hello all !

i've got a question about a YsplineLength and a little expression (theoric)
I take the same exercice BUT, if i want to make a shutter in place of glaze ?

So, I will make the defaut segement (left segment) to the same y dimension as the simple shutter (call it Y defaut value)
Then, if our Railclone split in twice our full window in the "sequence" i think about scatter the simple shutter with a Mode "Count" and to obtain automatically the good count for that simple shutter, i think to use the "Ysplinelength"

I need the Yvalue from top segment >> Input1
YValue from the cross segment >> Input2
and also YValue from the bottom segment >> Input3

And soustract them to the YSplineLength then divide by 2 the result (because our "window" is split by the middle)

So i tried that :

Return
(YSplineLength - (input1+Input2+Input3))/2
;

so it should result a length that now i can divide by the shutter Yvalue to obtain... the count i need automatically ?

So, i take the YValue from my defaut segment in >> Input4

Return
((YSplineLength - (input1+Input2+Input3))/2)/Input4
;

But.
It don't work.. :'( (middle section didn't appear

so i have to place a Numeric fonction with random manually each window size... too bad...

What is wrong in my formula ?

Here is the shutter window

thx in advance, i'm pretty sure it's as always a little thing :'(
La vie est une aventure dangereuse d'où personne n'est jamais sortie vivant.

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 2887
##### Re: Windows type with "shutters"
« Reply #1 on: December 09, 2022, 02:47:46 PM »
Hi,

Please take a look at the attached. I changed a couple of things.

First of all, the counter parameter of a Sequence node technically can't be controlled with expressions, I was actually surprised to see it working as well as it was in your example. Instead I've replaced those with a Geometry Switch Macro which is basically just a Selector node that can be toggled using 0 or 1.

Secondly, in your expression, you are dividing the height of the array by the Y Size of the Default segment to find the count. This would be fine if the sides were the same height but they are in fact a little larger to create the gaps between the louvres. If you instead wire the Y Size of the Left Default segment to Input 4 of the expression you should get the expected results.

I hope that helps,

Paul
Paul Roberts
iToo Software

#### raistlin

• Jr. Member
• Posts: 60
##### Re: Windows type with "shutters"
« Reply #2 on: December 09, 2022, 04:02:35 PM »
Damned Thx !
LOL : "a couple of things"
It's not with my knowledge i can think about that...

And if it work as well this is probably because the pivots i make it smart

I know that it could take time, but i'd love to have explanations on that variables and macros you're using.

Cheers!
La vie est une aventure dangereuse d'où personne n'est jamais sortie vivant.