2.5.8.5. Designing a clearance template
A clearance template is a DXF drawing of a clearance profile that the program reads with Import DXF… or Add from DXF files…. This chapter explains how to draw it so that the clearance check of the clearance viewer does what you expect: which lines are checked and which are only drawn, how a line becomes an area, and how to draw a platform template.
2.5.8.5.1. Envelope and reference lines
Every polyline of a template has a kind:
envelope — the line is used by the check. It bounds an area; the clearance of every point is measured to it (negative when the point is inside). Draw as envelope the outlines that surveyed objects must stay out of: the nominal installation gauge, a platform limit, a pantograph gauge you want to check.
reference — the line is only drawn (dashed) to show context: the kinematic reference profile, a pantograph chimney you do not want to check, a tolerance marker, a height marker, a note line. Points are never measured to it.
The kind is part of the template. It comes from the layer name when
the DXF is read (REF_ in front = reference, see below), it is shown
in the Kind column of the profile editor, and in the clearance
viewer Lines to check shows it as a tick: ticked = envelope,
unticked = reference. Ticking a line there turns it into an envelope
line and the choice is kept with the alignment.
Why a line cannot be ticked. The check asks whether a point is inside an area. A line with fewer than three points encloses no area, so it is always a reference line: the viewer shows it greyed out and the import makes it reference whatever its layer. Short markers — a tolerance tick, a height mark, an axis line — are therefore always display only. To check against such a zone, draw it as a closed outline with at least three points.
2.5.8.5.2. The coordinate system of the drawing
Units: metres. A drawing in millimetres comes in 1000 times too large: scale it by 0.001 before saving.
Origin (0, 0): the top of rail (running surface) at the track centre, not the rail foot and not the formation level. The rail head centres are at
x = ±b/2(b= gauge + rail head width, 1.507 m for standard gauge and 60E1), with their top ony = 0.+X to the right of the direction of travel. For a curve profile of a gauge study put the inside of the curve on +X (that is how the templates of the program are drawn) and mirror it in the editor when the inside of the curve is on the left.
+Y up, square to the top-of-rail plane. Draw the template upright, as on straight track: the program turns it with the cant along the alignment. Do not draw a canted template.
2.5.8.5.3. Layers, colours and entities
One layer per line. Each polyline is named after its layer. Use
clear, unique names; a second polyline on the same layer gets 2,
3, … after the name.
Layer |
Imported as |
Use |
|---|---|---|
|
envelope |
an outline to check |
|
reference |
a line to draw only |
|
reference |
a line to draw only (tick it in the viewer to check it) |
|
envelope |
the limit of a platform edge |
|
reference |
a marker (two points: always reference) |
The prefix
REF_(any case) makes a reference line and is removed from the name; every other layer gives an envelope line. The export writes the prefix back, so a template goes out and comes back in unchanged.The colour is the entity colour, otherwise the layer colour.
Entities read:
LWPOLYLINE,POLYLINEandLINE. Lines of one layer that meet end to end are joined into one polyline. Text, dimensions, hatches, blocks and 3D entities are skipped (the import message counts them), so the drawing may carry notes and dimensions.Arcs are read as straight segments between the polyline vertices (the message warns about it). Draw an arc as a polyline with enough vertices — every 5 – 10 cm is plenty for a gauge outline.
2.5.8.5.4. How a line becomes an area
For the check, every envelope line with at least three points is an area. When the line is open, the program closes it with a straight edge from its last point back to its first. The editor and the viewer draw that closing edge dotted.
a) A closed polyline is its own outline.
b) An open U — the usual gauge drawing, open at the bottom — is closed by a straight edge between its two lower ends. Draw the U so that this straight edge is where the area should end (for the nominal gauge: the lowest points of the lower part on both sides).
c) Wrong: a line drawn on one side only is closed by a diagonal edge and bounds a triangle. Always draw the whole outline, both sides, in one polyline.
The direction of the line (clockwise or not) and the first point do not matter, as long as the closing edge is where you want it.
2.5.8.5.5. Several envelope lines
a) Several envelope lines form one area: a point is inside when it is inside any of them. Its clearance is the depth in the line it is deepest in, or the distance to the nearest line when it is outside all of them; that line is the governing line of the point.
b) A line inside another is not a hole. The program has no holes: everything inside the outer line is inside. Do not draw “free” zones as inner outlines.
c) Do not let a line cross itself. Inside is decided with the even–odd rule, so where a self-crossing outline overlaps itself the area counts as outside. Draw simple outlines; split a complicated shape into several envelope lines.
A gap between two envelope lines is not checked. For example, between the top of the nominal gauge (about 4.85 m) and the bottom of a pantograph chimney (5.00 m) there is a strip that belongs to neither.
2.5.8.5.6. Designing a platform template
At a platform the edge must be as close to the train as allowed, but
not closer. A gauge study gives the limit position b_lim of the
platform edge on the inside and the outside of the curve, at the nominal
platform height h_cr (0.760 m), measured from the track centre in
the top-of-rail plane, and a tolerance (0.050 m): the edge must lie
between b_lim and b_lim + 0.050 (see Platform templates).
Draw it like this:
PLATFORM_LIMIT — the envelope. One closed polyline: the rectangle from
x = −b_lim,atox = +b_lim,i(outside of the curve on −X, inside on +X), from the bottom of the platform nose (h_cr − 0.25= 0.51 m) up to the height where the limit stops applying (1.17 m in the templates of the program). Its two vertical sides are the platform limits; the box between them is the space the platform edge must stay out of.REF_PLATFORM_TOLERANCE — markers. Two short lines at
±(b_lim + 0.050): they show where the tolerance ends. They are not checked and do not need to be: the tolerance is the number in the viewer (next step).REF_PLATFORM_TOP — markers. Short lines at the platform height 0.760 m beside the limits.
The station gauge — reference only. Add the nominal gauge, the kinematic profile and the pantograph lines of the station with
REF_layers, for context. Never as envelope: at platform height the general nominal gauge is wider than the platform limit (about 1.70 – 1.75 m against 1.65 – 1.68 m), so every correct platform edge would be inside it.
The tolerance is a number, not a line. In the clearance viewer,
Check = Platform edge (chosen by itself for a profile with a ticked
PLATFORM… line) measures every edge point to PLATFORM_LIMIT and
compares the clearance with Tolerance (m):
C < 0— TOO CLOSE: the edge is inside the limit;0 ≤ C ≤ tolerance— OK;C > tolerance— TOO FAR: the gap to the train is too wide.
So for a platform check tick only PLATFORM_LIMIT, load only the
platform edge points, and check each platform with the alignment of the
track beside it (see Platform edge check).
Tip
To check other objects against the tolerance zone too, draw the
zone as a closed polyline (for example PLATFORM_ZONE: from
b_lim to b_lim + 0.050 and from 0.51 to 0.76 m) instead of
two markers. It can then be ticked in the viewer like any envelope.
2.5.8.5.7. Checklist before importing
Units in metres, origin on the top of rail at the track centre,
+Xright (inside of the curve),+Yup.The template is drawn upright (no cant).
Each outline to check is one polyline with at least three points, drawn all round — both sides — and, if open, open only where the straight closing edge belongs.
Outlines do not cross themselves; no inner “hole” outlines.
Lines to draw only are on layers starting with
REF_.Arcs are broken into polyline vertices.
One layer per line, with a clear name.
After Import DXF…: check the Kind column and the preview — envelope lines solid, reference dashed, the closing edge of every open envelope dotted where you expect it.
In the clearance viewer: Lines to check shows the envelope lines ticked; lines with fewer than three points are greyed out.