### Author Topic: Place Y Evenly a set distance form the top of an 2S Array  (Read 117 times)

#### RC2292

• Jr. Member
• Posts: 60
##### Place Y Evenly a set distance form the top of an 2S Array
« on: May 17, 2022, 02:55:19 PM »
Hi All,

I'm trying and failing to place the Y Evenly of a 2S Array a certain distance form the top (Input1) using this formula:

Return
YSectionLength-Input1;

Any Ideas on how I can achieve this?

#### Paul Roberts

• iToo Software
• Hero Member
• Posts: 2547
##### Re: Place Y Evenly a set distance form the top of an 2S Array
« Reply #1 on: May 17, 2022, 05:29:24 PM »
Hi,

Most of a generator's properties can't be evaluated on a per-spline basis since internally they are processed just once before the geometry is built. There is however a workaround that circumvents this if you don't mind nesting generators.

Please take a look at the attached. It uses two A2S generators, one nested inside the other. The nested generator gets its height, width and evenly distance by accessing the main generator's properties using dot syntax, for example, assuming the end generator is called MainArray you could access its Y size using return MainArray.YSplineLength;

I hope that helps,
Paul
Paul Roberts
iToo Software

#### RC2292

• Jr. Member
• Posts: 60
##### Re: Place Y Evenly a set distance form the top of an 2S Array
« Reply #2 on: May 17, 2022, 07:33:34 PM »
Thanks for the prompt in-depth reply Paul.
I'm not getting the results I want when the input is 20cm or more.

Dumb question but, is YSectionLength also only processed once?

Thanks again

#### RC2292

• Jr. Member
• Posts: 60
##### Re: Place Y Evenly a set distance form the top of an 2S Array
« Reply #3 on: May 17, 2022, 08:10:49 PM »
Actually I think I can achieve what I want using YSectionLength and transforming the YEvenly Segment's position on Y instead.

Apologies if I didn't explain my task very clearly.

Thanks again