Repository navigation
tool gauge
laurel Lin edited this page Aug 22, 2026
·
2 revisions
Entry:
Tools → Track Gauge Converter(Actioncreate_track_gen.gauge) Source:src/ui/gauge.ts
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.
| 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.
| 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 |
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.
A single OK button (closes the dialog). This tool writes no files and changes nothing in the workspace.