Itoo Software Forum
RailClone => RailClone Pro (*) => Topic started by: George on December 09, 2013, 01:41:50 AM
-
I have the following (attached) segments. The RC object should be as follows:
CornerA - MidA (repeat as necessary) - MidB (middle) - MidC (repeat as necessary) - CornerB
I can do 90% of that, using a conditional for MidA and MidC (greater and less than 50% of the spline section) but I can't work out how to place MidB in the centre, and most importantly only once.
-
I'm afraid there is no way to place a "Default" segment exactly at spline's center, because these segments are used to fill the gaps between spline sections. And the only rules that may "break" the spline and create sections are Evenly and Corner.
You would use an "Evenly" segment and adjust the distance parameter to place an unique piece at center, but each spline will require a different distance. Other alternative is to add a vertex manually at the spline's center, and use the Corner rule. Unfortunately i cannot see any automatic method for this case.
-
I think "evenly" is the way to go too. I was thinking you could have the option to express the distance as a percentage, but a more "node-friendly" way to do this might be to have a SplineInfo and SectionInfo node, where each one outputs, amongst other things, a length parameter. That way I could apply some arithmetic to it (length / 2) and feed it into the "evenly distance" parameter.
-
Apologies Carlos, I just found the expression variables in the arithmetic mode - this may solve my problem!
-
Yes, i tried also using an Arithmetic (expression) operator to define the distance, according to the spline's length. Unfortunately that doesn't work because the Evenly partition is done before evaluating the scene's operators.
I'm looking some way to avoid this limitation, although it's not simple because internally certain processes must be done in a strict order.