Following up on an issue I noticed last year, I want to share the root cause, my solution, and move this thread to the TSRE forum.
Original post:
I noticed TSRE has trouble recognizing "SectionSkew" entries in the global tsection.dat when placing track shapes that reference them. This leads to misaligned TDB vectors even though the track pieces snap together properly in the editor. The point shapes for Mtracks #20 and #24 switches (M1tPntNo2*.s) happen to start with a skew section followed by a curve for the diverging path. When placed in TSRE, the initial ~0.5 degree skew gets skipped causing the TDB vectors to miss the blue pole on the adjacent Mtracks frog or xover shape. I tested this theory by placing the default A1t10mSkew.s in TSRE and found the same result - the TDB vector doesn't align with the following piece.
What I saw in TSRE when placing a #20 Mtracks point, global tsection build 0056:
mtracks-point-issue.jpg
I found a way to patch this issue by using the OpenRails include file feature. I created a file named "tsection.dat" and placed it in a folder named "openrails" within the directory of whichever route I'm editing in TSRE. Then, I wrote modified entries for the Mtracks points' skew sections that will temporarily replace the global tsection.dat entries whenever TSRE or OR loads the route.
Starting from the global tsection.dat, build 0056:
I simply changed the "SectionSkew" lines to read "SectionCurve" and entered a 0.001m radius for each, while copying the degree of curvature over from the original skew entries. By replacing the culprit skew sections with an extremely short curve section, the TDB vectors for the Mtracks points now line up properly with the other shapes in the set.
The tested include file with required header (remember to include an empty first line if copying):
Here's the result when I place a #20 Mtracks point in TSRE with the include file in place:
mtracks-point-fixed.jpg
Everything lines up without the unwanted blue poles. Throughout this process, I learned a lot about the structure of the tsection.dat and the usefulness of patching it locally with an include file - let me know if you have any questions.
-Matt
Original post:
I noticed TSRE has trouble recognizing "SectionSkew" entries in the global tsection.dat when placing track shapes that reference them. This leads to misaligned TDB vectors even though the track pieces snap together properly in the editor. The point shapes for Mtracks #20 and #24 switches (M1tPntNo2*.s) happen to start with a skew section followed by a curve for the diverging path. When placed in TSRE, the initial ~0.5 degree skew gets skipped causing the TDB vectors to miss the blue pole on the adjacent Mtracks frog or xover shape. I tested this theory by placing the default A1t10mSkew.s in TSRE and found the same result - the TDB vector doesn't align with the following piece.
What I saw in TSRE when placing a #20 Mtracks point, global tsection build 0056:
mtracks-point-issue.jpg
I found a way to patch this issue by using the OpenRails include file feature. I created a file named "tsection.dat" and placed it in a folder named "openrails" within the directory of whichever route I'm editing in TSRE. Then, I wrote modified entries for the Mtracks points' skew sections that will temporarily replace the global tsection.dat entries whenever TSRE or OR loads the route.
Starting from the global tsection.dat, build 0056:
Code:
_INFO( Number 20 Pnt sections) TrackSection ( 31820 SectionSize ( 1.5 0 ) SectionSkew ( -0.5529 ) ) TrackSection ( 31821 SectionSize ( 1.5 0 ) SectionSkew ( 0.5529 ) ) _INFO( Number 24 Pnt sections) TrackSection ( 31842 SectionSize ( 1.5 0 ) SectionSkew ( -0.5461 ) ) TrackSection ( 31843 SectionSize ( 1.5 0 ) SectionSkew ( 0.5461 ) )
The tested include file with required header (remember to include an empty first line if copying):
Code:
include ( "../../../Global/tsection.dat" ) TrackSections ( 40000 _INFO(Mtrack No20 point skew) TrackSection ( 31820 SectionSize ( 1.5 0 ) SectionCurve ( 0.001 -0.5529 ) ) TrackSection ( 31821 SectionSize ( 1.5 0 ) SectionCurve ( 0.001 0.5529 ) ) _INFO(Mtrack No24 point skew) TrackSection ( 31842 SectionSize ( 1.5 0 ) SectionCurve ( 0.001 -0.5461 ) ) TrackSection ( 31843 SectionSize ( 1.5 0 ) SectionCurve ( 0.001 0.5461 ) ) )
mtracks-point-fixed.jpg
Everything lines up without the unwanted blue poles. Throughout this process, I learned a lot about the structure of the tsection.dat and the usefulness of patching it locally with an include file - let me know if you have any questions.
-Matt





Comment