@tscircuit/footprinter 0.0.258 → 0.0.260
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.d.ts +29 -1
- package/dist/index.js +894 -810
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,6 +72,7 @@ __export(fn_exports, {
|
|
|
72
72
|
sot457: () => sot457,
|
|
73
73
|
sot563: () => sot563,
|
|
74
74
|
sot723: () => sot723,
|
|
75
|
+
sot886: () => sot886,
|
|
75
76
|
sot89: () => sot89,
|
|
76
77
|
ssop: () => ssop,
|
|
77
78
|
stampboard: () => stampboard,
|
|
@@ -1365,18 +1366,99 @@ var sot363 = (raw_params) => {
|
|
|
1365
1366
|
};
|
|
1366
1367
|
};
|
|
1367
1368
|
|
|
1368
|
-
// src/fn/
|
|
1369
|
+
// src/fn/sot886.ts
|
|
1369
1370
|
import { z as z9 } from "zod";
|
|
1370
|
-
|
|
1371
|
+
import { length as length5 } from "circuit-json";
|
|
1372
|
+
var sot886_def = z9.object({
|
|
1371
1373
|
fn: z9.string(),
|
|
1372
|
-
num_pins: z9.
|
|
1373
|
-
w: z9.string().default("1.
|
|
1374
|
-
h: z9.string().default("
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1374
|
+
num_pins: z9.literal(6).default(6),
|
|
1375
|
+
w: z9.string().default("1.01mm"),
|
|
1376
|
+
h: z9.string().default("1.45mm"),
|
|
1377
|
+
p: z9.string().default("0.5mm"),
|
|
1378
|
+
pl: z9.string().default("0.33mm"),
|
|
1379
|
+
pw: z9.string().default("0.27mm"),
|
|
1378
1380
|
string: z9.string().optional()
|
|
1379
1381
|
});
|
|
1382
|
+
var sot886 = (raw_params) => {
|
|
1383
|
+
const parameters = sot886_def.parse({ fn: "sot886", ...raw_params });
|
|
1384
|
+
const w = length5.parse(parameters.w);
|
|
1385
|
+
const h = length5.parse(parameters.h);
|
|
1386
|
+
const p = length5.parse(parameters.p);
|
|
1387
|
+
const pl = length5.parse(parameters.pl);
|
|
1388
|
+
const pw = length5.parse(parameters.pw);
|
|
1389
|
+
const pads = [];
|
|
1390
|
+
for (let i = 0; i < 6; i++) {
|
|
1391
|
+
const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
|
|
1392
|
+
pads.push(rectpad(i + 1, x, y, pl, pw));
|
|
1393
|
+
}
|
|
1394
|
+
const silkscreenTopLine = {
|
|
1395
|
+
type: "pcb_silkscreen_path",
|
|
1396
|
+
layer: "top",
|
|
1397
|
+
pcb_component_id: "",
|
|
1398
|
+
route: [
|
|
1399
|
+
{ x: -w / 2, y: h / 2 },
|
|
1400
|
+
{ x: w / 2, y: h / 2 }
|
|
1401
|
+
],
|
|
1402
|
+
stroke_width: 0.05,
|
|
1403
|
+
pcb_silkscreen_path_id: ""
|
|
1404
|
+
};
|
|
1405
|
+
const silkscreenBottomLine = {
|
|
1406
|
+
type: "pcb_silkscreen_path",
|
|
1407
|
+
layer: "top",
|
|
1408
|
+
pcb_component_id: "",
|
|
1409
|
+
route: [
|
|
1410
|
+
{ x: -w / 2, y: -h / 2 },
|
|
1411
|
+
{ x: w / 2, y: -h / 2 }
|
|
1412
|
+
],
|
|
1413
|
+
stroke_width: 0.05,
|
|
1414
|
+
pcb_silkscreen_path_id: ""
|
|
1415
|
+
};
|
|
1416
|
+
const pin1Position = getSot886PadCoord(1, w, p, pl);
|
|
1417
|
+
const pin1Marking = {
|
|
1418
|
+
type: "pcb_silkscreen_path",
|
|
1419
|
+
layer: "top",
|
|
1420
|
+
pcb_component_id: "pin_marker_1",
|
|
1421
|
+
route: [
|
|
1422
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y },
|
|
1423
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y + 0.15 },
|
|
1424
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y - 0.15 },
|
|
1425
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y }
|
|
1426
|
+
],
|
|
1427
|
+
stroke_width: 0.05,
|
|
1428
|
+
pcb_silkscreen_path_id: "pin_marker_1"
|
|
1429
|
+
};
|
|
1430
|
+
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
1431
|
+
return {
|
|
1432
|
+
circuitJson: [
|
|
1433
|
+
...pads,
|
|
1434
|
+
silkscreenTopLine,
|
|
1435
|
+
silkscreenBottomLine,
|
|
1436
|
+
silkscreenRefText,
|
|
1437
|
+
pin1Marking
|
|
1438
|
+
],
|
|
1439
|
+
parameters
|
|
1440
|
+
};
|
|
1441
|
+
};
|
|
1442
|
+
var getSot886PadCoord = (pn, w, p, pl) => {
|
|
1443
|
+
const padCenterOffset = w / 2 - pl / 2;
|
|
1444
|
+
if (pn <= 3) {
|
|
1445
|
+
return { x: -padCenterOffset, y: p - (pn - 1) * p };
|
|
1446
|
+
}
|
|
1447
|
+
return { x: padCenterOffset, y: -p + (pn - 4) * p };
|
|
1448
|
+
};
|
|
1449
|
+
|
|
1450
|
+
// src/fn/sot23.ts
|
|
1451
|
+
import { z as z10 } from "zod";
|
|
1452
|
+
var sot23_def = z10.object({
|
|
1453
|
+
fn: z10.string(),
|
|
1454
|
+
num_pins: z10.number().default(3),
|
|
1455
|
+
w: z10.string().default("1.92mm"),
|
|
1456
|
+
h: z10.string().default("2.74mm"),
|
|
1457
|
+
pl: z10.string().default("0.8mm"),
|
|
1458
|
+
pw: z10.string().default("0.764mm"),
|
|
1459
|
+
p: z10.string().default("0.95mm"),
|
|
1460
|
+
string: z10.string().optional()
|
|
1461
|
+
});
|
|
1380
1462
|
var sot23_6_or_8_def = extendSoicDef({
|
|
1381
1463
|
p: "0.95mm",
|
|
1382
1464
|
w: "1.6mm",
|
|
@@ -1664,8 +1746,8 @@ var dfn = (raw_params) => {
|
|
|
1664
1746
|
};
|
|
1665
1747
|
|
|
1666
1748
|
// src/fn/pinrow.ts
|
|
1667
|
-
import { z as
|
|
1668
|
-
import { length as
|
|
1749
|
+
import { z as z13 } from "zod";
|
|
1750
|
+
import { length as length6 } from "circuit-json";
|
|
1669
1751
|
|
|
1670
1752
|
// src/helpers/silkscreenPin.ts
|
|
1671
1753
|
var silkscreenPin = ({
|
|
@@ -1751,24 +1833,24 @@ function determinePinlabelAnchorSide({
|
|
|
1751
1833
|
}
|
|
1752
1834
|
|
|
1753
1835
|
// src/fn/pinrow.ts
|
|
1754
|
-
var pinrow_def =
|
|
1755
|
-
fn:
|
|
1756
|
-
num_pins:
|
|
1757
|
-
rows:
|
|
1758
|
-
p:
|
|
1759
|
-
id:
|
|
1760
|
-
od:
|
|
1761
|
-
male:
|
|
1762
|
-
female:
|
|
1763
|
-
pinlabeltextalignleft:
|
|
1764
|
-
pinlabeltextaligncenter:
|
|
1765
|
-
pinlabeltextalignright:
|
|
1766
|
-
pinlabelverticallyinverted:
|
|
1767
|
-
pinlabelorthogonal:
|
|
1768
|
-
nosquareplating:
|
|
1769
|
-
nopinlabels:
|
|
1770
|
-
doublesidedpinlabel:
|
|
1771
|
-
bottomsidepinlabel:
|
|
1836
|
+
var pinrow_def = z13.object({
|
|
1837
|
+
fn: z13.string(),
|
|
1838
|
+
num_pins: z13.number().optional().default(6),
|
|
1839
|
+
rows: z13.union([z13.string(), z13.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
1840
|
+
p: length6.default("0.1in").describe("pitch"),
|
|
1841
|
+
id: length6.default("1.0mm").describe("inner diameter"),
|
|
1842
|
+
od: length6.default("1.5mm").describe("outer diameter"),
|
|
1843
|
+
male: z13.boolean().optional().describe("for male pin headers"),
|
|
1844
|
+
female: z13.boolean().optional().describe("for female pin headers"),
|
|
1845
|
+
pinlabeltextalignleft: z13.boolean().optional().default(false),
|
|
1846
|
+
pinlabeltextaligncenter: z13.boolean().optional().default(false),
|
|
1847
|
+
pinlabeltextalignright: z13.boolean().optional().default(false),
|
|
1848
|
+
pinlabelverticallyinverted: z13.boolean().optional().default(false),
|
|
1849
|
+
pinlabelorthogonal: z13.boolean().optional().default(false),
|
|
1850
|
+
nosquareplating: z13.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
|
|
1851
|
+
nopinlabels: z13.boolean().optional().default(false).describe("omit silkscreen pin labels"),
|
|
1852
|
+
doublesidedpinlabel: z13.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
|
|
1853
|
+
bottomsidepinlabel: z13.boolean().optional().default(false).describe(
|
|
1772
1854
|
"place the silkscreen reference text on the bottom layer instead of top"
|
|
1773
1855
|
)
|
|
1774
1856
|
}).transform((data) => {
|
|
@@ -1782,7 +1864,7 @@ var pinrow_def = z12.object({
|
|
|
1782
1864
|
}).superRefine((data, ctx) => {
|
|
1783
1865
|
if (data.male && data.female) {
|
|
1784
1866
|
ctx.addIssue({
|
|
1785
|
-
code:
|
|
1867
|
+
code: z13.ZodIssueCode.custom,
|
|
1786
1868
|
message: "'male' and 'female' cannot both be true; it should be male or female.",
|
|
1787
1869
|
path: ["male", "female"]
|
|
1788
1870
|
});
|
|
@@ -2028,23 +2110,23 @@ var ms013 = (raw_params) => {
|
|
|
2028
2110
|
};
|
|
2029
2111
|
|
|
2030
2112
|
// src/fn/sot723.ts
|
|
2031
|
-
import { length as
|
|
2032
|
-
import { z as
|
|
2033
|
-
var sot723_def =
|
|
2034
|
-
fn:
|
|
2035
|
-
num_pins:
|
|
2036
|
-
w:
|
|
2037
|
-
h:
|
|
2038
|
-
pw:
|
|
2039
|
-
pl:
|
|
2040
|
-
p:
|
|
2113
|
+
import { length as length7 } from "circuit-json";
|
|
2114
|
+
import { z as z14 } from "zod";
|
|
2115
|
+
var sot723_def = z14.object({
|
|
2116
|
+
fn: z14.string(),
|
|
2117
|
+
num_pins: z14.literal(3).default(3),
|
|
2118
|
+
w: z14.string().default("1.2mm"),
|
|
2119
|
+
h: z14.string().default("1.2mm"),
|
|
2120
|
+
pw: z14.string().default("0.40mm"),
|
|
2121
|
+
pl: z14.string().default("0.45mm"),
|
|
2122
|
+
p: z14.string().default("0.575mm")
|
|
2041
2123
|
});
|
|
2042
2124
|
var sot723 = (raw_params) => {
|
|
2043
2125
|
const parameters = sot723_def.parse(raw_params);
|
|
2044
2126
|
const pad2 = sot723WithoutParsing(parameters);
|
|
2045
2127
|
const silkscreenRefText = silkscreenRef(
|
|
2046
2128
|
0,
|
|
2047
|
-
|
|
2129
|
+
length7.parse(parameters.h),
|
|
2048
2130
|
0.2
|
|
2049
2131
|
);
|
|
2050
2132
|
return {
|
|
@@ -2087,22 +2169,22 @@ var sot723WithoutParsing = (parameters) => {
|
|
|
2087
2169
|
};
|
|
2088
2170
|
|
|
2089
2171
|
// src/fn/sod123.ts
|
|
2090
|
-
import { z as
|
|
2091
|
-
import { length as
|
|
2092
|
-
var sod_def =
|
|
2093
|
-
fn:
|
|
2094
|
-
num_pins:
|
|
2095
|
-
w:
|
|
2096
|
-
h:
|
|
2097
|
-
pl:
|
|
2098
|
-
pw:
|
|
2099
|
-
p:
|
|
2172
|
+
import { z as z15 } from "zod";
|
|
2173
|
+
import { length as length8 } from "circuit-json";
|
|
2174
|
+
var sod_def = z15.object({
|
|
2175
|
+
fn: z15.string(),
|
|
2176
|
+
num_pins: z15.literal(2).default(2),
|
|
2177
|
+
w: z15.string().default("2.36mm"),
|
|
2178
|
+
h: z15.string().default("1.22mm"),
|
|
2179
|
+
pl: z15.string().default("0.9mm"),
|
|
2180
|
+
pw: z15.string().default("1.2mm"),
|
|
2181
|
+
p: z15.string().default("3.30mm")
|
|
2100
2182
|
});
|
|
2101
2183
|
var sod123 = (raw_params) => {
|
|
2102
2184
|
const parameters = sod_def.parse(raw_params);
|
|
2103
2185
|
const silkscreenRefText = silkscreenRef(
|
|
2104
2186
|
0,
|
|
2105
|
-
|
|
2187
|
+
length8.parse(parameters.h) / 4 + 0.4,
|
|
2106
2188
|
0.3
|
|
2107
2189
|
);
|
|
2108
2190
|
return {
|
|
@@ -2142,14 +2224,14 @@ var sodWithoutParsing = (parameters) => {
|
|
|
2142
2224
|
|
|
2143
2225
|
// src/fn/axial.ts
|
|
2144
2226
|
import {
|
|
2145
|
-
length as
|
|
2227
|
+
length as length9
|
|
2146
2228
|
} from "circuit-json";
|
|
2147
|
-
import { z as
|
|
2148
|
-
var axial_def =
|
|
2149
|
-
fn:
|
|
2150
|
-
p:
|
|
2151
|
-
id:
|
|
2152
|
-
od:
|
|
2229
|
+
import { z as z16 } from "zod";
|
|
2230
|
+
var axial_def = z16.object({
|
|
2231
|
+
fn: z16.string(),
|
|
2232
|
+
p: length9.optional().default("2.54mm"),
|
|
2233
|
+
id: length9.optional().default("0.7mm"),
|
|
2234
|
+
od: length9.optional().default("1.4mm")
|
|
2153
2235
|
});
|
|
2154
2236
|
var axial = (raw_params) => {
|
|
2155
2237
|
const parameters = axial_def.parse(raw_params);
|
|
@@ -2181,8 +2263,8 @@ var axial = (raw_params) => {
|
|
|
2181
2263
|
};
|
|
2182
2264
|
|
|
2183
2265
|
// src/fn/pushbutton.ts
|
|
2184
|
-
import { length as
|
|
2185
|
-
import { z as
|
|
2266
|
+
import { length as length10 } from "circuit-json";
|
|
2267
|
+
import { z as z17 } from "zod";
|
|
2186
2268
|
|
|
2187
2269
|
// src/helpers/silkscreenpath.ts
|
|
2188
2270
|
var silkscreenpath = (route, options = {}) => {
|
|
@@ -2197,12 +2279,12 @@ var silkscreenpath = (route, options = {}) => {
|
|
|
2197
2279
|
};
|
|
2198
2280
|
|
|
2199
2281
|
// src/fn/pushbutton.ts
|
|
2200
|
-
var pushbutton_def =
|
|
2201
|
-
fn:
|
|
2202
|
-
w:
|
|
2203
|
-
h:
|
|
2204
|
-
id:
|
|
2205
|
-
od:
|
|
2282
|
+
var pushbutton_def = z17.object({
|
|
2283
|
+
fn: z17.literal("pushbutton"),
|
|
2284
|
+
w: length10.default(4.5),
|
|
2285
|
+
h: length10.default(6.5),
|
|
2286
|
+
id: length10.default(1),
|
|
2287
|
+
od: length10.default(1.2)
|
|
2206
2288
|
});
|
|
2207
2289
|
var pushbutton = (raw_params) => {
|
|
2208
2290
|
const parameters = pushbutton_def.parse(raw_params);
|
|
@@ -2249,24 +2331,24 @@ var pushbutton = (raw_params) => {
|
|
|
2249
2331
|
|
|
2250
2332
|
// src/fn/stampboard.ts
|
|
2251
2333
|
import {
|
|
2252
|
-
length as
|
|
2334
|
+
length as length11
|
|
2253
2335
|
} from "circuit-json";
|
|
2254
|
-
import { z as
|
|
2255
|
-
var stampboard_def =
|
|
2256
|
-
fn:
|
|
2257
|
-
w:
|
|
2258
|
-
h:
|
|
2259
|
-
left:
|
|
2260
|
-
right:
|
|
2261
|
-
top:
|
|
2262
|
-
bottom:
|
|
2263
|
-
p:
|
|
2264
|
-
pw:
|
|
2265
|
-
pl:
|
|
2266
|
-
innerhole:
|
|
2267
|
-
innerholeedgedistance:
|
|
2268
|
-
silkscreenlabels:
|
|
2269
|
-
silkscreenlabelmargin:
|
|
2336
|
+
import { z as z18 } from "zod";
|
|
2337
|
+
var stampboard_def = z18.object({
|
|
2338
|
+
fn: z18.string(),
|
|
2339
|
+
w: length11.default("22.58mm"),
|
|
2340
|
+
h: length11.optional(),
|
|
2341
|
+
left: length11.optional().default(20),
|
|
2342
|
+
right: length11.optional().default(20),
|
|
2343
|
+
top: length11.optional().default(2),
|
|
2344
|
+
bottom: length11.optional().default(2),
|
|
2345
|
+
p: length11.default(length11.parse("2.54mm")),
|
|
2346
|
+
pw: length11.default(length11.parse("1.6mm")),
|
|
2347
|
+
pl: length11.default(length11.parse("2.4mm")),
|
|
2348
|
+
innerhole: z18.boolean().default(false),
|
|
2349
|
+
innerholeedgedistance: length11.default(length11.parse("1.61mm")),
|
|
2350
|
+
silkscreenlabels: z18.boolean().default(false),
|
|
2351
|
+
silkscreenlabelmargin: length11.default(length11.parse("0.1mm"))
|
|
2270
2352
|
});
|
|
2271
2353
|
var getHeight = (parameters) => {
|
|
2272
2354
|
const params = stampboard_def.parse(parameters);
|
|
@@ -2675,22 +2757,22 @@ var stampboard = (raw_params) => {
|
|
|
2675
2757
|
|
|
2676
2758
|
// src/fn/stampreceiver.ts
|
|
2677
2759
|
import {
|
|
2678
|
-
length as
|
|
2760
|
+
length as length12
|
|
2679
2761
|
} from "circuit-json";
|
|
2680
|
-
import { z as
|
|
2681
|
-
var stampreceiver_def =
|
|
2682
|
-
fn:
|
|
2683
|
-
w:
|
|
2684
|
-
h:
|
|
2685
|
-
left:
|
|
2686
|
-
right:
|
|
2687
|
-
top:
|
|
2688
|
-
bottom:
|
|
2689
|
-
p:
|
|
2690
|
-
pw:
|
|
2691
|
-
pl:
|
|
2692
|
-
innerhole:
|
|
2693
|
-
innerholeedgedistance:
|
|
2762
|
+
import { z as z19 } from "zod";
|
|
2763
|
+
var stampreceiver_def = z19.object({
|
|
2764
|
+
fn: z19.string(),
|
|
2765
|
+
w: length12.default("22.58mm"),
|
|
2766
|
+
h: length12.optional(),
|
|
2767
|
+
left: length12.optional().default(20),
|
|
2768
|
+
right: length12.optional().default(20),
|
|
2769
|
+
top: length12.optional().default(2),
|
|
2770
|
+
bottom: length12.optional().default(2),
|
|
2771
|
+
p: length12.default(length12.parse("2.54mm")),
|
|
2772
|
+
pw: length12.default(length12.parse("1.6mm")),
|
|
2773
|
+
pl: length12.default(length12.parse("3.2mm")),
|
|
2774
|
+
innerhole: z19.boolean().default(false),
|
|
2775
|
+
innerholeedgedistance: length12.default(length12.parse("1.61mm"))
|
|
2694
2776
|
});
|
|
2695
2777
|
var getHeight2 = (parameters) => {
|
|
2696
2778
|
const params = stampreceiver_def.parse(parameters);
|
|
@@ -2991,20 +3073,20 @@ var lqfp = (parameters) => {
|
|
|
2991
3073
|
|
|
2992
3074
|
// src/fn/breakoutheaders.ts
|
|
2993
3075
|
import {
|
|
2994
|
-
length as
|
|
3076
|
+
length as length13
|
|
2995
3077
|
} from "circuit-json";
|
|
2996
|
-
import { z as
|
|
2997
|
-
var breakoutheaders_def =
|
|
2998
|
-
fn:
|
|
2999
|
-
w:
|
|
3000
|
-
h:
|
|
3001
|
-
left:
|
|
3002
|
-
right:
|
|
3003
|
-
top:
|
|
3004
|
-
bottom:
|
|
3005
|
-
p:
|
|
3006
|
-
id:
|
|
3007
|
-
od:
|
|
3078
|
+
import { z as z20 } from "zod";
|
|
3079
|
+
var breakoutheaders_def = z20.object({
|
|
3080
|
+
fn: z20.string(),
|
|
3081
|
+
w: length13.default("10mm"),
|
|
3082
|
+
h: length13.optional(),
|
|
3083
|
+
left: length13.optional().default(20),
|
|
3084
|
+
right: length13.optional().default(20),
|
|
3085
|
+
top: length13.optional().default(0),
|
|
3086
|
+
bottom: length13.optional().default(0),
|
|
3087
|
+
p: length13.default(length13.parse("2.54mm")),
|
|
3088
|
+
id: length13.optional().default(length13.parse("1mm")),
|
|
3089
|
+
od: length13.optional().default(length13.parse("1.5mm"))
|
|
3008
3090
|
});
|
|
3009
3091
|
var getHeight3 = (parameters) => {
|
|
3010
3092
|
const params = breakoutheaders_def.parse(parameters);
|
|
@@ -3196,9 +3278,9 @@ var breakoutheaders = (raw_params) => {
|
|
|
3196
3278
|
|
|
3197
3279
|
// src/fn/hc49.ts
|
|
3198
3280
|
import {
|
|
3199
|
-
length as
|
|
3281
|
+
length as length14
|
|
3200
3282
|
} from "circuit-json";
|
|
3201
|
-
import { z as
|
|
3283
|
+
import { z as z21 } from "zod";
|
|
3202
3284
|
var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
3203
3285
|
return Array.from({ length: 25 }, (_, i) => {
|
|
3204
3286
|
const theta = i / 24 * Math.PI - Math.PI / 2;
|
|
@@ -3208,13 +3290,13 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
|
3208
3290
|
};
|
|
3209
3291
|
});
|
|
3210
3292
|
};
|
|
3211
|
-
var hc49_def =
|
|
3212
|
-
fn:
|
|
3213
|
-
p:
|
|
3214
|
-
id:
|
|
3215
|
-
od:
|
|
3216
|
-
w:
|
|
3217
|
-
h:
|
|
3293
|
+
var hc49_def = z21.object({
|
|
3294
|
+
fn: z21.string(),
|
|
3295
|
+
p: length14.optional().default("4.88mm"),
|
|
3296
|
+
id: length14.optional().default("0.8mm"),
|
|
3297
|
+
od: length14.optional().default("1.5mm"),
|
|
3298
|
+
w: length14.optional().default("5.6mm"),
|
|
3299
|
+
h: length14.optional().default("3.5mm")
|
|
3218
3300
|
});
|
|
3219
3301
|
var hc49 = (raw_params) => {
|
|
3220
3302
|
const parameters = hc49_def.parse(raw_params);
|
|
@@ -3254,12 +3336,12 @@ var hc49 = (raw_params) => {
|
|
|
3254
3336
|
};
|
|
3255
3337
|
|
|
3256
3338
|
// src/fn/pad.ts
|
|
3257
|
-
import { z as
|
|
3258
|
-
import { length as
|
|
3339
|
+
import { z as z22 } from "zod";
|
|
3340
|
+
import { length as length15 } from "circuit-json";
|
|
3259
3341
|
import { mm as mm5 } from "@tscircuit/mm";
|
|
3260
|
-
var pad_def =
|
|
3261
|
-
w:
|
|
3262
|
-
h:
|
|
3342
|
+
var pad_def = z22.object({
|
|
3343
|
+
w: length15,
|
|
3344
|
+
h: length15
|
|
3263
3345
|
});
|
|
3264
3346
|
var pad = (params) => {
|
|
3265
3347
|
const { w, h } = params;
|
|
@@ -3275,17 +3357,17 @@ var pad = (params) => {
|
|
|
3275
3357
|
};
|
|
3276
3358
|
|
|
3277
3359
|
// src/fn/to92.ts
|
|
3278
|
-
import { z as
|
|
3279
|
-
var to92_def =
|
|
3280
|
-
fn:
|
|
3281
|
-
num_pins:
|
|
3282
|
-
p:
|
|
3283
|
-
id:
|
|
3284
|
-
od:
|
|
3285
|
-
w:
|
|
3286
|
-
h:
|
|
3287
|
-
inline:
|
|
3288
|
-
string:
|
|
3360
|
+
import { z as z23 } from "zod";
|
|
3361
|
+
var to92_def = z23.object({
|
|
3362
|
+
fn: z23.string(),
|
|
3363
|
+
num_pins: z23.union([z23.literal(3), z23.literal(2)]).default(3),
|
|
3364
|
+
p: z23.string().default("1.27mm"),
|
|
3365
|
+
id: z23.string().default("0.72mm"),
|
|
3366
|
+
od: z23.string().default("0.95mm"),
|
|
3367
|
+
w: z23.string().default("4.5mm"),
|
|
3368
|
+
h: z23.string().default("4.5mm"),
|
|
3369
|
+
inline: z23.boolean().default(false),
|
|
3370
|
+
string: z23.string().optional()
|
|
3289
3371
|
});
|
|
3290
3372
|
var generateSemicircle = (centerX, centerY, radius) => {
|
|
3291
3373
|
return Array.from({ length: 25 }, (_, i) => {
|
|
@@ -3358,22 +3440,22 @@ var to92 = (raw_params) => {
|
|
|
3358
3440
|
};
|
|
3359
3441
|
|
|
3360
3442
|
// src/fn/sod523.ts
|
|
3361
|
-
import { z as
|
|
3362
|
-
import { length as
|
|
3363
|
-
var sod_def2 =
|
|
3364
|
-
fn:
|
|
3365
|
-
num_pins:
|
|
3366
|
-
w:
|
|
3367
|
-
h:
|
|
3368
|
-
pl:
|
|
3369
|
-
pw:
|
|
3370
|
-
p:
|
|
3443
|
+
import { z as z24 } from "zod";
|
|
3444
|
+
import { length as length16 } from "circuit-json";
|
|
3445
|
+
var sod_def2 = z24.object({
|
|
3446
|
+
fn: z24.string(),
|
|
3447
|
+
num_pins: z24.literal(2).default(2),
|
|
3448
|
+
w: z24.string().default("2.15mm"),
|
|
3449
|
+
h: z24.string().default("1.20mm"),
|
|
3450
|
+
pl: z24.string().default("0.5mm"),
|
|
3451
|
+
pw: z24.string().default("0.6mm"),
|
|
3452
|
+
p: z24.string().default("1.4mm")
|
|
3371
3453
|
});
|
|
3372
3454
|
var sod523 = (raw_params) => {
|
|
3373
3455
|
const parameters = sod_def2.parse(raw_params);
|
|
3374
3456
|
const silkscreenRefText = silkscreenRef(
|
|
3375
3457
|
0,
|
|
3376
|
-
|
|
3458
|
+
length16.parse(parameters.h),
|
|
3377
3459
|
0.3
|
|
3378
3460
|
);
|
|
3379
3461
|
const silkscreenLine = {
|
|
@@ -3382,20 +3464,20 @@ var sod523 = (raw_params) => {
|
|
|
3382
3464
|
pcb_component_id: "",
|
|
3383
3465
|
route: [
|
|
3384
3466
|
{
|
|
3385
|
-
x:
|
|
3386
|
-
y:
|
|
3467
|
+
x: length16.parse(parameters.p) / 2,
|
|
3468
|
+
y: length16.parse(parameters.h) / 2
|
|
3387
3469
|
},
|
|
3388
3470
|
{
|
|
3389
|
-
x: -
|
|
3390
|
-
y:
|
|
3471
|
+
x: -length16.parse(parameters.w) / 2 - 0.2,
|
|
3472
|
+
y: length16.parse(parameters.h) / 2
|
|
3391
3473
|
},
|
|
3392
3474
|
{
|
|
3393
|
-
x: -
|
|
3394
|
-
y: -
|
|
3475
|
+
x: -length16.parse(parameters.w) / 2 - 0.2,
|
|
3476
|
+
y: -length16.parse(parameters.h) / 2
|
|
3395
3477
|
},
|
|
3396
3478
|
{
|
|
3397
|
-
x:
|
|
3398
|
-
y: -
|
|
3479
|
+
x: length16.parse(parameters.p) / 2,
|
|
3480
|
+
y: -length16.parse(parameters.h) / 2
|
|
3399
3481
|
}
|
|
3400
3482
|
],
|
|
3401
3483
|
stroke_width: 0.1,
|
|
@@ -3483,22 +3565,22 @@ var sop8 = (raw_params) => {
|
|
|
3483
3565
|
};
|
|
3484
3566
|
|
|
3485
3567
|
// src/fn/sod80.ts
|
|
3486
|
-
import { z as
|
|
3487
|
-
import { length as
|
|
3488
|
-
var sod80_def =
|
|
3489
|
-
fn:
|
|
3490
|
-
num_pins:
|
|
3491
|
-
w:
|
|
3492
|
-
h:
|
|
3493
|
-
pl:
|
|
3494
|
-
pw:
|
|
3495
|
-
p:
|
|
3568
|
+
import { z as z25 } from "zod";
|
|
3569
|
+
import { length as length17 } from "circuit-json";
|
|
3570
|
+
var sod80_def = z25.object({
|
|
3571
|
+
fn: z25.string(),
|
|
3572
|
+
num_pins: z25.literal(2).default(2),
|
|
3573
|
+
w: z25.string().default("5.0mm"),
|
|
3574
|
+
h: z25.string().default("2.30mm"),
|
|
3575
|
+
pl: z25.string().default("1.25mm"),
|
|
3576
|
+
pw: z25.string().default("2mm"),
|
|
3577
|
+
p: z25.string().default("3.75mm")
|
|
3496
3578
|
});
|
|
3497
3579
|
var sod80 = (raw_params) => {
|
|
3498
3580
|
const parameters = sod80_def.parse(raw_params);
|
|
3499
3581
|
const silkscreenRefText = silkscreenRef(
|
|
3500
3582
|
0,
|
|
3501
|
-
|
|
3583
|
+
length17.parse(parameters.h) / 2 + 1,
|
|
3502
3584
|
0.3
|
|
3503
3585
|
);
|
|
3504
3586
|
const silkscreenLine = {
|
|
@@ -3507,20 +3589,20 @@ var sod80 = (raw_params) => {
|
|
|
3507
3589
|
pcb_component_id: "",
|
|
3508
3590
|
route: [
|
|
3509
3591
|
{
|
|
3510
|
-
x:
|
|
3511
|
-
y:
|
|
3592
|
+
x: length17.parse(parameters.p) / 2 + 0.5,
|
|
3593
|
+
y: length17.parse(parameters.h) / 2 + 0.5
|
|
3512
3594
|
},
|
|
3513
3595
|
{
|
|
3514
|
-
x: -
|
|
3515
|
-
y:
|
|
3596
|
+
x: -length17.parse(parameters.w) / 2 - 0.5,
|
|
3597
|
+
y: length17.parse(parameters.h) / 2 + 0.5
|
|
3516
3598
|
},
|
|
3517
3599
|
{
|
|
3518
|
-
x: -
|
|
3519
|
-
y: -
|
|
3600
|
+
x: -length17.parse(parameters.w) / 2 - 0.5,
|
|
3601
|
+
y: -length17.parse(parameters.h) / 2 - 0.5
|
|
3520
3602
|
},
|
|
3521
3603
|
{
|
|
3522
|
-
x:
|
|
3523
|
-
y: -
|
|
3604
|
+
x: length17.parse(parameters.p) / 2 + 0.5,
|
|
3605
|
+
y: -length17.parse(parameters.h) / 2 - 0.5
|
|
3524
3606
|
}
|
|
3525
3607
|
],
|
|
3526
3608
|
stroke_width: 0.1,
|
|
@@ -3559,22 +3641,22 @@ var sod80WithoutParsing = (parameters) => {
|
|
|
3559
3641
|
};
|
|
3560
3642
|
|
|
3561
3643
|
// src/fn/sod123w.ts
|
|
3562
|
-
import { z as
|
|
3563
|
-
import { length as
|
|
3564
|
-
var sod_def3 =
|
|
3565
|
-
fn:
|
|
3566
|
-
num_pins:
|
|
3567
|
-
w:
|
|
3568
|
-
h:
|
|
3569
|
-
pl:
|
|
3570
|
-
pw:
|
|
3571
|
-
p:
|
|
3644
|
+
import { z as z26 } from "zod";
|
|
3645
|
+
import { length as length18 } from "circuit-json";
|
|
3646
|
+
var sod_def3 = z26.object({
|
|
3647
|
+
fn: z26.string(),
|
|
3648
|
+
num_pins: z26.literal(2).default(2),
|
|
3649
|
+
w: z26.string().default("4.4mm"),
|
|
3650
|
+
h: z26.string().default("2.1mm"),
|
|
3651
|
+
pl: z26.string().default("1.2mm"),
|
|
3652
|
+
pw: z26.string().default("1.2mm"),
|
|
3653
|
+
p: z26.string().default("2.9mm")
|
|
3572
3654
|
});
|
|
3573
3655
|
var sod123w = (raw_params) => {
|
|
3574
3656
|
const parameters = sod_def3.parse(raw_params);
|
|
3575
3657
|
const silkscreenRefText = silkscreenRef(
|
|
3576
3658
|
0,
|
|
3577
|
-
|
|
3659
|
+
length18.parse(parameters.h) - 0.5,
|
|
3578
3660
|
0.3
|
|
3579
3661
|
);
|
|
3580
3662
|
const silkscreenLine = {
|
|
@@ -3583,20 +3665,20 @@ var sod123w = (raw_params) => {
|
|
|
3583
3665
|
pcb_component_id: "",
|
|
3584
3666
|
route: [
|
|
3585
3667
|
{
|
|
3586
|
-
x:
|
|
3587
|
-
y:
|
|
3668
|
+
x: length18.parse(parameters.p) / 2,
|
|
3669
|
+
y: length18.parse(parameters.h) / 2
|
|
3588
3670
|
},
|
|
3589
3671
|
{
|
|
3590
|
-
x: -
|
|
3591
|
-
y:
|
|
3672
|
+
x: -length18.parse(parameters.w) / 2 - 0.2,
|
|
3673
|
+
y: length18.parse(parameters.h) / 2
|
|
3592
3674
|
},
|
|
3593
3675
|
{
|
|
3594
|
-
x: -
|
|
3595
|
-
y: -
|
|
3676
|
+
x: -length18.parse(parameters.w) / 2 - 0.2,
|
|
3677
|
+
y: -length18.parse(parameters.h) / 2
|
|
3596
3678
|
},
|
|
3597
3679
|
{
|
|
3598
|
-
x:
|
|
3599
|
-
y: -
|
|
3680
|
+
x: length18.parse(parameters.p) / 2,
|
|
3681
|
+
y: -length18.parse(parameters.h) / 2
|
|
3600
3682
|
}
|
|
3601
3683
|
],
|
|
3602
3684
|
stroke_width: 0.1,
|
|
@@ -3638,22 +3720,22 @@ var sodWithoutParsing3 = (parameters) => {
|
|
|
3638
3720
|
};
|
|
3639
3721
|
|
|
3640
3722
|
// src/fn/sod323.ts
|
|
3641
|
-
import { z as
|
|
3642
|
-
import { length as
|
|
3643
|
-
var sod_def4 =
|
|
3644
|
-
fn:
|
|
3645
|
-
num_pins:
|
|
3646
|
-
w:
|
|
3647
|
-
h:
|
|
3648
|
-
pl:
|
|
3649
|
-
pw:
|
|
3650
|
-
p:
|
|
3723
|
+
import { z as z27 } from "zod";
|
|
3724
|
+
import { length as length19 } from "circuit-json";
|
|
3725
|
+
var sod_def4 = z27.object({
|
|
3726
|
+
fn: z27.string(),
|
|
3727
|
+
num_pins: z27.literal(2).default(2),
|
|
3728
|
+
w: z27.string().default("3.30mm"),
|
|
3729
|
+
h: z27.string().default("1.80mm"),
|
|
3730
|
+
pl: z27.string().default("0.60mm"),
|
|
3731
|
+
pw: z27.string().default("0.45mm"),
|
|
3732
|
+
p: z27.string().default("2.1mm")
|
|
3651
3733
|
});
|
|
3652
3734
|
var sod323 = (raw_params) => {
|
|
3653
3735
|
const parameters = sod_def4.parse(raw_params);
|
|
3654
3736
|
const silkscreenRefText = silkscreenRef(
|
|
3655
3737
|
0,
|
|
3656
|
-
|
|
3738
|
+
length19.parse(parameters.h) - 0.5,
|
|
3657
3739
|
0.3
|
|
3658
3740
|
);
|
|
3659
3741
|
const silkscreenLine = {
|
|
@@ -3662,20 +3744,20 @@ var sod323 = (raw_params) => {
|
|
|
3662
3744
|
pcb_component_id: "",
|
|
3663
3745
|
route: [
|
|
3664
3746
|
{
|
|
3665
|
-
x:
|
|
3666
|
-
y:
|
|
3747
|
+
x: length19.parse(parameters.p) / 2,
|
|
3748
|
+
y: length19.parse(parameters.h) / 2
|
|
3667
3749
|
},
|
|
3668
3750
|
{
|
|
3669
|
-
x: -
|
|
3670
|
-
y:
|
|
3751
|
+
x: -length19.parse(parameters.w) / 2,
|
|
3752
|
+
y: length19.parse(parameters.h) / 2
|
|
3671
3753
|
},
|
|
3672
3754
|
{
|
|
3673
|
-
x: -
|
|
3674
|
-
y: -
|
|
3755
|
+
x: -length19.parse(parameters.w) / 2,
|
|
3756
|
+
y: -length19.parse(parameters.h) / 2
|
|
3675
3757
|
},
|
|
3676
3758
|
{
|
|
3677
|
-
x:
|
|
3678
|
-
y: -
|
|
3759
|
+
x: length19.parse(parameters.p) / 2,
|
|
3760
|
+
y: -length19.parse(parameters.h) / 2
|
|
3679
3761
|
}
|
|
3680
3762
|
],
|
|
3681
3763
|
stroke_width: 0.1,
|
|
@@ -3717,22 +3799,22 @@ var sodWithoutParsing4 = (parameters) => {
|
|
|
3717
3799
|
};
|
|
3718
3800
|
|
|
3719
3801
|
// src/fn/sod923.ts
|
|
3720
|
-
import { z as
|
|
3721
|
-
import { length as
|
|
3722
|
-
var sod_def5 =
|
|
3723
|
-
fn:
|
|
3724
|
-
num_pins:
|
|
3725
|
-
w:
|
|
3726
|
-
h:
|
|
3727
|
-
pl:
|
|
3728
|
-
pw:
|
|
3729
|
-
p:
|
|
3802
|
+
import { z as z28 } from "zod";
|
|
3803
|
+
import { length as length20 } from "circuit-json";
|
|
3804
|
+
var sod_def5 = z28.object({
|
|
3805
|
+
fn: z28.string(),
|
|
3806
|
+
num_pins: z28.literal(2).default(2),
|
|
3807
|
+
w: z28.string().default("1.4mm"),
|
|
3808
|
+
h: z28.string().default("0.9mm"),
|
|
3809
|
+
pl: z28.string().default("0.36mm"),
|
|
3810
|
+
pw: z28.string().default("0.25mm"),
|
|
3811
|
+
p: z28.string().default("0.85mm")
|
|
3730
3812
|
});
|
|
3731
3813
|
var sod923 = (raw_params) => {
|
|
3732
3814
|
const parameters = sod_def5.parse(raw_params);
|
|
3733
3815
|
const silkscreenRefText = silkscreenRef(
|
|
3734
3816
|
0,
|
|
3735
|
-
|
|
3817
|
+
length20.parse(parameters.h),
|
|
3736
3818
|
0.3
|
|
3737
3819
|
);
|
|
3738
3820
|
const silkscreenLine = {
|
|
@@ -3741,20 +3823,20 @@ var sod923 = (raw_params) => {
|
|
|
3741
3823
|
pcb_component_id: "",
|
|
3742
3824
|
route: [
|
|
3743
3825
|
{
|
|
3744
|
-
x:
|
|
3745
|
-
y:
|
|
3826
|
+
x: length20.parse(parameters.p) / 2 + 0.15,
|
|
3827
|
+
y: length20.parse(parameters.h) / 2
|
|
3746
3828
|
},
|
|
3747
3829
|
{
|
|
3748
|
-
x: -
|
|
3749
|
-
y:
|
|
3830
|
+
x: -length20.parse(parameters.w) / 2 - 0.15,
|
|
3831
|
+
y: length20.parse(parameters.h) / 2
|
|
3750
3832
|
},
|
|
3751
3833
|
{
|
|
3752
|
-
x: -
|
|
3753
|
-
y: -
|
|
3834
|
+
x: -length20.parse(parameters.w) / 2 - 0.15,
|
|
3835
|
+
y: -length20.parse(parameters.h) / 2
|
|
3754
3836
|
},
|
|
3755
3837
|
{
|
|
3756
|
-
x:
|
|
3757
|
-
y: -
|
|
3838
|
+
x: length20.parse(parameters.p) / 2 + 0.15,
|
|
3839
|
+
y: -length20.parse(parameters.h) / 2
|
|
3758
3840
|
}
|
|
3759
3841
|
],
|
|
3760
3842
|
stroke_width: 0.1,
|
|
@@ -3797,22 +3879,22 @@ var sodWithoutParsing5 = (parameters) => {
|
|
|
3797
3879
|
};
|
|
3798
3880
|
|
|
3799
3881
|
// src/fn/sod882.ts
|
|
3800
|
-
import { z as
|
|
3801
|
-
import { length as
|
|
3802
|
-
var sod_def6 =
|
|
3803
|
-
fn:
|
|
3804
|
-
num_pins:
|
|
3805
|
-
w:
|
|
3806
|
-
h:
|
|
3807
|
-
pl:
|
|
3808
|
-
pw:
|
|
3809
|
-
p:
|
|
3882
|
+
import { z as z29 } from "zod";
|
|
3883
|
+
import { length as length21 } from "circuit-json";
|
|
3884
|
+
var sod_def6 = z29.object({
|
|
3885
|
+
fn: z29.string(),
|
|
3886
|
+
num_pins: z29.literal(2).default(2),
|
|
3887
|
+
w: z29.string().default("1.3mm"),
|
|
3888
|
+
h: z29.string().default("0.9mm"),
|
|
3889
|
+
pl: z29.string().default("0.4mm"),
|
|
3890
|
+
pw: z29.string().default("0.7mm"),
|
|
3891
|
+
p: z29.string().default("0.7mm")
|
|
3810
3892
|
});
|
|
3811
3893
|
var sod882 = (raw_params) => {
|
|
3812
3894
|
const parameters = sod_def6.parse(raw_params);
|
|
3813
3895
|
const silkscreenRefText = silkscreenRef(
|
|
3814
3896
|
0,
|
|
3815
|
-
|
|
3897
|
+
length21.parse(parameters.h) + 0.1,
|
|
3816
3898
|
0.3
|
|
3817
3899
|
);
|
|
3818
3900
|
const silkscreenLine = {
|
|
@@ -3821,20 +3903,20 @@ var sod882 = (raw_params) => {
|
|
|
3821
3903
|
pcb_component_id: "",
|
|
3822
3904
|
route: [
|
|
3823
3905
|
{
|
|
3824
|
-
x:
|
|
3825
|
-
y:
|
|
3906
|
+
x: length21.parse(parameters.p) / 2 + 0.2,
|
|
3907
|
+
y: length21.parse(parameters.h) / 2 + 0.2
|
|
3826
3908
|
},
|
|
3827
3909
|
{
|
|
3828
|
-
x: -
|
|
3829
|
-
y:
|
|
3910
|
+
x: -length21.parse(parameters.w) / 2 - 0.2,
|
|
3911
|
+
y: length21.parse(parameters.h) / 2 + 0.2
|
|
3830
3912
|
},
|
|
3831
3913
|
{
|
|
3832
|
-
x: -
|
|
3833
|
-
y: -
|
|
3914
|
+
x: -length21.parse(parameters.w) / 2 - 0.2,
|
|
3915
|
+
y: -length21.parse(parameters.h) / 2 - 0.2
|
|
3834
3916
|
},
|
|
3835
3917
|
{
|
|
3836
|
-
x:
|
|
3837
|
-
y: -
|
|
3918
|
+
x: length21.parse(parameters.p) / 2 + 0.2,
|
|
3919
|
+
y: -length21.parse(parameters.h) / 2 - 0.2
|
|
3838
3920
|
}
|
|
3839
3921
|
],
|
|
3840
3922
|
stroke_width: 0.1,
|
|
@@ -3877,22 +3959,22 @@ var sodWithoutParsing6 = (parameters) => {
|
|
|
3877
3959
|
};
|
|
3878
3960
|
|
|
3879
3961
|
// src/fn/sod323f.ts
|
|
3880
|
-
import { z as
|
|
3881
|
-
import { length as
|
|
3882
|
-
var sod_def7 =
|
|
3883
|
-
fn:
|
|
3884
|
-
num_pins:
|
|
3885
|
-
w:
|
|
3886
|
-
h:
|
|
3887
|
-
pl:
|
|
3888
|
-
pw:
|
|
3889
|
-
pad_spacing:
|
|
3962
|
+
import { z as z30 } from "zod";
|
|
3963
|
+
import { length as length22 } from "circuit-json";
|
|
3964
|
+
var sod_def7 = z30.object({
|
|
3965
|
+
fn: z30.string(),
|
|
3966
|
+
num_pins: z30.literal(2).default(2),
|
|
3967
|
+
w: z30.string().default("3,05mm"),
|
|
3968
|
+
h: z30.string().default("1.65mm"),
|
|
3969
|
+
pl: z30.string().default("0.6mm"),
|
|
3970
|
+
pw: z30.string().default("0.6mm"),
|
|
3971
|
+
pad_spacing: z30.string().default("2.2mm")
|
|
3890
3972
|
});
|
|
3891
3973
|
var sod323f = (raw_params) => {
|
|
3892
3974
|
const parameters = sod_def7.parse(raw_params);
|
|
3893
3975
|
const silkscreenRefText = silkscreenRef(
|
|
3894
3976
|
0,
|
|
3895
|
-
|
|
3977
|
+
length22.parse(parameters.h),
|
|
3896
3978
|
0.3
|
|
3897
3979
|
);
|
|
3898
3980
|
const silkscreenLine = {
|
|
@@ -3901,20 +3983,20 @@ var sod323f = (raw_params) => {
|
|
|
3901
3983
|
pcb_component_id: "",
|
|
3902
3984
|
route: [
|
|
3903
3985
|
{
|
|
3904
|
-
x:
|
|
3905
|
-
y:
|
|
3986
|
+
x: length22.parse(parameters.pad_spacing) / 2,
|
|
3987
|
+
y: length22.parse(parameters.h) / 2
|
|
3906
3988
|
},
|
|
3907
3989
|
{
|
|
3908
|
-
x: -
|
|
3909
|
-
y:
|
|
3990
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3991
|
+
y: length22.parse(parameters.h) / 2
|
|
3910
3992
|
},
|
|
3911
3993
|
{
|
|
3912
|
-
x: -
|
|
3913
|
-
y: -
|
|
3994
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3995
|
+
y: -length22.parse(parameters.h) / 2
|
|
3914
3996
|
},
|
|
3915
3997
|
{
|
|
3916
|
-
x:
|
|
3917
|
-
y: -
|
|
3998
|
+
x: length22.parse(parameters.pad_spacing) / 2,
|
|
3999
|
+
y: -length22.parse(parameters.h) / 2
|
|
3918
4000
|
}
|
|
3919
4001
|
],
|
|
3920
4002
|
stroke_width: 0.1,
|
|
@@ -3957,22 +4039,22 @@ var sodWithoutParsing7 = (parameters) => {
|
|
|
3957
4039
|
};
|
|
3958
4040
|
|
|
3959
4041
|
// src/fn/sod123f.ts
|
|
3960
|
-
import { z as
|
|
3961
|
-
import { length as
|
|
3962
|
-
var sod_def8 =
|
|
3963
|
-
fn:
|
|
3964
|
-
num_pins:
|
|
3965
|
-
w:
|
|
3966
|
-
h:
|
|
3967
|
-
pl:
|
|
3968
|
-
pw:
|
|
3969
|
-
p:
|
|
4042
|
+
import { z as z31 } from "zod";
|
|
4043
|
+
import { length as length23 } from "circuit-json";
|
|
4044
|
+
var sod_def8 = z31.object({
|
|
4045
|
+
fn: z31.string(),
|
|
4046
|
+
num_pins: z31.literal(2).default(2),
|
|
4047
|
+
w: z31.string().default("4.4mm"),
|
|
4048
|
+
h: z31.string().default("2.1mm"),
|
|
4049
|
+
pl: z31.string().default("1.2mm"),
|
|
4050
|
+
pw: z31.string().default("1.2mm"),
|
|
4051
|
+
p: z31.string().default("2.9mm")
|
|
3970
4052
|
});
|
|
3971
4053
|
var sod123f = (raw_params) => {
|
|
3972
4054
|
const parameters = sod_def8.parse(raw_params);
|
|
3973
4055
|
const silkscreenRefText = silkscreenRef(
|
|
3974
4056
|
0,
|
|
3975
|
-
|
|
4057
|
+
length23.parse(parameters.h),
|
|
3976
4058
|
0.3
|
|
3977
4059
|
);
|
|
3978
4060
|
const silkscreenLine = {
|
|
@@ -3981,20 +4063,20 @@ var sod123f = (raw_params) => {
|
|
|
3981
4063
|
pcb_component_id: "",
|
|
3982
4064
|
route: [
|
|
3983
4065
|
{
|
|
3984
|
-
x:
|
|
3985
|
-
y:
|
|
4066
|
+
x: length23.parse(parameters.p) / 2,
|
|
4067
|
+
y: length23.parse(parameters.h) / 2
|
|
3986
4068
|
},
|
|
3987
4069
|
{
|
|
3988
|
-
x: -
|
|
3989
|
-
y:
|
|
4070
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4071
|
+
y: length23.parse(parameters.h) / 2
|
|
3990
4072
|
},
|
|
3991
4073
|
{
|
|
3992
|
-
x: -
|
|
3993
|
-
y: -
|
|
4074
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4075
|
+
y: -length23.parse(parameters.h) / 2
|
|
3994
4076
|
},
|
|
3995
4077
|
{
|
|
3996
|
-
x:
|
|
3997
|
-
y: -
|
|
4078
|
+
x: length23.parse(parameters.p) / 2,
|
|
4079
|
+
y: -length23.parse(parameters.h) / 2
|
|
3998
4080
|
}
|
|
3999
4081
|
],
|
|
4000
4082
|
stroke_width: 0.1,
|
|
@@ -4037,22 +4119,22 @@ var sodWithoutParsing8 = (parameters) => {
|
|
|
4037
4119
|
};
|
|
4038
4120
|
|
|
4039
4121
|
// src/fn/sod123fl.ts
|
|
4040
|
-
import { z as
|
|
4041
|
-
import { length as
|
|
4042
|
-
var sod123FL_def =
|
|
4043
|
-
fn:
|
|
4044
|
-
num_pins:
|
|
4045
|
-
w:
|
|
4046
|
-
h:
|
|
4047
|
-
pl:
|
|
4048
|
-
pw:
|
|
4049
|
-
p:
|
|
4122
|
+
import { z as z32 } from "zod";
|
|
4123
|
+
import { length as length24 } from "circuit-json";
|
|
4124
|
+
var sod123FL_def = z32.object({
|
|
4125
|
+
fn: z32.string(),
|
|
4126
|
+
num_pins: z32.literal(2).default(2),
|
|
4127
|
+
w: z32.string().default("4.4mm"),
|
|
4128
|
+
h: z32.string().default("2.1mm"),
|
|
4129
|
+
pl: z32.string().default("0.91mm"),
|
|
4130
|
+
pw: z32.string().default("1.22mm"),
|
|
4131
|
+
p: z32.string().default("3.146mm")
|
|
4050
4132
|
});
|
|
4051
4133
|
var sod123fl = (raw_params) => {
|
|
4052
4134
|
const parameters = sod123FL_def.parse(raw_params);
|
|
4053
4135
|
const silkscreenRefText = silkscreenRef(
|
|
4054
4136
|
0,
|
|
4055
|
-
|
|
4137
|
+
length24.parse(parameters.h),
|
|
4056
4138
|
0.3
|
|
4057
4139
|
);
|
|
4058
4140
|
const silkscreenLine = {
|
|
@@ -4061,20 +4143,20 @@ var sod123fl = (raw_params) => {
|
|
|
4061
4143
|
pcb_component_id: "",
|
|
4062
4144
|
route: [
|
|
4063
4145
|
{
|
|
4064
|
-
x:
|
|
4065
|
-
y:
|
|
4146
|
+
x: length24.parse(parameters.p) / 2,
|
|
4147
|
+
y: length24.parse(parameters.h) / 2
|
|
4066
4148
|
},
|
|
4067
4149
|
{
|
|
4068
|
-
x: -
|
|
4069
|
-
y:
|
|
4150
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4151
|
+
y: length24.parse(parameters.h) / 2
|
|
4070
4152
|
},
|
|
4071
4153
|
{
|
|
4072
|
-
x: -
|
|
4073
|
-
y: -
|
|
4154
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4155
|
+
y: -length24.parse(parameters.h) / 2
|
|
4074
4156
|
},
|
|
4075
4157
|
{
|
|
4076
|
-
x:
|
|
4077
|
-
y: -
|
|
4158
|
+
x: length24.parse(parameters.p) / 2,
|
|
4159
|
+
y: -length24.parse(parameters.h) / 2
|
|
4078
4160
|
}
|
|
4079
4161
|
],
|
|
4080
4162
|
stroke_width: 0.1,
|
|
@@ -4117,22 +4199,22 @@ var sodWithoutParsing9 = (parameters) => {
|
|
|
4117
4199
|
};
|
|
4118
4200
|
|
|
4119
4201
|
// src/fn/sod723.ts
|
|
4120
|
-
import { z as
|
|
4121
|
-
import { length as
|
|
4122
|
-
var sod_def9 =
|
|
4123
|
-
fn:
|
|
4124
|
-
num_pins:
|
|
4125
|
-
w:
|
|
4126
|
-
h:
|
|
4127
|
-
pl:
|
|
4128
|
-
pw:
|
|
4129
|
-
p:
|
|
4202
|
+
import { z as z33 } from "zod";
|
|
4203
|
+
import { length as length25 } from "circuit-json";
|
|
4204
|
+
var sod_def9 = z33.object({
|
|
4205
|
+
fn: z33.string(),
|
|
4206
|
+
num_pins: z33.literal(2).default(2),
|
|
4207
|
+
w: z33.string().default("1.80mm"),
|
|
4208
|
+
h: z33.string().default("1.00mm"),
|
|
4209
|
+
pl: z33.string().default("0.66mm"),
|
|
4210
|
+
pw: z33.string().default("0.5mm"),
|
|
4211
|
+
p: z33.string().default("0.8mm")
|
|
4130
4212
|
});
|
|
4131
4213
|
var sod723 = (raw_params) => {
|
|
4132
4214
|
const parameters = sod_def9.parse(raw_params);
|
|
4133
4215
|
const silkscreenRefText = silkscreenRef(
|
|
4134
4216
|
0,
|
|
4135
|
-
|
|
4217
|
+
length25.parse(parameters.h),
|
|
4136
4218
|
0.3
|
|
4137
4219
|
);
|
|
4138
4220
|
const silkscreenLine = {
|
|
@@ -4141,20 +4223,20 @@ var sod723 = (raw_params) => {
|
|
|
4141
4223
|
pcb_component_id: "",
|
|
4142
4224
|
route: [
|
|
4143
4225
|
{
|
|
4144
|
-
x:
|
|
4145
|
-
y:
|
|
4226
|
+
x: length25.parse(parameters.p) / 2,
|
|
4227
|
+
y: length25.parse(parameters.h) / 2
|
|
4146
4228
|
},
|
|
4147
4229
|
{
|
|
4148
|
-
x: -
|
|
4149
|
-
y:
|
|
4230
|
+
x: -length25.parse(parameters.w) / 2 - 0.1,
|
|
4231
|
+
y: length25.parse(parameters.h) / 2
|
|
4150
4232
|
},
|
|
4151
4233
|
{
|
|
4152
|
-
x: -
|
|
4153
|
-
y: -
|
|
4234
|
+
x: -length25.parse(parameters.w) / 2 - 0.1,
|
|
4235
|
+
y: -length25.parse(parameters.h) / 2
|
|
4154
4236
|
},
|
|
4155
4237
|
{
|
|
4156
|
-
x:
|
|
4157
|
-
y: -
|
|
4238
|
+
x: length25.parse(parameters.p) / 2,
|
|
4239
|
+
y: -length25.parse(parameters.h) / 2
|
|
4158
4240
|
}
|
|
4159
4241
|
],
|
|
4160
4242
|
stroke_width: 0.1,
|
|
@@ -4197,22 +4279,22 @@ var sodWithoutParsing10 = (parameters) => {
|
|
|
4197
4279
|
};
|
|
4198
4280
|
|
|
4199
4281
|
// src/fn/sod128.ts
|
|
4200
|
-
import { z as
|
|
4201
|
-
import { length as
|
|
4202
|
-
var sod_def10 =
|
|
4203
|
-
fn:
|
|
4204
|
-
num_pins:
|
|
4205
|
-
w:
|
|
4206
|
-
h:
|
|
4207
|
-
pl:
|
|
4208
|
-
pw:
|
|
4209
|
-
p:
|
|
4282
|
+
import { z as z34 } from "zod";
|
|
4283
|
+
import { length as length26 } from "circuit-json";
|
|
4284
|
+
var sod_def10 = z34.object({
|
|
4285
|
+
fn: z34.string(),
|
|
4286
|
+
num_pins: z34.literal(2).default(2),
|
|
4287
|
+
w: z34.string().default("6.2mm"),
|
|
4288
|
+
h: z34.string().default("3.4mm"),
|
|
4289
|
+
pl: z34.string().default("1.4mm"),
|
|
4290
|
+
pw: z34.string().default("2.1mm"),
|
|
4291
|
+
p: z34.string().default("4.4mm")
|
|
4210
4292
|
});
|
|
4211
4293
|
var sod128 = (raw_params) => {
|
|
4212
4294
|
const parameters = sod_def10.parse(raw_params);
|
|
4213
4295
|
const silkscreenRefText = silkscreenRef(
|
|
4214
4296
|
0,
|
|
4215
|
-
|
|
4297
|
+
length26.parse(parameters.h) / 2 + 0.4,
|
|
4216
4298
|
0.3
|
|
4217
4299
|
);
|
|
4218
4300
|
const silkscreenLine = {
|
|
@@ -4221,20 +4303,20 @@ var sod128 = (raw_params) => {
|
|
|
4221
4303
|
pcb_component_id: "",
|
|
4222
4304
|
route: [
|
|
4223
4305
|
{
|
|
4224
|
-
x:
|
|
4225
|
-
y:
|
|
4306
|
+
x: length26.parse(parameters.p) / 2,
|
|
4307
|
+
y: length26.parse(parameters.h) / 2
|
|
4226
4308
|
},
|
|
4227
4309
|
{
|
|
4228
|
-
x: -
|
|
4229
|
-
y:
|
|
4310
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4311
|
+
y: length26.parse(parameters.h) / 2
|
|
4230
4312
|
},
|
|
4231
4313
|
{
|
|
4232
|
-
x: -
|
|
4233
|
-
y: -
|
|
4314
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4315
|
+
y: -length26.parse(parameters.h) / 2
|
|
4234
4316
|
},
|
|
4235
4317
|
{
|
|
4236
|
-
x:
|
|
4237
|
-
y: -
|
|
4318
|
+
x: length26.parse(parameters.p) / 2,
|
|
4319
|
+
y: -length26.parse(parameters.h) / 2
|
|
4238
4320
|
}
|
|
4239
4321
|
],
|
|
4240
4322
|
stroke_width: 0.1,
|
|
@@ -4277,27 +4359,29 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
4277
4359
|
};
|
|
4278
4360
|
|
|
4279
4361
|
// src/fn/sot89.ts
|
|
4280
|
-
import { z as
|
|
4281
|
-
var sot89_def =
|
|
4282
|
-
fn:
|
|
4283
|
-
num_pins:
|
|
4284
|
-
w:
|
|
4285
|
-
h:
|
|
4286
|
-
pl:
|
|
4287
|
-
pw:
|
|
4288
|
-
p:
|
|
4289
|
-
string:
|
|
4362
|
+
import { z as z35 } from "zod";
|
|
4363
|
+
var sot89_def = z35.object({
|
|
4364
|
+
fn: z35.string(),
|
|
4365
|
+
num_pins: z35.union([z35.literal(3), z35.literal(5)]).default(3),
|
|
4366
|
+
w: z35.string().default("4.20mm"),
|
|
4367
|
+
h: z35.string().default("4.80mm"),
|
|
4368
|
+
pl: z35.string().default("1.3mm"),
|
|
4369
|
+
pw: z35.string().default("0.9mm"),
|
|
4370
|
+
p: z35.string().default("1.5mm"),
|
|
4371
|
+
string: z35.string().optional()
|
|
4290
4372
|
});
|
|
4291
4373
|
var sot89_3 = (parameters) => {
|
|
4292
4374
|
const pads = [];
|
|
4293
4375
|
const padGap = Number.parseFloat(parameters.p);
|
|
4294
4376
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4295
|
-
const
|
|
4377
|
+
const length48 = Number.parseFloat(parameters.w);
|
|
4296
4378
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
4379
|
+
const centerExtra = 0.175;
|
|
4380
|
+
const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
|
|
4297
4381
|
pads.push(
|
|
4298
|
-
rectpad(1, -
|
|
4299
|
-
rectpad(2, -
|
|
4300
|
-
rectpad(3, -
|
|
4382
|
+
rectpad(1, -length48 / 2 + outerPadXShift, padGap, padHeight, padWidth),
|
|
4383
|
+
rectpad(2, -length48 / 2, 0, padHeight + centerExtra, padWidth),
|
|
4384
|
+
rectpad(3, -length48 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
|
|
4301
4385
|
);
|
|
4302
4386
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
4303
4387
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -4337,7 +4421,7 @@ var sot89_5 = (parameters) => {
|
|
|
4337
4421
|
const pads = [];
|
|
4338
4422
|
const padGap = Number.parseFloat(parameters.p);
|
|
4339
4423
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4340
|
-
const
|
|
4424
|
+
const length48 = Number.parseFloat(parameters.w);
|
|
4341
4425
|
pads.push(
|
|
4342
4426
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
4343
4427
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -4405,18 +4489,18 @@ var sot89 = (raw_params) => {
|
|
|
4405
4489
|
|
|
4406
4490
|
// src/fn/to220.ts
|
|
4407
4491
|
import {
|
|
4408
|
-
length as
|
|
4492
|
+
length as length27
|
|
4409
4493
|
} from "circuit-json";
|
|
4410
|
-
import { z as
|
|
4411
|
-
var to220_def =
|
|
4412
|
-
fn:
|
|
4413
|
-
p:
|
|
4414
|
-
id:
|
|
4415
|
-
od:
|
|
4416
|
-
w:
|
|
4417
|
-
h:
|
|
4418
|
-
num_pins:
|
|
4419
|
-
string:
|
|
4494
|
+
import { z as z36 } from "zod";
|
|
4495
|
+
var to220_def = z36.object({
|
|
4496
|
+
fn: z36.string(),
|
|
4497
|
+
p: length27.optional().default("5.0mm"),
|
|
4498
|
+
id: length27.optional().default("1.0mm"),
|
|
4499
|
+
od: length27.optional().default("1.9mm"),
|
|
4500
|
+
w: length27.optional().default("13mm"),
|
|
4501
|
+
h: length27.optional().default("7mm"),
|
|
4502
|
+
num_pins: z36.number().optional(),
|
|
4503
|
+
string: z36.string().optional()
|
|
4420
4504
|
});
|
|
4421
4505
|
var to220 = (raw_params) => {
|
|
4422
4506
|
const parameters = to220_def.parse(raw_params);
|
|
@@ -4496,22 +4580,22 @@ var to220 = (raw_params) => {
|
|
|
4496
4580
|
};
|
|
4497
4581
|
|
|
4498
4582
|
// src/fn/minimelf.ts
|
|
4499
|
-
import { z as
|
|
4500
|
-
import { length as
|
|
4501
|
-
var minimelf_def =
|
|
4502
|
-
fn:
|
|
4503
|
-
num_pins:
|
|
4504
|
-
w:
|
|
4505
|
-
h:
|
|
4506
|
-
pl:
|
|
4507
|
-
pw:
|
|
4508
|
-
p:
|
|
4583
|
+
import { z as z37 } from "zod";
|
|
4584
|
+
import { length as length28 } from "circuit-json";
|
|
4585
|
+
var minimelf_def = z37.object({
|
|
4586
|
+
fn: z37.string(),
|
|
4587
|
+
num_pins: z37.literal(2).default(2),
|
|
4588
|
+
w: z37.string().default("5.40mm"),
|
|
4589
|
+
h: z37.string().default("2.30mm"),
|
|
4590
|
+
pl: z37.string().default("1.30mm"),
|
|
4591
|
+
pw: z37.string().default("1.70mm"),
|
|
4592
|
+
p: z37.string().default("3.5mm")
|
|
4509
4593
|
});
|
|
4510
4594
|
var minimelf = (raw_params) => {
|
|
4511
4595
|
const parameters = minimelf_def.parse(raw_params);
|
|
4512
4596
|
const silkscreenRefText = silkscreenRef(
|
|
4513
4597
|
0,
|
|
4514
|
-
|
|
4598
|
+
length28.parse(parameters.h) / 2 + 0.4,
|
|
4515
4599
|
0.3
|
|
4516
4600
|
);
|
|
4517
4601
|
const silkscreenLine = {
|
|
@@ -4520,20 +4604,20 @@ var minimelf = (raw_params) => {
|
|
|
4520
4604
|
pcb_component_id: "",
|
|
4521
4605
|
route: [
|
|
4522
4606
|
{
|
|
4523
|
-
x:
|
|
4524
|
-
y:
|
|
4607
|
+
x: length28.parse(parameters.p) / 2,
|
|
4608
|
+
y: length28.parse(parameters.h) / 2
|
|
4525
4609
|
},
|
|
4526
4610
|
{
|
|
4527
|
-
x: -
|
|
4528
|
-
y:
|
|
4611
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4612
|
+
y: length28.parse(parameters.h) / 2
|
|
4529
4613
|
},
|
|
4530
4614
|
{
|
|
4531
|
-
x: -
|
|
4532
|
-
y: -
|
|
4615
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4616
|
+
y: -length28.parse(parameters.h) / 2
|
|
4533
4617
|
},
|
|
4534
4618
|
{
|
|
4535
|
-
x:
|
|
4536
|
-
y: -
|
|
4619
|
+
x: length28.parse(parameters.p) / 2,
|
|
4620
|
+
y: -length28.parse(parameters.h) / 2
|
|
4537
4621
|
}
|
|
4538
4622
|
],
|
|
4539
4623
|
stroke_width: 0.1,
|
|
@@ -4572,22 +4656,22 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
4572
4656
|
};
|
|
4573
4657
|
|
|
4574
4658
|
// src/fn/sod882d.ts
|
|
4575
|
-
import { z as
|
|
4576
|
-
import { length as
|
|
4577
|
-
var sod_def11 =
|
|
4578
|
-
fn:
|
|
4579
|
-
num_pins:
|
|
4580
|
-
w:
|
|
4581
|
-
h:
|
|
4582
|
-
pl:
|
|
4583
|
-
pw:
|
|
4584
|
-
p:
|
|
4659
|
+
import { z as z38 } from "zod";
|
|
4660
|
+
import { length as length29 } from "circuit-json";
|
|
4661
|
+
var sod_def11 = z38.object({
|
|
4662
|
+
fn: z38.string(),
|
|
4663
|
+
num_pins: z38.literal(2).default(2),
|
|
4664
|
+
w: z38.string().default("1.90mm"),
|
|
4665
|
+
h: z38.string().default("1.33mm"),
|
|
4666
|
+
pl: z38.string().default("0.5mm"),
|
|
4667
|
+
pw: z38.string().default("0.7mm"),
|
|
4668
|
+
p: z38.string().default("0.8mm")
|
|
4585
4669
|
});
|
|
4586
4670
|
var sod882d = (raw_params) => {
|
|
4587
4671
|
const parameters = sod_def11.parse(raw_params);
|
|
4588
4672
|
const silkscreenRefText = silkscreenRef(
|
|
4589
4673
|
0,
|
|
4590
|
-
|
|
4674
|
+
length29.parse(parameters.h) + 0.1,
|
|
4591
4675
|
0.3
|
|
4592
4676
|
);
|
|
4593
4677
|
const silkscreenLine = {
|
|
@@ -4596,20 +4680,20 @@ var sod882d = (raw_params) => {
|
|
|
4596
4680
|
pcb_component_id: "",
|
|
4597
4681
|
route: [
|
|
4598
4682
|
{
|
|
4599
|
-
x:
|
|
4600
|
-
y:
|
|
4683
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4684
|
+
y: length29.parse(parameters.h) / 2
|
|
4601
4685
|
},
|
|
4602
4686
|
{
|
|
4603
|
-
x: -
|
|
4604
|
-
y:
|
|
4687
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4688
|
+
y: length29.parse(parameters.h) / 2
|
|
4605
4689
|
},
|
|
4606
4690
|
{
|
|
4607
|
-
x: -
|
|
4608
|
-
y: -
|
|
4691
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4692
|
+
y: -length29.parse(parameters.h) / 2
|
|
4609
4693
|
},
|
|
4610
4694
|
{
|
|
4611
|
-
x:
|
|
4612
|
-
y: -
|
|
4695
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4696
|
+
y: -length29.parse(parameters.h) / 2
|
|
4613
4697
|
}
|
|
4614
4698
|
],
|
|
4615
4699
|
stroke_width: 0.1,
|
|
@@ -4652,22 +4736,22 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
4652
4736
|
};
|
|
4653
4737
|
|
|
4654
4738
|
// src/fn/melf.ts
|
|
4655
|
-
import { z as
|
|
4656
|
-
import { length as
|
|
4657
|
-
var melf_def =
|
|
4658
|
-
fn:
|
|
4659
|
-
num_pins:
|
|
4660
|
-
w:
|
|
4661
|
-
h:
|
|
4662
|
-
pl:
|
|
4663
|
-
pw:
|
|
4664
|
-
p:
|
|
4739
|
+
import { z as z39 } from "zod";
|
|
4740
|
+
import { length as length30 } from "circuit-json";
|
|
4741
|
+
var melf_def = z39.object({
|
|
4742
|
+
fn: z39.string(),
|
|
4743
|
+
num_pins: z39.literal(2).default(2),
|
|
4744
|
+
w: z39.string().default("7.0mm"),
|
|
4745
|
+
h: z39.string().default("3.35mm"),
|
|
4746
|
+
pl: z39.string().default("1.50mm"),
|
|
4747
|
+
pw: z39.string().default("2.70mm"),
|
|
4748
|
+
p: z39.string().default("4.8mm")
|
|
4665
4749
|
});
|
|
4666
4750
|
var melf = (raw_params) => {
|
|
4667
4751
|
const parameters = melf_def.parse(raw_params);
|
|
4668
4752
|
const silkscreenRefText = silkscreenRef(
|
|
4669
4753
|
0,
|
|
4670
|
-
|
|
4754
|
+
length30.parse(parameters.h),
|
|
4671
4755
|
0.3
|
|
4672
4756
|
);
|
|
4673
4757
|
const silkscreenLine = {
|
|
@@ -4676,20 +4760,20 @@ var melf = (raw_params) => {
|
|
|
4676
4760
|
pcb_component_id: "",
|
|
4677
4761
|
route: [
|
|
4678
4762
|
{
|
|
4679
|
-
x:
|
|
4680
|
-
y:
|
|
4763
|
+
x: length30.parse(parameters.p) / 2,
|
|
4764
|
+
y: length30.parse(parameters.h) / 2
|
|
4681
4765
|
},
|
|
4682
4766
|
{
|
|
4683
|
-
x: -
|
|
4684
|
-
y:
|
|
4767
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4768
|
+
y: length30.parse(parameters.h) / 2
|
|
4685
4769
|
},
|
|
4686
4770
|
{
|
|
4687
|
-
x: -
|
|
4688
|
-
y: -
|
|
4771
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4772
|
+
y: -length30.parse(parameters.h) / 2
|
|
4689
4773
|
},
|
|
4690
4774
|
{
|
|
4691
|
-
x:
|
|
4692
|
-
y: -
|
|
4775
|
+
x: length30.parse(parameters.p) / 2,
|
|
4776
|
+
y: -length30.parse(parameters.h) / 2
|
|
4693
4777
|
}
|
|
4694
4778
|
],
|
|
4695
4779
|
stroke_width: 0.1,
|
|
@@ -4732,22 +4816,22 @@ var melfWithoutParsing = (parameters) => {
|
|
|
4732
4816
|
};
|
|
4733
4817
|
|
|
4734
4818
|
// src/fn/micromelf.ts
|
|
4735
|
-
import { z as
|
|
4736
|
-
import { length as
|
|
4737
|
-
var micromelf_def =
|
|
4738
|
-
fn:
|
|
4739
|
-
num_pins:
|
|
4740
|
-
w:
|
|
4741
|
-
h:
|
|
4742
|
-
pl:
|
|
4743
|
-
pw:
|
|
4744
|
-
p:
|
|
4819
|
+
import { z as z40 } from "zod";
|
|
4820
|
+
import { length as length31 } from "circuit-json";
|
|
4821
|
+
var micromelf_def = z40.object({
|
|
4822
|
+
fn: z40.string(),
|
|
4823
|
+
num_pins: z40.literal(2).default(2),
|
|
4824
|
+
w: z40.string().default("3.0mm"),
|
|
4825
|
+
h: z40.string().default("1.80mm"),
|
|
4826
|
+
pl: z40.string().default("0.80mm"),
|
|
4827
|
+
pw: z40.string().default("1.20mm"),
|
|
4828
|
+
p: z40.string().default("1.6mm")
|
|
4745
4829
|
});
|
|
4746
4830
|
var micromelf = (raw_params) => {
|
|
4747
4831
|
const parameters = micromelf_def.parse(raw_params);
|
|
4748
4832
|
const silkscreenRefText = silkscreenRef(
|
|
4749
4833
|
0,
|
|
4750
|
-
|
|
4834
|
+
length31.parse(parameters.h),
|
|
4751
4835
|
0.3
|
|
4752
4836
|
);
|
|
4753
4837
|
const silkscreenLine = {
|
|
@@ -4756,20 +4840,20 @@ var micromelf = (raw_params) => {
|
|
|
4756
4840
|
pcb_component_id: "",
|
|
4757
4841
|
route: [
|
|
4758
4842
|
{
|
|
4759
|
-
x:
|
|
4760
|
-
y:
|
|
4843
|
+
x: length31.parse(parameters.p) / 2,
|
|
4844
|
+
y: length31.parse(parameters.h) / 2
|
|
4761
4845
|
},
|
|
4762
4846
|
{
|
|
4763
|
-
x: -
|
|
4764
|
-
y:
|
|
4847
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4848
|
+
y: length31.parse(parameters.h) / 2
|
|
4765
4849
|
},
|
|
4766
4850
|
{
|
|
4767
|
-
x: -
|
|
4768
|
-
y: -
|
|
4851
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4852
|
+
y: -length31.parse(parameters.h) / 2
|
|
4769
4853
|
},
|
|
4770
4854
|
{
|
|
4771
|
-
x:
|
|
4772
|
-
y: -
|
|
4855
|
+
x: length31.parse(parameters.p) / 2,
|
|
4856
|
+
y: -length31.parse(parameters.h) / 2
|
|
4773
4857
|
}
|
|
4774
4858
|
],
|
|
4775
4859
|
stroke_width: 0.1,
|
|
@@ -4812,22 +4896,22 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
4812
4896
|
};
|
|
4813
4897
|
|
|
4814
4898
|
// src/fn/sma.ts
|
|
4815
|
-
import { z as
|
|
4816
|
-
import { length as
|
|
4817
|
-
var sma_def =
|
|
4818
|
-
fn:
|
|
4819
|
-
num_pins:
|
|
4820
|
-
w:
|
|
4821
|
-
h:
|
|
4822
|
-
pl:
|
|
4823
|
-
pw:
|
|
4824
|
-
p:
|
|
4899
|
+
import { z as z41 } from "zod";
|
|
4900
|
+
import { length as length32 } from "circuit-json";
|
|
4901
|
+
var sma_def = z41.object({
|
|
4902
|
+
fn: z41.string(),
|
|
4903
|
+
num_pins: z41.literal(2).default(2),
|
|
4904
|
+
w: z41.string().default("7.10mm"),
|
|
4905
|
+
h: z41.string().default("3.40mm"),
|
|
4906
|
+
pl: z41.string().default("2.45mm"),
|
|
4907
|
+
pw: z41.string().default("1.80mm"),
|
|
4908
|
+
p: z41.string().default("4.05mm")
|
|
4825
4909
|
});
|
|
4826
4910
|
var sma = (raw_params) => {
|
|
4827
4911
|
const parameters = sma_def.parse(raw_params);
|
|
4828
4912
|
const silkscreenRefText = silkscreenRef(
|
|
4829
4913
|
0,
|
|
4830
|
-
|
|
4914
|
+
length32.parse(parameters.h) / 2 + 0.5,
|
|
4831
4915
|
0.3
|
|
4832
4916
|
);
|
|
4833
4917
|
const silkscreenLine = {
|
|
@@ -4836,20 +4920,20 @@ var sma = (raw_params) => {
|
|
|
4836
4920
|
pcb_component_id: "",
|
|
4837
4921
|
route: [
|
|
4838
4922
|
{
|
|
4839
|
-
x:
|
|
4840
|
-
y:
|
|
4923
|
+
x: length32.parse(parameters.p) / 2,
|
|
4924
|
+
y: length32.parse(parameters.h) / 2
|
|
4841
4925
|
},
|
|
4842
4926
|
{
|
|
4843
|
-
x: -
|
|
4844
|
-
y:
|
|
4927
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4928
|
+
y: length32.parse(parameters.h) / 2
|
|
4845
4929
|
},
|
|
4846
4930
|
{
|
|
4847
|
-
x: -
|
|
4848
|
-
y: -
|
|
4931
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4932
|
+
y: -length32.parse(parameters.h) / 2
|
|
4849
4933
|
},
|
|
4850
4934
|
{
|
|
4851
|
-
x:
|
|
4852
|
-
y: -
|
|
4935
|
+
x: length32.parse(parameters.p) / 2,
|
|
4936
|
+
y: -length32.parse(parameters.h) / 2
|
|
4853
4937
|
}
|
|
4854
4938
|
],
|
|
4855
4939
|
stroke_width: 0.1,
|
|
@@ -4891,22 +4975,22 @@ var smaWithoutParsing = (parameters) => {
|
|
|
4891
4975
|
};
|
|
4892
4976
|
|
|
4893
4977
|
// src/fn/smf.ts
|
|
4894
|
-
import { z as
|
|
4895
|
-
import { length as
|
|
4896
|
-
var smf_def =
|
|
4897
|
-
fn:
|
|
4898
|
-
num_pins:
|
|
4899
|
-
w:
|
|
4900
|
-
h:
|
|
4901
|
-
pl:
|
|
4902
|
-
pw:
|
|
4903
|
-
p:
|
|
4978
|
+
import { z as z42 } from "zod";
|
|
4979
|
+
import { length as length33 } from "circuit-json";
|
|
4980
|
+
var smf_def = z42.object({
|
|
4981
|
+
fn: z42.string(),
|
|
4982
|
+
num_pins: z42.literal(2).default(2),
|
|
4983
|
+
w: z42.string().default("4.80mm"),
|
|
4984
|
+
h: z42.string().default("2.10mm"),
|
|
4985
|
+
pl: z42.string().default("1.30mm"),
|
|
4986
|
+
pw: z42.string().default("1.40mm"),
|
|
4987
|
+
p: z42.string().default("2.9mm")
|
|
4904
4988
|
});
|
|
4905
4989
|
var smf = (raw_params) => {
|
|
4906
4990
|
const parameters = smf_def.parse(raw_params);
|
|
4907
4991
|
const silkscreenRefText = silkscreenRef(
|
|
4908
4992
|
0,
|
|
4909
|
-
|
|
4993
|
+
length33.parse(parameters.h) - 0.5,
|
|
4910
4994
|
0.3
|
|
4911
4995
|
);
|
|
4912
4996
|
const silkscreenLine = {
|
|
@@ -4915,20 +4999,20 @@ var smf = (raw_params) => {
|
|
|
4915
4999
|
pcb_component_id: "",
|
|
4916
5000
|
route: [
|
|
4917
5001
|
{
|
|
4918
|
-
x:
|
|
4919
|
-
y:
|
|
5002
|
+
x: length33.parse(parameters.p) / 2,
|
|
5003
|
+
y: length33.parse(parameters.h) / 2
|
|
4920
5004
|
},
|
|
4921
5005
|
{
|
|
4922
|
-
x: -
|
|
4923
|
-
y:
|
|
5006
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5007
|
+
y: length33.parse(parameters.h) / 2
|
|
4924
5008
|
},
|
|
4925
5009
|
{
|
|
4926
|
-
x: -
|
|
4927
|
-
y: -
|
|
5010
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5011
|
+
y: -length33.parse(parameters.h) / 2
|
|
4928
5012
|
},
|
|
4929
5013
|
{
|
|
4930
|
-
x:
|
|
4931
|
-
y: -
|
|
5014
|
+
x: length33.parse(parameters.p) / 2,
|
|
5015
|
+
y: -length33.parse(parameters.h) / 2
|
|
4932
5016
|
}
|
|
4933
5017
|
],
|
|
4934
5018
|
stroke_width: 0.1,
|
|
@@ -4971,22 +5055,22 @@ var smfWithoutParsing = (parameters) => {
|
|
|
4971
5055
|
};
|
|
4972
5056
|
|
|
4973
5057
|
// src/fn/smb.ts
|
|
4974
|
-
import { z as
|
|
4975
|
-
import { length as
|
|
4976
|
-
var smb_def =
|
|
4977
|
-
fn:
|
|
4978
|
-
num_pins:
|
|
4979
|
-
w:
|
|
4980
|
-
h:
|
|
4981
|
-
pl:
|
|
4982
|
-
pw:
|
|
4983
|
-
p:
|
|
5058
|
+
import { z as z43 } from "zod";
|
|
5059
|
+
import { length as length34 } from "circuit-json";
|
|
5060
|
+
var smb_def = z43.object({
|
|
5061
|
+
fn: z43.string(),
|
|
5062
|
+
num_pins: z43.literal(2).default(2),
|
|
5063
|
+
w: z43.string().default("7.30mm"),
|
|
5064
|
+
h: z43.string().default("4.40mm"),
|
|
5065
|
+
pl: z43.string().default("2.50mm"),
|
|
5066
|
+
pw: z43.string().default("2.30mm"),
|
|
5067
|
+
p: z43.string().default("4.30mm")
|
|
4984
5068
|
});
|
|
4985
5069
|
var smb = (raw_params) => {
|
|
4986
5070
|
const parameters = smb_def.parse(raw_params);
|
|
4987
5071
|
const silkscreenRefText = silkscreenRef(
|
|
4988
5072
|
0,
|
|
4989
|
-
|
|
5073
|
+
length34.parse(parameters.h) / 2 + 0.5,
|
|
4990
5074
|
0.3
|
|
4991
5075
|
);
|
|
4992
5076
|
const silkscreenLine = {
|
|
@@ -4995,20 +5079,20 @@ var smb = (raw_params) => {
|
|
|
4995
5079
|
pcb_component_id: "",
|
|
4996
5080
|
route: [
|
|
4997
5081
|
{
|
|
4998
|
-
x:
|
|
4999
|
-
y:
|
|
5082
|
+
x: length34.parse(parameters.p) / 2,
|
|
5083
|
+
y: length34.parse(parameters.h) / 2
|
|
5000
5084
|
},
|
|
5001
5085
|
{
|
|
5002
|
-
x: -
|
|
5003
|
-
y:
|
|
5086
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5087
|
+
y: length34.parse(parameters.h) / 2
|
|
5004
5088
|
},
|
|
5005
5089
|
{
|
|
5006
|
-
x: -
|
|
5007
|
-
y: -
|
|
5090
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5091
|
+
y: -length34.parse(parameters.h) / 2
|
|
5008
5092
|
},
|
|
5009
5093
|
{
|
|
5010
|
-
x:
|
|
5011
|
-
y: -
|
|
5094
|
+
x: length34.parse(parameters.p) / 2,
|
|
5095
|
+
y: -length34.parse(parameters.h) / 2
|
|
5012
5096
|
}
|
|
5013
5097
|
],
|
|
5014
5098
|
stroke_width: 0.1,
|
|
@@ -5051,16 +5135,16 @@ var smbWithoutParsing = (parameters) => {
|
|
|
5051
5135
|
};
|
|
5052
5136
|
|
|
5053
5137
|
// src/fn/smc.ts
|
|
5054
|
-
import { z as
|
|
5055
|
-
import { length as
|
|
5056
|
-
var smc_def =
|
|
5057
|
-
fn:
|
|
5058
|
-
num_pins:
|
|
5059
|
-
w:
|
|
5060
|
-
h:
|
|
5061
|
-
pl:
|
|
5062
|
-
pw:
|
|
5063
|
-
p:
|
|
5138
|
+
import { z as z44 } from "zod";
|
|
5139
|
+
import { length as length35 } from "circuit-json";
|
|
5140
|
+
var smc_def = z44.object({
|
|
5141
|
+
fn: z44.string(),
|
|
5142
|
+
num_pins: z44.literal(2).default(2),
|
|
5143
|
+
w: z44.string().default("10.70mm"),
|
|
5144
|
+
h: z44.string().default("6.60mm"),
|
|
5145
|
+
pl: z44.string().default("3.30mm"),
|
|
5146
|
+
pw: z44.string().default("2.50mm"),
|
|
5147
|
+
p: z44.string().default("6.80mm")
|
|
5064
5148
|
});
|
|
5065
5149
|
var smc = (raw_params) => {
|
|
5066
5150
|
const parameters = smc_def.parse(raw_params);
|
|
@@ -5071,20 +5155,20 @@ var smc = (raw_params) => {
|
|
|
5071
5155
|
pcb_component_id: "",
|
|
5072
5156
|
route: [
|
|
5073
5157
|
{
|
|
5074
|
-
x:
|
|
5075
|
-
y:
|
|
5158
|
+
x: length35.parse(parameters.p) / 2,
|
|
5159
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5076
5160
|
},
|
|
5077
5161
|
{
|
|
5078
|
-
x: -
|
|
5079
|
-
y:
|
|
5162
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5163
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5080
5164
|
},
|
|
5081
5165
|
{
|
|
5082
|
-
x: -
|
|
5083
|
-
y: -
|
|
5166
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5167
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5084
5168
|
},
|
|
5085
5169
|
{
|
|
5086
|
-
x:
|
|
5087
|
-
y: -
|
|
5170
|
+
x: length35.parse(parameters.p) / 2,
|
|
5171
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5088
5172
|
}
|
|
5089
5173
|
],
|
|
5090
5174
|
stroke_width: 0.1,
|
|
@@ -5126,16 +5210,16 @@ var smcWithoutParsing = (parameters) => {
|
|
|
5126
5210
|
};
|
|
5127
5211
|
|
|
5128
5212
|
// src/fn/sot223.ts
|
|
5129
|
-
import { z as
|
|
5130
|
-
var sot223_def =
|
|
5131
|
-
fn:
|
|
5132
|
-
num_pins:
|
|
5133
|
-
w:
|
|
5134
|
-
h:
|
|
5135
|
-
pl:
|
|
5136
|
-
pw:
|
|
5137
|
-
p:
|
|
5138
|
-
string:
|
|
5213
|
+
import { z as z45 } from "zod";
|
|
5214
|
+
var sot223_def = z45.object({
|
|
5215
|
+
fn: z45.string(),
|
|
5216
|
+
num_pins: z45.number().default(4),
|
|
5217
|
+
w: z45.string().default("8.50mm"),
|
|
5218
|
+
h: z45.string().default("6.90mm"),
|
|
5219
|
+
pl: z45.string().default("2mm"),
|
|
5220
|
+
pw: z45.string().default("1.5mm"),
|
|
5221
|
+
p: z45.string().default("2.30mm"),
|
|
5222
|
+
string: z45.string().optional()
|
|
5139
5223
|
});
|
|
5140
5224
|
var sot223 = (raw_params) => {
|
|
5141
5225
|
const match = raw_params.string?.match(/^sot223_(\d+)/);
|
|
@@ -5381,16 +5465,16 @@ var sot223_6 = (parameters) => {
|
|
|
5381
5465
|
};
|
|
5382
5466
|
|
|
5383
5467
|
// src/fn/sot23w.ts
|
|
5384
|
-
import { z as
|
|
5385
|
-
var sot23w_def =
|
|
5386
|
-
fn:
|
|
5387
|
-
num_pins:
|
|
5388
|
-
w:
|
|
5389
|
-
h:
|
|
5390
|
-
pl:
|
|
5391
|
-
pw:
|
|
5392
|
-
p:
|
|
5393
|
-
string:
|
|
5468
|
+
import { z as z46 } from "zod";
|
|
5469
|
+
var sot23w_def = z46.object({
|
|
5470
|
+
fn: z46.string(),
|
|
5471
|
+
num_pins: z46.number().default(3),
|
|
5472
|
+
w: z46.string().default("3.40mm"),
|
|
5473
|
+
h: z46.string().default("3.30mm"),
|
|
5474
|
+
pl: z46.string().default("1mm"),
|
|
5475
|
+
pw: z46.string().default("0.7mm"),
|
|
5476
|
+
p: z46.string().default("1.2mm"),
|
|
5477
|
+
string: z46.string().optional()
|
|
5394
5478
|
});
|
|
5395
5479
|
var sot23w = (raw_params) => {
|
|
5396
5480
|
const match = raw_params.string?.match(/^sot23w_(\d+)/);
|
|
@@ -5478,16 +5562,16 @@ var sot23w_3 = (parameters) => {
|
|
|
5478
5562
|
};
|
|
5479
5563
|
|
|
5480
5564
|
// src/fn/to92s.ts
|
|
5481
|
-
import { z as
|
|
5482
|
-
var to92s_def =
|
|
5483
|
-
fn:
|
|
5484
|
-
num_pins:
|
|
5485
|
-
p:
|
|
5486
|
-
id:
|
|
5487
|
-
od:
|
|
5488
|
-
w:
|
|
5489
|
-
h:
|
|
5490
|
-
string:
|
|
5565
|
+
import { z as z47 } from "zod";
|
|
5566
|
+
var to92s_def = z47.object({
|
|
5567
|
+
fn: z47.string(),
|
|
5568
|
+
num_pins: z47.union([z47.literal(3), z47.literal(2)]).default(3),
|
|
5569
|
+
p: z47.string().default("1.27mm"),
|
|
5570
|
+
id: z47.string().default("0.72mm"),
|
|
5571
|
+
od: z47.string().default("0.95mm"),
|
|
5572
|
+
w: z47.string().default("2.5mm"),
|
|
5573
|
+
h: z47.string().default("4.2mm"),
|
|
5574
|
+
string: z47.string().optional()
|
|
5491
5575
|
});
|
|
5492
5576
|
var to92s_3 = (parameters) => {
|
|
5493
5577
|
const { p, id, od, w, h } = parameters;
|
|
@@ -5554,18 +5638,18 @@ var to92s = (raw_params) => {
|
|
|
5554
5638
|
|
|
5555
5639
|
// src/fn/jst.ts
|
|
5556
5640
|
import {
|
|
5557
|
-
length as
|
|
5641
|
+
length as length36
|
|
5558
5642
|
} from "circuit-json";
|
|
5559
|
-
import { z as
|
|
5560
|
-
var jst_def =
|
|
5561
|
-
fn:
|
|
5562
|
-
p:
|
|
5563
|
-
id:
|
|
5564
|
-
pw:
|
|
5565
|
-
pl:
|
|
5566
|
-
w:
|
|
5567
|
-
h:
|
|
5568
|
-
sh:
|
|
5643
|
+
import { z as z48 } from "zod";
|
|
5644
|
+
var jst_def = z48.object({
|
|
5645
|
+
fn: z48.string(),
|
|
5646
|
+
p: length36.optional(),
|
|
5647
|
+
id: length36.optional(),
|
|
5648
|
+
pw: length36.optional(),
|
|
5649
|
+
pl: length36.optional(),
|
|
5650
|
+
w: length36.optional(),
|
|
5651
|
+
h: length36.optional(),
|
|
5652
|
+
sh: z48.union([z48.boolean(), z48.string(), z48.number()]).optional().transform((v) => {
|
|
5569
5653
|
if (typeof v === "string") {
|
|
5570
5654
|
const n = Number(v);
|
|
5571
5655
|
return Number.isNaN(n) ? true : n;
|
|
@@ -5574,26 +5658,26 @@ var jst_def = z47.object({
|
|
|
5574
5658
|
}).describe(
|
|
5575
5659
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
5576
5660
|
),
|
|
5577
|
-
ph:
|
|
5661
|
+
ph: z48.boolean().optional().describe(
|
|
5578
5662
|
'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
|
|
5579
5663
|
),
|
|
5580
|
-
string:
|
|
5664
|
+
string: z48.string().optional()
|
|
5581
5665
|
});
|
|
5582
5666
|
var variantDefaults = {
|
|
5583
5667
|
ph: {
|
|
5584
|
-
p:
|
|
5585
|
-
id:
|
|
5586
|
-
pw:
|
|
5587
|
-
pl:
|
|
5588
|
-
w:
|
|
5589
|
-
h:
|
|
5668
|
+
p: length36.parse("2.2mm"),
|
|
5669
|
+
id: length36.parse("0.70mm"),
|
|
5670
|
+
pw: length36.parse("1.20mm"),
|
|
5671
|
+
pl: length36.parse("1.20mm"),
|
|
5672
|
+
w: length36.parse("6mm"),
|
|
5673
|
+
h: length36.parse("5mm")
|
|
5590
5674
|
},
|
|
5591
5675
|
sh: {
|
|
5592
|
-
p:
|
|
5593
|
-
pw:
|
|
5594
|
-
pl:
|
|
5595
|
-
w:
|
|
5596
|
-
h:
|
|
5676
|
+
p: length36.parse("1mm"),
|
|
5677
|
+
pw: length36.parse("0.6mm"),
|
|
5678
|
+
pl: length36.parse("1.55mm"),
|
|
5679
|
+
w: length36.parse("5.8mm"),
|
|
5680
|
+
h: length36.parse("7.8mm")
|
|
5597
5681
|
}
|
|
5598
5682
|
};
|
|
5599
5683
|
function getVariant(params) {
|
|
@@ -5692,22 +5776,22 @@ var jst = (raw_params) => {
|
|
|
5692
5776
|
};
|
|
5693
5777
|
|
|
5694
5778
|
// src/fn/sod110.ts
|
|
5695
|
-
import { z as
|
|
5696
|
-
import { length as
|
|
5697
|
-
var sod_def12 =
|
|
5698
|
-
fn:
|
|
5699
|
-
num_pins:
|
|
5700
|
-
w:
|
|
5701
|
-
h:
|
|
5702
|
-
pl:
|
|
5703
|
-
pw:
|
|
5704
|
-
p:
|
|
5779
|
+
import { z as z49 } from "zod";
|
|
5780
|
+
import { length as length37 } from "circuit-json";
|
|
5781
|
+
var sod_def12 = z49.object({
|
|
5782
|
+
fn: z49.string(),
|
|
5783
|
+
num_pins: z49.literal(2).default(2),
|
|
5784
|
+
w: z49.string().default("3.30mm"),
|
|
5785
|
+
h: z49.string().default("1.70mm"),
|
|
5786
|
+
pl: z49.string().default("0.80mm"),
|
|
5787
|
+
pw: z49.string().default("1mm"),
|
|
5788
|
+
p: z49.string().default("1.90mm")
|
|
5705
5789
|
});
|
|
5706
5790
|
var sod110 = (raw_params) => {
|
|
5707
5791
|
const parameters = sod_def12.parse(raw_params);
|
|
5708
5792
|
const silkscreenRefText = silkscreenRef(
|
|
5709
5793
|
0,
|
|
5710
|
-
|
|
5794
|
+
length37.parse(parameters.h) / 2 + 0.5,
|
|
5711
5795
|
0.3
|
|
5712
5796
|
);
|
|
5713
5797
|
const silkscreenLine = {
|
|
@@ -5716,20 +5800,20 @@ var sod110 = (raw_params) => {
|
|
|
5716
5800
|
pcb_component_id: "",
|
|
5717
5801
|
route: [
|
|
5718
5802
|
{
|
|
5719
|
-
x:
|
|
5720
|
-
y:
|
|
5803
|
+
x: length37.parse(parameters.p) / 2,
|
|
5804
|
+
y: length37.parse(parameters.h) / 2
|
|
5721
5805
|
},
|
|
5722
5806
|
{
|
|
5723
|
-
x: -
|
|
5724
|
-
y:
|
|
5807
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5808
|
+
y: length37.parse(parameters.h) / 2
|
|
5725
5809
|
},
|
|
5726
5810
|
{
|
|
5727
|
-
x: -
|
|
5728
|
-
y: -
|
|
5811
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5812
|
+
y: -length37.parse(parameters.h) / 2
|
|
5729
5813
|
},
|
|
5730
5814
|
{
|
|
5731
|
-
x:
|
|
5732
|
-
y: -
|
|
5815
|
+
x: length37.parse(parameters.p) / 2,
|
|
5816
|
+
y: -length37.parse(parameters.h) / 2
|
|
5733
5817
|
}
|
|
5734
5818
|
],
|
|
5735
5819
|
stroke_width: 0.1,
|
|
@@ -5771,8 +5855,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
5771
5855
|
};
|
|
5772
5856
|
|
|
5773
5857
|
// src/fn/vssop.ts
|
|
5774
|
-
import { z as
|
|
5775
|
-
import { length as
|
|
5858
|
+
import { z as z50 } from "zod";
|
|
5859
|
+
import { length as length38 } from "circuit-json";
|
|
5776
5860
|
var getDefaultValues = (num_pins) => {
|
|
5777
5861
|
switch (num_pins) {
|
|
5778
5862
|
case 8:
|
|
@@ -5801,24 +5885,24 @@ var getDefaultValues = (num_pins) => {
|
|
|
5801
5885
|
};
|
|
5802
5886
|
}
|
|
5803
5887
|
};
|
|
5804
|
-
var vssop_def =
|
|
5805
|
-
fn:
|
|
5806
|
-
num_pins:
|
|
5807
|
-
w:
|
|
5808
|
-
h:
|
|
5809
|
-
p:
|
|
5810
|
-
pl:
|
|
5811
|
-
pw:
|
|
5812
|
-
string:
|
|
5888
|
+
var vssop_def = z50.object({
|
|
5889
|
+
fn: z50.string(),
|
|
5890
|
+
num_pins: z50.union([z50.literal(8), z50.literal(10)]).default(8),
|
|
5891
|
+
w: z50.string().optional(),
|
|
5892
|
+
h: z50.string().optional(),
|
|
5893
|
+
p: z50.string().optional(),
|
|
5894
|
+
pl: z50.string().optional(),
|
|
5895
|
+
pw: z50.string().optional(),
|
|
5896
|
+
string: z50.string().optional()
|
|
5813
5897
|
});
|
|
5814
5898
|
var vssop = (raw_params) => {
|
|
5815
5899
|
const parameters = vssop_def.parse(raw_params);
|
|
5816
5900
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
5817
|
-
const w =
|
|
5818
|
-
const h =
|
|
5819
|
-
const p =
|
|
5820
|
-
const pl =
|
|
5821
|
-
const pw =
|
|
5901
|
+
const w = length38.parse(parameters.w || defaults.w);
|
|
5902
|
+
const h = length38.parse(parameters.h || defaults.h);
|
|
5903
|
+
const p = length38.parse(parameters.p || defaults.p);
|
|
5904
|
+
const pl = length38.parse(parameters.pl || defaults.pl);
|
|
5905
|
+
const pw = length38.parse(parameters.pw || defaults.pw);
|
|
5822
5906
|
const pads = [];
|
|
5823
5907
|
const half = parameters.num_pins / 2;
|
|
5824
5908
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -5895,14 +5979,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
5895
5979
|
const col = pn <= half ? -1 : 1;
|
|
5896
5980
|
const row = (half - 1) / 2 - rowIndex;
|
|
5897
5981
|
return {
|
|
5898
|
-
x: col *
|
|
5982
|
+
x: col * length38.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
|
|
5899
5983
|
y: row * p
|
|
5900
5984
|
};
|
|
5901
5985
|
};
|
|
5902
5986
|
|
|
5903
5987
|
// src/fn/msop.ts
|
|
5904
|
-
import { z as
|
|
5905
|
-
import { length as
|
|
5988
|
+
import { z as z51 } from "zod";
|
|
5989
|
+
import { length as length39 } from "circuit-json";
|
|
5906
5990
|
var getDefaultValues2 = (num_pins) => {
|
|
5907
5991
|
switch (num_pins) {
|
|
5908
5992
|
case 10:
|
|
@@ -5939,15 +6023,15 @@ var getDefaultValues2 = (num_pins) => {
|
|
|
5939
6023
|
};
|
|
5940
6024
|
}
|
|
5941
6025
|
};
|
|
5942
|
-
var msop_def =
|
|
5943
|
-
fn:
|
|
5944
|
-
num_pins:
|
|
5945
|
-
w:
|
|
5946
|
-
h:
|
|
5947
|
-
p:
|
|
5948
|
-
pl:
|
|
5949
|
-
pw:
|
|
5950
|
-
string:
|
|
6026
|
+
var msop_def = z51.object({
|
|
6027
|
+
fn: z51.string(),
|
|
6028
|
+
num_pins: z51.union([z51.literal(8), z51.literal(10), z51.literal(12), z51.literal(16)]).default(8),
|
|
6029
|
+
w: z51.string().optional(),
|
|
6030
|
+
h: z51.string().optional(),
|
|
6031
|
+
p: z51.string().optional(),
|
|
6032
|
+
pl: z51.string().optional(),
|
|
6033
|
+
pw: z51.string().optional(),
|
|
6034
|
+
string: z51.string().optional()
|
|
5951
6035
|
});
|
|
5952
6036
|
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
5953
6037
|
const half = pinCount / 2;
|
|
@@ -5955,18 +6039,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
|
|
|
5955
6039
|
const col = pn <= half ? -1 : 1;
|
|
5956
6040
|
const row = (half - 1) / 2 - rowIndex;
|
|
5957
6041
|
return {
|
|
5958
|
-
x: col *
|
|
6042
|
+
x: col * length39.parse("2mm"),
|
|
5959
6043
|
y: row * p
|
|
5960
6044
|
};
|
|
5961
6045
|
};
|
|
5962
6046
|
var msop = (raw_params) => {
|
|
5963
6047
|
const parameters = msop_def.parse(raw_params);
|
|
5964
6048
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
5965
|
-
const w =
|
|
5966
|
-
const h =
|
|
5967
|
-
const p =
|
|
5968
|
-
const pl =
|
|
5969
|
-
const pw =
|
|
6049
|
+
const w = length39.parse(parameters.w || defaults.w);
|
|
6050
|
+
const h = length39.parse(parameters.h || defaults.h);
|
|
6051
|
+
const p = length39.parse(parameters.p || defaults.p);
|
|
6052
|
+
const pl = length39.parse(parameters.pl || defaults.pl);
|
|
6053
|
+
const pw = length39.parse(parameters.pw || defaults.pw);
|
|
5970
6054
|
const pads = [];
|
|
5971
6055
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
5972
6056
|
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
@@ -6037,22 +6121,22 @@ var msop = (raw_params) => {
|
|
|
6037
6121
|
};
|
|
6038
6122
|
|
|
6039
6123
|
// src/fn/sod323w.ts
|
|
6040
|
-
import { z as
|
|
6041
|
-
import { length as
|
|
6042
|
-
var sod323w_def =
|
|
6043
|
-
fn:
|
|
6044
|
-
num_pins:
|
|
6045
|
-
w:
|
|
6046
|
-
h:
|
|
6047
|
-
pl:
|
|
6048
|
-
pw:
|
|
6049
|
-
pad_spacing:
|
|
6124
|
+
import { z as z52 } from "zod";
|
|
6125
|
+
import { length as length40 } from "circuit-json";
|
|
6126
|
+
var sod323w_def = z52.object({
|
|
6127
|
+
fn: z52.string(),
|
|
6128
|
+
num_pins: z52.literal(2).default(2),
|
|
6129
|
+
w: z52.string().default("3.8mm"),
|
|
6130
|
+
h: z52.string().default("1.65mm"),
|
|
6131
|
+
pl: z52.string().default("1.2mm"),
|
|
6132
|
+
pw: z52.string().default("1.2mm"),
|
|
6133
|
+
pad_spacing: z52.string().default("2.6mm")
|
|
6050
6134
|
});
|
|
6051
6135
|
var sod323w = (raw_params) => {
|
|
6052
6136
|
const parameters = sod323w_def.parse(raw_params);
|
|
6053
6137
|
const silkscreenRefText = silkscreenRef(
|
|
6054
6138
|
0,
|
|
6055
|
-
|
|
6139
|
+
length40.parse(parameters.h),
|
|
6056
6140
|
0.3
|
|
6057
6141
|
);
|
|
6058
6142
|
const silkscreenLine = {
|
|
@@ -6061,20 +6145,20 @@ var sod323w = (raw_params) => {
|
|
|
6061
6145
|
pcb_component_id: "",
|
|
6062
6146
|
route: [
|
|
6063
6147
|
{
|
|
6064
|
-
x:
|
|
6065
|
-
y:
|
|
6148
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6149
|
+
y: length40.parse(parameters.h) / 2
|
|
6066
6150
|
},
|
|
6067
6151
|
{
|
|
6068
|
-
x: -
|
|
6069
|
-
y:
|
|
6152
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6153
|
+
y: length40.parse(parameters.h) / 2
|
|
6070
6154
|
},
|
|
6071
6155
|
{
|
|
6072
|
-
x: -
|
|
6073
|
-
y: -
|
|
6156
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6157
|
+
y: -length40.parse(parameters.h) / 2
|
|
6074
6158
|
},
|
|
6075
6159
|
{
|
|
6076
|
-
x:
|
|
6077
|
-
y: -
|
|
6160
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6161
|
+
y: -length40.parse(parameters.h) / 2
|
|
6078
6162
|
}
|
|
6079
6163
|
],
|
|
6080
6164
|
stroke_width: 0.1,
|
|
@@ -6117,22 +6201,22 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
6117
6201
|
};
|
|
6118
6202
|
|
|
6119
6203
|
// src/fn/sod323fl.ts
|
|
6120
|
-
import { z as
|
|
6121
|
-
import { length as
|
|
6122
|
-
var sod323FL_def =
|
|
6123
|
-
fn:
|
|
6124
|
-
num_pins:
|
|
6125
|
-
w:
|
|
6126
|
-
h:
|
|
6127
|
-
pl:
|
|
6128
|
-
pw:
|
|
6129
|
-
pad_spacing:
|
|
6204
|
+
import { z as z53 } from "zod";
|
|
6205
|
+
import { length as length41 } from "circuit-json";
|
|
6206
|
+
var sod323FL_def = z53.object({
|
|
6207
|
+
fn: z53.string(),
|
|
6208
|
+
num_pins: z53.literal(2).default(2),
|
|
6209
|
+
w: z53.string().default("3.20mm"),
|
|
6210
|
+
h: z53.string().default("1.65mm"),
|
|
6211
|
+
pl: z53.string().default("0.8mm"),
|
|
6212
|
+
pw: z53.string().default("0.9mm"),
|
|
6213
|
+
pad_spacing: z53.string().default("2.1mm")
|
|
6130
6214
|
});
|
|
6131
6215
|
var sod323fl = (raw_params) => {
|
|
6132
6216
|
const parameters = sod323FL_def.parse(raw_params);
|
|
6133
6217
|
const silkscreenRefText = silkscreenRef(
|
|
6134
6218
|
0,
|
|
6135
|
-
|
|
6219
|
+
length41.parse(parameters.h),
|
|
6136
6220
|
0.3
|
|
6137
6221
|
);
|
|
6138
6222
|
const silkscreenLine = {
|
|
@@ -6141,20 +6225,20 @@ var sod323fl = (raw_params) => {
|
|
|
6141
6225
|
pcb_component_id: "",
|
|
6142
6226
|
route: [
|
|
6143
6227
|
{
|
|
6144
|
-
x:
|
|
6145
|
-
y:
|
|
6228
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6229
|
+
y: length41.parse(parameters.h) / 2
|
|
6146
6230
|
},
|
|
6147
6231
|
{
|
|
6148
|
-
x: -
|
|
6149
|
-
y:
|
|
6232
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6233
|
+
y: length41.parse(parameters.h) / 2
|
|
6150
6234
|
},
|
|
6151
6235
|
{
|
|
6152
|
-
x: -
|
|
6153
|
-
y: -
|
|
6236
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6237
|
+
y: -length41.parse(parameters.h) / 2
|
|
6154
6238
|
},
|
|
6155
6239
|
{
|
|
6156
|
-
x:
|
|
6157
|
-
y: -
|
|
6240
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6241
|
+
y: -length41.parse(parameters.h) / 2
|
|
6158
6242
|
}
|
|
6159
6243
|
],
|
|
6160
6244
|
stroke_width: 0.1,
|
|
@@ -6197,20 +6281,20 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
6197
6281
|
};
|
|
6198
6282
|
|
|
6199
6283
|
// src/fn/son.ts
|
|
6200
|
-
import { z as
|
|
6201
|
-
import { length as
|
|
6202
|
-
var son_def =
|
|
6203
|
-
fn:
|
|
6204
|
-
num_pins:
|
|
6205
|
-
w:
|
|
6206
|
-
h:
|
|
6207
|
-
p:
|
|
6208
|
-
pl:
|
|
6209
|
-
pw:
|
|
6210
|
-
epw:
|
|
6211
|
-
eph:
|
|
6212
|
-
string:
|
|
6213
|
-
ep:
|
|
6284
|
+
import { z as z54 } from "zod";
|
|
6285
|
+
import { length as length42 } from "circuit-json";
|
|
6286
|
+
var son_def = z54.object({
|
|
6287
|
+
fn: z54.string(),
|
|
6288
|
+
num_pins: z54.union([z54.literal(6), z54.literal(8)]).default(8),
|
|
6289
|
+
w: z54.string().default("3mm"),
|
|
6290
|
+
h: z54.string().default("3mm"),
|
|
6291
|
+
p: z54.string().default("0.5mm"),
|
|
6292
|
+
pl: z54.string().default("0.52mm"),
|
|
6293
|
+
pw: z54.string().default("0.35mm"),
|
|
6294
|
+
epw: z54.string().default("1.40mm"),
|
|
6295
|
+
eph: z54.string().default("1.60mm"),
|
|
6296
|
+
string: z54.string().optional(),
|
|
6297
|
+
ep: z54.boolean().default(false)
|
|
6214
6298
|
});
|
|
6215
6299
|
var son = (raw_params) => {
|
|
6216
6300
|
if (raw_params.string && raw_params.string.includes("_ep")) {
|
|
@@ -6222,13 +6306,13 @@ var son = (raw_params) => {
|
|
|
6222
6306
|
...raw_params,
|
|
6223
6307
|
num_pins: numPins
|
|
6224
6308
|
});
|
|
6225
|
-
const w =
|
|
6226
|
-
const h =
|
|
6227
|
-
const p =
|
|
6228
|
-
const pl =
|
|
6229
|
-
const pw =
|
|
6230
|
-
const epw =
|
|
6231
|
-
const eph =
|
|
6309
|
+
const w = length42.parse(parameters.w);
|
|
6310
|
+
const h = length42.parse(parameters.h);
|
|
6311
|
+
const p = length42.parse(parameters.p);
|
|
6312
|
+
const pl = length42.parse(parameters.pl);
|
|
6313
|
+
const pw = length42.parse(parameters.pw);
|
|
6314
|
+
const epw = length42.parse(parameters.epw);
|
|
6315
|
+
const eph = length42.parse(parameters.eph);
|
|
6232
6316
|
const pads = [];
|
|
6233
6317
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6234
6318
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -6306,18 +6390,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
6306
6390
|
const col = pn <= half ? -1 : 1;
|
|
6307
6391
|
const row = (half - 1) / 2 - rowIndex;
|
|
6308
6392
|
return {
|
|
6309
|
-
x: col *
|
|
6393
|
+
x: col * length42.parse("1.4mm"),
|
|
6310
6394
|
y: row * p
|
|
6311
6395
|
};
|
|
6312
6396
|
};
|
|
6313
6397
|
|
|
6314
6398
|
// src/fn/solderjumper.ts
|
|
6315
|
-
import { length as
|
|
6399
|
+
import { length as length43 } from "circuit-json";
|
|
6316
6400
|
var solderjumper = (params) => {
|
|
6317
6401
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
6318
|
-
const padSpacing =
|
|
6319
|
-
const padWidth =
|
|
6320
|
-
const padHeight =
|
|
6402
|
+
const padSpacing = length43.parse(p);
|
|
6403
|
+
const padWidth = length43.parse(pw);
|
|
6404
|
+
const padHeight = length43.parse(ph);
|
|
6321
6405
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
6322
6406
|
const pads = [];
|
|
6323
6407
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -6405,34 +6489,34 @@ var solderjumper = (params) => {
|
|
|
6405
6489
|
};
|
|
6406
6490
|
|
|
6407
6491
|
// src/fn/sot457.ts
|
|
6408
|
-
import { z as
|
|
6492
|
+
import { z as z55 } from "zod";
|
|
6409
6493
|
var commonSchema = {
|
|
6410
|
-
fn:
|
|
6411
|
-
num_pins:
|
|
6412
|
-
pillh:
|
|
6413
|
-
pillw:
|
|
6414
|
-
pl:
|
|
6415
|
-
pw:
|
|
6416
|
-
p:
|
|
6417
|
-
wave:
|
|
6418
|
-
reflow:
|
|
6419
|
-
};
|
|
6420
|
-
var sot457DefSchema =
|
|
6494
|
+
fn: z55.literal("sot457"),
|
|
6495
|
+
num_pins: z55.literal(6).default(6),
|
|
6496
|
+
pillh: z55.string().default("0.45mm"),
|
|
6497
|
+
pillw: z55.string().default("1.45mm"),
|
|
6498
|
+
pl: z55.string(),
|
|
6499
|
+
pw: z55.string(),
|
|
6500
|
+
p: z55.string(),
|
|
6501
|
+
wave: z55.boolean().optional(),
|
|
6502
|
+
reflow: z55.boolean().optional()
|
|
6503
|
+
};
|
|
6504
|
+
var sot457DefSchema = z55.object({
|
|
6421
6505
|
...commonSchema,
|
|
6422
|
-
h:
|
|
6423
|
-
w:
|
|
6424
|
-
pl:
|
|
6425
|
-
pw:
|
|
6426
|
-
p:
|
|
6506
|
+
h: z55.string().default("2.5mm"),
|
|
6507
|
+
w: z55.string().default("2.7mm"),
|
|
6508
|
+
pl: z55.string().default("0.8mm"),
|
|
6509
|
+
pw: z55.string().default("0.55mm"),
|
|
6510
|
+
p: z55.string().default("0.95mm")
|
|
6427
6511
|
});
|
|
6428
|
-
var sot457WaveSchema =
|
|
6512
|
+
var sot457WaveSchema = z55.object({
|
|
6429
6513
|
...commonSchema,
|
|
6430
|
-
h:
|
|
6431
|
-
w:
|
|
6432
|
-
pillr:
|
|
6433
|
-
pl:
|
|
6434
|
-
pw:
|
|
6435
|
-
p:
|
|
6514
|
+
h: z55.string().default("3mm"),
|
|
6515
|
+
w: z55.string().default("4mm"),
|
|
6516
|
+
pillr: z55.string().default("0.225mm"),
|
|
6517
|
+
pl: z55.string().default("1.45mm"),
|
|
6518
|
+
pw: z55.string().default("1.5mm"),
|
|
6519
|
+
p: z55.string().default("1.475mm")
|
|
6436
6520
|
}).transform((data) => ({
|
|
6437
6521
|
...data,
|
|
6438
6522
|
wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
|
|
@@ -6571,19 +6655,19 @@ var sot457 = (rawParams) => {
|
|
|
6571
6655
|
};
|
|
6572
6656
|
|
|
6573
6657
|
// src/fn/potentiometer.ts
|
|
6574
|
-
import { z as
|
|
6575
|
-
var potentiometer_def =
|
|
6576
|
-
fn:
|
|
6577
|
-
num_pins:
|
|
6578
|
-
p:
|
|
6579
|
-
id:
|
|
6580
|
-
od:
|
|
6581
|
-
ca:
|
|
6658
|
+
import { z as z56 } from "zod";
|
|
6659
|
+
var potentiometer_def = z56.object({
|
|
6660
|
+
fn: z56.string(),
|
|
6661
|
+
num_pins: z56.union([z56.literal(3), z56.literal(2)]).default(3),
|
|
6662
|
+
p: z56.string().default("3.8mm"),
|
|
6663
|
+
id: z56.string().default("1.25mm"),
|
|
6664
|
+
od: z56.string().default("2.35mm"),
|
|
6665
|
+
ca: z56.string().default("14mm").describe(
|
|
6582
6666
|
"Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
|
|
6583
6667
|
),
|
|
6584
|
-
w:
|
|
6585
|
-
h:
|
|
6586
|
-
string:
|
|
6668
|
+
w: z56.string().default("5.35mm"),
|
|
6669
|
+
h: z56.string().default("4mm"),
|
|
6670
|
+
string: z56.string().optional()
|
|
6587
6671
|
});
|
|
6588
6672
|
var potentiometer_acp = (parameters) => {
|
|
6589
6673
|
const { p, id, od, h, ca } = parameters;
|
|
@@ -6650,15 +6734,15 @@ var potentiometer = (raw_params) => {
|
|
|
6650
6734
|
|
|
6651
6735
|
// src/fn/electrolytic.ts
|
|
6652
6736
|
import {
|
|
6653
|
-
length as
|
|
6737
|
+
length as length44
|
|
6654
6738
|
} from "circuit-json";
|
|
6655
|
-
import { z as
|
|
6656
|
-
var electrolytic_def =
|
|
6657
|
-
fn:
|
|
6658
|
-
p:
|
|
6659
|
-
id:
|
|
6660
|
-
od:
|
|
6661
|
-
d:
|
|
6739
|
+
import { z as z57 } from "zod";
|
|
6740
|
+
var electrolytic_def = z57.object({
|
|
6741
|
+
fn: z57.string(),
|
|
6742
|
+
p: length44.optional().default("7.5mm"),
|
|
6743
|
+
id: length44.optional().default("1mm"),
|
|
6744
|
+
od: length44.optional().default("2mm"),
|
|
6745
|
+
d: length44.optional().default("10.5mm")
|
|
6662
6746
|
});
|
|
6663
6747
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
6664
6748
|
const topArc = [];
|
|
@@ -6765,22 +6849,22 @@ var electrolytic = (raw_params) => {
|
|
|
6765
6849
|
};
|
|
6766
6850
|
|
|
6767
6851
|
// src/fn/smbf.ts
|
|
6768
|
-
import { z as
|
|
6769
|
-
import { length as
|
|
6770
|
-
var smbf_def =
|
|
6771
|
-
fn:
|
|
6772
|
-
num_pins:
|
|
6773
|
-
w:
|
|
6774
|
-
h:
|
|
6775
|
-
pl:
|
|
6776
|
-
pw:
|
|
6777
|
-
p:
|
|
6852
|
+
import { z as z58 } from "zod";
|
|
6853
|
+
import { length as length45 } from "circuit-json";
|
|
6854
|
+
var smbf_def = z58.object({
|
|
6855
|
+
fn: z58.string(),
|
|
6856
|
+
num_pins: z58.literal(2).default(2),
|
|
6857
|
+
w: z58.string().default("6.5mm"),
|
|
6858
|
+
h: z58.string().default("3mm"),
|
|
6859
|
+
pl: z58.string().default("1.75mm"),
|
|
6860
|
+
pw: z58.string().default("2.40mm"),
|
|
6861
|
+
p: z58.string().default("4.75mm")
|
|
6778
6862
|
});
|
|
6779
6863
|
var smbf = (raw_params) => {
|
|
6780
6864
|
const parameters = smbf_def.parse(raw_params);
|
|
6781
6865
|
const silkscreenRefText = silkscreenRef(
|
|
6782
6866
|
0,
|
|
6783
|
-
|
|
6867
|
+
length45.parse(parameters.h) - 0.5,
|
|
6784
6868
|
0.3
|
|
6785
6869
|
);
|
|
6786
6870
|
const silkscreenLine = {
|
|
@@ -6789,20 +6873,20 @@ var smbf = (raw_params) => {
|
|
|
6789
6873
|
pcb_component_id: "",
|
|
6790
6874
|
route: [
|
|
6791
6875
|
{
|
|
6792
|
-
x:
|
|
6793
|
-
y:
|
|
6876
|
+
x: length45.parse(parameters.p) / 2,
|
|
6877
|
+
y: length45.parse(parameters.h) / 2
|
|
6794
6878
|
},
|
|
6795
6879
|
{
|
|
6796
|
-
x: -
|
|
6797
|
-
y:
|
|
6880
|
+
x: -length45.parse(parameters.w) / 2 - 0.3,
|
|
6881
|
+
y: length45.parse(parameters.h) / 2
|
|
6798
6882
|
},
|
|
6799
6883
|
{
|
|
6800
|
-
x: -
|
|
6801
|
-
y: -
|
|
6884
|
+
x: -length45.parse(parameters.w) / 2 - 0.3,
|
|
6885
|
+
y: -length45.parse(parameters.h) / 2
|
|
6802
6886
|
},
|
|
6803
6887
|
{
|
|
6804
|
-
x:
|
|
6805
|
-
y: -
|
|
6888
|
+
x: length45.parse(parameters.p) / 2,
|
|
6889
|
+
y: -length45.parse(parameters.h) / 2
|
|
6806
6890
|
}
|
|
6807
6891
|
],
|
|
6808
6892
|
stroke_width: 0.1,
|
|
@@ -6844,16 +6928,16 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
6844
6928
|
};
|
|
6845
6929
|
|
|
6846
6930
|
// src/fn/sot323.ts
|
|
6847
|
-
import { z as
|
|
6848
|
-
var sot323_def =
|
|
6849
|
-
fn:
|
|
6850
|
-
num_pins:
|
|
6851
|
-
w:
|
|
6852
|
-
h:
|
|
6853
|
-
pl:
|
|
6854
|
-
pw:
|
|
6855
|
-
p:
|
|
6856
|
-
string:
|
|
6931
|
+
import { z as z59 } from "zod";
|
|
6932
|
+
var sot323_def = z59.object({
|
|
6933
|
+
fn: z59.string(),
|
|
6934
|
+
num_pins: z59.number().default(3),
|
|
6935
|
+
w: z59.string().default("2.45mm"),
|
|
6936
|
+
h: z59.string().default("2.40mm"),
|
|
6937
|
+
pl: z59.string().default("0.70mm"),
|
|
6938
|
+
pw: z59.string().default("0.45mm"),
|
|
6939
|
+
p: z59.string().default("1mm"),
|
|
6940
|
+
string: z59.string().optional()
|
|
6857
6941
|
});
|
|
6858
6942
|
var sot323 = (raw_params) => {
|
|
6859
6943
|
const match = raw_params.string?.match(/^sot323_(\d+)/);
|
|
@@ -6941,30 +7025,30 @@ var sot323_3 = (parameters) => {
|
|
|
6941
7025
|
};
|
|
6942
7026
|
|
|
6943
7027
|
// src/fn/smtpad.ts
|
|
6944
|
-
import { z as
|
|
6945
|
-
import { length as
|
|
7028
|
+
import { z as z60 } from "zod";
|
|
7029
|
+
import { length as length46 } from "circuit-json";
|
|
6946
7030
|
import { mm as mm6 } from "@tscircuit/mm";
|
|
6947
|
-
var smtpad_def =
|
|
6948
|
-
fn:
|
|
6949
|
-
circle:
|
|
6950
|
-
rect:
|
|
6951
|
-
square:
|
|
6952
|
-
pill:
|
|
6953
|
-
d:
|
|
6954
|
-
pd:
|
|
6955
|
-
diameter:
|
|
6956
|
-
r:
|
|
6957
|
-
pr:
|
|
6958
|
-
radius:
|
|
6959
|
-
w:
|
|
6960
|
-
pw:
|
|
6961
|
-
width:
|
|
6962
|
-
h:
|
|
6963
|
-
ph:
|
|
6964
|
-
height:
|
|
6965
|
-
s:
|
|
6966
|
-
size:
|
|
6967
|
-
string:
|
|
7031
|
+
var smtpad_def = z60.object({
|
|
7032
|
+
fn: z60.string(),
|
|
7033
|
+
circle: z60.boolean().optional(),
|
|
7034
|
+
rect: z60.boolean().optional(),
|
|
7035
|
+
square: z60.boolean().optional(),
|
|
7036
|
+
pill: z60.boolean().optional(),
|
|
7037
|
+
d: length46.optional(),
|
|
7038
|
+
pd: length46.optional(),
|
|
7039
|
+
diameter: length46.optional(),
|
|
7040
|
+
r: length46.optional(),
|
|
7041
|
+
pr: length46.optional(),
|
|
7042
|
+
radius: length46.optional(),
|
|
7043
|
+
w: length46.optional(),
|
|
7044
|
+
pw: length46.optional(),
|
|
7045
|
+
width: length46.optional(),
|
|
7046
|
+
h: length46.optional(),
|
|
7047
|
+
ph: length46.optional(),
|
|
7048
|
+
height: length46.optional(),
|
|
7049
|
+
s: length46.optional(),
|
|
7050
|
+
size: length46.optional(),
|
|
7051
|
+
string: z60.string().optional()
|
|
6968
7052
|
}).transform((v) => {
|
|
6969
7053
|
let shape = "rect";
|
|
6970
7054
|
if (v.circle) shape = "circle";
|
|
@@ -7030,18 +7114,18 @@ var smtpad = (raw_params) => {
|
|
|
7030
7114
|
};
|
|
7031
7115
|
|
|
7032
7116
|
// src/fn/platedhole.ts
|
|
7033
|
-
import { z as
|
|
7034
|
-
import { length as
|
|
7117
|
+
import { z as z61 } from "zod";
|
|
7118
|
+
import { length as length47 } from "circuit-json";
|
|
7035
7119
|
import { mm as mm7 } from "@tscircuit/mm";
|
|
7036
|
-
var platedhole_def =
|
|
7037
|
-
fn:
|
|
7038
|
-
d:
|
|
7039
|
-
hd:
|
|
7040
|
-
r:
|
|
7041
|
-
hr:
|
|
7042
|
-
pd:
|
|
7043
|
-
pr:
|
|
7044
|
-
squarepad:
|
|
7120
|
+
var platedhole_def = z61.object({
|
|
7121
|
+
fn: z61.string(),
|
|
7122
|
+
d: length47.optional(),
|
|
7123
|
+
hd: length47.optional(),
|
|
7124
|
+
r: length47.optional(),
|
|
7125
|
+
hr: length47.optional(),
|
|
7126
|
+
pd: length47.optional(),
|
|
7127
|
+
pr: length47.optional(),
|
|
7128
|
+
squarepad: z61.boolean().optional().default(false)
|
|
7045
7129
|
}).transform((v) => {
|
|
7046
7130
|
let holeD;
|
|
7047
7131
|
if (v.d !== void 0) holeD = mm7(v.d);
|
|
@@ -7073,14 +7157,14 @@ var platedhole2 = (raw_params) => {
|
|
|
7073
7157
|
};
|
|
7074
7158
|
|
|
7075
7159
|
// src/fn/sot.ts
|
|
7076
|
-
import { z as
|
|
7077
|
-
var sot_def =
|
|
7078
|
-
fn:
|
|
7079
|
-
num_pins:
|
|
7080
|
-
h:
|
|
7081
|
-
pl:
|
|
7082
|
-
pw:
|
|
7083
|
-
p:
|
|
7160
|
+
import { z as z62 } from "zod";
|
|
7161
|
+
var sot_def = z62.object({
|
|
7162
|
+
fn: z62.string(),
|
|
7163
|
+
num_pins: z62.literal(6).default(6),
|
|
7164
|
+
h: z62.string().default("1.6mm"),
|
|
7165
|
+
pl: z62.string().default("1mm"),
|
|
7166
|
+
pw: z62.string().default("0.7mm"),
|
|
7167
|
+
p: z62.string().default("0.95mm")
|
|
7084
7168
|
});
|
|
7085
7169
|
var sot = (raw_params) => {
|
|
7086
7170
|
const parameters = sot_def.parse(raw_params);
|
|
@@ -7197,9 +7281,9 @@ var sotWithoutParsing = (parameters) => {
|
|
|
7197
7281
|
};
|
|
7198
7282
|
|
|
7199
7283
|
// src/fn/m2host.ts
|
|
7200
|
-
import { z as
|
|
7201
|
-
var m2host_def =
|
|
7202
|
-
fn:
|
|
7284
|
+
import { z as z63 } from "zod";
|
|
7285
|
+
var m2host_def = z63.object({
|
|
7286
|
+
fn: z63.string()
|
|
7203
7287
|
});
|
|
7204
7288
|
var m2host = (raw_params) => {
|
|
7205
7289
|
const parameters = m2host_def.parse(raw_params);
|