@tscircuit/footprinter 0.0.20 → 0.0.21
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/package.json +1 -1
- package/src/fn/quad.ts +18 -18
package/package.json
CHANGED
package/src/fn/quad.ts
CHANGED
|
@@ -60,14 +60,15 @@ const quad_def = base_quad_def.transform((v) => {
|
|
|
60
60
|
|
|
61
61
|
const SIDES_CCW = ["left", "bottom", "right", "top"] as const
|
|
62
62
|
|
|
63
|
-
export const getQuadCoords = (
|
|
64
|
-
|
|
65
|
-
pn: number
|
|
66
|
-
w: number
|
|
67
|
-
h: number
|
|
68
|
-
p: number
|
|
63
|
+
export const getQuadCoords = (params: {
|
|
64
|
+
pin_count: number
|
|
65
|
+
pn: number // pin number
|
|
66
|
+
w: number // width of the package
|
|
67
|
+
h: number // height (length) of the package
|
|
68
|
+
p: number // pitch between pins
|
|
69
69
|
pl: number // length of the pin
|
|
70
|
-
) => {
|
|
70
|
+
}) => {
|
|
71
|
+
const { pin_count: pinCount, pn, w, h, p, pl } = params
|
|
71
72
|
const sidePinCount = pinCount / 4
|
|
72
73
|
const side = SIDES_CCW[Math.floor((pn - 1) / sidePinCount)]
|
|
73
74
|
const pos = (pn - 1) % sidePinCount
|
|
@@ -104,14 +105,14 @@ export const quad = (
|
|
|
104
105
|
x,
|
|
105
106
|
y,
|
|
106
107
|
o: orientation,
|
|
107
|
-
} = getQuadCoords(
|
|
108
|
-
params.num_pins,
|
|
109
|
-
i + 1,
|
|
110
|
-
params.w,
|
|
111
|
-
params.h,
|
|
112
|
-
params.p ?? 0.5,
|
|
113
|
-
params.pl
|
|
114
|
-
)
|
|
108
|
+
} = getQuadCoords({
|
|
109
|
+
pin_count: params.num_pins,
|
|
110
|
+
pn: i + 1,
|
|
111
|
+
w: params.w,
|
|
112
|
+
h: params.h,
|
|
113
|
+
p: params.p ?? 0.5,
|
|
114
|
+
pl: params.pl,
|
|
115
|
+
})
|
|
115
116
|
|
|
116
117
|
let pw = params.pw
|
|
117
118
|
let pl = params.pl
|
|
@@ -125,9 +126,8 @@ export const quad = (
|
|
|
125
126
|
|
|
126
127
|
if (params.thermalpad) {
|
|
127
128
|
if (typeof params.thermalpad === "boolean") {
|
|
128
|
-
const
|
|
129
|
-
const
|
|
130
|
-
const ibh = params.p * (sidePinCount - 1) + params.pw
|
|
129
|
+
const ibw = params.p * (spc - 1) + params.pw
|
|
130
|
+
const ibh = params.p * (spc - 1) + params.pw
|
|
131
131
|
pads.push(rectpad(["thermalpad"], 0, 0, ibw, ibh))
|
|
132
132
|
} else {
|
|
133
133
|
pads.push(
|