Itoo Software Forum

RailClone => RailClone Pro (*) => Topic started by: W on November 07, 2019, 03:33:01 PM

Title: Distance between markers.
Post by: W on November 07, 2019, 03:33:01 PM
Is it possible to access the distance between markers?
Like if I want a segment starting from one marker till the next marker, and another segment starting from the second marker and so on?

Is this possible with markers or do I have to use vertices like before?
The markers are really nice to add information.
Title: Re: Distance between markers.
Post by: W on November 07, 2019, 03:57:31 PM
I attached an example.
Is it possible to do this without scaling the start/end-segments of the first generator?
Title: Re: Distance between markers.
Post by: Rokas on November 07, 2019, 04:12:21 PM
I will answer to Your first post question.

There is no access for distance between markers. However You can use default input and break it on Markers in Scale Mode:
(https://i.imgur.com/LFBxy1S.gif)

I do not understand, what You mean in Your second post. Would You please clarify (max files are also very welcome) ?
Title: Re: Distance between markers.
Post by: W on November 07, 2019, 04:20:02 PM
That's what I did in my example, scaling or adaptive between markers.
Is it possible to only scale the def segment and not the start/end-segments of the nested generator?

The max file is attached.
Title: Re: Distance between markers.
Post by: Rokas on November 08, 2019, 08:56:10 AM
Hi I would like to correct myself, You can get distance between markers with XSectionLength XSectionNextLength functions.
It is not yet mentioned in functions help section, so we will update them as well.

(https://i.imgur.com/JoUvNIo.png)

attached demo scene
Title: Re: Distance between markers.
Post by: W on November 08, 2019, 10:32:41 AM
Thank you!
I didn't expect a solution.

Something else I notice now.
For the first marker at the start I have to use XSectionLength, afterwards XSectionNextLength.
Code: [Select]
Return if(Linear_1S1.XSplinePosition==0.0, Linear_1S1.XSectionLength, Linear_1S1.XSectionNextLength);Otherwise the segment at the start takes the length of the next section.