Trouble laying straight track

eerbaugh

New member
Does anyone else find it hard to lay long stretches of straight track? When ever I use the staighten button, another part of the track that I previously laid curves. I tried laying one long straight section and then split the spline to insert the gradient, but the long sections slowed the computer down so much that I couldnt move around in surveyor. If anyone has some tips that would be great. 21 miles of track with out a curve.
 
Only ever straighten alternate sections. If two adjacent sections are straightened, and the spline points do not line up, Trainz will try to curve both slightly to acheive a compromise. If the 21m has to be dead straight, then lay it and split it, but don't forget, if you have hills, the strightening tool works in the vertical direction too...

Paul
 
Sorry eerbaugh I haven't laid long stretches of straight track although I've gotten the same slow down using several rulers stretched over 30 mile distances.

The straighten tool sometimes doesn't seem to do what we think it should. But that's the way Auran designed the track spline. It appears to be a special type of a cubic bezier spline with the 2 intermediate control point locations determined by the straighten flags and end points of the connecting splines at each end. Applying the straighten tool to a spline section (between 2 spline points or vertices) toggles the straighten flag for that spline - on/off each time you click on it. If the flag is set (toggled on) the spline will normally form a straight line between its 2 end points. Actually what really happens depends on the straighten flag setting on each of the splines that it's connected to. If the connecting spline at an end point has the straighten flag toggeled off the tangent to the spline at that end lies along the spline's chord (straight line to its other end point). If the adjacent spline has the straighten flag toggled on then it acts as if neither is set at that end and the tangent to the spline lies along the perpendicular to the bisector of the angle between the chords of the 2 splines. At a junction with 2 and 3 connecting splines at an end point it's a bit more complicated.

So using the straighten tool on a number of splines connecting end to end that aren't co-linear will result in a curved track line. As you move down the route using the tool you'll see previous sections snap back into a curved shape. Not something you were expecting. As Paul mentioned they are 3-d splines but straightening every other spline will still result in curved spline sections - but just in alternate sections because your points aren't co-linear (in a straight line) to start with. It's also easy to forget whether you last set or unset the straighten flag on a spline as the tool only acts as a toggle and there's no indication in Surveyor aside from guessing from the spline's behavior. TrainzMap gives an indication of the straighten flag setting and also allows you to toggle it.

Before following the long winded approach that follows I'd try laying a ruler (from the tools menu) out in Surveyor between the locations that you want to lay the long straight section. If Surveyor is still usable at that point use the ruler as the guide and lay the track along it using any reasonable length you want for the intermediate points.

If that didn't work too well the other way I'd approach laying a long 20 mile straight section manually would be to calculate the coordinates of points along the section. Using an intermidate length of say 500m or something more appropriate for setting grades and it needn't be a constant distance. Although after you get the track laid in reasonable lengths you can go back and add in points where you need grade changes.

In Surveyor you can get the xy coords (meters from the global origin of the map) of the compass point displayed with a setting in the trainzoptions.txt file. It can be quite useful at times. (Some people might use the long/lat feature that's built-in but I have my own concerns with this and never use it. The scales are not equidistant like the xy coords so it's a bit tricker to use for this purpose) The coods are the same as the ones displayed by TrainzMap except the north one (x) is multiplied by -1 in TrainzMap so that north is in a positive direction while in Surveyor going north is in a negative direction.

In Surveyor with the compass point set alternately at the end points of the straight section you want to create you can get the coords of those points and then with some basic algrebra calculate the coords of any intermediate points you need. Use some of the marker pins or a pine tree even and place one at each point you need locating them by moving the compass to the correct coord location. Then lay the track placing an end point at each marker.

Personally I don't lay track like this. I do it by drawing it in a cad program like Cadrail, TurboCad or Autocad setting what ever intermediate spacing I wanted and then converting the cad drawing directly to a trk file using the utility I wrote. But that's not an option many Trainz users want to follow. There are a lot of pit falls to that process too. But that's the way I'd probably do it since I'd have the rest of the route in cad to start with.

Bob Pearson


Edit: In case anyones interested (and all this good stuff from the old forum is gone for now) adding the following line to the trainzoptions.txt (either TRs2006 or 2006) will display the coordinates of the compass point in surveyor:
-loc
 
Last edited:
Thanks Rob - I have often battled to get straights to behave properly. No reason why they should now, but at least I will understand why they don't...

andy :)
 
I did a 50 mile straight track once. I laid a ruler out over the roadbed, then laid a spline point along it at least once each baseboard (I did twice per board to keep the sections visible to the video card:D ). That way the program could keep track of the full length of the visible track without calculating what it was doing 50 baseboards away. Then I only had to straighten the last section on each end, plus along any turnouts.
I like the idea of laying the straight section in one piece then adding spline points. That's probably the easiest way to do it.

:cool: Claude
 
I got my 21 miles laid and it looks pretty straight. I laid long sections, about 5-10 miles at a time and then went back and inserted points to adjust the grade. It looks pretty good. There are a couple of slight curves, but when you are driving the train they will be hardly noticible. I have to go back and put in sidings, hopefuly that wont mess anything up.
 
Be warned also, that the smoothenr tool does not work well on very long straights. It does not act on any ground that is not being displayed on screen when you press it.
 
Back
Top