@tscircuit/footprinter 0.0.259 → 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 +892 -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,29 +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);
|
|
4297
4379
|
const centerExtra = 0.175;
|
|
4298
4380
|
const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
|
|
4299
4381
|
pads.push(
|
|
4300
|
-
rectpad(1, -
|
|
4301
|
-
rectpad(2, -
|
|
4302
|
-
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)
|
|
4303
4385
|
);
|
|
4304
4386
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
4305
4387
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -4339,7 +4421,7 @@ var sot89_5 = (parameters) => {
|
|
|
4339
4421
|
const pads = [];
|
|
4340
4422
|
const padGap = Number.parseFloat(parameters.p);
|
|
4341
4423
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4342
|
-
const
|
|
4424
|
+
const length48 = Number.parseFloat(parameters.w);
|
|
4343
4425
|
pads.push(
|
|
4344
4426
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
4345
4427
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -4407,18 +4489,18 @@ var sot89 = (raw_params) => {
|
|
|
4407
4489
|
|
|
4408
4490
|
// src/fn/to220.ts
|
|
4409
4491
|
import {
|
|
4410
|
-
length as
|
|
4492
|
+
length as length27
|
|
4411
4493
|
} from "circuit-json";
|
|
4412
|
-
import { z as
|
|
4413
|
-
var to220_def =
|
|
4414
|
-
fn:
|
|
4415
|
-
p:
|
|
4416
|
-
id:
|
|
4417
|
-
od:
|
|
4418
|
-
w:
|
|
4419
|
-
h:
|
|
4420
|
-
num_pins:
|
|
4421
|
-
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()
|
|
4422
4504
|
});
|
|
4423
4505
|
var to220 = (raw_params) => {
|
|
4424
4506
|
const parameters = to220_def.parse(raw_params);
|
|
@@ -4498,22 +4580,22 @@ var to220 = (raw_params) => {
|
|
|
4498
4580
|
};
|
|
4499
4581
|
|
|
4500
4582
|
// src/fn/minimelf.ts
|
|
4501
|
-
import { z as
|
|
4502
|
-
import { length as
|
|
4503
|
-
var minimelf_def =
|
|
4504
|
-
fn:
|
|
4505
|
-
num_pins:
|
|
4506
|
-
w:
|
|
4507
|
-
h:
|
|
4508
|
-
pl:
|
|
4509
|
-
pw:
|
|
4510
|
-
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")
|
|
4511
4593
|
});
|
|
4512
4594
|
var minimelf = (raw_params) => {
|
|
4513
4595
|
const parameters = minimelf_def.parse(raw_params);
|
|
4514
4596
|
const silkscreenRefText = silkscreenRef(
|
|
4515
4597
|
0,
|
|
4516
|
-
|
|
4598
|
+
length28.parse(parameters.h) / 2 + 0.4,
|
|
4517
4599
|
0.3
|
|
4518
4600
|
);
|
|
4519
4601
|
const silkscreenLine = {
|
|
@@ -4522,20 +4604,20 @@ var minimelf = (raw_params) => {
|
|
|
4522
4604
|
pcb_component_id: "",
|
|
4523
4605
|
route: [
|
|
4524
4606
|
{
|
|
4525
|
-
x:
|
|
4526
|
-
y:
|
|
4607
|
+
x: length28.parse(parameters.p) / 2,
|
|
4608
|
+
y: length28.parse(parameters.h) / 2
|
|
4527
4609
|
},
|
|
4528
4610
|
{
|
|
4529
|
-
x: -
|
|
4530
|
-
y:
|
|
4611
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4612
|
+
y: length28.parse(parameters.h) / 2
|
|
4531
4613
|
},
|
|
4532
4614
|
{
|
|
4533
|
-
x: -
|
|
4534
|
-
y: -
|
|
4615
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4616
|
+
y: -length28.parse(parameters.h) / 2
|
|
4535
4617
|
},
|
|
4536
4618
|
{
|
|
4537
|
-
x:
|
|
4538
|
-
y: -
|
|
4619
|
+
x: length28.parse(parameters.p) / 2,
|
|
4620
|
+
y: -length28.parse(parameters.h) / 2
|
|
4539
4621
|
}
|
|
4540
4622
|
],
|
|
4541
4623
|
stroke_width: 0.1,
|
|
@@ -4574,22 +4656,22 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
4574
4656
|
};
|
|
4575
4657
|
|
|
4576
4658
|
// src/fn/sod882d.ts
|
|
4577
|
-
import { z as
|
|
4578
|
-
import { length as
|
|
4579
|
-
var sod_def11 =
|
|
4580
|
-
fn:
|
|
4581
|
-
num_pins:
|
|
4582
|
-
w:
|
|
4583
|
-
h:
|
|
4584
|
-
pl:
|
|
4585
|
-
pw:
|
|
4586
|
-
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")
|
|
4587
4669
|
});
|
|
4588
4670
|
var sod882d = (raw_params) => {
|
|
4589
4671
|
const parameters = sod_def11.parse(raw_params);
|
|
4590
4672
|
const silkscreenRefText = silkscreenRef(
|
|
4591
4673
|
0,
|
|
4592
|
-
|
|
4674
|
+
length29.parse(parameters.h) + 0.1,
|
|
4593
4675
|
0.3
|
|
4594
4676
|
);
|
|
4595
4677
|
const silkscreenLine = {
|
|
@@ -4598,20 +4680,20 @@ var sod882d = (raw_params) => {
|
|
|
4598
4680
|
pcb_component_id: "",
|
|
4599
4681
|
route: [
|
|
4600
4682
|
{
|
|
4601
|
-
x:
|
|
4602
|
-
y:
|
|
4683
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4684
|
+
y: length29.parse(parameters.h) / 2
|
|
4603
4685
|
},
|
|
4604
4686
|
{
|
|
4605
|
-
x: -
|
|
4606
|
-
y:
|
|
4687
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4688
|
+
y: length29.parse(parameters.h) / 2
|
|
4607
4689
|
},
|
|
4608
4690
|
{
|
|
4609
|
-
x: -
|
|
4610
|
-
y: -
|
|
4691
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4692
|
+
y: -length29.parse(parameters.h) / 2
|
|
4611
4693
|
},
|
|
4612
4694
|
{
|
|
4613
|
-
x:
|
|
4614
|
-
y: -
|
|
4695
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4696
|
+
y: -length29.parse(parameters.h) / 2
|
|
4615
4697
|
}
|
|
4616
4698
|
],
|
|
4617
4699
|
stroke_width: 0.1,
|
|
@@ -4654,22 +4736,22 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
4654
4736
|
};
|
|
4655
4737
|
|
|
4656
4738
|
// src/fn/melf.ts
|
|
4657
|
-
import { z as
|
|
4658
|
-
import { length as
|
|
4659
|
-
var melf_def =
|
|
4660
|
-
fn:
|
|
4661
|
-
num_pins:
|
|
4662
|
-
w:
|
|
4663
|
-
h:
|
|
4664
|
-
pl:
|
|
4665
|
-
pw:
|
|
4666
|
-
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")
|
|
4667
4749
|
});
|
|
4668
4750
|
var melf = (raw_params) => {
|
|
4669
4751
|
const parameters = melf_def.parse(raw_params);
|
|
4670
4752
|
const silkscreenRefText = silkscreenRef(
|
|
4671
4753
|
0,
|
|
4672
|
-
|
|
4754
|
+
length30.parse(parameters.h),
|
|
4673
4755
|
0.3
|
|
4674
4756
|
);
|
|
4675
4757
|
const silkscreenLine = {
|
|
@@ -4678,20 +4760,20 @@ var melf = (raw_params) => {
|
|
|
4678
4760
|
pcb_component_id: "",
|
|
4679
4761
|
route: [
|
|
4680
4762
|
{
|
|
4681
|
-
x:
|
|
4682
|
-
y:
|
|
4763
|
+
x: length30.parse(parameters.p) / 2,
|
|
4764
|
+
y: length30.parse(parameters.h) / 2
|
|
4683
4765
|
},
|
|
4684
4766
|
{
|
|
4685
|
-
x: -
|
|
4686
|
-
y:
|
|
4767
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4768
|
+
y: length30.parse(parameters.h) / 2
|
|
4687
4769
|
},
|
|
4688
4770
|
{
|
|
4689
|
-
x: -
|
|
4690
|
-
y: -
|
|
4771
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4772
|
+
y: -length30.parse(parameters.h) / 2
|
|
4691
4773
|
},
|
|
4692
4774
|
{
|
|
4693
|
-
x:
|
|
4694
|
-
y: -
|
|
4775
|
+
x: length30.parse(parameters.p) / 2,
|
|
4776
|
+
y: -length30.parse(parameters.h) / 2
|
|
4695
4777
|
}
|
|
4696
4778
|
],
|
|
4697
4779
|
stroke_width: 0.1,
|
|
@@ -4734,22 +4816,22 @@ var melfWithoutParsing = (parameters) => {
|
|
|
4734
4816
|
};
|
|
4735
4817
|
|
|
4736
4818
|
// src/fn/micromelf.ts
|
|
4737
|
-
import { z as
|
|
4738
|
-
import { length as
|
|
4739
|
-
var micromelf_def =
|
|
4740
|
-
fn:
|
|
4741
|
-
num_pins:
|
|
4742
|
-
w:
|
|
4743
|
-
h:
|
|
4744
|
-
pl:
|
|
4745
|
-
pw:
|
|
4746
|
-
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")
|
|
4747
4829
|
});
|
|
4748
4830
|
var micromelf = (raw_params) => {
|
|
4749
4831
|
const parameters = micromelf_def.parse(raw_params);
|
|
4750
4832
|
const silkscreenRefText = silkscreenRef(
|
|
4751
4833
|
0,
|
|
4752
|
-
|
|
4834
|
+
length31.parse(parameters.h),
|
|
4753
4835
|
0.3
|
|
4754
4836
|
);
|
|
4755
4837
|
const silkscreenLine = {
|
|
@@ -4758,20 +4840,20 @@ var micromelf = (raw_params) => {
|
|
|
4758
4840
|
pcb_component_id: "",
|
|
4759
4841
|
route: [
|
|
4760
4842
|
{
|
|
4761
|
-
x:
|
|
4762
|
-
y:
|
|
4843
|
+
x: length31.parse(parameters.p) / 2,
|
|
4844
|
+
y: length31.parse(parameters.h) / 2
|
|
4763
4845
|
},
|
|
4764
4846
|
{
|
|
4765
|
-
x: -
|
|
4766
|
-
y:
|
|
4847
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4848
|
+
y: length31.parse(parameters.h) / 2
|
|
4767
4849
|
},
|
|
4768
4850
|
{
|
|
4769
|
-
x: -
|
|
4770
|
-
y: -
|
|
4851
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4852
|
+
y: -length31.parse(parameters.h) / 2
|
|
4771
4853
|
},
|
|
4772
4854
|
{
|
|
4773
|
-
x:
|
|
4774
|
-
y: -
|
|
4855
|
+
x: length31.parse(parameters.p) / 2,
|
|
4856
|
+
y: -length31.parse(parameters.h) / 2
|
|
4775
4857
|
}
|
|
4776
4858
|
],
|
|
4777
4859
|
stroke_width: 0.1,
|
|
@@ -4814,22 +4896,22 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
4814
4896
|
};
|
|
4815
4897
|
|
|
4816
4898
|
// src/fn/sma.ts
|
|
4817
|
-
import { z as
|
|
4818
|
-
import { length as
|
|
4819
|
-
var sma_def =
|
|
4820
|
-
fn:
|
|
4821
|
-
num_pins:
|
|
4822
|
-
w:
|
|
4823
|
-
h:
|
|
4824
|
-
pl:
|
|
4825
|
-
pw:
|
|
4826
|
-
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")
|
|
4827
4909
|
});
|
|
4828
4910
|
var sma = (raw_params) => {
|
|
4829
4911
|
const parameters = sma_def.parse(raw_params);
|
|
4830
4912
|
const silkscreenRefText = silkscreenRef(
|
|
4831
4913
|
0,
|
|
4832
|
-
|
|
4914
|
+
length32.parse(parameters.h) / 2 + 0.5,
|
|
4833
4915
|
0.3
|
|
4834
4916
|
);
|
|
4835
4917
|
const silkscreenLine = {
|
|
@@ -4838,20 +4920,20 @@ var sma = (raw_params) => {
|
|
|
4838
4920
|
pcb_component_id: "",
|
|
4839
4921
|
route: [
|
|
4840
4922
|
{
|
|
4841
|
-
x:
|
|
4842
|
-
y:
|
|
4923
|
+
x: length32.parse(parameters.p) / 2,
|
|
4924
|
+
y: length32.parse(parameters.h) / 2
|
|
4843
4925
|
},
|
|
4844
4926
|
{
|
|
4845
|
-
x: -
|
|
4846
|
-
y:
|
|
4927
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4928
|
+
y: length32.parse(parameters.h) / 2
|
|
4847
4929
|
},
|
|
4848
4930
|
{
|
|
4849
|
-
x: -
|
|
4850
|
-
y: -
|
|
4931
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4932
|
+
y: -length32.parse(parameters.h) / 2
|
|
4851
4933
|
},
|
|
4852
4934
|
{
|
|
4853
|
-
x:
|
|
4854
|
-
y: -
|
|
4935
|
+
x: length32.parse(parameters.p) / 2,
|
|
4936
|
+
y: -length32.parse(parameters.h) / 2
|
|
4855
4937
|
}
|
|
4856
4938
|
],
|
|
4857
4939
|
stroke_width: 0.1,
|
|
@@ -4893,22 +4975,22 @@ var smaWithoutParsing = (parameters) => {
|
|
|
4893
4975
|
};
|
|
4894
4976
|
|
|
4895
4977
|
// src/fn/smf.ts
|
|
4896
|
-
import { z as
|
|
4897
|
-
import { length as
|
|
4898
|
-
var smf_def =
|
|
4899
|
-
fn:
|
|
4900
|
-
num_pins:
|
|
4901
|
-
w:
|
|
4902
|
-
h:
|
|
4903
|
-
pl:
|
|
4904
|
-
pw:
|
|
4905
|
-
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")
|
|
4906
4988
|
});
|
|
4907
4989
|
var smf = (raw_params) => {
|
|
4908
4990
|
const parameters = smf_def.parse(raw_params);
|
|
4909
4991
|
const silkscreenRefText = silkscreenRef(
|
|
4910
4992
|
0,
|
|
4911
|
-
|
|
4993
|
+
length33.parse(parameters.h) - 0.5,
|
|
4912
4994
|
0.3
|
|
4913
4995
|
);
|
|
4914
4996
|
const silkscreenLine = {
|
|
@@ -4917,20 +4999,20 @@ var smf = (raw_params) => {
|
|
|
4917
4999
|
pcb_component_id: "",
|
|
4918
5000
|
route: [
|
|
4919
5001
|
{
|
|
4920
|
-
x:
|
|
4921
|
-
y:
|
|
5002
|
+
x: length33.parse(parameters.p) / 2,
|
|
5003
|
+
y: length33.parse(parameters.h) / 2
|
|
4922
5004
|
},
|
|
4923
5005
|
{
|
|
4924
|
-
x: -
|
|
4925
|
-
y:
|
|
5006
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5007
|
+
y: length33.parse(parameters.h) / 2
|
|
4926
5008
|
},
|
|
4927
5009
|
{
|
|
4928
|
-
x: -
|
|
4929
|
-
y: -
|
|
5010
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5011
|
+
y: -length33.parse(parameters.h) / 2
|
|
4930
5012
|
},
|
|
4931
5013
|
{
|
|
4932
|
-
x:
|
|
4933
|
-
y: -
|
|
5014
|
+
x: length33.parse(parameters.p) / 2,
|
|
5015
|
+
y: -length33.parse(parameters.h) / 2
|
|
4934
5016
|
}
|
|
4935
5017
|
],
|
|
4936
5018
|
stroke_width: 0.1,
|
|
@@ -4973,22 +5055,22 @@ var smfWithoutParsing = (parameters) => {
|
|
|
4973
5055
|
};
|
|
4974
5056
|
|
|
4975
5057
|
// src/fn/smb.ts
|
|
4976
|
-
import { z as
|
|
4977
|
-
import { length as
|
|
4978
|
-
var smb_def =
|
|
4979
|
-
fn:
|
|
4980
|
-
num_pins:
|
|
4981
|
-
w:
|
|
4982
|
-
h:
|
|
4983
|
-
pl:
|
|
4984
|
-
pw:
|
|
4985
|
-
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")
|
|
4986
5068
|
});
|
|
4987
5069
|
var smb = (raw_params) => {
|
|
4988
5070
|
const parameters = smb_def.parse(raw_params);
|
|
4989
5071
|
const silkscreenRefText = silkscreenRef(
|
|
4990
5072
|
0,
|
|
4991
|
-
|
|
5073
|
+
length34.parse(parameters.h) / 2 + 0.5,
|
|
4992
5074
|
0.3
|
|
4993
5075
|
);
|
|
4994
5076
|
const silkscreenLine = {
|
|
@@ -4997,20 +5079,20 @@ var smb = (raw_params) => {
|
|
|
4997
5079
|
pcb_component_id: "",
|
|
4998
5080
|
route: [
|
|
4999
5081
|
{
|
|
5000
|
-
x:
|
|
5001
|
-
y:
|
|
5082
|
+
x: length34.parse(parameters.p) / 2,
|
|
5083
|
+
y: length34.parse(parameters.h) / 2
|
|
5002
5084
|
},
|
|
5003
5085
|
{
|
|
5004
|
-
x: -
|
|
5005
|
-
y:
|
|
5086
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5087
|
+
y: length34.parse(parameters.h) / 2
|
|
5006
5088
|
},
|
|
5007
5089
|
{
|
|
5008
|
-
x: -
|
|
5009
|
-
y: -
|
|
5090
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5091
|
+
y: -length34.parse(parameters.h) / 2
|
|
5010
5092
|
},
|
|
5011
5093
|
{
|
|
5012
|
-
x:
|
|
5013
|
-
y: -
|
|
5094
|
+
x: length34.parse(parameters.p) / 2,
|
|
5095
|
+
y: -length34.parse(parameters.h) / 2
|
|
5014
5096
|
}
|
|
5015
5097
|
],
|
|
5016
5098
|
stroke_width: 0.1,
|
|
@@ -5053,16 +5135,16 @@ var smbWithoutParsing = (parameters) => {
|
|
|
5053
5135
|
};
|
|
5054
5136
|
|
|
5055
5137
|
// src/fn/smc.ts
|
|
5056
|
-
import { z as
|
|
5057
|
-
import { length as
|
|
5058
|
-
var smc_def =
|
|
5059
|
-
fn:
|
|
5060
|
-
num_pins:
|
|
5061
|
-
w:
|
|
5062
|
-
h:
|
|
5063
|
-
pl:
|
|
5064
|
-
pw:
|
|
5065
|
-
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")
|
|
5066
5148
|
});
|
|
5067
5149
|
var smc = (raw_params) => {
|
|
5068
5150
|
const parameters = smc_def.parse(raw_params);
|
|
@@ -5073,20 +5155,20 @@ var smc = (raw_params) => {
|
|
|
5073
5155
|
pcb_component_id: "",
|
|
5074
5156
|
route: [
|
|
5075
5157
|
{
|
|
5076
|
-
x:
|
|
5077
|
-
y:
|
|
5158
|
+
x: length35.parse(parameters.p) / 2,
|
|
5159
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5078
5160
|
},
|
|
5079
5161
|
{
|
|
5080
|
-
x: -
|
|
5081
|
-
y:
|
|
5162
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5163
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5082
5164
|
},
|
|
5083
5165
|
{
|
|
5084
|
-
x: -
|
|
5085
|
-
y: -
|
|
5166
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5167
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5086
5168
|
},
|
|
5087
5169
|
{
|
|
5088
|
-
x:
|
|
5089
|
-
y: -
|
|
5170
|
+
x: length35.parse(parameters.p) / 2,
|
|
5171
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5090
5172
|
}
|
|
5091
5173
|
],
|
|
5092
5174
|
stroke_width: 0.1,
|
|
@@ -5128,16 +5210,16 @@ var smcWithoutParsing = (parameters) => {
|
|
|
5128
5210
|
};
|
|
5129
5211
|
|
|
5130
5212
|
// src/fn/sot223.ts
|
|
5131
|
-
import { z as
|
|
5132
|
-
var sot223_def =
|
|
5133
|
-
fn:
|
|
5134
|
-
num_pins:
|
|
5135
|
-
w:
|
|
5136
|
-
h:
|
|
5137
|
-
pl:
|
|
5138
|
-
pw:
|
|
5139
|
-
p:
|
|
5140
|
-
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()
|
|
5141
5223
|
});
|
|
5142
5224
|
var sot223 = (raw_params) => {
|
|
5143
5225
|
const match = raw_params.string?.match(/^sot223_(\d+)/);
|
|
@@ -5383,16 +5465,16 @@ var sot223_6 = (parameters) => {
|
|
|
5383
5465
|
};
|
|
5384
5466
|
|
|
5385
5467
|
// src/fn/sot23w.ts
|
|
5386
|
-
import { z as
|
|
5387
|
-
var sot23w_def =
|
|
5388
|
-
fn:
|
|
5389
|
-
num_pins:
|
|
5390
|
-
w:
|
|
5391
|
-
h:
|
|
5392
|
-
pl:
|
|
5393
|
-
pw:
|
|
5394
|
-
p:
|
|
5395
|
-
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()
|
|
5396
5478
|
});
|
|
5397
5479
|
var sot23w = (raw_params) => {
|
|
5398
5480
|
const match = raw_params.string?.match(/^sot23w_(\d+)/);
|
|
@@ -5480,16 +5562,16 @@ var sot23w_3 = (parameters) => {
|
|
|
5480
5562
|
};
|
|
5481
5563
|
|
|
5482
5564
|
// src/fn/to92s.ts
|
|
5483
|
-
import { z as
|
|
5484
|
-
var to92s_def =
|
|
5485
|
-
fn:
|
|
5486
|
-
num_pins:
|
|
5487
|
-
p:
|
|
5488
|
-
id:
|
|
5489
|
-
od:
|
|
5490
|
-
w:
|
|
5491
|
-
h:
|
|
5492
|
-
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()
|
|
5493
5575
|
});
|
|
5494
5576
|
var to92s_3 = (parameters) => {
|
|
5495
5577
|
const { p, id, od, w, h } = parameters;
|
|
@@ -5556,18 +5638,18 @@ var to92s = (raw_params) => {
|
|
|
5556
5638
|
|
|
5557
5639
|
// src/fn/jst.ts
|
|
5558
5640
|
import {
|
|
5559
|
-
length as
|
|
5641
|
+
length as length36
|
|
5560
5642
|
} from "circuit-json";
|
|
5561
|
-
import { z as
|
|
5562
|
-
var jst_def =
|
|
5563
|
-
fn:
|
|
5564
|
-
p:
|
|
5565
|
-
id:
|
|
5566
|
-
pw:
|
|
5567
|
-
pl:
|
|
5568
|
-
w:
|
|
5569
|
-
h:
|
|
5570
|
-
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) => {
|
|
5571
5653
|
if (typeof v === "string") {
|
|
5572
5654
|
const n = Number(v);
|
|
5573
5655
|
return Number.isNaN(n) ? true : n;
|
|
@@ -5576,26 +5658,26 @@ var jst_def = z47.object({
|
|
|
5576
5658
|
}).describe(
|
|
5577
5659
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
5578
5660
|
),
|
|
5579
|
-
ph:
|
|
5661
|
+
ph: z48.boolean().optional().describe(
|
|
5580
5662
|
'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
|
|
5581
5663
|
),
|
|
5582
|
-
string:
|
|
5664
|
+
string: z48.string().optional()
|
|
5583
5665
|
});
|
|
5584
5666
|
var variantDefaults = {
|
|
5585
5667
|
ph: {
|
|
5586
|
-
p:
|
|
5587
|
-
id:
|
|
5588
|
-
pw:
|
|
5589
|
-
pl:
|
|
5590
|
-
w:
|
|
5591
|
-
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")
|
|
5592
5674
|
},
|
|
5593
5675
|
sh: {
|
|
5594
|
-
p:
|
|
5595
|
-
pw:
|
|
5596
|
-
pl:
|
|
5597
|
-
w:
|
|
5598
|
-
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")
|
|
5599
5681
|
}
|
|
5600
5682
|
};
|
|
5601
5683
|
function getVariant(params) {
|
|
@@ -5694,22 +5776,22 @@ var jst = (raw_params) => {
|
|
|
5694
5776
|
};
|
|
5695
5777
|
|
|
5696
5778
|
// src/fn/sod110.ts
|
|
5697
|
-
import { z as
|
|
5698
|
-
import { length as
|
|
5699
|
-
var sod_def12 =
|
|
5700
|
-
fn:
|
|
5701
|
-
num_pins:
|
|
5702
|
-
w:
|
|
5703
|
-
h:
|
|
5704
|
-
pl:
|
|
5705
|
-
pw:
|
|
5706
|
-
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")
|
|
5707
5789
|
});
|
|
5708
5790
|
var sod110 = (raw_params) => {
|
|
5709
5791
|
const parameters = sod_def12.parse(raw_params);
|
|
5710
5792
|
const silkscreenRefText = silkscreenRef(
|
|
5711
5793
|
0,
|
|
5712
|
-
|
|
5794
|
+
length37.parse(parameters.h) / 2 + 0.5,
|
|
5713
5795
|
0.3
|
|
5714
5796
|
);
|
|
5715
5797
|
const silkscreenLine = {
|
|
@@ -5718,20 +5800,20 @@ var sod110 = (raw_params) => {
|
|
|
5718
5800
|
pcb_component_id: "",
|
|
5719
5801
|
route: [
|
|
5720
5802
|
{
|
|
5721
|
-
x:
|
|
5722
|
-
y:
|
|
5803
|
+
x: length37.parse(parameters.p) / 2,
|
|
5804
|
+
y: length37.parse(parameters.h) / 2
|
|
5723
5805
|
},
|
|
5724
5806
|
{
|
|
5725
|
-
x: -
|
|
5726
|
-
y:
|
|
5807
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5808
|
+
y: length37.parse(parameters.h) / 2
|
|
5727
5809
|
},
|
|
5728
5810
|
{
|
|
5729
|
-
x: -
|
|
5730
|
-
y: -
|
|
5811
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5812
|
+
y: -length37.parse(parameters.h) / 2
|
|
5731
5813
|
},
|
|
5732
5814
|
{
|
|
5733
|
-
x:
|
|
5734
|
-
y: -
|
|
5815
|
+
x: length37.parse(parameters.p) / 2,
|
|
5816
|
+
y: -length37.parse(parameters.h) / 2
|
|
5735
5817
|
}
|
|
5736
5818
|
],
|
|
5737
5819
|
stroke_width: 0.1,
|
|
@@ -5773,8 +5855,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
5773
5855
|
};
|
|
5774
5856
|
|
|
5775
5857
|
// src/fn/vssop.ts
|
|
5776
|
-
import { z as
|
|
5777
|
-
import { length as
|
|
5858
|
+
import { z as z50 } from "zod";
|
|
5859
|
+
import { length as length38 } from "circuit-json";
|
|
5778
5860
|
var getDefaultValues = (num_pins) => {
|
|
5779
5861
|
switch (num_pins) {
|
|
5780
5862
|
case 8:
|
|
@@ -5803,24 +5885,24 @@ var getDefaultValues = (num_pins) => {
|
|
|
5803
5885
|
};
|
|
5804
5886
|
}
|
|
5805
5887
|
};
|
|
5806
|
-
var vssop_def =
|
|
5807
|
-
fn:
|
|
5808
|
-
num_pins:
|
|
5809
|
-
w:
|
|
5810
|
-
h:
|
|
5811
|
-
p:
|
|
5812
|
-
pl:
|
|
5813
|
-
pw:
|
|
5814
|
-
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()
|
|
5815
5897
|
});
|
|
5816
5898
|
var vssop = (raw_params) => {
|
|
5817
5899
|
const parameters = vssop_def.parse(raw_params);
|
|
5818
5900
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
5819
|
-
const w =
|
|
5820
|
-
const h =
|
|
5821
|
-
const p =
|
|
5822
|
-
const pl =
|
|
5823
|
-
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);
|
|
5824
5906
|
const pads = [];
|
|
5825
5907
|
const half = parameters.num_pins / 2;
|
|
5826
5908
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -5897,14 +5979,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
5897
5979
|
const col = pn <= half ? -1 : 1;
|
|
5898
5980
|
const row = (half - 1) / 2 - rowIndex;
|
|
5899
5981
|
return {
|
|
5900
|
-
x: col *
|
|
5982
|
+
x: col * length38.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
|
|
5901
5983
|
y: row * p
|
|
5902
5984
|
};
|
|
5903
5985
|
};
|
|
5904
5986
|
|
|
5905
5987
|
// src/fn/msop.ts
|
|
5906
|
-
import { z as
|
|
5907
|
-
import { length as
|
|
5988
|
+
import { z as z51 } from "zod";
|
|
5989
|
+
import { length as length39 } from "circuit-json";
|
|
5908
5990
|
var getDefaultValues2 = (num_pins) => {
|
|
5909
5991
|
switch (num_pins) {
|
|
5910
5992
|
case 10:
|
|
@@ -5941,15 +6023,15 @@ var getDefaultValues2 = (num_pins) => {
|
|
|
5941
6023
|
};
|
|
5942
6024
|
}
|
|
5943
6025
|
};
|
|
5944
|
-
var msop_def =
|
|
5945
|
-
fn:
|
|
5946
|
-
num_pins:
|
|
5947
|
-
w:
|
|
5948
|
-
h:
|
|
5949
|
-
p:
|
|
5950
|
-
pl:
|
|
5951
|
-
pw:
|
|
5952
|
-
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()
|
|
5953
6035
|
});
|
|
5954
6036
|
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
5955
6037
|
const half = pinCount / 2;
|
|
@@ -5957,18 +6039,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
|
|
|
5957
6039
|
const col = pn <= half ? -1 : 1;
|
|
5958
6040
|
const row = (half - 1) / 2 - rowIndex;
|
|
5959
6041
|
return {
|
|
5960
|
-
x: col *
|
|
6042
|
+
x: col * length39.parse("2mm"),
|
|
5961
6043
|
y: row * p
|
|
5962
6044
|
};
|
|
5963
6045
|
};
|
|
5964
6046
|
var msop = (raw_params) => {
|
|
5965
6047
|
const parameters = msop_def.parse(raw_params);
|
|
5966
6048
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
5967
|
-
const w =
|
|
5968
|
-
const h =
|
|
5969
|
-
const p =
|
|
5970
|
-
const pl =
|
|
5971
|
-
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);
|
|
5972
6054
|
const pads = [];
|
|
5973
6055
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
5974
6056
|
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
@@ -6039,22 +6121,22 @@ var msop = (raw_params) => {
|
|
|
6039
6121
|
};
|
|
6040
6122
|
|
|
6041
6123
|
// src/fn/sod323w.ts
|
|
6042
|
-
import { z as
|
|
6043
|
-
import { length as
|
|
6044
|
-
var sod323w_def =
|
|
6045
|
-
fn:
|
|
6046
|
-
num_pins:
|
|
6047
|
-
w:
|
|
6048
|
-
h:
|
|
6049
|
-
pl:
|
|
6050
|
-
pw:
|
|
6051
|
-
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")
|
|
6052
6134
|
});
|
|
6053
6135
|
var sod323w = (raw_params) => {
|
|
6054
6136
|
const parameters = sod323w_def.parse(raw_params);
|
|
6055
6137
|
const silkscreenRefText = silkscreenRef(
|
|
6056
6138
|
0,
|
|
6057
|
-
|
|
6139
|
+
length40.parse(parameters.h),
|
|
6058
6140
|
0.3
|
|
6059
6141
|
);
|
|
6060
6142
|
const silkscreenLine = {
|
|
@@ -6063,20 +6145,20 @@ var sod323w = (raw_params) => {
|
|
|
6063
6145
|
pcb_component_id: "",
|
|
6064
6146
|
route: [
|
|
6065
6147
|
{
|
|
6066
|
-
x:
|
|
6067
|
-
y:
|
|
6148
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6149
|
+
y: length40.parse(parameters.h) / 2
|
|
6068
6150
|
},
|
|
6069
6151
|
{
|
|
6070
|
-
x: -
|
|
6071
|
-
y:
|
|
6152
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6153
|
+
y: length40.parse(parameters.h) / 2
|
|
6072
6154
|
},
|
|
6073
6155
|
{
|
|
6074
|
-
x: -
|
|
6075
|
-
y: -
|
|
6156
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6157
|
+
y: -length40.parse(parameters.h) / 2
|
|
6076
6158
|
},
|
|
6077
6159
|
{
|
|
6078
|
-
x:
|
|
6079
|
-
y: -
|
|
6160
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6161
|
+
y: -length40.parse(parameters.h) / 2
|
|
6080
6162
|
}
|
|
6081
6163
|
],
|
|
6082
6164
|
stroke_width: 0.1,
|
|
@@ -6119,22 +6201,22 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
6119
6201
|
};
|
|
6120
6202
|
|
|
6121
6203
|
// src/fn/sod323fl.ts
|
|
6122
|
-
import { z as
|
|
6123
|
-
import { length as
|
|
6124
|
-
var sod323FL_def =
|
|
6125
|
-
fn:
|
|
6126
|
-
num_pins:
|
|
6127
|
-
w:
|
|
6128
|
-
h:
|
|
6129
|
-
pl:
|
|
6130
|
-
pw:
|
|
6131
|
-
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")
|
|
6132
6214
|
});
|
|
6133
6215
|
var sod323fl = (raw_params) => {
|
|
6134
6216
|
const parameters = sod323FL_def.parse(raw_params);
|
|
6135
6217
|
const silkscreenRefText = silkscreenRef(
|
|
6136
6218
|
0,
|
|
6137
|
-
|
|
6219
|
+
length41.parse(parameters.h),
|
|
6138
6220
|
0.3
|
|
6139
6221
|
);
|
|
6140
6222
|
const silkscreenLine = {
|
|
@@ -6143,20 +6225,20 @@ var sod323fl = (raw_params) => {
|
|
|
6143
6225
|
pcb_component_id: "",
|
|
6144
6226
|
route: [
|
|
6145
6227
|
{
|
|
6146
|
-
x:
|
|
6147
|
-
y:
|
|
6228
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6229
|
+
y: length41.parse(parameters.h) / 2
|
|
6148
6230
|
},
|
|
6149
6231
|
{
|
|
6150
|
-
x: -
|
|
6151
|
-
y:
|
|
6232
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6233
|
+
y: length41.parse(parameters.h) / 2
|
|
6152
6234
|
},
|
|
6153
6235
|
{
|
|
6154
|
-
x: -
|
|
6155
|
-
y: -
|
|
6236
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6237
|
+
y: -length41.parse(parameters.h) / 2
|
|
6156
6238
|
},
|
|
6157
6239
|
{
|
|
6158
|
-
x:
|
|
6159
|
-
y: -
|
|
6240
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6241
|
+
y: -length41.parse(parameters.h) / 2
|
|
6160
6242
|
}
|
|
6161
6243
|
],
|
|
6162
6244
|
stroke_width: 0.1,
|
|
@@ -6199,20 +6281,20 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
6199
6281
|
};
|
|
6200
6282
|
|
|
6201
6283
|
// src/fn/son.ts
|
|
6202
|
-
import { z as
|
|
6203
|
-
import { length as
|
|
6204
|
-
var son_def =
|
|
6205
|
-
fn:
|
|
6206
|
-
num_pins:
|
|
6207
|
-
w:
|
|
6208
|
-
h:
|
|
6209
|
-
p:
|
|
6210
|
-
pl:
|
|
6211
|
-
pw:
|
|
6212
|
-
epw:
|
|
6213
|
-
eph:
|
|
6214
|
-
string:
|
|
6215
|
-
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)
|
|
6216
6298
|
});
|
|
6217
6299
|
var son = (raw_params) => {
|
|
6218
6300
|
if (raw_params.string && raw_params.string.includes("_ep")) {
|
|
@@ -6224,13 +6306,13 @@ var son = (raw_params) => {
|
|
|
6224
6306
|
...raw_params,
|
|
6225
6307
|
num_pins: numPins
|
|
6226
6308
|
});
|
|
6227
|
-
const w =
|
|
6228
|
-
const h =
|
|
6229
|
-
const p =
|
|
6230
|
-
const pl =
|
|
6231
|
-
const pw =
|
|
6232
|
-
const epw =
|
|
6233
|
-
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);
|
|
6234
6316
|
const pads = [];
|
|
6235
6317
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6236
6318
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -6308,18 +6390,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
6308
6390
|
const col = pn <= half ? -1 : 1;
|
|
6309
6391
|
const row = (half - 1) / 2 - rowIndex;
|
|
6310
6392
|
return {
|
|
6311
|
-
x: col *
|
|
6393
|
+
x: col * length42.parse("1.4mm"),
|
|
6312
6394
|
y: row * p
|
|
6313
6395
|
};
|
|
6314
6396
|
};
|
|
6315
6397
|
|
|
6316
6398
|
// src/fn/solderjumper.ts
|
|
6317
|
-
import { length as
|
|
6399
|
+
import { length as length43 } from "circuit-json";
|
|
6318
6400
|
var solderjumper = (params) => {
|
|
6319
6401
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
6320
|
-
const padSpacing =
|
|
6321
|
-
const padWidth =
|
|
6322
|
-
const padHeight =
|
|
6402
|
+
const padSpacing = length43.parse(p);
|
|
6403
|
+
const padWidth = length43.parse(pw);
|
|
6404
|
+
const padHeight = length43.parse(ph);
|
|
6323
6405
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
6324
6406
|
const pads = [];
|
|
6325
6407
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -6407,34 +6489,34 @@ var solderjumper = (params) => {
|
|
|
6407
6489
|
};
|
|
6408
6490
|
|
|
6409
6491
|
// src/fn/sot457.ts
|
|
6410
|
-
import { z as
|
|
6492
|
+
import { z as z55 } from "zod";
|
|
6411
6493
|
var commonSchema = {
|
|
6412
|
-
fn:
|
|
6413
|
-
num_pins:
|
|
6414
|
-
pillh:
|
|
6415
|
-
pillw:
|
|
6416
|
-
pl:
|
|
6417
|
-
pw:
|
|
6418
|
-
p:
|
|
6419
|
-
wave:
|
|
6420
|
-
reflow:
|
|
6421
|
-
};
|
|
6422
|
-
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({
|
|
6423
6505
|
...commonSchema,
|
|
6424
|
-
h:
|
|
6425
|
-
w:
|
|
6426
|
-
pl:
|
|
6427
|
-
pw:
|
|
6428
|
-
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")
|
|
6429
6511
|
});
|
|
6430
|
-
var sot457WaveSchema =
|
|
6512
|
+
var sot457WaveSchema = z55.object({
|
|
6431
6513
|
...commonSchema,
|
|
6432
|
-
h:
|
|
6433
|
-
w:
|
|
6434
|
-
pillr:
|
|
6435
|
-
pl:
|
|
6436
|
-
pw:
|
|
6437
|
-
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")
|
|
6438
6520
|
}).transform((data) => ({
|
|
6439
6521
|
...data,
|
|
6440
6522
|
wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
|
|
@@ -6573,19 +6655,19 @@ var sot457 = (rawParams) => {
|
|
|
6573
6655
|
};
|
|
6574
6656
|
|
|
6575
6657
|
// src/fn/potentiometer.ts
|
|
6576
|
-
import { z as
|
|
6577
|
-
var potentiometer_def =
|
|
6578
|
-
fn:
|
|
6579
|
-
num_pins:
|
|
6580
|
-
p:
|
|
6581
|
-
id:
|
|
6582
|
-
od:
|
|
6583
|
-
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(
|
|
6584
6666
|
"Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
|
|
6585
6667
|
),
|
|
6586
|
-
w:
|
|
6587
|
-
h:
|
|
6588
|
-
string:
|
|
6668
|
+
w: z56.string().default("5.35mm"),
|
|
6669
|
+
h: z56.string().default("4mm"),
|
|
6670
|
+
string: z56.string().optional()
|
|
6589
6671
|
});
|
|
6590
6672
|
var potentiometer_acp = (parameters) => {
|
|
6591
6673
|
const { p, id, od, h, ca } = parameters;
|
|
@@ -6652,15 +6734,15 @@ var potentiometer = (raw_params) => {
|
|
|
6652
6734
|
|
|
6653
6735
|
// src/fn/electrolytic.ts
|
|
6654
6736
|
import {
|
|
6655
|
-
length as
|
|
6737
|
+
length as length44
|
|
6656
6738
|
} from "circuit-json";
|
|
6657
|
-
import { z as
|
|
6658
|
-
var electrolytic_def =
|
|
6659
|
-
fn:
|
|
6660
|
-
p:
|
|
6661
|
-
id:
|
|
6662
|
-
od:
|
|
6663
|
-
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")
|
|
6664
6746
|
});
|
|
6665
6747
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
6666
6748
|
const topArc = [];
|
|
@@ -6767,22 +6849,22 @@ var electrolytic = (raw_params) => {
|
|
|
6767
6849
|
};
|
|
6768
6850
|
|
|
6769
6851
|
// src/fn/smbf.ts
|
|
6770
|
-
import { z as
|
|
6771
|
-
import { length as
|
|
6772
|
-
var smbf_def =
|
|
6773
|
-
fn:
|
|
6774
|
-
num_pins:
|
|
6775
|
-
w:
|
|
6776
|
-
h:
|
|
6777
|
-
pl:
|
|
6778
|
-
pw:
|
|
6779
|
-
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")
|
|
6780
6862
|
});
|
|
6781
6863
|
var smbf = (raw_params) => {
|
|
6782
6864
|
const parameters = smbf_def.parse(raw_params);
|
|
6783
6865
|
const silkscreenRefText = silkscreenRef(
|
|
6784
6866
|
0,
|
|
6785
|
-
|
|
6867
|
+
length45.parse(parameters.h) - 0.5,
|
|
6786
6868
|
0.3
|
|
6787
6869
|
);
|
|
6788
6870
|
const silkscreenLine = {
|
|
@@ -6791,20 +6873,20 @@ var smbf = (raw_params) => {
|
|
|
6791
6873
|
pcb_component_id: "",
|
|
6792
6874
|
route: [
|
|
6793
6875
|
{
|
|
6794
|
-
x:
|
|
6795
|
-
y:
|
|
6876
|
+
x: length45.parse(parameters.p) / 2,
|
|
6877
|
+
y: length45.parse(parameters.h) / 2
|
|
6796
6878
|
},
|
|
6797
6879
|
{
|
|
6798
|
-
x: -
|
|
6799
|
-
y:
|
|
6880
|
+
x: -length45.parse(parameters.w) / 2 - 0.3,
|
|
6881
|
+
y: length45.parse(parameters.h) / 2
|
|
6800
6882
|
},
|
|
6801
6883
|
{
|
|
6802
|
-
x: -
|
|
6803
|
-
y: -
|
|
6884
|
+
x: -length45.parse(parameters.w) / 2 - 0.3,
|
|
6885
|
+
y: -length45.parse(parameters.h) / 2
|
|
6804
6886
|
},
|
|
6805
6887
|
{
|
|
6806
|
-
x:
|
|
6807
|
-
y: -
|
|
6888
|
+
x: length45.parse(parameters.p) / 2,
|
|
6889
|
+
y: -length45.parse(parameters.h) / 2
|
|
6808
6890
|
}
|
|
6809
6891
|
],
|
|
6810
6892
|
stroke_width: 0.1,
|
|
@@ -6846,16 +6928,16 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
6846
6928
|
};
|
|
6847
6929
|
|
|
6848
6930
|
// src/fn/sot323.ts
|
|
6849
|
-
import { z as
|
|
6850
|
-
var sot323_def =
|
|
6851
|
-
fn:
|
|
6852
|
-
num_pins:
|
|
6853
|
-
w:
|
|
6854
|
-
h:
|
|
6855
|
-
pl:
|
|
6856
|
-
pw:
|
|
6857
|
-
p:
|
|
6858
|
-
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()
|
|
6859
6941
|
});
|
|
6860
6942
|
var sot323 = (raw_params) => {
|
|
6861
6943
|
const match = raw_params.string?.match(/^sot323_(\d+)/);
|
|
@@ -6943,30 +7025,30 @@ var sot323_3 = (parameters) => {
|
|
|
6943
7025
|
};
|
|
6944
7026
|
|
|
6945
7027
|
// src/fn/smtpad.ts
|
|
6946
|
-
import { z as
|
|
6947
|
-
import { length as
|
|
7028
|
+
import { z as z60 } from "zod";
|
|
7029
|
+
import { length as length46 } from "circuit-json";
|
|
6948
7030
|
import { mm as mm6 } from "@tscircuit/mm";
|
|
6949
|
-
var smtpad_def =
|
|
6950
|
-
fn:
|
|
6951
|
-
circle:
|
|
6952
|
-
rect:
|
|
6953
|
-
square:
|
|
6954
|
-
pill:
|
|
6955
|
-
d:
|
|
6956
|
-
pd:
|
|
6957
|
-
diameter:
|
|
6958
|
-
r:
|
|
6959
|
-
pr:
|
|
6960
|
-
radius:
|
|
6961
|
-
w:
|
|
6962
|
-
pw:
|
|
6963
|
-
width:
|
|
6964
|
-
h:
|
|
6965
|
-
ph:
|
|
6966
|
-
height:
|
|
6967
|
-
s:
|
|
6968
|
-
size:
|
|
6969
|
-
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()
|
|
6970
7052
|
}).transform((v) => {
|
|
6971
7053
|
let shape = "rect";
|
|
6972
7054
|
if (v.circle) shape = "circle";
|
|
@@ -7032,18 +7114,18 @@ var smtpad = (raw_params) => {
|
|
|
7032
7114
|
};
|
|
7033
7115
|
|
|
7034
7116
|
// src/fn/platedhole.ts
|
|
7035
|
-
import { z as
|
|
7036
|
-
import { length as
|
|
7117
|
+
import { z as z61 } from "zod";
|
|
7118
|
+
import { length as length47 } from "circuit-json";
|
|
7037
7119
|
import { mm as mm7 } from "@tscircuit/mm";
|
|
7038
|
-
var platedhole_def =
|
|
7039
|
-
fn:
|
|
7040
|
-
d:
|
|
7041
|
-
hd:
|
|
7042
|
-
r:
|
|
7043
|
-
hr:
|
|
7044
|
-
pd:
|
|
7045
|
-
pr:
|
|
7046
|
-
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)
|
|
7047
7129
|
}).transform((v) => {
|
|
7048
7130
|
let holeD;
|
|
7049
7131
|
if (v.d !== void 0) holeD = mm7(v.d);
|
|
@@ -7075,14 +7157,14 @@ var platedhole2 = (raw_params) => {
|
|
|
7075
7157
|
};
|
|
7076
7158
|
|
|
7077
7159
|
// src/fn/sot.ts
|
|
7078
|
-
import { z as
|
|
7079
|
-
var sot_def =
|
|
7080
|
-
fn:
|
|
7081
|
-
num_pins:
|
|
7082
|
-
h:
|
|
7083
|
-
pl:
|
|
7084
|
-
pw:
|
|
7085
|
-
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")
|
|
7086
7168
|
});
|
|
7087
7169
|
var sot = (raw_params) => {
|
|
7088
7170
|
const parameters = sot_def.parse(raw_params);
|
|
@@ -7199,9 +7281,9 @@ var sotWithoutParsing = (parameters) => {
|
|
|
7199
7281
|
};
|
|
7200
7282
|
|
|
7201
7283
|
// src/fn/m2host.ts
|
|
7202
|
-
import { z as
|
|
7203
|
-
var m2host_def =
|
|
7204
|
-
fn:
|
|
7284
|
+
import { z as z63 } from "zod";
|
|
7285
|
+
var m2host_def = z63.object({
|
|
7286
|
+
fn: z63.string()
|
|
7205
7287
|
});
|
|
7206
7288
|
var m2host = (raw_params) => {
|
|
7207
7289
|
const parameters = m2host_def.parse(raw_params);
|