@tscircuit/footprinter 0.0.259 → 0.0.261
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 +77 -9
- package/dist/index.js +977 -812
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -72,7 +72,9 @@ __export(fn_exports, {
|
|
|
72
72
|
sot457: () => sot457,
|
|
73
73
|
sot563: () => sot563,
|
|
74
74
|
sot723: () => sot723,
|
|
75
|
+
sot886: () => sot886,
|
|
75
76
|
sot89: () => sot89,
|
|
77
|
+
sot963: () => sot963,
|
|
76
78
|
ssop: () => ssop,
|
|
77
79
|
stampboard: () => stampboard,
|
|
78
80
|
stampreceiver: () => stampreceiver,
|
|
@@ -768,7 +770,8 @@ var extendSoicDef = (newDefaults) => z6.object({
|
|
|
768
770
|
pw: length3.default(length3.parse(newDefaults.pw ?? "0.6mm")),
|
|
769
771
|
pl: length3.default(length3.parse(newDefaults.pl ?? "1.0mm")),
|
|
770
772
|
legsoutside: z6.boolean().optional().default(newDefaults.legsoutside ?? false),
|
|
771
|
-
pillpads: z6.boolean().optional().default(newDefaults.pillpads ?? false)
|
|
773
|
+
pillpads: z6.boolean().optional().default(newDefaults.pillpads ?? false),
|
|
774
|
+
silkscreen_stroke_width: z6.number().optional().default(0.1)
|
|
772
775
|
}).transform((v) => {
|
|
773
776
|
if (!v.pw && !v.pl) {
|
|
774
777
|
v.pw = length3.parse("0.6mm");
|
|
@@ -834,7 +837,7 @@ var soicWithoutParsing = (parameters) => {
|
|
|
834
837
|
layer: "top",
|
|
835
838
|
pcb_component_id: "",
|
|
836
839
|
pcb_silkscreen_path_id: "silkscreen_path_1",
|
|
837
|
-
stroke_width: 0.1,
|
|
840
|
+
stroke_width: parameters.silkscreen_stroke_width ?? 0.1,
|
|
838
841
|
route: [
|
|
839
842
|
{ x: -sw / 2, y: -sh / 2 },
|
|
840
843
|
{ x: -sw / 2, y: sh / 2 },
|
|
@@ -1365,18 +1368,99 @@ var sot363 = (raw_params) => {
|
|
|
1365
1368
|
};
|
|
1366
1369
|
};
|
|
1367
1370
|
|
|
1368
|
-
// src/fn/
|
|
1371
|
+
// src/fn/sot886.ts
|
|
1369
1372
|
import { z as z9 } from "zod";
|
|
1370
|
-
|
|
1373
|
+
import { length as length5 } from "circuit-json";
|
|
1374
|
+
var sot886_def = z9.object({
|
|
1371
1375
|
fn: z9.string(),
|
|
1372
|
-
num_pins: z9.
|
|
1373
|
-
w: z9.string().default("1.
|
|
1374
|
-
h: z9.string().default("
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1376
|
+
num_pins: z9.literal(6).default(6),
|
|
1377
|
+
w: z9.string().default("1.01mm"),
|
|
1378
|
+
h: z9.string().default("1.45mm"),
|
|
1379
|
+
p: z9.string().default("0.5mm"),
|
|
1380
|
+
pl: z9.string().default("0.33mm"),
|
|
1381
|
+
pw: z9.string().default("0.27mm"),
|
|
1378
1382
|
string: z9.string().optional()
|
|
1379
1383
|
});
|
|
1384
|
+
var sot886 = (raw_params) => {
|
|
1385
|
+
const parameters = sot886_def.parse({ fn: "sot886", ...raw_params });
|
|
1386
|
+
const w = length5.parse(parameters.w);
|
|
1387
|
+
const h = length5.parse(parameters.h);
|
|
1388
|
+
const p = length5.parse(parameters.p);
|
|
1389
|
+
const pl = length5.parse(parameters.pl);
|
|
1390
|
+
const pw = length5.parse(parameters.pw);
|
|
1391
|
+
const pads = [];
|
|
1392
|
+
for (let i = 0; i < 6; i++) {
|
|
1393
|
+
const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
|
|
1394
|
+
pads.push(rectpad(i + 1, x, y, pl, pw));
|
|
1395
|
+
}
|
|
1396
|
+
const silkscreenTopLine = {
|
|
1397
|
+
type: "pcb_silkscreen_path",
|
|
1398
|
+
layer: "top",
|
|
1399
|
+
pcb_component_id: "",
|
|
1400
|
+
route: [
|
|
1401
|
+
{ x: -w / 2, y: h / 2 },
|
|
1402
|
+
{ x: w / 2, y: h / 2 }
|
|
1403
|
+
],
|
|
1404
|
+
stroke_width: 0.05,
|
|
1405
|
+
pcb_silkscreen_path_id: ""
|
|
1406
|
+
};
|
|
1407
|
+
const silkscreenBottomLine = {
|
|
1408
|
+
type: "pcb_silkscreen_path",
|
|
1409
|
+
layer: "top",
|
|
1410
|
+
pcb_component_id: "",
|
|
1411
|
+
route: [
|
|
1412
|
+
{ x: -w / 2, y: -h / 2 },
|
|
1413
|
+
{ x: w / 2, y: -h / 2 }
|
|
1414
|
+
],
|
|
1415
|
+
stroke_width: 0.05,
|
|
1416
|
+
pcb_silkscreen_path_id: ""
|
|
1417
|
+
};
|
|
1418
|
+
const pin1Position = getSot886PadCoord(1, w, p, pl);
|
|
1419
|
+
const pin1Marking = {
|
|
1420
|
+
type: "pcb_silkscreen_path",
|
|
1421
|
+
layer: "top",
|
|
1422
|
+
pcb_component_id: "pin_marker_1",
|
|
1423
|
+
route: [
|
|
1424
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y },
|
|
1425
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y + 0.15 },
|
|
1426
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y - 0.15 },
|
|
1427
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y }
|
|
1428
|
+
],
|
|
1429
|
+
stroke_width: 0.05,
|
|
1430
|
+
pcb_silkscreen_path_id: "pin_marker_1"
|
|
1431
|
+
};
|
|
1432
|
+
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
1433
|
+
return {
|
|
1434
|
+
circuitJson: [
|
|
1435
|
+
...pads,
|
|
1436
|
+
silkscreenTopLine,
|
|
1437
|
+
silkscreenBottomLine,
|
|
1438
|
+
silkscreenRefText,
|
|
1439
|
+
pin1Marking
|
|
1440
|
+
],
|
|
1441
|
+
parameters
|
|
1442
|
+
};
|
|
1443
|
+
};
|
|
1444
|
+
var getSot886PadCoord = (pn, w, p, pl) => {
|
|
1445
|
+
const padCenterOffset = w / 2 - pl / 2;
|
|
1446
|
+
if (pn <= 3) {
|
|
1447
|
+
return { x: -padCenterOffset, y: p - (pn - 1) * p };
|
|
1448
|
+
}
|
|
1449
|
+
return { x: padCenterOffset, y: -p + (pn - 4) * p };
|
|
1450
|
+
};
|
|
1451
|
+
|
|
1452
|
+
// src/fn/sot23.ts
|
|
1453
|
+
import { z as z10 } from "zod";
|
|
1454
|
+
var sot23_def = z10.object({
|
|
1455
|
+
fn: z10.string(),
|
|
1456
|
+
num_pins: z10.number().default(3),
|
|
1457
|
+
w: z10.string().default("1.92mm"),
|
|
1458
|
+
h: z10.string().default("2.74mm"),
|
|
1459
|
+
pl: z10.string().default("0.8mm"),
|
|
1460
|
+
pw: z10.string().default("0.764mm"),
|
|
1461
|
+
p: z10.string().default("0.95mm"),
|
|
1462
|
+
string: z10.string().optional()
|
|
1463
|
+
});
|
|
1380
1464
|
var sot23_6_or_8_def = extendSoicDef({
|
|
1381
1465
|
p: "0.95mm",
|
|
1382
1466
|
w: "1.6mm",
|
|
@@ -1664,8 +1748,8 @@ var dfn = (raw_params) => {
|
|
|
1664
1748
|
};
|
|
1665
1749
|
|
|
1666
1750
|
// src/fn/pinrow.ts
|
|
1667
|
-
import { z as
|
|
1668
|
-
import { length as
|
|
1751
|
+
import { z as z13 } from "zod";
|
|
1752
|
+
import { length as length6 } from "circuit-json";
|
|
1669
1753
|
|
|
1670
1754
|
// src/helpers/silkscreenPin.ts
|
|
1671
1755
|
var silkscreenPin = ({
|
|
@@ -1751,24 +1835,24 @@ function determinePinlabelAnchorSide({
|
|
|
1751
1835
|
}
|
|
1752
1836
|
|
|
1753
1837
|
// 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:
|
|
1838
|
+
var pinrow_def = z13.object({
|
|
1839
|
+
fn: z13.string(),
|
|
1840
|
+
num_pins: z13.number().optional().default(6),
|
|
1841
|
+
rows: z13.union([z13.string(), z13.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
1842
|
+
p: length6.default("0.1in").describe("pitch"),
|
|
1843
|
+
id: length6.default("1.0mm").describe("inner diameter"),
|
|
1844
|
+
od: length6.default("1.5mm").describe("outer diameter"),
|
|
1845
|
+
male: z13.boolean().optional().describe("for male pin headers"),
|
|
1846
|
+
female: z13.boolean().optional().describe("for female pin headers"),
|
|
1847
|
+
pinlabeltextalignleft: z13.boolean().optional().default(false),
|
|
1848
|
+
pinlabeltextaligncenter: z13.boolean().optional().default(false),
|
|
1849
|
+
pinlabeltextalignright: z13.boolean().optional().default(false),
|
|
1850
|
+
pinlabelverticallyinverted: z13.boolean().optional().default(false),
|
|
1851
|
+
pinlabelorthogonal: z13.boolean().optional().default(false),
|
|
1852
|
+
nosquareplating: z13.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
|
|
1853
|
+
nopinlabels: z13.boolean().optional().default(false).describe("omit silkscreen pin labels"),
|
|
1854
|
+
doublesidedpinlabel: z13.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
|
|
1855
|
+
bottomsidepinlabel: z13.boolean().optional().default(false).describe(
|
|
1772
1856
|
"place the silkscreen reference text on the bottom layer instead of top"
|
|
1773
1857
|
)
|
|
1774
1858
|
}).transform((data) => {
|
|
@@ -1782,7 +1866,7 @@ var pinrow_def = z12.object({
|
|
|
1782
1866
|
}).superRefine((data, ctx) => {
|
|
1783
1867
|
if (data.male && data.female) {
|
|
1784
1868
|
ctx.addIssue({
|
|
1785
|
-
code:
|
|
1869
|
+
code: z13.ZodIssueCode.custom,
|
|
1786
1870
|
message: "'male' and 'female' cannot both be true; it should be male or female.",
|
|
1787
1871
|
path: ["male", "female"]
|
|
1788
1872
|
});
|
|
@@ -2028,23 +2112,23 @@ var ms013 = (raw_params) => {
|
|
|
2028
2112
|
};
|
|
2029
2113
|
|
|
2030
2114
|
// 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:
|
|
2115
|
+
import { length as length7 } from "circuit-json";
|
|
2116
|
+
import { z as z14 } from "zod";
|
|
2117
|
+
var sot723_def = z14.object({
|
|
2118
|
+
fn: z14.string(),
|
|
2119
|
+
num_pins: z14.literal(3).default(3),
|
|
2120
|
+
w: z14.string().default("1.2mm"),
|
|
2121
|
+
h: z14.string().default("1.2mm"),
|
|
2122
|
+
pw: z14.string().default("0.40mm"),
|
|
2123
|
+
pl: z14.string().default("0.45mm"),
|
|
2124
|
+
p: z14.string().default("0.575mm")
|
|
2041
2125
|
});
|
|
2042
2126
|
var sot723 = (raw_params) => {
|
|
2043
2127
|
const parameters = sot723_def.parse(raw_params);
|
|
2044
2128
|
const pad2 = sot723WithoutParsing(parameters);
|
|
2045
2129
|
const silkscreenRefText = silkscreenRef(
|
|
2046
2130
|
0,
|
|
2047
|
-
|
|
2131
|
+
length7.parse(parameters.h),
|
|
2048
2132
|
0.2
|
|
2049
2133
|
);
|
|
2050
2134
|
return {
|
|
@@ -2087,22 +2171,22 @@ var sot723WithoutParsing = (parameters) => {
|
|
|
2087
2171
|
};
|
|
2088
2172
|
|
|
2089
2173
|
// 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:
|
|
2174
|
+
import { z as z15 } from "zod";
|
|
2175
|
+
import { length as length8 } from "circuit-json";
|
|
2176
|
+
var sod_def = z15.object({
|
|
2177
|
+
fn: z15.string(),
|
|
2178
|
+
num_pins: z15.literal(2).default(2),
|
|
2179
|
+
w: z15.string().default("2.36mm"),
|
|
2180
|
+
h: z15.string().default("1.22mm"),
|
|
2181
|
+
pl: z15.string().default("0.9mm"),
|
|
2182
|
+
pw: z15.string().default("1.2mm"),
|
|
2183
|
+
p: z15.string().default("3.30mm")
|
|
2100
2184
|
});
|
|
2101
2185
|
var sod123 = (raw_params) => {
|
|
2102
2186
|
const parameters = sod_def.parse(raw_params);
|
|
2103
2187
|
const silkscreenRefText = silkscreenRef(
|
|
2104
2188
|
0,
|
|
2105
|
-
|
|
2189
|
+
length8.parse(parameters.h) / 4 + 0.4,
|
|
2106
2190
|
0.3
|
|
2107
2191
|
);
|
|
2108
2192
|
return {
|
|
@@ -2142,14 +2226,14 @@ var sodWithoutParsing = (parameters) => {
|
|
|
2142
2226
|
|
|
2143
2227
|
// src/fn/axial.ts
|
|
2144
2228
|
import {
|
|
2145
|
-
length as
|
|
2229
|
+
length as length9
|
|
2146
2230
|
} from "circuit-json";
|
|
2147
|
-
import { z as
|
|
2148
|
-
var axial_def =
|
|
2149
|
-
fn:
|
|
2150
|
-
p:
|
|
2151
|
-
id:
|
|
2152
|
-
od:
|
|
2231
|
+
import { z as z16 } from "zod";
|
|
2232
|
+
var axial_def = z16.object({
|
|
2233
|
+
fn: z16.string(),
|
|
2234
|
+
p: length9.optional().default("2.54mm"),
|
|
2235
|
+
id: length9.optional().default("0.7mm"),
|
|
2236
|
+
od: length9.optional().default("1.4mm")
|
|
2153
2237
|
});
|
|
2154
2238
|
var axial = (raw_params) => {
|
|
2155
2239
|
const parameters = axial_def.parse(raw_params);
|
|
@@ -2181,8 +2265,8 @@ var axial = (raw_params) => {
|
|
|
2181
2265
|
};
|
|
2182
2266
|
|
|
2183
2267
|
// src/fn/pushbutton.ts
|
|
2184
|
-
import { length as
|
|
2185
|
-
import { z as
|
|
2268
|
+
import { length as length10 } from "circuit-json";
|
|
2269
|
+
import { z as z17 } from "zod";
|
|
2186
2270
|
|
|
2187
2271
|
// src/helpers/silkscreenpath.ts
|
|
2188
2272
|
var silkscreenpath = (route, options = {}) => {
|
|
@@ -2197,12 +2281,12 @@ var silkscreenpath = (route, options = {}) => {
|
|
|
2197
2281
|
};
|
|
2198
2282
|
|
|
2199
2283
|
// src/fn/pushbutton.ts
|
|
2200
|
-
var pushbutton_def =
|
|
2201
|
-
fn:
|
|
2202
|
-
w:
|
|
2203
|
-
h:
|
|
2204
|
-
id:
|
|
2205
|
-
od:
|
|
2284
|
+
var pushbutton_def = z17.object({
|
|
2285
|
+
fn: z17.literal("pushbutton"),
|
|
2286
|
+
w: length10.default(4.5),
|
|
2287
|
+
h: length10.default(6.5),
|
|
2288
|
+
id: length10.default(1),
|
|
2289
|
+
od: length10.default(1.2)
|
|
2206
2290
|
});
|
|
2207
2291
|
var pushbutton = (raw_params) => {
|
|
2208
2292
|
const parameters = pushbutton_def.parse(raw_params);
|
|
@@ -2249,24 +2333,24 @@ var pushbutton = (raw_params) => {
|
|
|
2249
2333
|
|
|
2250
2334
|
// src/fn/stampboard.ts
|
|
2251
2335
|
import {
|
|
2252
|
-
length as
|
|
2336
|
+
length as length11
|
|
2253
2337
|
} 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:
|
|
2338
|
+
import { z as z18 } from "zod";
|
|
2339
|
+
var stampboard_def = z18.object({
|
|
2340
|
+
fn: z18.string(),
|
|
2341
|
+
w: length11.default("22.58mm"),
|
|
2342
|
+
h: length11.optional(),
|
|
2343
|
+
left: length11.optional().default(20),
|
|
2344
|
+
right: length11.optional().default(20),
|
|
2345
|
+
top: length11.optional().default(2),
|
|
2346
|
+
bottom: length11.optional().default(2),
|
|
2347
|
+
p: length11.default(length11.parse("2.54mm")),
|
|
2348
|
+
pw: length11.default(length11.parse("1.6mm")),
|
|
2349
|
+
pl: length11.default(length11.parse("2.4mm")),
|
|
2350
|
+
innerhole: z18.boolean().default(false),
|
|
2351
|
+
innerholeedgedistance: length11.default(length11.parse("1.61mm")),
|
|
2352
|
+
silkscreenlabels: z18.boolean().default(false),
|
|
2353
|
+
silkscreenlabelmargin: length11.default(length11.parse("0.1mm"))
|
|
2270
2354
|
});
|
|
2271
2355
|
var getHeight = (parameters) => {
|
|
2272
2356
|
const params = stampboard_def.parse(parameters);
|
|
@@ -2675,22 +2759,22 @@ var stampboard = (raw_params) => {
|
|
|
2675
2759
|
|
|
2676
2760
|
// src/fn/stampreceiver.ts
|
|
2677
2761
|
import {
|
|
2678
|
-
length as
|
|
2762
|
+
length as length12
|
|
2679
2763
|
} 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:
|
|
2764
|
+
import { z as z19 } from "zod";
|
|
2765
|
+
var stampreceiver_def = z19.object({
|
|
2766
|
+
fn: z19.string(),
|
|
2767
|
+
w: length12.default("22.58mm"),
|
|
2768
|
+
h: length12.optional(),
|
|
2769
|
+
left: length12.optional().default(20),
|
|
2770
|
+
right: length12.optional().default(20),
|
|
2771
|
+
top: length12.optional().default(2),
|
|
2772
|
+
bottom: length12.optional().default(2),
|
|
2773
|
+
p: length12.default(length12.parse("2.54mm")),
|
|
2774
|
+
pw: length12.default(length12.parse("1.6mm")),
|
|
2775
|
+
pl: length12.default(length12.parse("3.2mm")),
|
|
2776
|
+
innerhole: z19.boolean().default(false),
|
|
2777
|
+
innerholeedgedistance: length12.default(length12.parse("1.61mm"))
|
|
2694
2778
|
});
|
|
2695
2779
|
var getHeight2 = (parameters) => {
|
|
2696
2780
|
const params = stampreceiver_def.parse(parameters);
|
|
@@ -2991,20 +3075,20 @@ var lqfp = (parameters) => {
|
|
|
2991
3075
|
|
|
2992
3076
|
// src/fn/breakoutheaders.ts
|
|
2993
3077
|
import {
|
|
2994
|
-
length as
|
|
3078
|
+
length as length13
|
|
2995
3079
|
} 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:
|
|
3080
|
+
import { z as z20 } from "zod";
|
|
3081
|
+
var breakoutheaders_def = z20.object({
|
|
3082
|
+
fn: z20.string(),
|
|
3083
|
+
w: length13.default("10mm"),
|
|
3084
|
+
h: length13.optional(),
|
|
3085
|
+
left: length13.optional().default(20),
|
|
3086
|
+
right: length13.optional().default(20),
|
|
3087
|
+
top: length13.optional().default(0),
|
|
3088
|
+
bottom: length13.optional().default(0),
|
|
3089
|
+
p: length13.default(length13.parse("2.54mm")),
|
|
3090
|
+
id: length13.optional().default(length13.parse("1mm")),
|
|
3091
|
+
od: length13.optional().default(length13.parse("1.5mm"))
|
|
3008
3092
|
});
|
|
3009
3093
|
var getHeight3 = (parameters) => {
|
|
3010
3094
|
const params = breakoutheaders_def.parse(parameters);
|
|
@@ -3196,9 +3280,9 @@ var breakoutheaders = (raw_params) => {
|
|
|
3196
3280
|
|
|
3197
3281
|
// src/fn/hc49.ts
|
|
3198
3282
|
import {
|
|
3199
|
-
length as
|
|
3283
|
+
length as length14
|
|
3200
3284
|
} from "circuit-json";
|
|
3201
|
-
import { z as
|
|
3285
|
+
import { z as z21 } from "zod";
|
|
3202
3286
|
var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
3203
3287
|
return Array.from({ length: 25 }, (_, i) => {
|
|
3204
3288
|
const theta = i / 24 * Math.PI - Math.PI / 2;
|
|
@@ -3208,13 +3292,13 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
|
3208
3292
|
};
|
|
3209
3293
|
});
|
|
3210
3294
|
};
|
|
3211
|
-
var hc49_def =
|
|
3212
|
-
fn:
|
|
3213
|
-
p:
|
|
3214
|
-
id:
|
|
3215
|
-
od:
|
|
3216
|
-
w:
|
|
3217
|
-
h:
|
|
3295
|
+
var hc49_def = z21.object({
|
|
3296
|
+
fn: z21.string(),
|
|
3297
|
+
p: length14.optional().default("4.88mm"),
|
|
3298
|
+
id: length14.optional().default("0.8mm"),
|
|
3299
|
+
od: length14.optional().default("1.5mm"),
|
|
3300
|
+
w: length14.optional().default("5.6mm"),
|
|
3301
|
+
h: length14.optional().default("3.5mm")
|
|
3218
3302
|
});
|
|
3219
3303
|
var hc49 = (raw_params) => {
|
|
3220
3304
|
const parameters = hc49_def.parse(raw_params);
|
|
@@ -3254,12 +3338,12 @@ var hc49 = (raw_params) => {
|
|
|
3254
3338
|
};
|
|
3255
3339
|
|
|
3256
3340
|
// src/fn/pad.ts
|
|
3257
|
-
import { z as
|
|
3258
|
-
import { length as
|
|
3341
|
+
import { z as z22 } from "zod";
|
|
3342
|
+
import { length as length15 } from "circuit-json";
|
|
3259
3343
|
import { mm as mm5 } from "@tscircuit/mm";
|
|
3260
|
-
var pad_def =
|
|
3261
|
-
w:
|
|
3262
|
-
h:
|
|
3344
|
+
var pad_def = z22.object({
|
|
3345
|
+
w: length15,
|
|
3346
|
+
h: length15
|
|
3263
3347
|
});
|
|
3264
3348
|
var pad = (params) => {
|
|
3265
3349
|
const { w, h } = params;
|
|
@@ -3275,17 +3359,17 @@ var pad = (params) => {
|
|
|
3275
3359
|
};
|
|
3276
3360
|
|
|
3277
3361
|
// 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:
|
|
3362
|
+
import { z as z23 } from "zod";
|
|
3363
|
+
var to92_def = z23.object({
|
|
3364
|
+
fn: z23.string(),
|
|
3365
|
+
num_pins: z23.union([z23.literal(3), z23.literal(2)]).default(3),
|
|
3366
|
+
p: z23.string().default("1.27mm"),
|
|
3367
|
+
id: z23.string().default("0.72mm"),
|
|
3368
|
+
od: z23.string().default("0.95mm"),
|
|
3369
|
+
w: z23.string().default("4.5mm"),
|
|
3370
|
+
h: z23.string().default("4.5mm"),
|
|
3371
|
+
inline: z23.boolean().default(false),
|
|
3372
|
+
string: z23.string().optional()
|
|
3289
3373
|
});
|
|
3290
3374
|
var generateSemicircle = (centerX, centerY, radius) => {
|
|
3291
3375
|
return Array.from({ length: 25 }, (_, i) => {
|
|
@@ -3358,22 +3442,22 @@ var to92 = (raw_params) => {
|
|
|
3358
3442
|
};
|
|
3359
3443
|
|
|
3360
3444
|
// 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:
|
|
3445
|
+
import { z as z24 } from "zod";
|
|
3446
|
+
import { length as length16 } from "circuit-json";
|
|
3447
|
+
var sod_def2 = z24.object({
|
|
3448
|
+
fn: z24.string(),
|
|
3449
|
+
num_pins: z24.literal(2).default(2),
|
|
3450
|
+
w: z24.string().default("2.15mm"),
|
|
3451
|
+
h: z24.string().default("1.20mm"),
|
|
3452
|
+
pl: z24.string().default("0.5mm"),
|
|
3453
|
+
pw: z24.string().default("0.6mm"),
|
|
3454
|
+
p: z24.string().default("1.4mm")
|
|
3371
3455
|
});
|
|
3372
3456
|
var sod523 = (raw_params) => {
|
|
3373
3457
|
const parameters = sod_def2.parse(raw_params);
|
|
3374
3458
|
const silkscreenRefText = silkscreenRef(
|
|
3375
3459
|
0,
|
|
3376
|
-
|
|
3460
|
+
length16.parse(parameters.h),
|
|
3377
3461
|
0.3
|
|
3378
3462
|
);
|
|
3379
3463
|
const silkscreenLine = {
|
|
@@ -3382,20 +3466,20 @@ var sod523 = (raw_params) => {
|
|
|
3382
3466
|
pcb_component_id: "",
|
|
3383
3467
|
route: [
|
|
3384
3468
|
{
|
|
3385
|
-
x:
|
|
3386
|
-
y:
|
|
3469
|
+
x: length16.parse(parameters.p) / 2,
|
|
3470
|
+
y: length16.parse(parameters.h) / 2
|
|
3387
3471
|
},
|
|
3388
3472
|
{
|
|
3389
|
-
x: -
|
|
3390
|
-
y:
|
|
3473
|
+
x: -length16.parse(parameters.w) / 2 - 0.2,
|
|
3474
|
+
y: length16.parse(parameters.h) / 2
|
|
3391
3475
|
},
|
|
3392
3476
|
{
|
|
3393
|
-
x: -
|
|
3394
|
-
y: -
|
|
3477
|
+
x: -length16.parse(parameters.w) / 2 - 0.2,
|
|
3478
|
+
y: -length16.parse(parameters.h) / 2
|
|
3395
3479
|
},
|
|
3396
3480
|
{
|
|
3397
|
-
x:
|
|
3398
|
-
y: -
|
|
3481
|
+
x: length16.parse(parameters.p) / 2,
|
|
3482
|
+
y: -length16.parse(parameters.h) / 2
|
|
3399
3483
|
}
|
|
3400
3484
|
],
|
|
3401
3485
|
stroke_width: 0.1,
|
|
@@ -3483,22 +3567,22 @@ var sop8 = (raw_params) => {
|
|
|
3483
3567
|
};
|
|
3484
3568
|
|
|
3485
3569
|
// 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:
|
|
3570
|
+
import { z as z25 } from "zod";
|
|
3571
|
+
import { length as length17 } from "circuit-json";
|
|
3572
|
+
var sod80_def = z25.object({
|
|
3573
|
+
fn: z25.string(),
|
|
3574
|
+
num_pins: z25.literal(2).default(2),
|
|
3575
|
+
w: z25.string().default("5.0mm"),
|
|
3576
|
+
h: z25.string().default("2.30mm"),
|
|
3577
|
+
pl: z25.string().default("1.25mm"),
|
|
3578
|
+
pw: z25.string().default("2mm"),
|
|
3579
|
+
p: z25.string().default("3.75mm")
|
|
3496
3580
|
});
|
|
3497
3581
|
var sod80 = (raw_params) => {
|
|
3498
3582
|
const parameters = sod80_def.parse(raw_params);
|
|
3499
3583
|
const silkscreenRefText = silkscreenRef(
|
|
3500
3584
|
0,
|
|
3501
|
-
|
|
3585
|
+
length17.parse(parameters.h) / 2 + 1,
|
|
3502
3586
|
0.3
|
|
3503
3587
|
);
|
|
3504
3588
|
const silkscreenLine = {
|
|
@@ -3507,20 +3591,20 @@ var sod80 = (raw_params) => {
|
|
|
3507
3591
|
pcb_component_id: "",
|
|
3508
3592
|
route: [
|
|
3509
3593
|
{
|
|
3510
|
-
x:
|
|
3511
|
-
y:
|
|
3594
|
+
x: length17.parse(parameters.p) / 2 + 0.5,
|
|
3595
|
+
y: length17.parse(parameters.h) / 2 + 0.5
|
|
3512
3596
|
},
|
|
3513
3597
|
{
|
|
3514
|
-
x: -
|
|
3515
|
-
y:
|
|
3598
|
+
x: -length17.parse(parameters.w) / 2 - 0.5,
|
|
3599
|
+
y: length17.parse(parameters.h) / 2 + 0.5
|
|
3516
3600
|
},
|
|
3517
3601
|
{
|
|
3518
|
-
x: -
|
|
3519
|
-
y: -
|
|
3602
|
+
x: -length17.parse(parameters.w) / 2 - 0.5,
|
|
3603
|
+
y: -length17.parse(parameters.h) / 2 - 0.5
|
|
3520
3604
|
},
|
|
3521
3605
|
{
|
|
3522
|
-
x:
|
|
3523
|
-
y: -
|
|
3606
|
+
x: length17.parse(parameters.p) / 2 + 0.5,
|
|
3607
|
+
y: -length17.parse(parameters.h) / 2 - 0.5
|
|
3524
3608
|
}
|
|
3525
3609
|
],
|
|
3526
3610
|
stroke_width: 0.1,
|
|
@@ -3559,22 +3643,22 @@ var sod80WithoutParsing = (parameters) => {
|
|
|
3559
3643
|
};
|
|
3560
3644
|
|
|
3561
3645
|
// 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:
|
|
3646
|
+
import { z as z26 } from "zod";
|
|
3647
|
+
import { length as length18 } from "circuit-json";
|
|
3648
|
+
var sod_def3 = z26.object({
|
|
3649
|
+
fn: z26.string(),
|
|
3650
|
+
num_pins: z26.literal(2).default(2),
|
|
3651
|
+
w: z26.string().default("4.4mm"),
|
|
3652
|
+
h: z26.string().default("2.1mm"),
|
|
3653
|
+
pl: z26.string().default("1.2mm"),
|
|
3654
|
+
pw: z26.string().default("1.2mm"),
|
|
3655
|
+
p: z26.string().default("2.9mm")
|
|
3572
3656
|
});
|
|
3573
3657
|
var sod123w = (raw_params) => {
|
|
3574
3658
|
const parameters = sod_def3.parse(raw_params);
|
|
3575
3659
|
const silkscreenRefText = silkscreenRef(
|
|
3576
3660
|
0,
|
|
3577
|
-
|
|
3661
|
+
length18.parse(parameters.h) - 0.5,
|
|
3578
3662
|
0.3
|
|
3579
3663
|
);
|
|
3580
3664
|
const silkscreenLine = {
|
|
@@ -3583,20 +3667,20 @@ var sod123w = (raw_params) => {
|
|
|
3583
3667
|
pcb_component_id: "",
|
|
3584
3668
|
route: [
|
|
3585
3669
|
{
|
|
3586
|
-
x:
|
|
3587
|
-
y:
|
|
3670
|
+
x: length18.parse(parameters.p) / 2,
|
|
3671
|
+
y: length18.parse(parameters.h) / 2
|
|
3588
3672
|
},
|
|
3589
3673
|
{
|
|
3590
|
-
x: -
|
|
3591
|
-
y:
|
|
3674
|
+
x: -length18.parse(parameters.w) / 2 - 0.2,
|
|
3675
|
+
y: length18.parse(parameters.h) / 2
|
|
3592
3676
|
},
|
|
3593
3677
|
{
|
|
3594
|
-
x: -
|
|
3595
|
-
y: -
|
|
3678
|
+
x: -length18.parse(parameters.w) / 2 - 0.2,
|
|
3679
|
+
y: -length18.parse(parameters.h) / 2
|
|
3596
3680
|
},
|
|
3597
3681
|
{
|
|
3598
|
-
x:
|
|
3599
|
-
y: -
|
|
3682
|
+
x: length18.parse(parameters.p) / 2,
|
|
3683
|
+
y: -length18.parse(parameters.h) / 2
|
|
3600
3684
|
}
|
|
3601
3685
|
],
|
|
3602
3686
|
stroke_width: 0.1,
|
|
@@ -3638,22 +3722,22 @@ var sodWithoutParsing3 = (parameters) => {
|
|
|
3638
3722
|
};
|
|
3639
3723
|
|
|
3640
3724
|
// 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:
|
|
3725
|
+
import { z as z27 } from "zod";
|
|
3726
|
+
import { length as length19 } from "circuit-json";
|
|
3727
|
+
var sod_def4 = z27.object({
|
|
3728
|
+
fn: z27.string(),
|
|
3729
|
+
num_pins: z27.literal(2).default(2),
|
|
3730
|
+
w: z27.string().default("3.30mm"),
|
|
3731
|
+
h: z27.string().default("1.80mm"),
|
|
3732
|
+
pl: z27.string().default("0.60mm"),
|
|
3733
|
+
pw: z27.string().default("0.45mm"),
|
|
3734
|
+
p: z27.string().default("2.1mm")
|
|
3651
3735
|
});
|
|
3652
3736
|
var sod323 = (raw_params) => {
|
|
3653
3737
|
const parameters = sod_def4.parse(raw_params);
|
|
3654
3738
|
const silkscreenRefText = silkscreenRef(
|
|
3655
3739
|
0,
|
|
3656
|
-
|
|
3740
|
+
length19.parse(parameters.h) - 0.5,
|
|
3657
3741
|
0.3
|
|
3658
3742
|
);
|
|
3659
3743
|
const silkscreenLine = {
|
|
@@ -3662,20 +3746,20 @@ var sod323 = (raw_params) => {
|
|
|
3662
3746
|
pcb_component_id: "",
|
|
3663
3747
|
route: [
|
|
3664
3748
|
{
|
|
3665
|
-
x:
|
|
3666
|
-
y:
|
|
3749
|
+
x: length19.parse(parameters.p) / 2,
|
|
3750
|
+
y: length19.parse(parameters.h) / 2
|
|
3667
3751
|
},
|
|
3668
3752
|
{
|
|
3669
|
-
x: -
|
|
3670
|
-
y:
|
|
3753
|
+
x: -length19.parse(parameters.w) / 2,
|
|
3754
|
+
y: length19.parse(parameters.h) / 2
|
|
3671
3755
|
},
|
|
3672
3756
|
{
|
|
3673
|
-
x: -
|
|
3674
|
-
y: -
|
|
3757
|
+
x: -length19.parse(parameters.w) / 2,
|
|
3758
|
+
y: -length19.parse(parameters.h) / 2
|
|
3675
3759
|
},
|
|
3676
3760
|
{
|
|
3677
|
-
x:
|
|
3678
|
-
y: -
|
|
3761
|
+
x: length19.parse(parameters.p) / 2,
|
|
3762
|
+
y: -length19.parse(parameters.h) / 2
|
|
3679
3763
|
}
|
|
3680
3764
|
],
|
|
3681
3765
|
stroke_width: 0.1,
|
|
@@ -3717,22 +3801,22 @@ var sodWithoutParsing4 = (parameters) => {
|
|
|
3717
3801
|
};
|
|
3718
3802
|
|
|
3719
3803
|
// 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:
|
|
3804
|
+
import { z as z28 } from "zod";
|
|
3805
|
+
import { length as length20 } from "circuit-json";
|
|
3806
|
+
var sod_def5 = z28.object({
|
|
3807
|
+
fn: z28.string(),
|
|
3808
|
+
num_pins: z28.literal(2).default(2),
|
|
3809
|
+
w: z28.string().default("1.4mm"),
|
|
3810
|
+
h: z28.string().default("0.9mm"),
|
|
3811
|
+
pl: z28.string().default("0.36mm"),
|
|
3812
|
+
pw: z28.string().default("0.25mm"),
|
|
3813
|
+
p: z28.string().default("0.85mm")
|
|
3730
3814
|
});
|
|
3731
3815
|
var sod923 = (raw_params) => {
|
|
3732
3816
|
const parameters = sod_def5.parse(raw_params);
|
|
3733
3817
|
const silkscreenRefText = silkscreenRef(
|
|
3734
3818
|
0,
|
|
3735
|
-
|
|
3819
|
+
length20.parse(parameters.h),
|
|
3736
3820
|
0.3
|
|
3737
3821
|
);
|
|
3738
3822
|
const silkscreenLine = {
|
|
@@ -3741,20 +3825,20 @@ var sod923 = (raw_params) => {
|
|
|
3741
3825
|
pcb_component_id: "",
|
|
3742
3826
|
route: [
|
|
3743
3827
|
{
|
|
3744
|
-
x:
|
|
3745
|
-
y:
|
|
3828
|
+
x: length20.parse(parameters.p) / 2 + 0.15,
|
|
3829
|
+
y: length20.parse(parameters.h) / 2
|
|
3746
3830
|
},
|
|
3747
3831
|
{
|
|
3748
|
-
x: -
|
|
3749
|
-
y:
|
|
3832
|
+
x: -length20.parse(parameters.w) / 2 - 0.15,
|
|
3833
|
+
y: length20.parse(parameters.h) / 2
|
|
3750
3834
|
},
|
|
3751
3835
|
{
|
|
3752
|
-
x: -
|
|
3753
|
-
y: -
|
|
3836
|
+
x: -length20.parse(parameters.w) / 2 - 0.15,
|
|
3837
|
+
y: -length20.parse(parameters.h) / 2
|
|
3754
3838
|
},
|
|
3755
3839
|
{
|
|
3756
|
-
x:
|
|
3757
|
-
y: -
|
|
3840
|
+
x: length20.parse(parameters.p) / 2 + 0.15,
|
|
3841
|
+
y: -length20.parse(parameters.h) / 2
|
|
3758
3842
|
}
|
|
3759
3843
|
],
|
|
3760
3844
|
stroke_width: 0.1,
|
|
@@ -3797,22 +3881,22 @@ var sodWithoutParsing5 = (parameters) => {
|
|
|
3797
3881
|
};
|
|
3798
3882
|
|
|
3799
3883
|
// 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:
|
|
3884
|
+
import { z as z29 } from "zod";
|
|
3885
|
+
import { length as length21 } from "circuit-json";
|
|
3886
|
+
var sod_def6 = z29.object({
|
|
3887
|
+
fn: z29.string(),
|
|
3888
|
+
num_pins: z29.literal(2).default(2),
|
|
3889
|
+
w: z29.string().default("1.3mm"),
|
|
3890
|
+
h: z29.string().default("0.9mm"),
|
|
3891
|
+
pl: z29.string().default("0.4mm"),
|
|
3892
|
+
pw: z29.string().default("0.7mm"),
|
|
3893
|
+
p: z29.string().default("0.7mm")
|
|
3810
3894
|
});
|
|
3811
3895
|
var sod882 = (raw_params) => {
|
|
3812
3896
|
const parameters = sod_def6.parse(raw_params);
|
|
3813
3897
|
const silkscreenRefText = silkscreenRef(
|
|
3814
3898
|
0,
|
|
3815
|
-
|
|
3899
|
+
length21.parse(parameters.h) + 0.1,
|
|
3816
3900
|
0.3
|
|
3817
3901
|
);
|
|
3818
3902
|
const silkscreenLine = {
|
|
@@ -3821,20 +3905,20 @@ var sod882 = (raw_params) => {
|
|
|
3821
3905
|
pcb_component_id: "",
|
|
3822
3906
|
route: [
|
|
3823
3907
|
{
|
|
3824
|
-
x:
|
|
3825
|
-
y:
|
|
3908
|
+
x: length21.parse(parameters.p) / 2 + 0.2,
|
|
3909
|
+
y: length21.parse(parameters.h) / 2 + 0.2
|
|
3826
3910
|
},
|
|
3827
3911
|
{
|
|
3828
|
-
x: -
|
|
3829
|
-
y:
|
|
3912
|
+
x: -length21.parse(parameters.w) / 2 - 0.2,
|
|
3913
|
+
y: length21.parse(parameters.h) / 2 + 0.2
|
|
3830
3914
|
},
|
|
3831
3915
|
{
|
|
3832
|
-
x: -
|
|
3833
|
-
y: -
|
|
3916
|
+
x: -length21.parse(parameters.w) / 2 - 0.2,
|
|
3917
|
+
y: -length21.parse(parameters.h) / 2 - 0.2
|
|
3834
3918
|
},
|
|
3835
3919
|
{
|
|
3836
|
-
x:
|
|
3837
|
-
y: -
|
|
3920
|
+
x: length21.parse(parameters.p) / 2 + 0.2,
|
|
3921
|
+
y: -length21.parse(parameters.h) / 2 - 0.2
|
|
3838
3922
|
}
|
|
3839
3923
|
],
|
|
3840
3924
|
stroke_width: 0.1,
|
|
@@ -3877,22 +3961,22 @@ var sodWithoutParsing6 = (parameters) => {
|
|
|
3877
3961
|
};
|
|
3878
3962
|
|
|
3879
3963
|
// 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:
|
|
3964
|
+
import { z as z30 } from "zod";
|
|
3965
|
+
import { length as length22 } from "circuit-json";
|
|
3966
|
+
var sod_def7 = z30.object({
|
|
3967
|
+
fn: z30.string(),
|
|
3968
|
+
num_pins: z30.literal(2).default(2),
|
|
3969
|
+
w: z30.string().default("3,05mm"),
|
|
3970
|
+
h: z30.string().default("1.65mm"),
|
|
3971
|
+
pl: z30.string().default("0.6mm"),
|
|
3972
|
+
pw: z30.string().default("0.6mm"),
|
|
3973
|
+
pad_spacing: z30.string().default("2.2mm")
|
|
3890
3974
|
});
|
|
3891
3975
|
var sod323f = (raw_params) => {
|
|
3892
3976
|
const parameters = sod_def7.parse(raw_params);
|
|
3893
3977
|
const silkscreenRefText = silkscreenRef(
|
|
3894
3978
|
0,
|
|
3895
|
-
|
|
3979
|
+
length22.parse(parameters.h),
|
|
3896
3980
|
0.3
|
|
3897
3981
|
);
|
|
3898
3982
|
const silkscreenLine = {
|
|
@@ -3901,20 +3985,20 @@ var sod323f = (raw_params) => {
|
|
|
3901
3985
|
pcb_component_id: "",
|
|
3902
3986
|
route: [
|
|
3903
3987
|
{
|
|
3904
|
-
x:
|
|
3905
|
-
y:
|
|
3988
|
+
x: length22.parse(parameters.pad_spacing) / 2,
|
|
3989
|
+
y: length22.parse(parameters.h) / 2
|
|
3906
3990
|
},
|
|
3907
3991
|
{
|
|
3908
|
-
x: -
|
|
3909
|
-
y:
|
|
3992
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3993
|
+
y: length22.parse(parameters.h) / 2
|
|
3910
3994
|
},
|
|
3911
3995
|
{
|
|
3912
|
-
x: -
|
|
3913
|
-
y: -
|
|
3996
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3997
|
+
y: -length22.parse(parameters.h) / 2
|
|
3914
3998
|
},
|
|
3915
3999
|
{
|
|
3916
|
-
x:
|
|
3917
|
-
y: -
|
|
4000
|
+
x: length22.parse(parameters.pad_spacing) / 2,
|
|
4001
|
+
y: -length22.parse(parameters.h) / 2
|
|
3918
4002
|
}
|
|
3919
4003
|
],
|
|
3920
4004
|
stroke_width: 0.1,
|
|
@@ -3957,22 +4041,22 @@ var sodWithoutParsing7 = (parameters) => {
|
|
|
3957
4041
|
};
|
|
3958
4042
|
|
|
3959
4043
|
// 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:
|
|
4044
|
+
import { z as z31 } from "zod";
|
|
4045
|
+
import { length as length23 } from "circuit-json";
|
|
4046
|
+
var sod_def8 = z31.object({
|
|
4047
|
+
fn: z31.string(),
|
|
4048
|
+
num_pins: z31.literal(2).default(2),
|
|
4049
|
+
w: z31.string().default("4.4mm"),
|
|
4050
|
+
h: z31.string().default("2.1mm"),
|
|
4051
|
+
pl: z31.string().default("1.2mm"),
|
|
4052
|
+
pw: z31.string().default("1.2mm"),
|
|
4053
|
+
p: z31.string().default("2.9mm")
|
|
3970
4054
|
});
|
|
3971
4055
|
var sod123f = (raw_params) => {
|
|
3972
4056
|
const parameters = sod_def8.parse(raw_params);
|
|
3973
4057
|
const silkscreenRefText = silkscreenRef(
|
|
3974
4058
|
0,
|
|
3975
|
-
|
|
4059
|
+
length23.parse(parameters.h),
|
|
3976
4060
|
0.3
|
|
3977
4061
|
);
|
|
3978
4062
|
const silkscreenLine = {
|
|
@@ -3981,20 +4065,20 @@ var sod123f = (raw_params) => {
|
|
|
3981
4065
|
pcb_component_id: "",
|
|
3982
4066
|
route: [
|
|
3983
4067
|
{
|
|
3984
|
-
x:
|
|
3985
|
-
y:
|
|
4068
|
+
x: length23.parse(parameters.p) / 2,
|
|
4069
|
+
y: length23.parse(parameters.h) / 2
|
|
3986
4070
|
},
|
|
3987
4071
|
{
|
|
3988
|
-
x: -
|
|
3989
|
-
y:
|
|
4072
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4073
|
+
y: length23.parse(parameters.h) / 2
|
|
3990
4074
|
},
|
|
3991
4075
|
{
|
|
3992
|
-
x: -
|
|
3993
|
-
y: -
|
|
4076
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4077
|
+
y: -length23.parse(parameters.h) / 2
|
|
3994
4078
|
},
|
|
3995
4079
|
{
|
|
3996
|
-
x:
|
|
3997
|
-
y: -
|
|
4080
|
+
x: length23.parse(parameters.p) / 2,
|
|
4081
|
+
y: -length23.parse(parameters.h) / 2
|
|
3998
4082
|
}
|
|
3999
4083
|
],
|
|
4000
4084
|
stroke_width: 0.1,
|
|
@@ -4037,22 +4121,22 @@ var sodWithoutParsing8 = (parameters) => {
|
|
|
4037
4121
|
};
|
|
4038
4122
|
|
|
4039
4123
|
// 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:
|
|
4124
|
+
import { z as z32 } from "zod";
|
|
4125
|
+
import { length as length24 } from "circuit-json";
|
|
4126
|
+
var sod123FL_def = z32.object({
|
|
4127
|
+
fn: z32.string(),
|
|
4128
|
+
num_pins: z32.literal(2).default(2),
|
|
4129
|
+
w: z32.string().default("4.4mm"),
|
|
4130
|
+
h: z32.string().default("2.1mm"),
|
|
4131
|
+
pl: z32.string().default("0.91mm"),
|
|
4132
|
+
pw: z32.string().default("1.22mm"),
|
|
4133
|
+
p: z32.string().default("3.146mm")
|
|
4050
4134
|
});
|
|
4051
4135
|
var sod123fl = (raw_params) => {
|
|
4052
4136
|
const parameters = sod123FL_def.parse(raw_params);
|
|
4053
4137
|
const silkscreenRefText = silkscreenRef(
|
|
4054
4138
|
0,
|
|
4055
|
-
|
|
4139
|
+
length24.parse(parameters.h),
|
|
4056
4140
|
0.3
|
|
4057
4141
|
);
|
|
4058
4142
|
const silkscreenLine = {
|
|
@@ -4061,20 +4145,20 @@ var sod123fl = (raw_params) => {
|
|
|
4061
4145
|
pcb_component_id: "",
|
|
4062
4146
|
route: [
|
|
4063
4147
|
{
|
|
4064
|
-
x:
|
|
4065
|
-
y:
|
|
4148
|
+
x: length24.parse(parameters.p) / 2,
|
|
4149
|
+
y: length24.parse(parameters.h) / 2
|
|
4066
4150
|
},
|
|
4067
4151
|
{
|
|
4068
|
-
x: -
|
|
4069
|
-
y:
|
|
4152
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4153
|
+
y: length24.parse(parameters.h) / 2
|
|
4070
4154
|
},
|
|
4071
4155
|
{
|
|
4072
|
-
x: -
|
|
4073
|
-
y: -
|
|
4156
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4157
|
+
y: -length24.parse(parameters.h) / 2
|
|
4074
4158
|
},
|
|
4075
4159
|
{
|
|
4076
|
-
x:
|
|
4077
|
-
y: -
|
|
4160
|
+
x: length24.parse(parameters.p) / 2,
|
|
4161
|
+
y: -length24.parse(parameters.h) / 2
|
|
4078
4162
|
}
|
|
4079
4163
|
],
|
|
4080
4164
|
stroke_width: 0.1,
|
|
@@ -4117,22 +4201,22 @@ var sodWithoutParsing9 = (parameters) => {
|
|
|
4117
4201
|
};
|
|
4118
4202
|
|
|
4119
4203
|
// 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:
|
|
4204
|
+
import { z as z33 } from "zod";
|
|
4205
|
+
import { length as length25 } from "circuit-json";
|
|
4206
|
+
var sod_def9 = z33.object({
|
|
4207
|
+
fn: z33.string(),
|
|
4208
|
+
num_pins: z33.literal(2).default(2),
|
|
4209
|
+
w: z33.string().default("1.80mm"),
|
|
4210
|
+
h: z33.string().default("1.00mm"),
|
|
4211
|
+
pl: z33.string().default("0.66mm"),
|
|
4212
|
+
pw: z33.string().default("0.5mm"),
|
|
4213
|
+
p: z33.string().default("0.8mm")
|
|
4130
4214
|
});
|
|
4131
4215
|
var sod723 = (raw_params) => {
|
|
4132
4216
|
const parameters = sod_def9.parse(raw_params);
|
|
4133
4217
|
const silkscreenRefText = silkscreenRef(
|
|
4134
4218
|
0,
|
|
4135
|
-
|
|
4219
|
+
length25.parse(parameters.h),
|
|
4136
4220
|
0.3
|
|
4137
4221
|
);
|
|
4138
4222
|
const silkscreenLine = {
|
|
@@ -4141,20 +4225,20 @@ var sod723 = (raw_params) => {
|
|
|
4141
4225
|
pcb_component_id: "",
|
|
4142
4226
|
route: [
|
|
4143
4227
|
{
|
|
4144
|
-
x:
|
|
4145
|
-
y:
|
|
4228
|
+
x: length25.parse(parameters.p) / 2,
|
|
4229
|
+
y: length25.parse(parameters.h) / 2
|
|
4146
4230
|
},
|
|
4147
4231
|
{
|
|
4148
|
-
x: -
|
|
4149
|
-
y:
|
|
4232
|
+
x: -length25.parse(parameters.w) / 2 - 0.1,
|
|
4233
|
+
y: length25.parse(parameters.h) / 2
|
|
4150
4234
|
},
|
|
4151
4235
|
{
|
|
4152
|
-
x: -
|
|
4153
|
-
y: -
|
|
4236
|
+
x: -length25.parse(parameters.w) / 2 - 0.1,
|
|
4237
|
+
y: -length25.parse(parameters.h) / 2
|
|
4154
4238
|
},
|
|
4155
4239
|
{
|
|
4156
|
-
x:
|
|
4157
|
-
y: -
|
|
4240
|
+
x: length25.parse(parameters.p) / 2,
|
|
4241
|
+
y: -length25.parse(parameters.h) / 2
|
|
4158
4242
|
}
|
|
4159
4243
|
],
|
|
4160
4244
|
stroke_width: 0.1,
|
|
@@ -4197,22 +4281,22 @@ var sodWithoutParsing10 = (parameters) => {
|
|
|
4197
4281
|
};
|
|
4198
4282
|
|
|
4199
4283
|
// 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:
|
|
4284
|
+
import { z as z34 } from "zod";
|
|
4285
|
+
import { length as length26 } from "circuit-json";
|
|
4286
|
+
var sod_def10 = z34.object({
|
|
4287
|
+
fn: z34.string(),
|
|
4288
|
+
num_pins: z34.literal(2).default(2),
|
|
4289
|
+
w: z34.string().default("6.2mm"),
|
|
4290
|
+
h: z34.string().default("3.4mm"),
|
|
4291
|
+
pl: z34.string().default("1.4mm"),
|
|
4292
|
+
pw: z34.string().default("2.1mm"),
|
|
4293
|
+
p: z34.string().default("4.4mm")
|
|
4210
4294
|
});
|
|
4211
4295
|
var sod128 = (raw_params) => {
|
|
4212
4296
|
const parameters = sod_def10.parse(raw_params);
|
|
4213
4297
|
const silkscreenRefText = silkscreenRef(
|
|
4214
4298
|
0,
|
|
4215
|
-
|
|
4299
|
+
length26.parse(parameters.h) / 2 + 0.4,
|
|
4216
4300
|
0.3
|
|
4217
4301
|
);
|
|
4218
4302
|
const silkscreenLine = {
|
|
@@ -4221,20 +4305,20 @@ var sod128 = (raw_params) => {
|
|
|
4221
4305
|
pcb_component_id: "",
|
|
4222
4306
|
route: [
|
|
4223
4307
|
{
|
|
4224
|
-
x:
|
|
4225
|
-
y:
|
|
4308
|
+
x: length26.parse(parameters.p) / 2,
|
|
4309
|
+
y: length26.parse(parameters.h) / 2
|
|
4226
4310
|
},
|
|
4227
4311
|
{
|
|
4228
|
-
x: -
|
|
4229
|
-
y:
|
|
4312
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4313
|
+
y: length26.parse(parameters.h) / 2
|
|
4230
4314
|
},
|
|
4231
4315
|
{
|
|
4232
|
-
x: -
|
|
4233
|
-
y: -
|
|
4316
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4317
|
+
y: -length26.parse(parameters.h) / 2
|
|
4234
4318
|
},
|
|
4235
4319
|
{
|
|
4236
|
-
x:
|
|
4237
|
-
y: -
|
|
4320
|
+
x: length26.parse(parameters.p) / 2,
|
|
4321
|
+
y: -length26.parse(parameters.h) / 2
|
|
4238
4322
|
}
|
|
4239
4323
|
],
|
|
4240
4324
|
stroke_width: 0.1,
|
|
@@ -4277,29 +4361,29 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
4277
4361
|
};
|
|
4278
4362
|
|
|
4279
4363
|
// 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:
|
|
4364
|
+
import { z as z35 } from "zod";
|
|
4365
|
+
var sot89_def = z35.object({
|
|
4366
|
+
fn: z35.string(),
|
|
4367
|
+
num_pins: z35.union([z35.literal(3), z35.literal(5)]).default(3),
|
|
4368
|
+
w: z35.string().default("4.20mm"),
|
|
4369
|
+
h: z35.string().default("4.80mm"),
|
|
4370
|
+
pl: z35.string().default("1.3mm"),
|
|
4371
|
+
pw: z35.string().default("0.9mm"),
|
|
4372
|
+
p: z35.string().default("1.5mm"),
|
|
4373
|
+
string: z35.string().optional()
|
|
4290
4374
|
});
|
|
4291
4375
|
var sot89_3 = (parameters) => {
|
|
4292
4376
|
const pads = [];
|
|
4293
4377
|
const padGap = Number.parseFloat(parameters.p);
|
|
4294
4378
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4295
|
-
const
|
|
4379
|
+
const length49 = Number.parseFloat(parameters.w);
|
|
4296
4380
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
4297
4381
|
const centerExtra = 0.175;
|
|
4298
4382
|
const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
|
|
4299
4383
|
pads.push(
|
|
4300
|
-
rectpad(1, -
|
|
4301
|
-
rectpad(2, -
|
|
4302
|
-
rectpad(3, -
|
|
4384
|
+
rectpad(1, -length49 / 2 + outerPadXShift, padGap, padHeight, padWidth),
|
|
4385
|
+
rectpad(2, -length49 / 2, 0, padHeight + centerExtra, padWidth),
|
|
4386
|
+
rectpad(3, -length49 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
|
|
4303
4387
|
);
|
|
4304
4388
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
4305
4389
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -4339,7 +4423,7 @@ var sot89_5 = (parameters) => {
|
|
|
4339
4423
|
const pads = [];
|
|
4340
4424
|
const padGap = Number.parseFloat(parameters.p);
|
|
4341
4425
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4342
|
-
const
|
|
4426
|
+
const length49 = Number.parseFloat(parameters.w);
|
|
4343
4427
|
pads.push(
|
|
4344
4428
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
4345
4429
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -4407,18 +4491,18 @@ var sot89 = (raw_params) => {
|
|
|
4407
4491
|
|
|
4408
4492
|
// src/fn/to220.ts
|
|
4409
4493
|
import {
|
|
4410
|
-
length as
|
|
4494
|
+
length as length27
|
|
4411
4495
|
} 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:
|
|
4496
|
+
import { z as z36 } from "zod";
|
|
4497
|
+
var to220_def = z36.object({
|
|
4498
|
+
fn: z36.string(),
|
|
4499
|
+
p: length27.optional().default("5.0mm"),
|
|
4500
|
+
id: length27.optional().default("1.0mm"),
|
|
4501
|
+
od: length27.optional().default("1.9mm"),
|
|
4502
|
+
w: length27.optional().default("13mm"),
|
|
4503
|
+
h: length27.optional().default("7mm"),
|
|
4504
|
+
num_pins: z36.number().optional(),
|
|
4505
|
+
string: z36.string().optional()
|
|
4422
4506
|
});
|
|
4423
4507
|
var to220 = (raw_params) => {
|
|
4424
4508
|
const parameters = to220_def.parse(raw_params);
|
|
@@ -4498,22 +4582,22 @@ var to220 = (raw_params) => {
|
|
|
4498
4582
|
};
|
|
4499
4583
|
|
|
4500
4584
|
// 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:
|
|
4585
|
+
import { z as z37 } from "zod";
|
|
4586
|
+
import { length as length28 } from "circuit-json";
|
|
4587
|
+
var minimelf_def = z37.object({
|
|
4588
|
+
fn: z37.string(),
|
|
4589
|
+
num_pins: z37.literal(2).default(2),
|
|
4590
|
+
w: z37.string().default("5.40mm"),
|
|
4591
|
+
h: z37.string().default("2.30mm"),
|
|
4592
|
+
pl: z37.string().default("1.30mm"),
|
|
4593
|
+
pw: z37.string().default("1.70mm"),
|
|
4594
|
+
p: z37.string().default("3.5mm")
|
|
4511
4595
|
});
|
|
4512
4596
|
var minimelf = (raw_params) => {
|
|
4513
4597
|
const parameters = minimelf_def.parse(raw_params);
|
|
4514
4598
|
const silkscreenRefText = silkscreenRef(
|
|
4515
4599
|
0,
|
|
4516
|
-
|
|
4600
|
+
length28.parse(parameters.h) / 2 + 0.4,
|
|
4517
4601
|
0.3
|
|
4518
4602
|
);
|
|
4519
4603
|
const silkscreenLine = {
|
|
@@ -4522,20 +4606,20 @@ var minimelf = (raw_params) => {
|
|
|
4522
4606
|
pcb_component_id: "",
|
|
4523
4607
|
route: [
|
|
4524
4608
|
{
|
|
4525
|
-
x:
|
|
4526
|
-
y:
|
|
4609
|
+
x: length28.parse(parameters.p) / 2,
|
|
4610
|
+
y: length28.parse(parameters.h) / 2
|
|
4527
4611
|
},
|
|
4528
4612
|
{
|
|
4529
|
-
x: -
|
|
4530
|
-
y:
|
|
4613
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4614
|
+
y: length28.parse(parameters.h) / 2
|
|
4531
4615
|
},
|
|
4532
4616
|
{
|
|
4533
|
-
x: -
|
|
4534
|
-
y: -
|
|
4617
|
+
x: -length28.parse(parameters.w) / 2,
|
|
4618
|
+
y: -length28.parse(parameters.h) / 2
|
|
4535
4619
|
},
|
|
4536
4620
|
{
|
|
4537
|
-
x:
|
|
4538
|
-
y: -
|
|
4621
|
+
x: length28.parse(parameters.p) / 2,
|
|
4622
|
+
y: -length28.parse(parameters.h) / 2
|
|
4539
4623
|
}
|
|
4540
4624
|
],
|
|
4541
4625
|
stroke_width: 0.1,
|
|
@@ -4574,22 +4658,22 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
4574
4658
|
};
|
|
4575
4659
|
|
|
4576
4660
|
// 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:
|
|
4661
|
+
import { z as z38 } from "zod";
|
|
4662
|
+
import { length as length29 } from "circuit-json";
|
|
4663
|
+
var sod_def11 = z38.object({
|
|
4664
|
+
fn: z38.string(),
|
|
4665
|
+
num_pins: z38.literal(2).default(2),
|
|
4666
|
+
w: z38.string().default("1.90mm"),
|
|
4667
|
+
h: z38.string().default("1.33mm"),
|
|
4668
|
+
pl: z38.string().default("0.5mm"),
|
|
4669
|
+
pw: z38.string().default("0.7mm"),
|
|
4670
|
+
p: z38.string().default("0.8mm")
|
|
4587
4671
|
});
|
|
4588
4672
|
var sod882d = (raw_params) => {
|
|
4589
4673
|
const parameters = sod_def11.parse(raw_params);
|
|
4590
4674
|
const silkscreenRefText = silkscreenRef(
|
|
4591
4675
|
0,
|
|
4592
|
-
|
|
4676
|
+
length29.parse(parameters.h) + 0.1,
|
|
4593
4677
|
0.3
|
|
4594
4678
|
);
|
|
4595
4679
|
const silkscreenLine = {
|
|
@@ -4598,20 +4682,20 @@ var sod882d = (raw_params) => {
|
|
|
4598
4682
|
pcb_component_id: "",
|
|
4599
4683
|
route: [
|
|
4600
4684
|
{
|
|
4601
|
-
x:
|
|
4602
|
-
y:
|
|
4685
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4686
|
+
y: length29.parse(parameters.h) / 2
|
|
4603
4687
|
},
|
|
4604
4688
|
{
|
|
4605
|
-
x: -
|
|
4606
|
-
y:
|
|
4689
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4690
|
+
y: length29.parse(parameters.h) / 2
|
|
4607
4691
|
},
|
|
4608
4692
|
{
|
|
4609
|
-
x: -
|
|
4610
|
-
y: -
|
|
4693
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4694
|
+
y: -length29.parse(parameters.h) / 2
|
|
4611
4695
|
},
|
|
4612
4696
|
{
|
|
4613
|
-
x:
|
|
4614
|
-
y: -
|
|
4697
|
+
x: length29.parse(parameters.p) / 2 + 0.1,
|
|
4698
|
+
y: -length29.parse(parameters.h) / 2
|
|
4615
4699
|
}
|
|
4616
4700
|
],
|
|
4617
4701
|
stroke_width: 0.1,
|
|
@@ -4654,22 +4738,22 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
4654
4738
|
};
|
|
4655
4739
|
|
|
4656
4740
|
// 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:
|
|
4741
|
+
import { z as z39 } from "zod";
|
|
4742
|
+
import { length as length30 } from "circuit-json";
|
|
4743
|
+
var melf_def = z39.object({
|
|
4744
|
+
fn: z39.string(),
|
|
4745
|
+
num_pins: z39.literal(2).default(2),
|
|
4746
|
+
w: z39.string().default("7.0mm"),
|
|
4747
|
+
h: z39.string().default("3.35mm"),
|
|
4748
|
+
pl: z39.string().default("1.50mm"),
|
|
4749
|
+
pw: z39.string().default("2.70mm"),
|
|
4750
|
+
p: z39.string().default("4.8mm")
|
|
4667
4751
|
});
|
|
4668
4752
|
var melf = (raw_params) => {
|
|
4669
4753
|
const parameters = melf_def.parse(raw_params);
|
|
4670
4754
|
const silkscreenRefText = silkscreenRef(
|
|
4671
4755
|
0,
|
|
4672
|
-
|
|
4756
|
+
length30.parse(parameters.h),
|
|
4673
4757
|
0.3
|
|
4674
4758
|
);
|
|
4675
4759
|
const silkscreenLine = {
|
|
@@ -4678,20 +4762,20 @@ var melf = (raw_params) => {
|
|
|
4678
4762
|
pcb_component_id: "",
|
|
4679
4763
|
route: [
|
|
4680
4764
|
{
|
|
4681
|
-
x:
|
|
4682
|
-
y:
|
|
4765
|
+
x: length30.parse(parameters.p) / 2,
|
|
4766
|
+
y: length30.parse(parameters.h) / 2
|
|
4683
4767
|
},
|
|
4684
4768
|
{
|
|
4685
|
-
x: -
|
|
4686
|
-
y:
|
|
4769
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4770
|
+
y: length30.parse(parameters.h) / 2
|
|
4687
4771
|
},
|
|
4688
4772
|
{
|
|
4689
|
-
x: -
|
|
4690
|
-
y: -
|
|
4773
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4774
|
+
y: -length30.parse(parameters.h) / 2
|
|
4691
4775
|
},
|
|
4692
4776
|
{
|
|
4693
|
-
x:
|
|
4694
|
-
y: -
|
|
4777
|
+
x: length30.parse(parameters.p) / 2,
|
|
4778
|
+
y: -length30.parse(parameters.h) / 2
|
|
4695
4779
|
}
|
|
4696
4780
|
],
|
|
4697
4781
|
stroke_width: 0.1,
|
|
@@ -4734,22 +4818,22 @@ var melfWithoutParsing = (parameters) => {
|
|
|
4734
4818
|
};
|
|
4735
4819
|
|
|
4736
4820
|
// 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:
|
|
4821
|
+
import { z as z40 } from "zod";
|
|
4822
|
+
import { length as length31 } from "circuit-json";
|
|
4823
|
+
var micromelf_def = z40.object({
|
|
4824
|
+
fn: z40.string(),
|
|
4825
|
+
num_pins: z40.literal(2).default(2),
|
|
4826
|
+
w: z40.string().default("3.0mm"),
|
|
4827
|
+
h: z40.string().default("1.80mm"),
|
|
4828
|
+
pl: z40.string().default("0.80mm"),
|
|
4829
|
+
pw: z40.string().default("1.20mm"),
|
|
4830
|
+
p: z40.string().default("1.6mm")
|
|
4747
4831
|
});
|
|
4748
4832
|
var micromelf = (raw_params) => {
|
|
4749
4833
|
const parameters = micromelf_def.parse(raw_params);
|
|
4750
4834
|
const silkscreenRefText = silkscreenRef(
|
|
4751
4835
|
0,
|
|
4752
|
-
|
|
4836
|
+
length31.parse(parameters.h),
|
|
4753
4837
|
0.3
|
|
4754
4838
|
);
|
|
4755
4839
|
const silkscreenLine = {
|
|
@@ -4758,20 +4842,20 @@ var micromelf = (raw_params) => {
|
|
|
4758
4842
|
pcb_component_id: "",
|
|
4759
4843
|
route: [
|
|
4760
4844
|
{
|
|
4761
|
-
x:
|
|
4762
|
-
y:
|
|
4845
|
+
x: length31.parse(parameters.p) / 2,
|
|
4846
|
+
y: length31.parse(parameters.h) / 2
|
|
4763
4847
|
},
|
|
4764
4848
|
{
|
|
4765
|
-
x: -
|
|
4766
|
-
y:
|
|
4849
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4850
|
+
y: length31.parse(parameters.h) / 2
|
|
4767
4851
|
},
|
|
4768
4852
|
{
|
|
4769
|
-
x: -
|
|
4770
|
-
y: -
|
|
4853
|
+
x: -length31.parse(parameters.w) / 2 - 0.1,
|
|
4854
|
+
y: -length31.parse(parameters.h) / 2
|
|
4771
4855
|
},
|
|
4772
4856
|
{
|
|
4773
|
-
x:
|
|
4774
|
-
y: -
|
|
4857
|
+
x: length31.parse(parameters.p) / 2,
|
|
4858
|
+
y: -length31.parse(parameters.h) / 2
|
|
4775
4859
|
}
|
|
4776
4860
|
],
|
|
4777
4861
|
stroke_width: 0.1,
|
|
@@ -4814,22 +4898,22 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
4814
4898
|
};
|
|
4815
4899
|
|
|
4816
4900
|
// 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:
|
|
4901
|
+
import { z as z41 } from "zod";
|
|
4902
|
+
import { length as length32 } from "circuit-json";
|
|
4903
|
+
var sma_def = z41.object({
|
|
4904
|
+
fn: z41.string(),
|
|
4905
|
+
num_pins: z41.literal(2).default(2),
|
|
4906
|
+
w: z41.string().default("7.10mm"),
|
|
4907
|
+
h: z41.string().default("3.40mm"),
|
|
4908
|
+
pl: z41.string().default("2.45mm"),
|
|
4909
|
+
pw: z41.string().default("1.80mm"),
|
|
4910
|
+
p: z41.string().default("4.05mm")
|
|
4827
4911
|
});
|
|
4828
4912
|
var sma = (raw_params) => {
|
|
4829
4913
|
const parameters = sma_def.parse(raw_params);
|
|
4830
4914
|
const silkscreenRefText = silkscreenRef(
|
|
4831
4915
|
0,
|
|
4832
|
-
|
|
4916
|
+
length32.parse(parameters.h) / 2 + 0.5,
|
|
4833
4917
|
0.3
|
|
4834
4918
|
);
|
|
4835
4919
|
const silkscreenLine = {
|
|
@@ -4838,20 +4922,20 @@ var sma = (raw_params) => {
|
|
|
4838
4922
|
pcb_component_id: "",
|
|
4839
4923
|
route: [
|
|
4840
4924
|
{
|
|
4841
|
-
x:
|
|
4842
|
-
y:
|
|
4925
|
+
x: length32.parse(parameters.p) / 2,
|
|
4926
|
+
y: length32.parse(parameters.h) / 2
|
|
4843
4927
|
},
|
|
4844
4928
|
{
|
|
4845
|
-
x: -
|
|
4846
|
-
y:
|
|
4929
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4930
|
+
y: length32.parse(parameters.h) / 2
|
|
4847
4931
|
},
|
|
4848
4932
|
{
|
|
4849
|
-
x: -
|
|
4850
|
-
y: -
|
|
4933
|
+
x: -length32.parse(parameters.w) / 2 - 0.5,
|
|
4934
|
+
y: -length32.parse(parameters.h) / 2
|
|
4851
4935
|
},
|
|
4852
4936
|
{
|
|
4853
|
-
x:
|
|
4854
|
-
y: -
|
|
4937
|
+
x: length32.parse(parameters.p) / 2,
|
|
4938
|
+
y: -length32.parse(parameters.h) / 2
|
|
4855
4939
|
}
|
|
4856
4940
|
],
|
|
4857
4941
|
stroke_width: 0.1,
|
|
@@ -4893,22 +4977,22 @@ var smaWithoutParsing = (parameters) => {
|
|
|
4893
4977
|
};
|
|
4894
4978
|
|
|
4895
4979
|
// 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:
|
|
4980
|
+
import { z as z42 } from "zod";
|
|
4981
|
+
import { length as length33 } from "circuit-json";
|
|
4982
|
+
var smf_def = z42.object({
|
|
4983
|
+
fn: z42.string(),
|
|
4984
|
+
num_pins: z42.literal(2).default(2),
|
|
4985
|
+
w: z42.string().default("4.80mm"),
|
|
4986
|
+
h: z42.string().default("2.10mm"),
|
|
4987
|
+
pl: z42.string().default("1.30mm"),
|
|
4988
|
+
pw: z42.string().default("1.40mm"),
|
|
4989
|
+
p: z42.string().default("2.9mm")
|
|
4906
4990
|
});
|
|
4907
4991
|
var smf = (raw_params) => {
|
|
4908
4992
|
const parameters = smf_def.parse(raw_params);
|
|
4909
4993
|
const silkscreenRefText = silkscreenRef(
|
|
4910
4994
|
0,
|
|
4911
|
-
|
|
4995
|
+
length33.parse(parameters.h) - 0.5,
|
|
4912
4996
|
0.3
|
|
4913
4997
|
);
|
|
4914
4998
|
const silkscreenLine = {
|
|
@@ -4917,20 +5001,20 @@ var smf = (raw_params) => {
|
|
|
4917
5001
|
pcb_component_id: "",
|
|
4918
5002
|
route: [
|
|
4919
5003
|
{
|
|
4920
|
-
x:
|
|
4921
|
-
y:
|
|
5004
|
+
x: length33.parse(parameters.p) / 2,
|
|
5005
|
+
y: length33.parse(parameters.h) / 2
|
|
4922
5006
|
},
|
|
4923
5007
|
{
|
|
4924
|
-
x: -
|
|
4925
|
-
y:
|
|
5008
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5009
|
+
y: length33.parse(parameters.h) / 2
|
|
4926
5010
|
},
|
|
4927
5011
|
{
|
|
4928
|
-
x: -
|
|
4929
|
-
y: -
|
|
5012
|
+
x: -length33.parse(parameters.w) / 2,
|
|
5013
|
+
y: -length33.parse(parameters.h) / 2
|
|
4930
5014
|
},
|
|
4931
5015
|
{
|
|
4932
|
-
x:
|
|
4933
|
-
y: -
|
|
5016
|
+
x: length33.parse(parameters.p) / 2,
|
|
5017
|
+
y: -length33.parse(parameters.h) / 2
|
|
4934
5018
|
}
|
|
4935
5019
|
],
|
|
4936
5020
|
stroke_width: 0.1,
|
|
@@ -4973,22 +5057,22 @@ var smfWithoutParsing = (parameters) => {
|
|
|
4973
5057
|
};
|
|
4974
5058
|
|
|
4975
5059
|
// 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:
|
|
5060
|
+
import { z as z43 } from "zod";
|
|
5061
|
+
import { length as length34 } from "circuit-json";
|
|
5062
|
+
var smb_def = z43.object({
|
|
5063
|
+
fn: z43.string(),
|
|
5064
|
+
num_pins: z43.literal(2).default(2),
|
|
5065
|
+
w: z43.string().default("7.30mm"),
|
|
5066
|
+
h: z43.string().default("4.40mm"),
|
|
5067
|
+
pl: z43.string().default("2.50mm"),
|
|
5068
|
+
pw: z43.string().default("2.30mm"),
|
|
5069
|
+
p: z43.string().default("4.30mm")
|
|
4986
5070
|
});
|
|
4987
5071
|
var smb = (raw_params) => {
|
|
4988
5072
|
const parameters = smb_def.parse(raw_params);
|
|
4989
5073
|
const silkscreenRefText = silkscreenRef(
|
|
4990
5074
|
0,
|
|
4991
|
-
|
|
5075
|
+
length34.parse(parameters.h) / 2 + 0.5,
|
|
4992
5076
|
0.3
|
|
4993
5077
|
);
|
|
4994
5078
|
const silkscreenLine = {
|
|
@@ -4997,20 +5081,20 @@ var smb = (raw_params) => {
|
|
|
4997
5081
|
pcb_component_id: "",
|
|
4998
5082
|
route: [
|
|
4999
5083
|
{
|
|
5000
|
-
x:
|
|
5001
|
-
y:
|
|
5084
|
+
x: length34.parse(parameters.p) / 2,
|
|
5085
|
+
y: length34.parse(parameters.h) / 2
|
|
5002
5086
|
},
|
|
5003
5087
|
{
|
|
5004
|
-
x: -
|
|
5005
|
-
y:
|
|
5088
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5089
|
+
y: length34.parse(parameters.h) / 2
|
|
5006
5090
|
},
|
|
5007
5091
|
{
|
|
5008
|
-
x: -
|
|
5009
|
-
y: -
|
|
5092
|
+
x: -length34.parse(parameters.w) / 2 - 0.1,
|
|
5093
|
+
y: -length34.parse(parameters.h) / 2
|
|
5010
5094
|
},
|
|
5011
5095
|
{
|
|
5012
|
-
x:
|
|
5013
|
-
y: -
|
|
5096
|
+
x: length34.parse(parameters.p) / 2,
|
|
5097
|
+
y: -length34.parse(parameters.h) / 2
|
|
5014
5098
|
}
|
|
5015
5099
|
],
|
|
5016
5100
|
stroke_width: 0.1,
|
|
@@ -5053,16 +5137,16 @@ var smbWithoutParsing = (parameters) => {
|
|
|
5053
5137
|
};
|
|
5054
5138
|
|
|
5055
5139
|
// 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:
|
|
5140
|
+
import { z as z44 } from "zod";
|
|
5141
|
+
import { length as length35 } from "circuit-json";
|
|
5142
|
+
var smc_def = z44.object({
|
|
5143
|
+
fn: z44.string(),
|
|
5144
|
+
num_pins: z44.literal(2).default(2),
|
|
5145
|
+
w: z44.string().default("10.70mm"),
|
|
5146
|
+
h: z44.string().default("6.60mm"),
|
|
5147
|
+
pl: z44.string().default("3.30mm"),
|
|
5148
|
+
pw: z44.string().default("2.50mm"),
|
|
5149
|
+
p: z44.string().default("6.80mm")
|
|
5066
5150
|
});
|
|
5067
5151
|
var smc = (raw_params) => {
|
|
5068
5152
|
const parameters = smc_def.parse(raw_params);
|
|
@@ -5073,20 +5157,20 @@ var smc = (raw_params) => {
|
|
|
5073
5157
|
pcb_component_id: "",
|
|
5074
5158
|
route: [
|
|
5075
5159
|
{
|
|
5076
|
-
x:
|
|
5077
|
-
y:
|
|
5160
|
+
x: length35.parse(parameters.p) / 2,
|
|
5161
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5078
5162
|
},
|
|
5079
5163
|
{
|
|
5080
|
-
x: -
|
|
5081
|
-
y:
|
|
5164
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5165
|
+
y: length35.parse(parameters.h) / 2 - 0.8
|
|
5082
5166
|
},
|
|
5083
5167
|
{
|
|
5084
|
-
x: -
|
|
5085
|
-
y: -
|
|
5168
|
+
x: -length35.parse(parameters.w) / 2 - 0.8,
|
|
5169
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5086
5170
|
},
|
|
5087
5171
|
{
|
|
5088
|
-
x:
|
|
5089
|
-
y: -
|
|
5172
|
+
x: length35.parse(parameters.p) / 2,
|
|
5173
|
+
y: -length35.parse(parameters.h) / 2 + 0.8
|
|
5090
5174
|
}
|
|
5091
5175
|
],
|
|
5092
5176
|
stroke_width: 0.1,
|
|
@@ -5128,16 +5212,16 @@ var smcWithoutParsing = (parameters) => {
|
|
|
5128
5212
|
};
|
|
5129
5213
|
|
|
5130
5214
|
// 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:
|
|
5215
|
+
import { z as z45 } from "zod";
|
|
5216
|
+
var sot223_def = z45.object({
|
|
5217
|
+
fn: z45.string(),
|
|
5218
|
+
num_pins: z45.number().default(4),
|
|
5219
|
+
w: z45.string().default("8.50mm"),
|
|
5220
|
+
h: z45.string().default("6.90mm"),
|
|
5221
|
+
pl: z45.string().default("2mm"),
|
|
5222
|
+
pw: z45.string().default("1.5mm"),
|
|
5223
|
+
p: z45.string().default("2.30mm"),
|
|
5224
|
+
string: z45.string().optional()
|
|
5141
5225
|
});
|
|
5142
5226
|
var sot223 = (raw_params) => {
|
|
5143
5227
|
const match = raw_params.string?.match(/^sot223_(\d+)/);
|
|
@@ -5383,16 +5467,16 @@ var sot223_6 = (parameters) => {
|
|
|
5383
5467
|
};
|
|
5384
5468
|
|
|
5385
5469
|
// 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:
|
|
5470
|
+
import { z as z46 } from "zod";
|
|
5471
|
+
var sot23w_def = z46.object({
|
|
5472
|
+
fn: z46.string(),
|
|
5473
|
+
num_pins: z46.number().default(3),
|
|
5474
|
+
w: z46.string().default("3.40mm"),
|
|
5475
|
+
h: z46.string().default("3.30mm"),
|
|
5476
|
+
pl: z46.string().default("1mm"),
|
|
5477
|
+
pw: z46.string().default("0.7mm"),
|
|
5478
|
+
p: z46.string().default("1.2mm"),
|
|
5479
|
+
string: z46.string().optional()
|
|
5396
5480
|
});
|
|
5397
5481
|
var sot23w = (raw_params) => {
|
|
5398
5482
|
const match = raw_params.string?.match(/^sot23w_(\d+)/);
|
|
@@ -5480,16 +5564,16 @@ var sot23w_3 = (parameters) => {
|
|
|
5480
5564
|
};
|
|
5481
5565
|
|
|
5482
5566
|
// 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:
|
|
5567
|
+
import { z as z47 } from "zod";
|
|
5568
|
+
var to92s_def = z47.object({
|
|
5569
|
+
fn: z47.string(),
|
|
5570
|
+
num_pins: z47.union([z47.literal(3), z47.literal(2)]).default(3),
|
|
5571
|
+
p: z47.string().default("1.27mm"),
|
|
5572
|
+
id: z47.string().default("0.72mm"),
|
|
5573
|
+
od: z47.string().default("0.95mm"),
|
|
5574
|
+
w: z47.string().default("2.5mm"),
|
|
5575
|
+
h: z47.string().default("4.2mm"),
|
|
5576
|
+
string: z47.string().optional()
|
|
5493
5577
|
});
|
|
5494
5578
|
var to92s_3 = (parameters) => {
|
|
5495
5579
|
const { p, id, od, w, h } = parameters;
|
|
@@ -5556,18 +5640,18 @@ var to92s = (raw_params) => {
|
|
|
5556
5640
|
|
|
5557
5641
|
// src/fn/jst.ts
|
|
5558
5642
|
import {
|
|
5559
|
-
length as
|
|
5643
|
+
length as length36
|
|
5560
5644
|
} 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:
|
|
5645
|
+
import { z as z48 } from "zod";
|
|
5646
|
+
var jst_def = z48.object({
|
|
5647
|
+
fn: z48.string(),
|
|
5648
|
+
p: length36.optional(),
|
|
5649
|
+
id: length36.optional(),
|
|
5650
|
+
pw: length36.optional(),
|
|
5651
|
+
pl: length36.optional(),
|
|
5652
|
+
w: length36.optional(),
|
|
5653
|
+
h: length36.optional(),
|
|
5654
|
+
sh: z48.union([z48.boolean(), z48.string(), z48.number()]).optional().transform((v) => {
|
|
5571
5655
|
if (typeof v === "string") {
|
|
5572
5656
|
const n = Number(v);
|
|
5573
5657
|
return Number.isNaN(n) ? true : n;
|
|
@@ -5576,26 +5660,26 @@ var jst_def = z47.object({
|
|
|
5576
5660
|
}).describe(
|
|
5577
5661
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
5578
5662
|
),
|
|
5579
|
-
ph:
|
|
5663
|
+
ph: z48.boolean().optional().describe(
|
|
5580
5664
|
'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
|
|
5581
5665
|
),
|
|
5582
|
-
string:
|
|
5666
|
+
string: z48.string().optional()
|
|
5583
5667
|
});
|
|
5584
5668
|
var variantDefaults = {
|
|
5585
5669
|
ph: {
|
|
5586
|
-
p:
|
|
5587
|
-
id:
|
|
5588
|
-
pw:
|
|
5589
|
-
pl:
|
|
5590
|
-
w:
|
|
5591
|
-
h:
|
|
5670
|
+
p: length36.parse("2.2mm"),
|
|
5671
|
+
id: length36.parse("0.70mm"),
|
|
5672
|
+
pw: length36.parse("1.20mm"),
|
|
5673
|
+
pl: length36.parse("1.20mm"),
|
|
5674
|
+
w: length36.parse("6mm"),
|
|
5675
|
+
h: length36.parse("5mm")
|
|
5592
5676
|
},
|
|
5593
5677
|
sh: {
|
|
5594
|
-
p:
|
|
5595
|
-
pw:
|
|
5596
|
-
pl:
|
|
5597
|
-
w:
|
|
5598
|
-
h:
|
|
5678
|
+
p: length36.parse("1mm"),
|
|
5679
|
+
pw: length36.parse("0.6mm"),
|
|
5680
|
+
pl: length36.parse("1.55mm"),
|
|
5681
|
+
w: length36.parse("5.8mm"),
|
|
5682
|
+
h: length36.parse("7.8mm")
|
|
5599
5683
|
}
|
|
5600
5684
|
};
|
|
5601
5685
|
function getVariant(params) {
|
|
@@ -5694,22 +5778,22 @@ var jst = (raw_params) => {
|
|
|
5694
5778
|
};
|
|
5695
5779
|
|
|
5696
5780
|
// 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:
|
|
5781
|
+
import { z as z49 } from "zod";
|
|
5782
|
+
import { length as length37 } from "circuit-json";
|
|
5783
|
+
var sod_def12 = z49.object({
|
|
5784
|
+
fn: z49.string(),
|
|
5785
|
+
num_pins: z49.literal(2).default(2),
|
|
5786
|
+
w: z49.string().default("3.30mm"),
|
|
5787
|
+
h: z49.string().default("1.70mm"),
|
|
5788
|
+
pl: z49.string().default("0.80mm"),
|
|
5789
|
+
pw: z49.string().default("1mm"),
|
|
5790
|
+
p: z49.string().default("1.90mm")
|
|
5707
5791
|
});
|
|
5708
5792
|
var sod110 = (raw_params) => {
|
|
5709
5793
|
const parameters = sod_def12.parse(raw_params);
|
|
5710
5794
|
const silkscreenRefText = silkscreenRef(
|
|
5711
5795
|
0,
|
|
5712
|
-
|
|
5796
|
+
length37.parse(parameters.h) / 2 + 0.5,
|
|
5713
5797
|
0.3
|
|
5714
5798
|
);
|
|
5715
5799
|
const silkscreenLine = {
|
|
@@ -5718,20 +5802,20 @@ var sod110 = (raw_params) => {
|
|
|
5718
5802
|
pcb_component_id: "",
|
|
5719
5803
|
route: [
|
|
5720
5804
|
{
|
|
5721
|
-
x:
|
|
5722
|
-
y:
|
|
5805
|
+
x: length37.parse(parameters.p) / 2,
|
|
5806
|
+
y: length37.parse(parameters.h) / 2
|
|
5723
5807
|
},
|
|
5724
5808
|
{
|
|
5725
|
-
x: -
|
|
5726
|
-
y:
|
|
5809
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5810
|
+
y: length37.parse(parameters.h) / 2
|
|
5727
5811
|
},
|
|
5728
5812
|
{
|
|
5729
|
-
x: -
|
|
5730
|
-
y: -
|
|
5813
|
+
x: -length37.parse(parameters.w) / 2,
|
|
5814
|
+
y: -length37.parse(parameters.h) / 2
|
|
5731
5815
|
},
|
|
5732
5816
|
{
|
|
5733
|
-
x:
|
|
5734
|
-
y: -
|
|
5817
|
+
x: length37.parse(parameters.p) / 2,
|
|
5818
|
+
y: -length37.parse(parameters.h) / 2
|
|
5735
5819
|
}
|
|
5736
5820
|
],
|
|
5737
5821
|
stroke_width: 0.1,
|
|
@@ -5773,8 +5857,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
5773
5857
|
};
|
|
5774
5858
|
|
|
5775
5859
|
// src/fn/vssop.ts
|
|
5776
|
-
import { z as
|
|
5777
|
-
import { length as
|
|
5860
|
+
import { z as z50 } from "zod";
|
|
5861
|
+
import { length as length38 } from "circuit-json";
|
|
5778
5862
|
var getDefaultValues = (num_pins) => {
|
|
5779
5863
|
switch (num_pins) {
|
|
5780
5864
|
case 8:
|
|
@@ -5803,24 +5887,24 @@ var getDefaultValues = (num_pins) => {
|
|
|
5803
5887
|
};
|
|
5804
5888
|
}
|
|
5805
5889
|
};
|
|
5806
|
-
var vssop_def =
|
|
5807
|
-
fn:
|
|
5808
|
-
num_pins:
|
|
5809
|
-
w:
|
|
5810
|
-
h:
|
|
5811
|
-
p:
|
|
5812
|
-
pl:
|
|
5813
|
-
pw:
|
|
5814
|
-
string:
|
|
5890
|
+
var vssop_def = z50.object({
|
|
5891
|
+
fn: z50.string(),
|
|
5892
|
+
num_pins: z50.union([z50.literal(8), z50.literal(10)]).default(8),
|
|
5893
|
+
w: z50.string().optional(),
|
|
5894
|
+
h: z50.string().optional(),
|
|
5895
|
+
p: z50.string().optional(),
|
|
5896
|
+
pl: z50.string().optional(),
|
|
5897
|
+
pw: z50.string().optional(),
|
|
5898
|
+
string: z50.string().optional()
|
|
5815
5899
|
});
|
|
5816
5900
|
var vssop = (raw_params) => {
|
|
5817
5901
|
const parameters = vssop_def.parse(raw_params);
|
|
5818
5902
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
5819
|
-
const w =
|
|
5820
|
-
const h =
|
|
5821
|
-
const p =
|
|
5822
|
-
const pl =
|
|
5823
|
-
const pw =
|
|
5903
|
+
const w = length38.parse(parameters.w || defaults.w);
|
|
5904
|
+
const h = length38.parse(parameters.h || defaults.h);
|
|
5905
|
+
const p = length38.parse(parameters.p || defaults.p);
|
|
5906
|
+
const pl = length38.parse(parameters.pl || defaults.pl);
|
|
5907
|
+
const pw = length38.parse(parameters.pw || defaults.pw);
|
|
5824
5908
|
const pads = [];
|
|
5825
5909
|
const half = parameters.num_pins / 2;
|
|
5826
5910
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -5897,14 +5981,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
5897
5981
|
const col = pn <= half ? -1 : 1;
|
|
5898
5982
|
const row = (half - 1) / 2 - rowIndex;
|
|
5899
5983
|
return {
|
|
5900
|
-
x: col *
|
|
5984
|
+
x: col * length38.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
|
|
5901
5985
|
y: row * p
|
|
5902
5986
|
};
|
|
5903
5987
|
};
|
|
5904
5988
|
|
|
5905
5989
|
// src/fn/msop.ts
|
|
5906
|
-
import { z as
|
|
5907
|
-
import { length as
|
|
5990
|
+
import { z as z51 } from "zod";
|
|
5991
|
+
import { length as length39 } from "circuit-json";
|
|
5908
5992
|
var getDefaultValues2 = (num_pins) => {
|
|
5909
5993
|
switch (num_pins) {
|
|
5910
5994
|
case 10:
|
|
@@ -5941,15 +6025,15 @@ var getDefaultValues2 = (num_pins) => {
|
|
|
5941
6025
|
};
|
|
5942
6026
|
}
|
|
5943
6027
|
};
|
|
5944
|
-
var msop_def =
|
|
5945
|
-
fn:
|
|
5946
|
-
num_pins:
|
|
5947
|
-
w:
|
|
5948
|
-
h:
|
|
5949
|
-
p:
|
|
5950
|
-
pl:
|
|
5951
|
-
pw:
|
|
5952
|
-
string:
|
|
6028
|
+
var msop_def = z51.object({
|
|
6029
|
+
fn: z51.string(),
|
|
6030
|
+
num_pins: z51.union([z51.literal(8), z51.literal(10), z51.literal(12), z51.literal(16)]).default(8),
|
|
6031
|
+
w: z51.string().optional(),
|
|
6032
|
+
h: z51.string().optional(),
|
|
6033
|
+
p: z51.string().optional(),
|
|
6034
|
+
pl: z51.string().optional(),
|
|
6035
|
+
pw: z51.string().optional(),
|
|
6036
|
+
string: z51.string().optional()
|
|
5953
6037
|
});
|
|
5954
6038
|
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
5955
6039
|
const half = pinCount / 2;
|
|
@@ -5957,18 +6041,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
|
|
|
5957
6041
|
const col = pn <= half ? -1 : 1;
|
|
5958
6042
|
const row = (half - 1) / 2 - rowIndex;
|
|
5959
6043
|
return {
|
|
5960
|
-
x: col *
|
|
6044
|
+
x: col * length39.parse("2mm"),
|
|
5961
6045
|
y: row * p
|
|
5962
6046
|
};
|
|
5963
6047
|
};
|
|
5964
6048
|
var msop = (raw_params) => {
|
|
5965
6049
|
const parameters = msop_def.parse(raw_params);
|
|
5966
6050
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
5967
|
-
const w =
|
|
5968
|
-
const h =
|
|
5969
|
-
const p =
|
|
5970
|
-
const pl =
|
|
5971
|
-
const pw =
|
|
6051
|
+
const w = length39.parse(parameters.w || defaults.w);
|
|
6052
|
+
const h = length39.parse(parameters.h || defaults.h);
|
|
6053
|
+
const p = length39.parse(parameters.p || defaults.p);
|
|
6054
|
+
const pl = length39.parse(parameters.pl || defaults.pl);
|
|
6055
|
+
const pw = length39.parse(parameters.pw || defaults.pw);
|
|
5972
6056
|
const pads = [];
|
|
5973
6057
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
5974
6058
|
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
@@ -6039,22 +6123,22 @@ var msop = (raw_params) => {
|
|
|
6039
6123
|
};
|
|
6040
6124
|
|
|
6041
6125
|
// 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:
|
|
6126
|
+
import { z as z52 } from "zod";
|
|
6127
|
+
import { length as length40 } from "circuit-json";
|
|
6128
|
+
var sod323w_def = z52.object({
|
|
6129
|
+
fn: z52.string(),
|
|
6130
|
+
num_pins: z52.literal(2).default(2),
|
|
6131
|
+
w: z52.string().default("3.8mm"),
|
|
6132
|
+
h: z52.string().default("1.65mm"),
|
|
6133
|
+
pl: z52.string().default("1.2mm"),
|
|
6134
|
+
pw: z52.string().default("1.2mm"),
|
|
6135
|
+
pad_spacing: z52.string().default("2.6mm")
|
|
6052
6136
|
});
|
|
6053
6137
|
var sod323w = (raw_params) => {
|
|
6054
6138
|
const parameters = sod323w_def.parse(raw_params);
|
|
6055
6139
|
const silkscreenRefText = silkscreenRef(
|
|
6056
6140
|
0,
|
|
6057
|
-
|
|
6141
|
+
length40.parse(parameters.h),
|
|
6058
6142
|
0.3
|
|
6059
6143
|
);
|
|
6060
6144
|
const silkscreenLine = {
|
|
@@ -6063,20 +6147,20 @@ var sod323w = (raw_params) => {
|
|
|
6063
6147
|
pcb_component_id: "",
|
|
6064
6148
|
route: [
|
|
6065
6149
|
{
|
|
6066
|
-
x:
|
|
6067
|
-
y:
|
|
6150
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6151
|
+
y: length40.parse(parameters.h) / 2
|
|
6068
6152
|
},
|
|
6069
6153
|
{
|
|
6070
|
-
x: -
|
|
6071
|
-
y:
|
|
6154
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6155
|
+
y: length40.parse(parameters.h) / 2
|
|
6072
6156
|
},
|
|
6073
6157
|
{
|
|
6074
|
-
x: -
|
|
6075
|
-
y: -
|
|
6158
|
+
x: -length40.parse(parameters.w) / 2 - 0.2,
|
|
6159
|
+
y: -length40.parse(parameters.h) / 2
|
|
6076
6160
|
},
|
|
6077
6161
|
{
|
|
6078
|
-
x:
|
|
6079
|
-
y: -
|
|
6162
|
+
x: length40.parse(parameters.pad_spacing) / 2,
|
|
6163
|
+
y: -length40.parse(parameters.h) / 2
|
|
6080
6164
|
}
|
|
6081
6165
|
],
|
|
6082
6166
|
stroke_width: 0.1,
|
|
@@ -6119,22 +6203,22 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
6119
6203
|
};
|
|
6120
6204
|
|
|
6121
6205
|
// 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:
|
|
6206
|
+
import { z as z53 } from "zod";
|
|
6207
|
+
import { length as length41 } from "circuit-json";
|
|
6208
|
+
var sod323FL_def = z53.object({
|
|
6209
|
+
fn: z53.string(),
|
|
6210
|
+
num_pins: z53.literal(2).default(2),
|
|
6211
|
+
w: z53.string().default("3.20mm"),
|
|
6212
|
+
h: z53.string().default("1.65mm"),
|
|
6213
|
+
pl: z53.string().default("0.8mm"),
|
|
6214
|
+
pw: z53.string().default("0.9mm"),
|
|
6215
|
+
pad_spacing: z53.string().default("2.1mm")
|
|
6132
6216
|
});
|
|
6133
6217
|
var sod323fl = (raw_params) => {
|
|
6134
6218
|
const parameters = sod323FL_def.parse(raw_params);
|
|
6135
6219
|
const silkscreenRefText = silkscreenRef(
|
|
6136
6220
|
0,
|
|
6137
|
-
|
|
6221
|
+
length41.parse(parameters.h),
|
|
6138
6222
|
0.3
|
|
6139
6223
|
);
|
|
6140
6224
|
const silkscreenLine = {
|
|
@@ -6143,20 +6227,20 @@ var sod323fl = (raw_params) => {
|
|
|
6143
6227
|
pcb_component_id: "",
|
|
6144
6228
|
route: [
|
|
6145
6229
|
{
|
|
6146
|
-
x:
|
|
6147
|
-
y:
|
|
6230
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6231
|
+
y: length41.parse(parameters.h) / 2
|
|
6148
6232
|
},
|
|
6149
6233
|
{
|
|
6150
|
-
x: -
|
|
6151
|
-
y:
|
|
6234
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6235
|
+
y: length41.parse(parameters.h) / 2
|
|
6152
6236
|
},
|
|
6153
6237
|
{
|
|
6154
|
-
x: -
|
|
6155
|
-
y: -
|
|
6238
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6239
|
+
y: -length41.parse(parameters.h) / 2
|
|
6156
6240
|
},
|
|
6157
6241
|
{
|
|
6158
|
-
x:
|
|
6159
|
-
y: -
|
|
6242
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6243
|
+
y: -length41.parse(parameters.h) / 2
|
|
6160
6244
|
}
|
|
6161
6245
|
],
|
|
6162
6246
|
stroke_width: 0.1,
|
|
@@ -6199,20 +6283,20 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
6199
6283
|
};
|
|
6200
6284
|
|
|
6201
6285
|
// 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:
|
|
6286
|
+
import { z as z54 } from "zod";
|
|
6287
|
+
import { length as length42 } from "circuit-json";
|
|
6288
|
+
var son_def = z54.object({
|
|
6289
|
+
fn: z54.string(),
|
|
6290
|
+
num_pins: z54.union([z54.literal(6), z54.literal(8)]).default(8),
|
|
6291
|
+
w: z54.string().default("3mm"),
|
|
6292
|
+
h: z54.string().default("3mm"),
|
|
6293
|
+
p: z54.string().default("0.5mm"),
|
|
6294
|
+
pl: z54.string().default("0.52mm"),
|
|
6295
|
+
pw: z54.string().default("0.35mm"),
|
|
6296
|
+
epw: z54.string().default("1.40mm"),
|
|
6297
|
+
eph: z54.string().default("1.60mm"),
|
|
6298
|
+
string: z54.string().optional(),
|
|
6299
|
+
ep: z54.boolean().default(false)
|
|
6216
6300
|
});
|
|
6217
6301
|
var son = (raw_params) => {
|
|
6218
6302
|
if (raw_params.string && raw_params.string.includes("_ep")) {
|
|
@@ -6224,13 +6308,13 @@ var son = (raw_params) => {
|
|
|
6224
6308
|
...raw_params,
|
|
6225
6309
|
num_pins: numPins
|
|
6226
6310
|
});
|
|
6227
|
-
const w =
|
|
6228
|
-
const h =
|
|
6229
|
-
const p =
|
|
6230
|
-
const pl =
|
|
6231
|
-
const pw =
|
|
6232
|
-
const epw =
|
|
6233
|
-
const eph =
|
|
6311
|
+
const w = length42.parse(parameters.w);
|
|
6312
|
+
const h = length42.parse(parameters.h);
|
|
6313
|
+
const p = length42.parse(parameters.p);
|
|
6314
|
+
const pl = length42.parse(parameters.pl);
|
|
6315
|
+
const pw = length42.parse(parameters.pw);
|
|
6316
|
+
const epw = length42.parse(parameters.epw);
|
|
6317
|
+
const eph = length42.parse(parameters.eph);
|
|
6234
6318
|
const pads = [];
|
|
6235
6319
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6236
6320
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -6308,18 +6392,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
6308
6392
|
const col = pn <= half ? -1 : 1;
|
|
6309
6393
|
const row = (half - 1) / 2 - rowIndex;
|
|
6310
6394
|
return {
|
|
6311
|
-
x: col *
|
|
6395
|
+
x: col * length42.parse("1.4mm"),
|
|
6312
6396
|
y: row * p
|
|
6313
6397
|
};
|
|
6314
6398
|
};
|
|
6315
6399
|
|
|
6316
6400
|
// src/fn/solderjumper.ts
|
|
6317
|
-
import { length as
|
|
6401
|
+
import { length as length43 } from "circuit-json";
|
|
6318
6402
|
var solderjumper = (params) => {
|
|
6319
6403
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
6320
|
-
const padSpacing =
|
|
6321
|
-
const padWidth =
|
|
6322
|
-
const padHeight =
|
|
6404
|
+
const padSpacing = length43.parse(p);
|
|
6405
|
+
const padWidth = length43.parse(pw);
|
|
6406
|
+
const padHeight = length43.parse(ph);
|
|
6323
6407
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
6324
6408
|
const pads = [];
|
|
6325
6409
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -6407,34 +6491,34 @@ var solderjumper = (params) => {
|
|
|
6407
6491
|
};
|
|
6408
6492
|
|
|
6409
6493
|
// src/fn/sot457.ts
|
|
6410
|
-
import { z as
|
|
6494
|
+
import { z as z55 } from "zod";
|
|
6411
6495
|
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 =
|
|
6496
|
+
fn: z55.literal("sot457"),
|
|
6497
|
+
num_pins: z55.literal(6).default(6),
|
|
6498
|
+
pillh: z55.string().default("0.45mm"),
|
|
6499
|
+
pillw: z55.string().default("1.45mm"),
|
|
6500
|
+
pl: z55.string(),
|
|
6501
|
+
pw: z55.string(),
|
|
6502
|
+
p: z55.string(),
|
|
6503
|
+
wave: z55.boolean().optional(),
|
|
6504
|
+
reflow: z55.boolean().optional()
|
|
6505
|
+
};
|
|
6506
|
+
var sot457DefSchema = z55.object({
|
|
6423
6507
|
...commonSchema,
|
|
6424
|
-
h:
|
|
6425
|
-
w:
|
|
6426
|
-
pl:
|
|
6427
|
-
pw:
|
|
6428
|
-
p:
|
|
6508
|
+
h: z55.string().default("2.5mm"),
|
|
6509
|
+
w: z55.string().default("2.7mm"),
|
|
6510
|
+
pl: z55.string().default("0.8mm"),
|
|
6511
|
+
pw: z55.string().default("0.55mm"),
|
|
6512
|
+
p: z55.string().default("0.95mm")
|
|
6429
6513
|
});
|
|
6430
|
-
var sot457WaveSchema =
|
|
6514
|
+
var sot457WaveSchema = z55.object({
|
|
6431
6515
|
...commonSchema,
|
|
6432
|
-
h:
|
|
6433
|
-
w:
|
|
6434
|
-
pillr:
|
|
6435
|
-
pl:
|
|
6436
|
-
pw:
|
|
6437
|
-
p:
|
|
6516
|
+
h: z55.string().default("3mm"),
|
|
6517
|
+
w: z55.string().default("4mm"),
|
|
6518
|
+
pillr: z55.string().default("0.225mm"),
|
|
6519
|
+
pl: z55.string().default("1.45mm"),
|
|
6520
|
+
pw: z55.string().default("1.5mm"),
|
|
6521
|
+
p: z55.string().default("1.475mm")
|
|
6438
6522
|
}).transform((data) => ({
|
|
6439
6523
|
...data,
|
|
6440
6524
|
wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
|
|
@@ -6572,20 +6656,101 @@ var sot457 = (rawParams) => {
|
|
|
6572
6656
|
};
|
|
6573
6657
|
};
|
|
6574
6658
|
|
|
6659
|
+
// src/fn/sot963.ts
|
|
6660
|
+
import { z as z56 } from "zod";
|
|
6661
|
+
import { length as length44 } from "circuit-json";
|
|
6662
|
+
var sot963_def = z56.object({
|
|
6663
|
+
fn: z56.string(),
|
|
6664
|
+
num_pins: z56.literal(6).default(6),
|
|
6665
|
+
w: z56.string().default("1.1mm"),
|
|
6666
|
+
h: z56.string().default("1.45mm"),
|
|
6667
|
+
p: z56.string().default("0.35mm"),
|
|
6668
|
+
pl: z56.string().default("0.2mm"),
|
|
6669
|
+
pw: z56.string().default("0.2mm"),
|
|
6670
|
+
string: z56.string().optional()
|
|
6671
|
+
});
|
|
6672
|
+
var sot963 = (raw_params) => {
|
|
6673
|
+
const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
|
|
6674
|
+
const w = length44.parse(parameters.w);
|
|
6675
|
+
const h = length44.parse(parameters.h);
|
|
6676
|
+
const p = length44.parse(parameters.p);
|
|
6677
|
+
const pl = length44.parse(parameters.pl);
|
|
6678
|
+
const pw = length44.parse(parameters.pw);
|
|
6679
|
+
const pads = [];
|
|
6680
|
+
for (let i = 0; i < 6; i++) {
|
|
6681
|
+
const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
|
|
6682
|
+
pads.push(rectpad(i + 1, x, y, pl, pw));
|
|
6683
|
+
}
|
|
6684
|
+
const silkscreenTopLine = {
|
|
6685
|
+
type: "pcb_silkscreen_path",
|
|
6686
|
+
layer: "top",
|
|
6687
|
+
pcb_component_id: "",
|
|
6688
|
+
route: [
|
|
6689
|
+
{ x: -w / 2, y: h / 2 },
|
|
6690
|
+
{ x: w / 2, y: h / 2 }
|
|
6691
|
+
],
|
|
6692
|
+
stroke_width: 0.05,
|
|
6693
|
+
pcb_silkscreen_path_id: ""
|
|
6694
|
+
};
|
|
6695
|
+
const silkscreenBottomLine = {
|
|
6696
|
+
type: "pcb_silkscreen_path",
|
|
6697
|
+
layer: "top",
|
|
6698
|
+
pcb_component_id: "",
|
|
6699
|
+
route: [
|
|
6700
|
+
{ x: -w / 2, y: -h / 2 },
|
|
6701
|
+
{ x: w / 2, y: -h / 2 }
|
|
6702
|
+
],
|
|
6703
|
+
stroke_width: 0.05,
|
|
6704
|
+
pcb_silkscreen_path_id: ""
|
|
6705
|
+
};
|
|
6706
|
+
const pin1Position = getSot963PadCoord(1, w, p, pl);
|
|
6707
|
+
const pin1Marking = {
|
|
6708
|
+
type: "pcb_silkscreen_path",
|
|
6709
|
+
layer: "top",
|
|
6710
|
+
pcb_component_id: "pin_marker_1",
|
|
6711
|
+
route: [
|
|
6712
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y },
|
|
6713
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y + 0.15 },
|
|
6714
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y - 0.15 },
|
|
6715
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y }
|
|
6716
|
+
],
|
|
6717
|
+
stroke_width: 0.05,
|
|
6718
|
+
pcb_silkscreen_path_id: "pin_marker_1"
|
|
6719
|
+
};
|
|
6720
|
+
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
6721
|
+
return {
|
|
6722
|
+
circuitJson: [
|
|
6723
|
+
...pads,
|
|
6724
|
+
silkscreenTopLine,
|
|
6725
|
+
silkscreenBottomLine,
|
|
6726
|
+
silkscreenRefText,
|
|
6727
|
+
pin1Marking
|
|
6728
|
+
],
|
|
6729
|
+
parameters
|
|
6730
|
+
};
|
|
6731
|
+
};
|
|
6732
|
+
var getSot963PadCoord = (pn, w, p, pl) => {
|
|
6733
|
+
const padCenterOffset = w / 2 - pl / 2;
|
|
6734
|
+
if (pn <= 3) {
|
|
6735
|
+
return { x: -padCenterOffset, y: p - (pn - 1) * p };
|
|
6736
|
+
}
|
|
6737
|
+
return { x: padCenterOffset, y: -p + (pn - 4) * p };
|
|
6738
|
+
};
|
|
6739
|
+
|
|
6575
6740
|
// 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:
|
|
6741
|
+
import { z as z57 } from "zod";
|
|
6742
|
+
var potentiometer_def = z57.object({
|
|
6743
|
+
fn: z57.string(),
|
|
6744
|
+
num_pins: z57.union([z57.literal(3), z57.literal(2)]).default(3),
|
|
6745
|
+
p: z57.string().default("3.8mm"),
|
|
6746
|
+
id: z57.string().default("1.25mm"),
|
|
6747
|
+
od: z57.string().default("2.35mm"),
|
|
6748
|
+
ca: z57.string().default("14mm").describe(
|
|
6584
6749
|
"Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
|
|
6585
6750
|
),
|
|
6586
|
-
w:
|
|
6587
|
-
h:
|
|
6588
|
-
string:
|
|
6751
|
+
w: z57.string().default("5.35mm"),
|
|
6752
|
+
h: z57.string().default("4mm"),
|
|
6753
|
+
string: z57.string().optional()
|
|
6589
6754
|
});
|
|
6590
6755
|
var potentiometer_acp = (parameters) => {
|
|
6591
6756
|
const { p, id, od, h, ca } = parameters;
|
|
@@ -6652,15 +6817,15 @@ var potentiometer = (raw_params) => {
|
|
|
6652
6817
|
|
|
6653
6818
|
// src/fn/electrolytic.ts
|
|
6654
6819
|
import {
|
|
6655
|
-
length as
|
|
6820
|
+
length as length45
|
|
6656
6821
|
} from "circuit-json";
|
|
6657
|
-
import { z as
|
|
6658
|
-
var electrolytic_def =
|
|
6659
|
-
fn:
|
|
6660
|
-
p:
|
|
6661
|
-
id:
|
|
6662
|
-
od:
|
|
6663
|
-
d:
|
|
6822
|
+
import { z as z58 } from "zod";
|
|
6823
|
+
var electrolytic_def = z58.object({
|
|
6824
|
+
fn: z58.string(),
|
|
6825
|
+
p: length45.optional().default("7.5mm"),
|
|
6826
|
+
id: length45.optional().default("1mm"),
|
|
6827
|
+
od: length45.optional().default("2mm"),
|
|
6828
|
+
d: length45.optional().default("10.5mm")
|
|
6664
6829
|
});
|
|
6665
6830
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
6666
6831
|
const topArc = [];
|
|
@@ -6767,22 +6932,22 @@ var electrolytic = (raw_params) => {
|
|
|
6767
6932
|
};
|
|
6768
6933
|
|
|
6769
6934
|
// 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:
|
|
6935
|
+
import { z as z59 } from "zod";
|
|
6936
|
+
import { length as length46 } from "circuit-json";
|
|
6937
|
+
var smbf_def = z59.object({
|
|
6938
|
+
fn: z59.string(),
|
|
6939
|
+
num_pins: z59.literal(2).default(2),
|
|
6940
|
+
w: z59.string().default("6.5mm"),
|
|
6941
|
+
h: z59.string().default("3mm"),
|
|
6942
|
+
pl: z59.string().default("1.75mm"),
|
|
6943
|
+
pw: z59.string().default("2.40mm"),
|
|
6944
|
+
p: z59.string().default("4.75mm")
|
|
6780
6945
|
});
|
|
6781
6946
|
var smbf = (raw_params) => {
|
|
6782
6947
|
const parameters = smbf_def.parse(raw_params);
|
|
6783
6948
|
const silkscreenRefText = silkscreenRef(
|
|
6784
6949
|
0,
|
|
6785
|
-
|
|
6950
|
+
length46.parse(parameters.h) - 0.5,
|
|
6786
6951
|
0.3
|
|
6787
6952
|
);
|
|
6788
6953
|
const silkscreenLine = {
|
|
@@ -6791,20 +6956,20 @@ var smbf = (raw_params) => {
|
|
|
6791
6956
|
pcb_component_id: "",
|
|
6792
6957
|
route: [
|
|
6793
6958
|
{
|
|
6794
|
-
x:
|
|
6795
|
-
y:
|
|
6959
|
+
x: length46.parse(parameters.p) / 2,
|
|
6960
|
+
y: length46.parse(parameters.h) / 2
|
|
6796
6961
|
},
|
|
6797
6962
|
{
|
|
6798
|
-
x: -
|
|
6799
|
-
y:
|
|
6963
|
+
x: -length46.parse(parameters.w) / 2 - 0.3,
|
|
6964
|
+
y: length46.parse(parameters.h) / 2
|
|
6800
6965
|
},
|
|
6801
6966
|
{
|
|
6802
|
-
x: -
|
|
6803
|
-
y: -
|
|
6967
|
+
x: -length46.parse(parameters.w) / 2 - 0.3,
|
|
6968
|
+
y: -length46.parse(parameters.h) / 2
|
|
6804
6969
|
},
|
|
6805
6970
|
{
|
|
6806
|
-
x:
|
|
6807
|
-
y: -
|
|
6971
|
+
x: length46.parse(parameters.p) / 2,
|
|
6972
|
+
y: -length46.parse(parameters.h) / 2
|
|
6808
6973
|
}
|
|
6809
6974
|
],
|
|
6810
6975
|
stroke_width: 0.1,
|
|
@@ -6846,16 +7011,16 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
6846
7011
|
};
|
|
6847
7012
|
|
|
6848
7013
|
// 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:
|
|
7014
|
+
import { z as z60 } from "zod";
|
|
7015
|
+
var sot323_def = z60.object({
|
|
7016
|
+
fn: z60.string(),
|
|
7017
|
+
num_pins: z60.number().default(3),
|
|
7018
|
+
w: z60.string().default("2.45mm"),
|
|
7019
|
+
h: z60.string().default("2.40mm"),
|
|
7020
|
+
pl: z60.string().default("0.70mm"),
|
|
7021
|
+
pw: z60.string().default("0.45mm"),
|
|
7022
|
+
p: z60.string().default("1mm"),
|
|
7023
|
+
string: z60.string().optional()
|
|
6859
7024
|
});
|
|
6860
7025
|
var sot323 = (raw_params) => {
|
|
6861
7026
|
const match = raw_params.string?.match(/^sot323_(\d+)/);
|
|
@@ -6943,30 +7108,30 @@ var sot323_3 = (parameters) => {
|
|
|
6943
7108
|
};
|
|
6944
7109
|
|
|
6945
7110
|
// src/fn/smtpad.ts
|
|
6946
|
-
import { z as
|
|
6947
|
-
import { length as
|
|
7111
|
+
import { z as z61 } from "zod";
|
|
7112
|
+
import { length as length47 } from "circuit-json";
|
|
6948
7113
|
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:
|
|
7114
|
+
var smtpad_def = z61.object({
|
|
7115
|
+
fn: z61.string(),
|
|
7116
|
+
circle: z61.boolean().optional(),
|
|
7117
|
+
rect: z61.boolean().optional(),
|
|
7118
|
+
square: z61.boolean().optional(),
|
|
7119
|
+
pill: z61.boolean().optional(),
|
|
7120
|
+
d: length47.optional(),
|
|
7121
|
+
pd: length47.optional(),
|
|
7122
|
+
diameter: length47.optional(),
|
|
7123
|
+
r: length47.optional(),
|
|
7124
|
+
pr: length47.optional(),
|
|
7125
|
+
radius: length47.optional(),
|
|
7126
|
+
w: length47.optional(),
|
|
7127
|
+
pw: length47.optional(),
|
|
7128
|
+
width: length47.optional(),
|
|
7129
|
+
h: length47.optional(),
|
|
7130
|
+
ph: length47.optional(),
|
|
7131
|
+
height: length47.optional(),
|
|
7132
|
+
s: length47.optional(),
|
|
7133
|
+
size: length47.optional(),
|
|
7134
|
+
string: z61.string().optional()
|
|
6970
7135
|
}).transform((v) => {
|
|
6971
7136
|
let shape = "rect";
|
|
6972
7137
|
if (v.circle) shape = "circle";
|
|
@@ -7032,18 +7197,18 @@ var smtpad = (raw_params) => {
|
|
|
7032
7197
|
};
|
|
7033
7198
|
|
|
7034
7199
|
// src/fn/platedhole.ts
|
|
7035
|
-
import { z as
|
|
7036
|
-
import { length as
|
|
7200
|
+
import { z as z62 } from "zod";
|
|
7201
|
+
import { length as length48 } from "circuit-json";
|
|
7037
7202
|
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:
|
|
7203
|
+
var platedhole_def = z62.object({
|
|
7204
|
+
fn: z62.string(),
|
|
7205
|
+
d: length48.optional(),
|
|
7206
|
+
hd: length48.optional(),
|
|
7207
|
+
r: length48.optional(),
|
|
7208
|
+
hr: length48.optional(),
|
|
7209
|
+
pd: length48.optional(),
|
|
7210
|
+
pr: length48.optional(),
|
|
7211
|
+
squarepad: z62.boolean().optional().default(false)
|
|
7047
7212
|
}).transform((v) => {
|
|
7048
7213
|
let holeD;
|
|
7049
7214
|
if (v.d !== void 0) holeD = mm7(v.d);
|
|
@@ -7075,14 +7240,14 @@ var platedhole2 = (raw_params) => {
|
|
|
7075
7240
|
};
|
|
7076
7241
|
|
|
7077
7242
|
// 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:
|
|
7243
|
+
import { z as z63 } from "zod";
|
|
7244
|
+
var sot_def = z63.object({
|
|
7245
|
+
fn: z63.string(),
|
|
7246
|
+
num_pins: z63.literal(6).default(6),
|
|
7247
|
+
h: z63.string().default("1.6mm"),
|
|
7248
|
+
pl: z63.string().default("1mm"),
|
|
7249
|
+
pw: z63.string().default("0.7mm"),
|
|
7250
|
+
p: z63.string().default("0.95mm")
|
|
7086
7251
|
});
|
|
7087
7252
|
var sot = (raw_params) => {
|
|
7088
7253
|
const parameters = sot_def.parse(raw_params);
|
|
@@ -7199,9 +7364,9 @@ var sotWithoutParsing = (parameters) => {
|
|
|
7199
7364
|
};
|
|
7200
7365
|
|
|
7201
7366
|
// src/fn/m2host.ts
|
|
7202
|
-
import { z as
|
|
7203
|
-
var m2host_def =
|
|
7204
|
-
fn:
|
|
7367
|
+
import { z as z64 } from "zod";
|
|
7368
|
+
var m2host_def = z64.object({
|
|
7369
|
+
fn: z64.string()
|
|
7205
7370
|
});
|
|
7206
7371
|
var m2host = (raw_params) => {
|
|
7207
7372
|
const parameters = m2host_def.parse(raw_params);
|