@tscircuit/core 0.0.1241 → 0.0.1242

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.
Files changed (2) hide show
  1. package/dist/index.js +19 -1
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2778,6 +2778,24 @@ var getObstaclesFromCircuitJson = (soup, connMap) => {
2778
2778
  ...element.shape === "rotated_pill" ? { ccwRotationDegrees: element.ccw_rotation } : {},
2779
2779
  connectedTo: withNetId([element.pcb_smtpad_id])
2780
2780
  });
2781
+ } else if (element.shape === "polygon") {
2782
+ const xs = element.points.map((point6) => point6.x);
2783
+ const ys = element.points.map((point6) => point6.y);
2784
+ const minX = Math.min(...xs);
2785
+ const maxX = Math.max(...xs);
2786
+ const minY = Math.min(...ys);
2787
+ const maxY = Math.max(...ys);
2788
+ obstacles.push({
2789
+ type: "rect",
2790
+ layers: [element.layer],
2791
+ center: {
2792
+ x: (minX + maxX) / 2,
2793
+ y: (minY + maxY) / 2
2794
+ },
2795
+ width: maxX - minX,
2796
+ height: maxY - minY,
2797
+ connectedTo: withNetId([element.pcb_smtpad_id])
2798
+ });
2781
2799
  }
2782
2800
  } else if (element.type === "pcb_keepout") {
2783
2801
  if (element.shape === "circle") {
@@ -20947,7 +20965,7 @@ import { identity as identity5 } from "transformation-matrix";
20947
20965
  var package_default = {
20948
20966
  name: "@tscircuit/core",
20949
20967
  type: "module",
20950
- version: "0.0.1240",
20968
+ version: "0.0.1241",
20951
20969
  types: "dist/index.d.ts",
20952
20970
  main: "dist/index.js",
20953
20971
  module: "dist/index.js",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tscircuit/core",
3
3
  "type": "module",
4
- "version": "0.0.1241",
4
+ "version": "0.0.1242",
5
5
  "types": "dist/index.d.ts",
6
6
  "main": "dist/index.js",
7
7
  "module": "dist/index.js",