@tscircuit/core 0.0.1162 → 0.0.1164
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 +68 -23
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2953,8 +2953,7 @@ var getObstaclesFromCircuitJson = (soup, connMap) => {
|
|
|
2953
2953
|
x: element.x,
|
|
2954
2954
|
y: element.y
|
|
2955
2955
|
},
|
|
2956
|
-
connectedTo: [],
|
|
2957
|
-
// TODO we can associate source_ports with this via
|
|
2956
|
+
connectedTo: withNetId([element.pcb_via_id]),
|
|
2958
2957
|
width: element.outer_diameter,
|
|
2959
2958
|
height: element.outer_diameter,
|
|
2960
2959
|
netIsAssignable: netIsAssignable || void 0
|
|
@@ -6986,26 +6985,54 @@ var PlatedHole = class extends PrimitiveComponent2 {
|
|
|
6986
6985
|
});
|
|
6987
6986
|
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
6988
6987
|
} else if (props.shape === "pill_hole_with_rect_pad") {
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
|
|
6998
|
-
|
|
6999
|
-
|
|
7000
|
-
|
|
7001
|
-
|
|
7002
|
-
|
|
7003
|
-
|
|
7004
|
-
|
|
7005
|
-
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
6988
|
+
if (props.pcbRotation && props.pcbRotation !== 0) {
|
|
6989
|
+
const pcb_plated_hole = db.pcb_plated_hole.insert({
|
|
6990
|
+
pcb_component_id,
|
|
6991
|
+
pcb_port_id: this.matchedPort?.pcb_port_id,
|
|
6992
|
+
hole_width: props.holeWidth,
|
|
6993
|
+
hole_height: props.holeHeight,
|
|
6994
|
+
rect_pad_width: props.rectPadWidth,
|
|
6995
|
+
rect_pad_height: props.rectPadHeight,
|
|
6996
|
+
hole_offset_x: props.holeOffsetX,
|
|
6997
|
+
hole_offset_y: props.holeOffsetY,
|
|
6998
|
+
shape: "rotated_pill_hole_with_rect_pad",
|
|
6999
|
+
type: "pcb_plated_hole",
|
|
7000
|
+
hole_shape: "rotated_pill",
|
|
7001
|
+
pad_shape: "rect",
|
|
7002
|
+
hole_ccw_rotation: props.pcbRotation,
|
|
7003
|
+
rect_ccw_rotation: props.pcbRotation,
|
|
7004
|
+
port_hints: this.getNameAndAliases(),
|
|
7005
|
+
x: position.x,
|
|
7006
|
+
y: position.y,
|
|
7007
|
+
layers: ["top", "bottom"],
|
|
7008
|
+
soldermask_margin: soldermaskMargin,
|
|
7009
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
7010
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
7011
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
7012
|
+
});
|
|
7013
|
+
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
7014
|
+
} else {
|
|
7015
|
+
const pcb_plated_hole = db.pcb_plated_hole.insert({
|
|
7016
|
+
pcb_component_id,
|
|
7017
|
+
pcb_port_id: this.matchedPort?.pcb_port_id,
|
|
7018
|
+
hole_width: props.holeWidth,
|
|
7019
|
+
hole_height: props.holeHeight,
|
|
7020
|
+
rect_pad_width: props.rectPadWidth,
|
|
7021
|
+
rect_pad_height: props.rectPadHeight,
|
|
7022
|
+
hole_offset_x: props.holeOffsetX,
|
|
7023
|
+
hole_offset_y: props.holeOffsetY,
|
|
7024
|
+
shape: "pill_hole_with_rect_pad",
|
|
7025
|
+
port_hints: this.getNameAndAliases(),
|
|
7026
|
+
x: position.x,
|
|
7027
|
+
y: position.y,
|
|
7028
|
+
layers: ["top", "bottom"],
|
|
7029
|
+
soldermask_margin: soldermaskMargin,
|
|
7030
|
+
is_covered_with_solder_mask: isCoveredWithSolderMask,
|
|
7031
|
+
subcircuit_id: subcircuit?.subcircuit_id ?? void 0,
|
|
7032
|
+
pcb_group_id: this.getGroup()?.pcb_group_id ?? void 0
|
|
7033
|
+
});
|
|
7034
|
+
this.pcb_plated_hole_id = pcb_plated_hole.pcb_plated_hole_id;
|
|
7035
|
+
}
|
|
7009
7036
|
} else if (props.shape === "hole_with_polygon_pad") {
|
|
7010
7037
|
const padOutline = (props.padOutline || []).map((point6) => {
|
|
7011
7038
|
const x = typeof point6.x === "number" ? point6.x : parseFloat(String(point6.x));
|
|
@@ -8092,6 +8119,24 @@ var createComponentsFromCircuitJson = ({
|
|
|
8092
8119
|
holeOffsetY: elm.hole_offset_y
|
|
8093
8120
|
})
|
|
8094
8121
|
);
|
|
8122
|
+
} else if (elm.shape === "rotated_pill_hole_with_rect_pad") {
|
|
8123
|
+
components.push(
|
|
8124
|
+
new PlatedHole({
|
|
8125
|
+
pcbX: elm.x,
|
|
8126
|
+
pcbY: elm.y,
|
|
8127
|
+
shape: "pill_hole_with_rect_pad",
|
|
8128
|
+
holeShape: "pill",
|
|
8129
|
+
padShape: "rect",
|
|
8130
|
+
holeWidth: elm.hole_width,
|
|
8131
|
+
holeHeight: elm.hole_height,
|
|
8132
|
+
rectPadWidth: elm.rect_pad_width,
|
|
8133
|
+
rectPadHeight: elm.rect_pad_height,
|
|
8134
|
+
portHints: elm.port_hints,
|
|
8135
|
+
holeOffsetX: elm.hole_offset_x,
|
|
8136
|
+
holeOffsetY: elm.hole_offset_y,
|
|
8137
|
+
pcbRotation: elm.hole_ccw_rotation
|
|
8138
|
+
})
|
|
8139
|
+
);
|
|
8095
8140
|
} else if (elm.shape === "hole_with_polygon_pad") {
|
|
8096
8141
|
components.push(
|
|
8097
8142
|
new PlatedHole({
|
|
@@ -19553,7 +19598,7 @@ import { identity as identity5 } from "transformation-matrix";
|
|
|
19553
19598
|
var package_default = {
|
|
19554
19599
|
name: "@tscircuit/core",
|
|
19555
19600
|
type: "module",
|
|
19556
|
-
version: "0.0.
|
|
19601
|
+
version: "0.0.1163",
|
|
19557
19602
|
types: "dist/index.d.ts",
|
|
19558
19603
|
main: "dist/index.js",
|
|
19559
19604
|
module: "dist/index.js",
|