imrishabh18/nema-23-stepper-controller
A 4-layer NEMA23 stepper motor controller PCB combining an RP2040, DRV8462 dual-phase driver, USB-C/28V power protection, current/voltage/temperature sensing, alarms, and optional magnetic encoder.
- Version
- 1.4.27
- License
- unset
- Stars
- 1
patches/@tscircuit+checks@0.0.269.patch
diff --git a/dist/index.js b/dist/index.js
--- a/dist/index.js
+++ b/dist/index.js
@@ -849,9 +849,15 @@
const netId = connMap.getNetConnectedToId(pour.source_net_id);
if (!netId) continue;
const pours = pourPolygonsByNetId.get(netId) ?? [];
+ const pourPolygon = getPourPolygon3(pour);
+ // Polygon.contains uses instanceof, so the polygon and contact point
+ // must come from the same Flatten module.
+ const localPolygon = pourPolygon.constructor === Polygon2
+ ? pourPolygon
+ : new Polygon2(pourPolygon.toJSON());
pours.push({
layer: pour.layer,
- polygon: getPourPolygon3(pour).scale(POLYGON_SCALE, POLYGON_SCALE)
+ polygon: localPolygon.scale(POLYGON_SCALE, POLYGON_SCALE)
});
pourPolygonsByNetId.set(netId, pours);
}