@willcgage/module-schematic 0.97.0 → 0.97.1
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 +10 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +10 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -2313,6 +2313,16 @@ function pieceRoutePaths(piece, library = BUILT_IN_TRACK_PARTS) {
|
|
|
2313
2313
|
const len = part.overallLength?.inches ?? BUMPER_DRAWN_INCHES;
|
|
2314
2314
|
return [{ route: ["a", "a"], points: [{ x: at2.x, y: at2.y }, place(len, 0)] }];
|
|
2315
2315
|
}
|
|
2316
|
+
if (part.kind === "curve") {
|
|
2317
|
+
const a = joints.find((j) => j.joint === "a");
|
|
2318
|
+
const b = joints.find((j) => j.joint === "b");
|
|
2319
|
+
if (!a || !b) return out;
|
|
2320
|
+
const pts = flexRunPoints(sectionalArcInches(part), part.radius.inches).map(
|
|
2321
|
+
(q) => place(q.x, q.y)
|
|
2322
|
+
);
|
|
2323
|
+
pts[pts.length - 1] = { x: b.x, y: b.y };
|
|
2324
|
+
return [{ route: ["a", "b"], points: pts }];
|
|
2325
|
+
}
|
|
2316
2326
|
for (const route of geo.routes) {
|
|
2317
2327
|
const a = at(route[0]);
|
|
2318
2328
|
const b = at(route[1]);
|