Menu

CompoundElements

FileFormat (7)
Russell Shilling

Compound Elements

BEZIER

BEZIER (sp) index (sp) layer (sp) track-width (sp) color (sp) 0.000000
(sp) scale (sp) visible&no_ties&bridge&roadbed (sp) X1 (sp) Y1 (sp) X2 (sp) Y2 (sp) X3 (sp) Y3 (sp) X4 (sp) Y4 (sp) 0 (sp) desc-X (sp) desc-Y

    Two end points (E or T)
    A set of Curve Segment definitions
    END$SEGS

track-width is an integer from 0 is thin, 1 is medium, 2 is thick. This affects how the track is drawn. It is added to by the track label field, If the field is 128 or larger, the track label is shown..

BEZIER 6 0 0 0 0.000000 HO 2 42.000000 18.000000 48.750000 20.125000 59.375000 15.875000 66.000000 17.000000 0 0.000000 0.000000
E 42.000000 18.000000 252.525226
E 66.000000 17.000000 80.362462
C3 16711680 0.000000 16.835800 46.528590 1.784697 344.396080 19.477771
C3 0 0.000000 65.722927 43.727987 -47.022809 3.435143 6.314718
C3 0 0.000000 -101.781263 71.554878 118.153232 186.074628 3.367245
C3 0 0.000000 -20.562674 63.171002 37.367138 172.092205 14.573946
END$SEGS

BZRLIN

BZRLIN (sp) index (sp) layer (sp) 0 (sp) 0 (sp) line-width
(sp) scale (sp) visible (sp) X1 (sp) Y1 (sp) X2 (sp) Y2
(sp) X3 (sp) Y3 (sp) X4 (sp) Y4 (sp) 0 (sp) desc-X (sp) desc-Y

    A set of curved line segment records
    END$SEGS

BZRLIN 2 0 0 0 0.000000 HO 2 7.000000 11.000000 25.625000 17.875000 35.375000 16.875000 33.000000 13.000000 0 0.000000 0.000000
A3 0 0.000000 104.148703 43.604058 -86.504335 0 339.423385 7.055613
A3 0 0.000000 42.504723 29.655774 -26.454475 0 345.834557 12.852734
A3 0 0.000000 9.941335 28.926786 6.100771 0 358.589229 19.703146
A3 0 0.000000 2.010337 31.469831 13.614051 0 16.685477 47.099725
A3 0 0.000000 1.718451 31.621998 14.026734 0 73.941420 52.747979
END$SEGS

The desc-X is a number from -0.5 to 0.5 as a ratio of the line that joins the ends of the Bezier. The desc-y number is a number of inches orthogonal to that.

CORNU

CORNU (sp) index (sp) layer (sp) width (sp) 0 (sp) 0 (sp) scale (sp) visible&no_ties&bridge&roadbed (sp)
pos1x (sp) pos1y (sp) angle1 (sp) radius1 (sp) center1x (sp) center1y (sp) pos2x (sp) pos2y (sp) angle2 (sp) radius2 (sp) center2x (sp) center2y

    Two end points
    A set of Bezer Track segments
    END$SEGS

The desc-X is a number from -0.5 to 0.5 as a ratio of the line that joins the ends of the Cornu. The desc-y number is a number of inches orthogonal to that.

Note line-width is from 0-127.It is added to by the label field, if the field is 128 or larger, the track label is shown.

Each Bezier Track segment has a section starting with SUBSEGS, 1 or more straight or curve segments, and ending SUBSEND

CORNU 28 0 0 0 0 OO 2 146.000000 58.000000 270.000000 0.000000 0.000000 0.000000 196.894263 34.350590 93.144957 0.000000 0.000000 0.000000
T 29 146.000000 58.000000 270.000000
E 196.894263 34.350590 93.144957
W3 0 0.000000 146.000000 58.000000 148.424081 58.000000 150.857211 57.973162 153.254630 57.614622
SUBSEGS
C3 0 0.000000 49.010944 147.034591 8.999977 358.790432 8.500708
SUBSEND
W3 0 0.000000 153.254630 57.614622 155.652049 57.256083 158.002995 56.570252 160.198336 55.542320
SUBSEGS
C3 0 0.000000 25.163319 149.605287 32.717335 8.338802 16.557159
SUBSEND
W3 0 0.000000 160.198336 55.542320 164.589019 53.486456 168.183655 50.084658 171.593567 46.638330
SUBSEGS
C3 0 0.000000 28.983672 147.591955 29.443806 25.781965 14.325058
C3 0 0.000000 70.800370 120.689955 -2.570560 40.067839 5.901981
SUBSEND
W3 0 0.000000 171.593567 46.638330 175.003478 43.192002 178.513299 39.721681 182.823293 37.501630
SUBSEGS
C3 0 0.000000 -87.944840 234.845476 107.740628 221.240049 4.750279
C3 0 0.000000 -31.190382 197.445339 65.052232 207.956421 13.316043
SUBSEND
W3 0 0.000000 182.823293 37.501630 187.133286 35.281578 192.053403 34.616571 196.894263 34.350590
SUBSEGS
C3 0 0.000000 -26.037017 194.490495 60.778284 190.692357 15.929527
C3 0 0.000000 -51.011591 199.164279 85.311648 182.550505 8.187707
SUBSEND
END$SEGS

DRAW

DRAW (sp) index (sp) layer (sp) lineType (sp) 0 (sp) 0 (sp) start-x (sp) start-y (sp) start angle
    A set of line segments
    END$SEGS

Note that most often the start-x and start-y is set to the layout origin 0,0, but it doesn't have to be. The start-angle is a rotation about that origin - most frequently 0.

LineType - 0=solid, 1=dashed, 2=dots, 3=dash-dot, 4=dash-dot-dot

JOINT

JOINT (sp) index (sp) layer (sp) width (sp) 0 (sp) 0 (sp) scale (sp) visible&no_ties&bridge&roadbed (sp) L0
(sp) L1 (sp) R (sp) L (sp) flip (sp) negate (sp) Scurve (sp) x (sp) y (sp) 0 (sp) angle

    Two end points (Both Ts as a JOINT must be connected)
    END$SEGS

The Joint is used for joins that don't use a Cornu. The values of L0, L1, R and L are taken from the settings of the Join screen - they define the shape as a part cut using L0 to L1 of a standard curve with offset from an arc of radius R of Length L. Negate means the curve is reversed. Scurve is two identical transition curves joined back to back each of half the gap length. x and y is the relative origin and angle is a rotation angle.

TURNOUT

TURNOUT (sp) index (sp) layer (sp) options (sp) postion (sp) 0 (sp) scale (sp)visible&no_ties&bridge&roadbed (sp)origx (sp) origy (sp) elev (sp) angle (sp) "Manufacturer<tab>Description <tab>Part<tab>"</tab></tab></tab>
    A set of X records for Adjustable or Piers or Curved Ends - optional
    A D Description record
    A set of P Path records
    A set of track segments (one or more)
    A set of line segments (if any)
    END$SEGS

A turnout is a group of segments that are treated as a unit - A turnout always has at least one track element and may not actually be a turnout in railway terms at all (could be a simple fixed piece of track). It is defined so that all the segments within are relative to its origin and angle. The same definition (with zero origin and 90 degree angle) exists in the parm file. The scale is used to decide whether to show it in the hotbar. Note that the definitions up to and including V5 all have the track elements first and any line segments second. This means the line segments will be drawn on top of the track.

Options is a set of values that are added together.

Turnout/Structure Options

Options Meaning
0-7 Width
8 Handlaid
16 Flipped
32 Ungrouped
64 Split
128 Label Hidden
256 Override
512 NoCombine

Handlaid indicates the TURNOUT is HandLaid.

Flipped, Ungrouped and Split specify that the object has had one or more of these operations applied.
Label Hidden controls whether the label is hidden.

Override and NoCombine control how paths are created for TURNOUTs. Override means that no automatic path generation is done. NoCombine means that Sub-Path Combination is not done, typically for Turntables, Transfer Tables and Double Slip switches. This is for future work, but these flags are ignored for now.

STRUCTURE

STRUCTURE (sp) index (sp) layer (sp) lineType (sp) 0 (sp) 0 (sp) scale (sp)visible (sp) origx (sp) origy (sp) elev (sp) angle (sp)"textfield1 <tab> textfield2 <tab> textfield3"</tab></tab>
    A D Description record
    A set of line segments
    END$SEGS

A structure is a group of segments that are treated as a unit - A structure has no track elements. It is defined so that all the segments within have positions and angles are relative to its origin and angle. The same definition (with zero origin and 90 degree angle) exists in the parm file. The scale is used to decide whether to show it in the hotbar.

LineType - 0=solid, 1=dashed, 2=dots, 3=dash-dot, 4=dash-dot-dot

Options is a set of values that are added together. Note -> not all of these may apply to a structure. See Turnout/Structure Options above.

CAR

CAR (sp) inx (sp) scale (sp) "Title" (sp) options (sp) type (sp) length (sp) width (sp) 0 (sp) truck-center-offset*1000 (sp)truck-center (sp) coupled-length (sp) color (sp) puchaseprice (sp) currentprice (sp) condition (sp) purchdate (sp) servdate (sp) "notes"

Title consists of a set of tab delimited fields that are arranged like this Manufacturer<\t>Prototype<\t>Description<\t>Part<\t>Road<\t>Reporting Mark<\t>Number

The truck-center offset is the offset in inches increased by 1000 to turn it into an integer.

If deployed on the layout, a line of details is appended to the object definition line
** (sp) carIndex (sp) layer (sp) pos.x (sp) pos.y (sp) angle**

followed by two E records for the ends, followed by END$SEGS


Related

Wiki: FileFormats

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.