2002-05-20

Track length calculator

Updated 4 November 2006 to version 1.5

Here is a tiny Windows program that will calculate the fewest pieces of Märklin straight track needed to make up any length. It is able to handle K-Track,  C-Track, M-Track as well as Z scale and I Gauge track pieces.

The program will also work out the required distance if the you know the offset you wish to achieve at a given angle. All the angles that can be produced with Märklin tracks are included.

Here the program has been asked to find the best set of K-Track lengths to produce a length of 256mm...

the result is 4 pieces, one length of 2207 track, two 2208 lengths and a single 2203.  These four pieces will be 0.2mm longer than 256mm

Now the angle calculations...

Select either X or Y depending on if the distance you are trying to produce is adjacent (X) or opposite (Y) to the angle at which the tracks will be inserted..

Example
If you have a loop of track and the ends do not meet perfectly and you want to insert a correction in the middle of a curve that is 30° to the tracks that don't meet up....

Imagine the right angled triangle, determine if the shift you want is opposite or adjacent to the angle. In this case it is opposite


Say you have two parallel station tracks connected with two turnouts having an angle of 14.43°  If you need to know how much straight to insert between the two turnouts to shift the tracks an additional 50mm...   select the angle and solve for Y

If you want to copy the solution to the clipboard, click the 'Copy' button.

Download  the program (60K) from: http://s3.amazonaws.com/betriebswerk/CALC.exe
Right click and select "Save link as..." (or similar) and save the file.
Because it is an executable file and I have no way to sign the executable, Windows may try to prevent the file from being downloaded. In that case, open your Windows Internet properties, go to the 'Advanced' tab and uncheck the option called: "Check for signatures on downloaded programs"

After downloading the file you can check the box again.
Windows may initially not want to run the program, if so, click 'More info' then 'Run anyway'.

Usage
Free non commercial use is granted, nothing more.
The program is written in Visual Basic 6.0 so it may need the VB runtime module if your computer does not already have it. If it complains that the .dll is missing, you can follow this link to obtain the file from Microsoft. Download vbrun60.exe from Microsoft

Version history

1.0 May 2002
  • Initial version

1.5 November 2006
  • Added M, Z and 1 track plus more angles
  • Add copy to clipboard button
  • Corrected typo in an error message
  • Added some brief instructions to this page

Thanks to Mark Edwards for supplying the M-Track, Z and 1 scale track lengths and suggesting the copy to clipboard feature...

1.6 December 2018
  • Added options to control if the solution may be longer or shorter.
Typically this is to allow solutions that may be a bit short, but not too long, as small gaps can be handled easily. Thanks to Henrik Hoexbroe for suggesting the feature.