@tscircuit/footprinter 0.0.349 → 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 +9 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -2927,6 +2927,8 @@ var pinrow = (raw_params) => {
|
|
|
2927
2927
|
else if (pinlabeltextalignright) pinlabelTextAlign = "right";
|
|
2928
2928
|
const holes = [];
|
|
2929
2929
|
const numPinsPerRow = Math.ceil(num_pins / rows);
|
|
2930
|
+
const pinRowSpanY = (rows - 1) * p;
|
|
2931
|
+
const yStart = pinRowSpanY / 2;
|
|
2930
2932
|
const ySpacing = -p;
|
|
2931
2933
|
const calculateAnchorPosition = ({
|
|
2932
2934
|
xoff,
|
|
@@ -3067,7 +3069,7 @@ var pinrow = (raw_params) => {
|
|
|
3067
3069
|
for (let row = 0; row < rows && currentPin <= num_pins; row++) {
|
|
3068
3070
|
for (let col = 0; col < numPinsPerRow && currentPin <= num_pins; col++) {
|
|
3069
3071
|
const xoff = xStart + col * p;
|
|
3070
|
-
const yoff = row * ySpacing;
|
|
3072
|
+
const yoff = yStart + row * ySpacing;
|
|
3071
3073
|
const posKey = `${xoff},${yoff}`;
|
|
3072
3074
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3073
3075
|
usedPositions.add(posKey);
|
|
@@ -3084,7 +3086,7 @@ var pinrow = (raw_params) => {
|
|
|
3084
3086
|
while (currentPin <= num_pins && top <= bottom && left <= right) {
|
|
3085
3087
|
for (let row = top; row <= bottom && currentPin <= num_pins; row++) {
|
|
3086
3088
|
const xoff = xStart + left * p;
|
|
3087
|
-
const yoff = row * ySpacing;
|
|
3089
|
+
const yoff = yStart + row * ySpacing;
|
|
3088
3090
|
const posKey = `${xoff},${yoff}`;
|
|
3089
3091
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3090
3092
|
usedPositions.add(posKey);
|
|
@@ -3093,7 +3095,7 @@ var pinrow = (raw_params) => {
|
|
|
3093
3095
|
left++;
|
|
3094
3096
|
for (let col = left; col <= right && currentPin <= num_pins; col++) {
|
|
3095
3097
|
const xoff = xStart + col * p;
|
|
3096
|
-
const yoff = bottom * ySpacing;
|
|
3098
|
+
const yoff = yStart + bottom * ySpacing;
|
|
3097
3099
|
const posKey = `${xoff},${yoff}`;
|
|
3098
3100
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3099
3101
|
usedPositions.add(posKey);
|
|
@@ -3103,7 +3105,7 @@ var pinrow = (raw_params) => {
|
|
|
3103
3105
|
if (left <= right) {
|
|
3104
3106
|
for (let row = bottom; row >= top && currentPin <= num_pins; row--) {
|
|
3105
3107
|
const xoff = xStart + right * p;
|
|
3106
|
-
const yoff = row * ySpacing;
|
|
3108
|
+
const yoff = yStart + row * ySpacing;
|
|
3107
3109
|
const posKey = `${xoff},${yoff}`;
|
|
3108
3110
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3109
3111
|
usedPositions.add(posKey);
|
|
@@ -3114,7 +3116,7 @@ var pinrow = (raw_params) => {
|
|
|
3114
3116
|
if (top <= bottom) {
|
|
3115
3117
|
for (let col = right; col >= left && currentPin <= num_pins; col--) {
|
|
3116
3118
|
const xoff = xStart + col * p;
|
|
3117
|
-
const yoff = top * ySpacing;
|
|
3119
|
+
const yoff = yStart + top * ySpacing;
|
|
3118
3120
|
const posKey = `${xoff},${yoff}`;
|
|
3119
3121
|
if (usedPositions.has(posKey)) throw new Error(`Overlap at ${posKey}`);
|
|
3120
3122
|
usedPositions.add(posKey);
|
|
@@ -3129,11 +3131,10 @@ var pinrow = (raw_params) => {
|
|
|
3129
3131
|
);
|
|
3130
3132
|
}
|
|
3131
3133
|
}
|
|
3132
|
-
const refText = silkscreenRef(0, p, 0.5);
|
|
3134
|
+
const refText = silkscreenRef(0, pinRowSpanY / 2 + p, 0.5);
|
|
3133
3135
|
const padHalfWidth = parameters.smd ? parameters.pw / 2 : od / 2;
|
|
3134
3136
|
const padHalfHeight = parameters.smd ? parameters.pl / 2 : od / 2;
|
|
3135
3137
|
const pinRowSpanX = (numPinsPerRow - 1) * p;
|
|
3136
|
-
const pinRowSpanY = (rows - 1) * p;
|
|
3137
3138
|
const padOuterHalfWidth = pinRowSpanX / 2 + padHalfWidth;
|
|
3138
3139
|
const padOuterHalfHeight = pinRowSpanY / 2 + padHalfHeight;
|
|
3139
3140
|
const bodyHalfWidth = pinRowSpanX / 2 + p / 2;
|
|
@@ -3150,7 +3151,7 @@ var pinrow = (raw_params) => {
|
|
|
3150
3151
|
type: "pcb_courtyard_rect",
|
|
3151
3152
|
pcb_courtyard_rect_id: "",
|
|
3152
3153
|
pcb_component_id: "",
|
|
3153
|
-
center: { x: 0, y:
|
|
3154
|
+
center: { x: 0, y: 0 },
|
|
3154
3155
|
width: 2 * courtyardHalfWidth,
|
|
3155
3156
|
height: 2 * courtyardHalfHeight,
|
|
3156
3157
|
layer: "top"
|