Glad it helps. I'll do my best to answer your questions below.
It works as a transition point because you didn't plug the segments into marker node right? It keeps default array but marker is a kind of breaking point I think.
That's it. The marker is just being used to change the segment used for the Default geometry but it doesn''t actually break the array. The Selector operator uses the ID of the previous marker found on the spline.
I know it simple for you but could you please explain the expression? XSplineLength means total length or remaining length after current segment/point?
So it checks remaining empty space for "divider+shelf" fits or not, after every new step?
Sure. The expression is finding out how much space is left in the spline. If there isn't enough space left for a whole segment, it chooses an empty (null) segment instead which kills the array. To achieve this we use a few properties:
- XSplineLength | This is the full length of the current X Spline
- XSplinePosition | This is the position along the spline measured from 0.0 at the start to 1.0 at the end.
By multiplying these two together you can find the distance of the spline before the current segment. XSplinePosition*XSplineLength
By subtracting the result of that from XSplineLength you can find out how much of the spline remains. XSplineLength-(XSplinePosition*XSplineLength)
The If statement is therefore checking to see if remaining space on the spline is sufficient to add a new segment.
One last question; How can I center this array on the spline. In order to prevent loop, I created a new L1S. Connected the same spline, connected previous array on start node. Finally I exported X Size from first array into an expression like this;
"return (XSplineLength - input1) / 2;" I connected this into "padding start". It says expression ok but nothing happens. What am I doing wrong? You may check the image.
Certain paramenter are evaluated at the start and cannot be controlled using expressions. You could do the same thing though by wiring the generator through a Transform node and using the expression to control the Left Padding. You should be aware though, that this approach will only really work your spline is oriented perfectly along the X X Axis. Any other direction will result in the array being rotated twice. I can't currently think of another way to align the array to the center of a spline. If I can come up with a solution, I'll post here.