@tscircuit/core 0.0.2022 → 0.0.2024
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 +13 -26
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3732,12 +3732,13 @@ var getObstaclesFromCircuitJson = (circuitJson, connMap) => {
|
|
|
3732
3732
|
height: element.outer_diameter,
|
|
3733
3733
|
connectedTo: withNetId([element.pcb_plated_hole_id])
|
|
3734
3734
|
});
|
|
3735
|
-
} else if (element.shape === "pill_hole_with_rect_pad" || element.shape === "rotated_pill_hole_with_rect_pad") {
|
|
3735
|
+
} else if (element.shape === "circular_hole_with_rect_pad" || element.shape === "pill_hole_with_rect_pad" || element.shape === "rotated_pill_hole_with_rect_pad") {
|
|
3736
|
+
const rect_ccw_rotation = element.shape === "pill_hole_with_rect_pad" ? 0 : element.rect_ccw_rotation ?? 0;
|
|
3736
3737
|
const rotatedRect = {
|
|
3737
3738
|
center: { x: element.x, y: element.y },
|
|
3738
3739
|
width: element.rect_pad_width,
|
|
3739
3740
|
height: element.rect_pad_height,
|
|
3740
|
-
rotation:
|
|
3741
|
+
rotation: rect_ccw_rotation
|
|
3741
3742
|
};
|
|
3742
3743
|
const axisAlignedRect = getAxisAlignedRectFromRotatedRect(rotatedRect);
|
|
3743
3744
|
const rect = axisAlignedRect ?? rotatedRect;
|
|
@@ -3752,21 +3753,6 @@ var getObstaclesFromCircuitJson = (circuitJson, connMap) => {
|
|
|
3752
3753
|
ccwRotationDegrees: axisAlignedRect ? void 0 : rotatedRect.rotation,
|
|
3753
3754
|
connectedTo: withNetId([element.pcb_plated_hole_id])
|
|
3754
3755
|
});
|
|
3755
|
-
} else if (element.shape === "circular_hole_with_rect_pad") {
|
|
3756
|
-
obstacles.push({
|
|
3757
|
-
circuitJsonMetadata: pcbPlatedHoleCircuitJsonMetadata,
|
|
3758
|
-
componentId: pcbComponentId,
|
|
3759
|
-
// @ts-ignore
|
|
3760
|
-
type: "rect",
|
|
3761
|
-
layers: everyLayer,
|
|
3762
|
-
center: {
|
|
3763
|
-
x: element.x,
|
|
3764
|
-
y: element.y
|
|
3765
|
-
},
|
|
3766
|
-
width: element.rect_pad_width,
|
|
3767
|
-
height: element.rect_pad_height,
|
|
3768
|
-
connectedTo: withNetId([element.pcb_plated_hole_id])
|
|
3769
|
-
});
|
|
3770
3756
|
} else if (element.shape === "oval") {
|
|
3771
3757
|
obstacles.push({
|
|
3772
3758
|
circuitJsonMetadata: pcbPlatedHoleCircuitJsonMetadata,
|
|
@@ -16975,16 +16961,17 @@ var NormalComponent = class extends PrimitiveComponent2 {
|
|
|
16975
16961
|
primaryPortOpts
|
|
16976
16962
|
);
|
|
16977
16963
|
}
|
|
16978
|
-
const newPorts = [];
|
|
16979
16964
|
if (!footprint) {
|
|
16980
|
-
|
|
16981
|
-
|
|
16982
|
-
|
|
16983
|
-
|
|
16984
|
-
|
|
16985
|
-
|
|
16965
|
+
return getPrimaryPortsFromPortHintGroups(
|
|
16966
|
+
this.children.filter((child) => child.props.portHints && child.isPcbPrimitive).map((child) => ({
|
|
16967
|
+
hints: child.props.portHints,
|
|
16968
|
+
originDescription: "direct PCB primitive",
|
|
16969
|
+
component: child
|
|
16970
|
+
})),
|
|
16971
|
+
{ ...primaryPortOpts, allowImplicitPinNumbers: false }
|
|
16972
|
+
);
|
|
16986
16973
|
}
|
|
16987
|
-
return
|
|
16974
|
+
return [];
|
|
16988
16975
|
}
|
|
16989
16976
|
_queueInvalidFootprintPropMessage(footprint, error) {
|
|
16990
16977
|
const rawErrorMessage = error instanceof Error ? error.message : String(error);
|
|
@@ -64566,7 +64553,7 @@ function Group_getRoutingPhasePlans(group) {
|
|
|
64566
64553
|
var package_default = {
|
|
64567
64554
|
name: "@tscircuit/core",
|
|
64568
64555
|
type: "module",
|
|
64569
|
-
version: "0.0.
|
|
64556
|
+
version: "0.0.2023",
|
|
64570
64557
|
types: "dist/index.d.ts",
|
|
64571
64558
|
main: "dist/index.js",
|
|
64572
64559
|
module: "dist/index.js",
|