Skip to content

tool gauge

laurel Lin edited this page Aug 22, 2026 · 2 revisions

Tool: Track Gauge Converter

Entry: Tools → Track Gauge Converter (Action create_track_gen.gauge) Source: src/ui/gauge.ts

What it does

A single dialog showing inches / millimeters / pixels (1/16 block) / output value at once. Typing a value into any input updates the other two and the "output value" (Create curve scale constant, read-only) together — no conversion or button press needed. Defaults to Create's nominal gauge of 1600 mm.

Input fields

Field Purpose
Inches (in) Enter a gauge in inches to convert to mm / px and the scale constant (1 inch = 25.4 mm)
Millimeters (mm) Enter a gauge in mm to convert to in / px and the scale constant (1 block = 1 m = 1000 mm)
Pixels (1/16 block) Enter a gauge in pixels to convert to in / mm and the scale constant. px is the generation basis (mm = px×1000/16, in = mm/25.4)

Any positive number triggers the conversion; non-numeric or ≤ 0 input is ignored.

Output (read-only)

Display Purpose
Output: Create curve scale Computed from the pixel gauge via the quadratic fit (scaleForPx); read-only. Create uses it to turn curve bend angles into the render-time scale

Notes section

The dialog always shows at the bottom:

  • Fit formula: the quadratic polynomial (fitted through the three anchors).
  • Anchors: 1435mm→0.755, 1600mm→0.965, 1000mm→0.525 — useful as a sanity check.

Bottom button

A single OK button (closes the dialog). This tool writes no files and changes nothing in the workspace.


← Home · 中文版

Clone this wiki locally