Itoo Software Forum
RailClone => RailClone Pro (*) => Topic started by: Joker1979 on June 29, 2022, 08:45:45 AM
-
I'm looking for a solution so that the lowest and the highest element is different than the middle, because I want to connect a staircase to it and it consists of 3 different elements. 2 of them I want to connect to the lowest and the highest element and the third should repeat. I cannot use the sequence because the building has to generate different heights so I need this solution. I have posted a picture showing the problem on the third last one I want to get this effect, or maybe there is another way to make these stairs so that they are separate and in harmony with the floors.
-
Hi,
There are a few ways you could do this, and really it depends how you are setting up the rest of the style. If the stairs are to be a separate generator, then it probably easiest to use the Top and Bottom inputs with the repeating section in the default. If you need to center the stairs along the side of the building , you could use the X Evenly input and use the Segment Y Role marker to target the top and bottom in a similar way.
If however you already have segments using the Top and Bottom inputs, then things are a little trickier. In this case you can use a Conditional operator testing Y Segment count to place the bottom part. The mid part is easy, but the top is a bit awkward. It can be achieved using expressions. Using XSplineLength and XSplinePosition you can find home much space remains in the spline at each segment.
YSplineLength-YSplineLength*YSplinePosition
One we know that we can check to see if the segment is smaller than the size of a single segment using a IF statement as follows
return if(YSplineLength-YSplineLength*YSplinePosition<=Input1+Input2,2,1);
Input 1 and Input 2 are the sizes of the Top segments (assuming you also have a frieze)
If the space remaining in the spline is equal or smaller than the size of a segment then the number 2 is returned, otherwise the expressions returns 1. This can then be wired to the Index property of a Selector node to switch between segments.
This is easier to show than explain, so I've attached a sample file for you to take a look at. It also includes the other two methods mentioned above.
Thanks,
Paul
-
Thank you very much for the quick help, I've never seen such a fast and concrete support and I want to do more in this program. Have a nice day.
-
You're very welcome!