@willcgage/module-schematic 0.112.0 → 0.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.cts CHANGED
@@ -2601,13 +2601,23 @@ interface PartGeometry {
2601
2601
  * builder's business, and every real double crossover pinches them closer.
2602
2602
  *
2603
2603
  * The derivation:
2604
- * - **Length** is `overallLength × piecesPerAssembly`. Fast Tracks' figure is
2605
- * ONE HALF the fixture builds a symmetrical half you make twice and butt
2606
- * together after turning the second 180°.
2604
+ * - **Length IS `overallLength`.** ⚠️ `piecesPerAssembly` counts BUILDS, not
2605
+ * length: you make the fixture's half twice and turn the second 180°, and the
2606
+ * two diagonals then SUPERIMPOSE into the scissors — they occupy the same
2607
+ * stretch of track, they do not sit end to end. Multiplying by it gave a #6 a
2608
+ * 20.14″ body with **6.8″ of plain approach track moulded on each end**.
2609
+ * `minimumLength` settles it independently: the shortest #6 build is 9.31″,
2610
+ * which reads as "trim the approach to 1.38″" — and only reads that way if the
2611
+ * assembly is L. Under 2L a "minimum" would still carry a 6″ approach.
2607
2612
  * - **The crossing run** `W = spacing / tan θ` is how far along the track a route
2608
2613
  * takes to cross to the other one. The two point-sets on the SAME track are
2609
2614
  * therefore `W` apart — 6.54″ for a #6 at 1.09″, not the 2.5″ my own FMN-0078
2610
2615
  * fixture claimed.
2616
+ * - **The approach**, `(length − W) / 2`, is what is left over at each end: the
2617
+ * straight tie strip from the start of the moulding to the start of the points.
2618
+ * ⭐ Will named this as the measurement that has to be right (2026-07-28), and
2619
+ * it is where the through routes take their rail joints. 1.76″ on a #6, 2.45″
2620
+ * on a #8 — it grows with the frog, as it must.
2611
2621
  * - Both crossing routes are centred on the assembly, so they meet in the middle
2612
2622
  * at `2θ` — which is exactly the {@link TrackPart.secondaryFrogAngle} Fast
2613
2623
  * Tracks publish, an independent check that this reading is right.
@@ -2618,6 +2628,14 @@ declare function crossoverAssembly(part: TrackPart): {
2618
2628
  spacingInches: number;
2619
2629
  /** Along-track distance a crossing route takes to reach the other track. */
2620
2630
  crossingRunInches: number;
2631
+ /**
2632
+ * Start of the moulding → start of the points, at each end.
2633
+ *
2634
+ * ⭐ The measurement that has to be right for the drawing to read as track:
2635
+ * it is the plain tie strip a crossover begins and ends with, and therefore
2636
+ * where the through routes are jointed.
2637
+ */
2638
+ approachInches: number;
2621
2639
  /** Where the four point-sets sit along the assembly. */
2622
2640
  pointsAtInches: [number, number];
2623
2641
  /** The X where the two crossing routes meet — a real diamond in the middle. */
package/dist/index.d.ts CHANGED
@@ -2601,13 +2601,23 @@ interface PartGeometry {
2601
2601
  * builder's business, and every real double crossover pinches them closer.
2602
2602
  *
2603
2603
  * The derivation:
2604
- * - **Length** is `overallLength × piecesPerAssembly`. Fast Tracks' figure is
2605
- * ONE HALF the fixture builds a symmetrical half you make twice and butt
2606
- * together after turning the second 180°.
2604
+ * - **Length IS `overallLength`.** ⚠️ `piecesPerAssembly` counts BUILDS, not
2605
+ * length: you make the fixture's half twice and turn the second 180°, and the
2606
+ * two diagonals then SUPERIMPOSE into the scissors — they occupy the same
2607
+ * stretch of track, they do not sit end to end. Multiplying by it gave a #6 a
2608
+ * 20.14″ body with **6.8″ of plain approach track moulded on each end**.
2609
+ * `minimumLength` settles it independently: the shortest #6 build is 9.31″,
2610
+ * which reads as "trim the approach to 1.38″" — and only reads that way if the
2611
+ * assembly is L. Under 2L a "minimum" would still carry a 6″ approach.
2607
2612
  * - **The crossing run** `W = spacing / tan θ` is how far along the track a route
2608
2613
  * takes to cross to the other one. The two point-sets on the SAME track are
2609
2614
  * therefore `W` apart — 6.54″ for a #6 at 1.09″, not the 2.5″ my own FMN-0078
2610
2615
  * fixture claimed.
2616
+ * - **The approach**, `(length − W) / 2`, is what is left over at each end: the
2617
+ * straight tie strip from the start of the moulding to the start of the points.
2618
+ * ⭐ Will named this as the measurement that has to be right (2026-07-28), and
2619
+ * it is where the through routes take their rail joints. 1.76″ on a #6, 2.45″
2620
+ * on a #8 — it grows with the frog, as it must.
2611
2621
  * - Both crossing routes are centred on the assembly, so they meet in the middle
2612
2622
  * at `2θ` — which is exactly the {@link TrackPart.secondaryFrogAngle} Fast
2613
2623
  * Tracks publish, an independent check that this reading is right.
@@ -2618,6 +2628,14 @@ declare function crossoverAssembly(part: TrackPart): {
2618
2628
  spacingInches: number;
2619
2629
  /** Along-track distance a crossing route takes to reach the other track. */
2620
2630
  crossingRunInches: number;
2631
+ /**
2632
+ * Start of the moulding → start of the points, at each end.
2633
+ *
2634
+ * ⭐ The measurement that has to be right for the drawing to read as track:
2635
+ * it is the plain tie strip a crossover begins and ends with, and therefore
2636
+ * where the through routes are jointed.
2637
+ */
2638
+ approachInches: number;
2621
2639
  /** Where the four point-sets sit along the assembly. */
2622
2640
  pointsAtInches: [number, number];
2623
2641
  /** The X where the two crossing routes meet — a real diamond in the middle. */
package/dist/index.js CHANGED
@@ -2212,7 +2212,7 @@ function crossoverAssembly(part) {
2212
2212
  const spacing = part.trackSpacing?.inches;
2213
2213
  const n = part.frogNumber;
2214
2214
  if (!overall || !spacing || !n) return null;
2215
- const lengthInches = overall * (part.piecesPerAssembly ?? 1);
2215
+ const lengthInches = overall;
2216
2216
  const tan = part.actualAngle ? Math.tan(part.actualAngle.deg * Math.PI / 180) : 1 / n;
2217
2217
  if (!(tan > 0)) return null;
2218
2218
  const crossingRunInches = spacing / tan;
@@ -2222,6 +2222,7 @@ function crossoverAssembly(part) {
2222
2222
  lengthInches,
2223
2223
  spacingInches: spacing,
2224
2224
  crossingRunInches,
2225
+ approachInches: mid - half,
2225
2226
  pointsAtInches: [mid - half, mid + half],
2226
2227
  scissorsAtInches: mid
2227
2228
  };