@tscircuit/footprinter 0.0.348 → 0.0.350
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 +19 -13
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1400,6 +1400,8 @@ var soic = (raw_params) => {
|
|
|
1400
1400
|
};
|
|
1401
1401
|
var soicWithoutParsing = (parameters) => {
|
|
1402
1402
|
const pads = [];
|
|
1403
|
+
let maxPadExtentX = 0;
|
|
1404
|
+
let maxPadExtentY = 0;
|
|
1403
1405
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
1404
1406
|
const { x, y } = getCcwSoicCoords({
|
|
1405
1407
|
num_pins: parameters.num_pins,
|
|
@@ -1409,6 +1411,8 @@ var soicWithoutParsing = (parameters) => {
|
|
|
1409
1411
|
pl: parameters.pl,
|
|
1410
1412
|
legsoutside: parameters.legsoutside
|
|
1411
1413
|
});
|
|
1414
|
+
maxPadExtentX = Math.max(maxPadExtentX, Math.abs(x) + parameters.pl / 2);
|
|
1415
|
+
maxPadExtentY = Math.max(maxPadExtentY, Math.abs(y) + parameters.pw / 2);
|
|
1412
1416
|
if (parameters.pillpads) {
|
|
1413
1417
|
pads.push(pillpad(i + 1, x, y, parameters.pl, parameters.pw));
|
|
1414
1418
|
} else {
|
|
@@ -1442,11 +1446,12 @@ var soicWithoutParsing = (parameters) => {
|
|
|
1442
1446
|
{ x: -sw / 2, y: -sh / 2 }
|
|
1443
1447
|
]
|
|
1444
1448
|
};
|
|
1445
|
-
const
|
|
1446
|
-
const
|
|
1447
|
-
const courtyardStepOuterHalfWidth =
|
|
1448
|
-
const courtyardStepInnerHalfHeight =
|
|
1449
|
-
const
|
|
1449
|
+
const bodyHalfWidth = parameters.w / 2;
|
|
1450
|
+
const bodyHalfHeight = sh / 2;
|
|
1451
|
+
const courtyardStepOuterHalfWidth = Math.max(maxPadExtentX, bodyHalfWidth) + 0.25;
|
|
1452
|
+
const courtyardStepInnerHalfHeight = Math.min(maxPadExtentY, bodyHalfHeight) + 0.25;
|
|
1453
|
+
const courtyardStepInnerHalfWidth = Math.min(maxPadExtentX, bodyHalfWidth) + 0.25;
|
|
1454
|
+
const courtyardStepOuterHalfHeight = Math.max(maxPadExtentY, bodyHalfHeight) + 0.25;
|
|
1450
1455
|
const courtyard = {
|
|
1451
1456
|
type: "pcb_courtyard_outline",
|
|
1452
1457
|
pcb_courtyard_outline_id: "",
|
|
@@ -2922,6 +2927,8 @@ var pinrow = (raw_params) => {
|
|
|
2922
2927
|
else if (pinlabeltextalignright) pinlabelTextAlign = "right";
|
|
2923
2928
|
const holes = [];
|
|
2924
2929
|
const numPinsPerRow = Math.ceil(num_pins / rows);
|
|
2930
|
+
const pinRowSpanY = (rows - 1) * p;
|
|
2931
|
+
const yStart = pinRowSpanY / 2;
|
|
2925
2932
|
const ySpacing = -p;
|
|
2926
2933
|
const calculateAnchorPosition = ({
|
|
2927
2934
|
xoff,
|
|
@@ -3062,7 +3069,7 @@ var pinrow = (raw_params) => {
|
|
|
3062
3069
|
for (let row = 0; row < rows && currentPin <= num_pins; row++) {
|
|
3063
3070
|
for (let col = 0; col < numPinsPerRow && currentPin <= num_pins; col++) {
|
|
3064
3071
|
const xoff = xStart + col * p;
|
|
3065
|
-
const yoff = row * ySpacing;
|
|
3072
|
+
const yoff = yStart + row * ySpacing;
|
|
3066
3073
|
const posKey = `${xoff},${yoff}`;
|
|
3067
3074
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3068
3075
|
usedPositions.add(posKey);
|
|
@@ -3079,7 +3086,7 @@ var pinrow = (raw_params) => {
|
|
|
3079
3086
|
while (currentPin <= num_pins && top <= bottom && left <= right) {
|
|
3080
3087
|
for (let row = top; row <= bottom && currentPin <= num_pins; row++) {
|
|
3081
3088
|
const xoff = xStart + left * p;
|
|
3082
|
-
const yoff = row * ySpacing;
|
|
3089
|
+
const yoff = yStart + row * ySpacing;
|
|
3083
3090
|
const posKey = `${xoff},${yoff}`;
|
|
3084
3091
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3085
3092
|
usedPositions.add(posKey);
|
|
@@ -3088,7 +3095,7 @@ var pinrow = (raw_params) => {
|
|
|
3088
3095
|
left++;
|
|
3089
3096
|
for (let col = left; col <= right && currentPin <= num_pins; col++) {
|
|
3090
3097
|
const xoff = xStart + col * p;
|
|
3091
|
-
const yoff = bottom * ySpacing;
|
|
3098
|
+
const yoff = yStart + bottom * ySpacing;
|
|
3092
3099
|
const posKey = `${xoff},${yoff}`;
|
|
3093
3100
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3094
3101
|
usedPositions.add(posKey);
|
|
@@ -3098,7 +3105,7 @@ var pinrow = (raw_params) => {
|
|
|
3098
3105
|
if (left <= right) {
|
|
3099
3106
|
for (let row = bottom; row >= top && currentPin <= num_pins; row--) {
|
|
3100
3107
|
const xoff = xStart + right * p;
|
|
3101
|
-
const yoff = row * ySpacing;
|
|
3108
|
+
const yoff = yStart + row * ySpacing;
|
|
3102
3109
|
const posKey = `${xoff},${yoff}`;
|
|
3103
3110
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3104
3111
|
usedPositions.add(posKey);
|
|
@@ -3109,7 +3116,7 @@ var pinrow = (raw_params) => {
|
|
|
3109
3116
|
if (top <= bottom) {
|
|
3110
3117
|
for (let col = right; col >= left && currentPin <= num_pins; col--) {
|
|
3111
3118
|
const xoff = xStart + col * p;
|
|
3112
|
-
const yoff = top * ySpacing;
|
|
3119
|
+
const yoff = yStart + top * ySpacing;
|
|
3113
3120
|
const posKey = `${xoff},${yoff}`;
|
|
3114
3121
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3115
3122
|
usedPositions.add(posKey);
|
|
@@ -3124,11 +3131,10 @@ var pinrow = (raw_params) => {
|
|
|
3124
3131
|
);
|
|
3125
3132
|
}
|
|
3126
3133
|
}
|
|
3127
|
-
const refText = silkscreenRef(0, p, 0.5);
|
|
3134
|
+
const refText = silkscreenRef(0, pinRowSpanY / 2 + p, 0.5);
|
|
3128
3135
|
const padHalfWidth = parameters.smd ? parameters.pw / 2 : od / 2;
|
|
3129
3136
|
const padHalfHeight = parameters.smd ? parameters.pl / 2 : od / 2;
|
|
3130
3137
|
const pinRowSpanX = (numPinsPerRow - 1) * p;
|
|
3131
|
-
const pinRowSpanY = (rows - 1) * p;
|
|
3132
3138
|
const padOuterHalfWidth = pinRowSpanX / 2 + padHalfWidth;
|
|
3133
3139
|
const padOuterHalfHeight = pinRowSpanY / 2 + padHalfHeight;
|
|
3134
3140
|
const bodyHalfWidth = pinRowSpanX / 2 + p / 2;
|
|
@@ -3145,7 +3151,7 @@ var pinrow = (raw_params) => {
|
|
|
3145
3151
|
type: "pcb_courtyard_rect",
|
|
3146
3152
|
pcb_courtyard_rect_id: "",
|
|
3147
3153
|
pcb_component_id: "",
|
|
3148
|
-
center: { x: 0, y:
|
|
3154
|
+
center: { x: 0, y: 0 },
|
|
3149
3155
|
width: 2 * courtyardHalfWidth,
|
|
3150
3156
|
height: 2 * courtyardHalfHeight,
|
|
3151
3157
|
layer: "top"
|