@willcgage/module-schematic 0.72.0 → 0.74.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.cjs CHANGED
@@ -577,6 +577,20 @@ function scaleFeetToInches(feet, ratio = N_SCALE_RATIO) {
577
577
  return feet * 12 / ratio;
578
578
  }
579
579
  var N_CAR_LENGTH_INCHES = 3.3;
580
+ function spanOverhang(input) {
581
+ const lo = Math.min(input.fromPos, input.toPos);
582
+ const hi = Math.max(input.fromPos, input.toPos);
583
+ const tLo = Math.min(input.trackFromPos, input.trackToPos);
584
+ const tHi = Math.max(input.trackFromPos, input.trackToPos);
585
+ const before = Math.max(0, tLo - lo);
586
+ const after = Math.max(0, hi - tHi);
587
+ return {
588
+ beforeInches: before,
589
+ afterInches: after,
590
+ onTrackInches: Math.max(0, Math.min(hi, tHi) - Math.max(lo, tLo)),
591
+ overhangInches: before + after
592
+ };
593
+ }
580
594
  function carCapacity(fromPos, toPos, carLengthInches = N_CAR_LENGTH_INCHES) {
581
595
  if (!(carLengthInches > 0)) return 0;
582
596
  return Math.max(0, Math.floor(Math.abs(toPos - fromPos) / carLengthInches));
@@ -1287,6 +1301,25 @@ var ATLAS_CODE55_N = [
1287
1301
  note: "scaled from the measured #7 by frog number \u2014 not measured"
1288
1302
  }
1289
1303
  },
1304
+ {
1305
+ // Will Gage, 2026-07-26: "2057 is 3.5, 2056 is 2.5" — the two Atlas Code 55
1306
+ // wyes are different FROG NUMBERS, not a left/right pair of one part. The
1307
+ // 2056 half of that confirms the entry above; this is the one we didn't have.
1308
+ //
1309
+ // No lead. The #2.5's is `derived` from a per-frog rule its own note records
1310
+ // as refuted, so it rests on nothing — repeating that for a second part
1311
+ // would be exactly how a number nobody checked becomes two. Without one,
1312
+ // `leadInchesForSize` interpolates across the MEASURED parts at the wye's
1313
+ // effective frog (3.5 × 2 = 7), which lands on the measured #7.
1314
+ id: "atlas-c55-n-wye-35",
1315
+ manufacturer: "Atlas",
1316
+ line: "Code 55",
1317
+ scale: "N",
1318
+ name: "#3.5 Wye",
1319
+ kind: "wye",
1320
+ partNumbers: { single: "2057" },
1321
+ frogNumber: 3.5
1322
+ },
1290
1323
  {
1291
1324
  id: "atlas-c55-n-curved-21-15",
1292
1325
  manufacturer: "Atlas",
@@ -2414,6 +2447,7 @@ exports.sectionSpansOrWhole = sectionSpansOrWhole;
2414
2447
  exports.sectionedCenterline = sectionedCenterline;
2415
2448
  exports.sectionedEndPose = sectionedEndPose;
2416
2449
  exports.sliceCenterline = sliceCenterline;
2450
+ exports.spanOverhang = spanOverhang;
2417
2451
  exports.stateToDoc = stateToDoc;
2418
2452
  exports.storedPartToTrackPart = storedPartToTrackPart;
2419
2453
  exports.toSectionRelative = toSectionRelative;