@tscircuit/core 0.0.1240 → 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.
- package/dist/index.js +20 -2
- package/package.json +2 -2
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.
|
|
20968
|
+
version: "0.0.1241",
|
|
20951
20969
|
types: "dist/index.d.ts",
|
|
20952
20970
|
main: "dist/index.js",
|
|
20953
20971
|
module: "dist/index.js",
|
|
@@ -20980,7 +20998,7 @@ var package_default = {
|
|
|
20980
20998
|
"@resvg/resvg-js": "^2.6.2",
|
|
20981
20999
|
"@tscircuit/alphabet": "0.0.25",
|
|
20982
21000
|
"@tscircuit/capacity-autorouter": "^0.0.505",
|
|
20983
|
-
"@tscircuit/checks": "0.0.
|
|
21001
|
+
"@tscircuit/checks": "0.0.128",
|
|
20984
21002
|
"@tscircuit/circuit-json-util": "^0.0.94",
|
|
20985
21003
|
"@tscircuit/common": "^0.0.20",
|
|
20986
21004
|
"@tscircuit/copper-pour-solver": "^0.0.29",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscircuit/core",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.1242",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"module": "dist/index.js",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@resvg/resvg-js": "^2.6.2",
|
|
35
35
|
"@tscircuit/alphabet": "0.0.25",
|
|
36
36
|
"@tscircuit/capacity-autorouter": "^0.0.505",
|
|
37
|
-
"@tscircuit/checks": "0.0.
|
|
37
|
+
"@tscircuit/checks": "0.0.128",
|
|
38
38
|
"@tscircuit/circuit-json-util": "^0.0.94",
|
|
39
39
|
"@tscircuit/common": "^0.0.20",
|
|
40
40
|
"@tscircuit/copper-pour-solver": "^0.0.29",
|