@willcgage/module-schematic 0.49.3 → 0.49.5
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 +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +4 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -464,13 +464,15 @@ function moduleFootprint(input) {
|
|
|
464
464
|
const authored = benchworkOutline(input);
|
|
465
465
|
const offA = input.endplateTrackOffsets?.["A"] ?? 0;
|
|
466
466
|
const offB = input.endplateTrackOffsets?.["B"] ?? 0;
|
|
467
|
-
const
|
|
467
|
+
const secs = input.sections ?? [];
|
|
468
|
+
const sectionsOwnShape = secs.length > 1 || secs.some((s) => (s.outline?.length ?? 0) >= 3);
|
|
469
|
+
const sectionOutlines = sectionsOwnShape ? sectionFootprints(input, {
|
|
468
470
|
centerline,
|
|
469
471
|
widthA,
|
|
470
472
|
widthB,
|
|
471
473
|
offsetA: offA,
|
|
472
474
|
offsetB: offB
|
|
473
|
-
});
|
|
475
|
+
}) : [];
|
|
474
476
|
return {
|
|
475
477
|
centerline,
|
|
476
478
|
band: benchworkBand(centerline, widthA, widthB, offA, offB),
|
|
@@ -1296,9 +1298,10 @@ function moduleFeatures(doc) {
|
|
|
1296
1298
|
};
|
|
1297
1299
|
});
|
|
1298
1300
|
});
|
|
1301
|
+
const main2Lane = trackLane.has(MAIN2_TRACK_ID) ? trackLane.get(MAIN2_TRACK_ID) : null;
|
|
1299
1302
|
const allLanes = [
|
|
1300
1303
|
0,
|
|
1301
|
-
doubleMain ? 1 : 0,
|
|
1304
|
+
main2Lane ?? (doubleMain ? 1 : 0),
|
|
1302
1305
|
...extraTracks.map((t) => t.lane),
|
|
1303
1306
|
...signals.map((s) => s.lane),
|
|
1304
1307
|
...crossings.flatMap((x) => [x.laneA, x.laneB]),
|
|
@@ -1326,6 +1329,7 @@ function moduleFeatures(doc) {
|
|
|
1326
1329
|
doubleMain,
|
|
1327
1330
|
loop,
|
|
1328
1331
|
main2Extent,
|
|
1332
|
+
main2Lane,
|
|
1329
1333
|
transition,
|
|
1330
1334
|
loopInterchange: loop && doc.endplates.filter((e) => !e.at).length >= 2,
|
|
1331
1335
|
loopReturn: loop && doc.loopReturn === "main2" ? "main2" : "same",
|