@tscircuit/footprinter 0.0.302 → 0.0.304
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 +1 -32
- package/dist/index.js +1233 -976
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1677,41 +1677,101 @@ var ssop = (raw_params) => {
|
|
|
1677
1677
|
};
|
|
1678
1678
|
|
|
1679
1679
|
// src/fn/tssop.ts
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1680
|
+
import { length as length11 } from "circuit-json";
|
|
1681
|
+
import { z as z16 } from "zod";
|
|
1682
|
+
var tssop_def = base_def.extend({
|
|
1683
|
+
fn: z16.string(),
|
|
1684
|
+
num_pins: z16.number().optional().default(8),
|
|
1685
|
+
w: length11.default(length11.parse("3.0mm")),
|
|
1686
|
+
p: length11.default(length11.parse("0.5mm")),
|
|
1687
|
+
pw: length11.default(length11.parse("0.30mm")),
|
|
1688
|
+
pl: length11.default(length11.parse("1.45mm")),
|
|
1689
|
+
legsoutside: z16.boolean().optional().default(true),
|
|
1690
|
+
silkscreen_stroke_width: z16.number().optional().default(0.1)
|
|
1686
1691
|
});
|
|
1692
|
+
var getTssopCoords = (parameters) => {
|
|
1693
|
+
const { num_pins, pn, w, p, pl, legsoutside } = parameters;
|
|
1694
|
+
const ph = num_pins / 2;
|
|
1695
|
+
const isLeft = pn <= ph;
|
|
1696
|
+
const leftPinGaps = ph - 1;
|
|
1697
|
+
const h = p * leftPinGaps;
|
|
1698
|
+
const legoffset = legsoutside ? pl / 2 : -pl / 2;
|
|
1699
|
+
if (isLeft) {
|
|
1700
|
+
return { x: -w / 2 - legoffset, y: h / 2 - (pn - 1) * p };
|
|
1701
|
+
}
|
|
1702
|
+
return { x: w / 2 + legoffset, y: -h / 2 + (pn - ph - 1) * p };
|
|
1703
|
+
};
|
|
1687
1704
|
var tssop = (raw_params) => {
|
|
1688
|
-
const
|
|
1705
|
+
const params = { ...raw_params };
|
|
1706
|
+
const pRaw = params.p;
|
|
1707
|
+
const pValue = typeof pRaw === "string" || typeof pRaw === "number" ? length11.parse(pRaw) : void 0;
|
|
1708
|
+
const isFinePitch = pValue != null && pValue <= length11.parse("0.5mm");
|
|
1709
|
+
const parameters = tssop_def.parse(params);
|
|
1710
|
+
const pads = [];
|
|
1711
|
+
const wForPads = isFinePitch ? parameters.w - length11.parse("0.15mm") : parameters.w;
|
|
1712
|
+
for (let i = 0; i < parameters.num_pins; i++) {
|
|
1713
|
+
const { x, y } = getTssopCoords({
|
|
1714
|
+
num_pins: parameters.num_pins,
|
|
1715
|
+
pn: i + 1,
|
|
1716
|
+
w: wForPads,
|
|
1717
|
+
p: parameters.p,
|
|
1718
|
+
pl: parameters.pl,
|
|
1719
|
+
legsoutside: parameters.legsoutside
|
|
1720
|
+
});
|
|
1721
|
+
pads.push(rectpad(i + 1, x, y, parameters.pl, parameters.pw));
|
|
1722
|
+
}
|
|
1723
|
+
const m = Math.min(1, parameters.p / 2);
|
|
1724
|
+
const sw = parameters.w - (parameters.legsoutside ? 0 : parameters.pl * 2) - 0.2;
|
|
1725
|
+
const sh = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw + m;
|
|
1726
|
+
const silkscreenRefText = silkscreenRef(
|
|
1727
|
+
0,
|
|
1728
|
+
sh / 2 + 0.4,
|
|
1729
|
+
sh / 12
|
|
1730
|
+
);
|
|
1731
|
+
const silkscreenBorder = {
|
|
1732
|
+
type: "pcb_silkscreen_path",
|
|
1733
|
+
layer: "top",
|
|
1734
|
+
pcb_component_id: "",
|
|
1735
|
+
pcb_silkscreen_path_id: "silkscreen_path_1",
|
|
1736
|
+
stroke_width: parameters.silkscreen_stroke_width ?? 0.1,
|
|
1737
|
+
route: [
|
|
1738
|
+
{ x: -sw / 2, y: -sh / 2 },
|
|
1739
|
+
{ x: -sw / 2, y: sh / 2 },
|
|
1740
|
+
...u_curve.map(({ x, y }) => ({
|
|
1741
|
+
x: x * sw / 6,
|
|
1742
|
+
y: y * sw / 6 + sh / 2
|
|
1743
|
+
})),
|
|
1744
|
+
{ x: sw / 2, y: sh / 2 },
|
|
1745
|
+
{ x: sw / 2, y: -sh / 2 },
|
|
1746
|
+
{ x: -sw / 2, y: -sh / 2 }
|
|
1747
|
+
]
|
|
1748
|
+
};
|
|
1689
1749
|
return {
|
|
1690
|
-
circuitJson:
|
|
1750
|
+
circuitJson: [...pads, silkscreenBorder, silkscreenRefText],
|
|
1691
1751
|
parameters
|
|
1692
1752
|
};
|
|
1693
1753
|
};
|
|
1694
1754
|
|
|
1695
1755
|
// src/fn/sot363.ts
|
|
1696
|
-
import { z as
|
|
1697
|
-
import { length as
|
|
1756
|
+
import { z as z17 } from "zod";
|
|
1757
|
+
import { length as length12 } from "circuit-json";
|
|
1698
1758
|
var sot363_def = base_def.extend({
|
|
1699
|
-
fn:
|
|
1700
|
-
num_pins:
|
|
1701
|
-
w:
|
|
1702
|
-
h:
|
|
1703
|
-
p:
|
|
1704
|
-
pl:
|
|
1705
|
-
pw:
|
|
1706
|
-
string:
|
|
1759
|
+
fn: z17.string(),
|
|
1760
|
+
num_pins: z17.literal(6).default(6),
|
|
1761
|
+
w: z17.string().default("3.1mm"),
|
|
1762
|
+
h: z17.string().default("2.0mm"),
|
|
1763
|
+
p: z17.string().default("0.65mm"),
|
|
1764
|
+
pl: z17.string().default("1.325mm"),
|
|
1765
|
+
pw: z17.string().default("0.4mm"),
|
|
1766
|
+
string: z17.string().optional()
|
|
1707
1767
|
});
|
|
1708
1768
|
var sot363 = (raw_params) => {
|
|
1709
1769
|
const parameters = sot363_def.parse({ ...raw_params, fn: "sot363" });
|
|
1710
|
-
const w =
|
|
1711
|
-
const h =
|
|
1712
|
-
const p =
|
|
1713
|
-
const pl =
|
|
1714
|
-
const pw =
|
|
1770
|
+
const w = length12.parse(parameters.w);
|
|
1771
|
+
const h = length12.parse(parameters.h);
|
|
1772
|
+
const p = length12.parse(parameters.p);
|
|
1773
|
+
const pl = length12.parse(parameters.pl);
|
|
1774
|
+
const pw = length12.parse(parameters.pw);
|
|
1715
1775
|
const pads = [];
|
|
1716
1776
|
for (let i = 0; i < 6; i++) {
|
|
1717
1777
|
const { x, y } = getSot363PadCoord(i + 1, w, p, pl);
|
|
@@ -1774,25 +1834,25 @@ var getSot363PadCoord = (pn, w, p, pl) => {
|
|
|
1774
1834
|
};
|
|
1775
1835
|
|
|
1776
1836
|
// src/fn/sot886.ts
|
|
1777
|
-
import { z as
|
|
1778
|
-
import { length as
|
|
1837
|
+
import { z as z18 } from "zod";
|
|
1838
|
+
import { length as length13 } from "circuit-json";
|
|
1779
1839
|
var sot886_def = base_def.extend({
|
|
1780
|
-
fn:
|
|
1781
|
-
num_pins:
|
|
1782
|
-
w:
|
|
1783
|
-
h:
|
|
1784
|
-
p:
|
|
1785
|
-
pl:
|
|
1786
|
-
pw:
|
|
1787
|
-
string:
|
|
1840
|
+
fn: z18.string(),
|
|
1841
|
+
num_pins: z18.literal(6).default(6),
|
|
1842
|
+
w: z18.string().default("1.01mm"),
|
|
1843
|
+
h: z18.string().default("1.45mm"),
|
|
1844
|
+
p: z18.string().default("0.5mm"),
|
|
1845
|
+
pl: z18.string().default("0.33mm"),
|
|
1846
|
+
pw: z18.string().default("0.27mm"),
|
|
1847
|
+
string: z18.string().optional()
|
|
1788
1848
|
});
|
|
1789
1849
|
var sot886 = (raw_params) => {
|
|
1790
1850
|
const parameters = sot886_def.parse({ ...raw_params, fn: "sot886" });
|
|
1791
|
-
const w =
|
|
1792
|
-
const h =
|
|
1793
|
-
const p =
|
|
1794
|
-
const pl =
|
|
1795
|
-
const pw =
|
|
1851
|
+
const w = length13.parse(parameters.w);
|
|
1852
|
+
const h = length13.parse(parameters.h);
|
|
1853
|
+
const p = length13.parse(parameters.p);
|
|
1854
|
+
const pl = length13.parse(parameters.pl);
|
|
1855
|
+
const pw = length13.parse(parameters.pw);
|
|
1796
1856
|
const pads = [];
|
|
1797
1857
|
for (let i = 0; i < 6; i++) {
|
|
1798
1858
|
const { x, y } = getSot886PadCoord(i + 1, w, p, pl);
|
|
@@ -1855,16 +1915,16 @@ var getSot886PadCoord = (pn, w, p, pl) => {
|
|
|
1855
1915
|
};
|
|
1856
1916
|
|
|
1857
1917
|
// src/fn/sot23.ts
|
|
1858
|
-
import { z as
|
|
1918
|
+
import { z as z19 } from "zod";
|
|
1859
1919
|
var sot23_def = base_def.extend({
|
|
1860
|
-
fn:
|
|
1861
|
-
num_pins:
|
|
1862
|
-
w:
|
|
1863
|
-
h:
|
|
1864
|
-
pl:
|
|
1865
|
-
pw:
|
|
1866
|
-
p:
|
|
1867
|
-
string:
|
|
1920
|
+
fn: z19.string(),
|
|
1921
|
+
num_pins: z19.number().default(3),
|
|
1922
|
+
w: z19.string().default("1.92mm"),
|
|
1923
|
+
h: z19.string().default("2.74mm"),
|
|
1924
|
+
pl: z19.string().default("1.32mm"),
|
|
1925
|
+
pw: z19.string().default("0.6mm"),
|
|
1926
|
+
p: z19.string().default("0.95mm"),
|
|
1927
|
+
string: z19.string().optional()
|
|
1868
1928
|
});
|
|
1869
1929
|
var sot23_6_or_8_def = extendSoicDef({
|
|
1870
1930
|
p: "0.95mm",
|
|
@@ -2154,8 +2214,8 @@ var dfn = (raw_params) => {
|
|
|
2154
2214
|
};
|
|
2155
2215
|
|
|
2156
2216
|
// src/fn/pinrow.ts
|
|
2157
|
-
import { z as
|
|
2158
|
-
import { length as
|
|
2217
|
+
import { z as z22 } from "zod";
|
|
2218
|
+
import { length as length14 } from "circuit-json";
|
|
2159
2219
|
|
|
2160
2220
|
// src/helpers/silkscreenPin.ts
|
|
2161
2221
|
var silkscreenPin = ({
|
|
@@ -2242,28 +2302,28 @@ function determinePinlabelAnchorSide({
|
|
|
2242
2302
|
|
|
2243
2303
|
// src/fn/pinrow.ts
|
|
2244
2304
|
var pinrow_def = base_def.extend({
|
|
2245
|
-
fn:
|
|
2246
|
-
num_pins:
|
|
2247
|
-
rows:
|
|
2248
|
-
p:
|
|
2249
|
-
id:
|
|
2250
|
-
od:
|
|
2251
|
-
male:
|
|
2252
|
-
female:
|
|
2253
|
-
smd:
|
|
2254
|
-
surfacemount:
|
|
2255
|
-
rightangle:
|
|
2256
|
-
pw:
|
|
2257
|
-
pl:
|
|
2258
|
-
pinlabeltextalignleft:
|
|
2259
|
-
pinlabeltextaligncenter:
|
|
2260
|
-
pinlabeltextalignright:
|
|
2261
|
-
pinlabelverticallyinverted:
|
|
2262
|
-
pinlabelorthogonal:
|
|
2263
|
-
nosquareplating:
|
|
2264
|
-
nopinlabels:
|
|
2265
|
-
doublesidedpinlabel:
|
|
2266
|
-
bottomsidepinlabel:
|
|
2305
|
+
fn: z22.string(),
|
|
2306
|
+
num_pins: z22.number().optional().default(6),
|
|
2307
|
+
rows: z22.union([z22.string(), z22.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
2308
|
+
p: length14.default("0.1in").describe("pitch"),
|
|
2309
|
+
id: length14.default("1.0mm").describe("inner diameter"),
|
|
2310
|
+
od: length14.default("1.5mm").describe("outer diameter"),
|
|
2311
|
+
male: z22.boolean().optional().describe("for male pin headers"),
|
|
2312
|
+
female: z22.boolean().optional().describe("for female pin headers"),
|
|
2313
|
+
smd: z22.boolean().optional().describe("surface mount device"),
|
|
2314
|
+
surfacemount: z22.boolean().optional().describe("surface mount device (verbose)"),
|
|
2315
|
+
rightangle: z22.boolean().optional().describe("right angle"),
|
|
2316
|
+
pw: length14.optional().default("1.0mm").describe("pad width for SMD"),
|
|
2317
|
+
pl: length14.optional().default("2.0mm").describe("pad length for SMD"),
|
|
2318
|
+
pinlabeltextalignleft: z22.boolean().optional().default(false),
|
|
2319
|
+
pinlabeltextaligncenter: z22.boolean().optional().default(false),
|
|
2320
|
+
pinlabeltextalignright: z22.boolean().optional().default(false),
|
|
2321
|
+
pinlabelverticallyinverted: z22.boolean().optional().default(false),
|
|
2322
|
+
pinlabelorthogonal: z22.boolean().optional().default(false),
|
|
2323
|
+
nosquareplating: z22.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
|
|
2324
|
+
nopinlabels: z22.boolean().optional().default(false).describe("omit silkscreen pin labels"),
|
|
2325
|
+
doublesidedpinlabel: z22.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
|
|
2326
|
+
bottomsidepinlabel: z22.boolean().optional().default(false).describe(
|
|
2267
2327
|
"place the silkscreen reference text on the bottom layer instead of top"
|
|
2268
2328
|
)
|
|
2269
2329
|
}).transform((data) => {
|
|
@@ -2279,7 +2339,7 @@ var pinrow_def = base_def.extend({
|
|
|
2279
2339
|
}).superRefine((data, ctx) => {
|
|
2280
2340
|
if (data.male && data.female) {
|
|
2281
2341
|
ctx.addIssue({
|
|
2282
|
-
code:
|
|
2342
|
+
code: z22.ZodIssueCode.custom,
|
|
2283
2343
|
message: "'male' and 'female' cannot both be true; it should be male or female.",
|
|
2284
2344
|
path: ["male", "female"]
|
|
2285
2345
|
});
|
|
@@ -2517,25 +2577,25 @@ var pinrow = (raw_params) => {
|
|
|
2517
2577
|
};
|
|
2518
2578
|
|
|
2519
2579
|
// src/fn/sot563.ts
|
|
2520
|
-
import { z as
|
|
2521
|
-
import { length as
|
|
2580
|
+
import { z as z23 } from "zod";
|
|
2581
|
+
import { length as length15 } from "circuit-json";
|
|
2522
2582
|
var sot563_def = base_def.extend({
|
|
2523
|
-
fn:
|
|
2524
|
-
num_pins:
|
|
2525
|
-
w:
|
|
2526
|
-
h:
|
|
2527
|
-
p:
|
|
2528
|
-
pl:
|
|
2529
|
-
pw:
|
|
2530
|
-
string:
|
|
2583
|
+
fn: z23.string(),
|
|
2584
|
+
num_pins: z23.literal(6).default(6),
|
|
2585
|
+
w: z23.string().default("2.1mm"),
|
|
2586
|
+
h: z23.string().default("2.45mm"),
|
|
2587
|
+
p: z23.string().default("0.5mm"),
|
|
2588
|
+
pl: z23.string().default("0.675mm"),
|
|
2589
|
+
pw: z23.string().default("0.35mm"),
|
|
2590
|
+
string: z23.string().optional()
|
|
2531
2591
|
});
|
|
2532
2592
|
var sot563 = (raw_params) => {
|
|
2533
2593
|
const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
|
|
2534
|
-
const w =
|
|
2535
|
-
const h =
|
|
2536
|
-
const p =
|
|
2537
|
-
const pl =
|
|
2538
|
-
const pw =
|
|
2594
|
+
const w = length15.parse(parameters.w);
|
|
2595
|
+
const h = length15.parse(parameters.h);
|
|
2596
|
+
const p = length15.parse(parameters.p);
|
|
2597
|
+
const pl = length15.parse(parameters.pl);
|
|
2598
|
+
const pw = length15.parse(parameters.pw);
|
|
2539
2599
|
const pads = [];
|
|
2540
2600
|
for (let i = 0; i < 6; i++) {
|
|
2541
2601
|
const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
|
|
@@ -2626,23 +2686,23 @@ var ms013 = (raw_params) => {
|
|
|
2626
2686
|
};
|
|
2627
2687
|
|
|
2628
2688
|
// src/fn/sot723.ts
|
|
2629
|
-
import { length as
|
|
2630
|
-
import { z as
|
|
2689
|
+
import { length as length16 } from "circuit-json";
|
|
2690
|
+
import { z as z24 } from "zod";
|
|
2631
2691
|
var sot723_def = base_def.extend({
|
|
2632
|
-
fn:
|
|
2633
|
-
num_pins:
|
|
2634
|
-
w:
|
|
2635
|
-
h:
|
|
2636
|
-
pw:
|
|
2637
|
-
pl:
|
|
2638
|
-
p:
|
|
2692
|
+
fn: z24.string(),
|
|
2693
|
+
num_pins: z24.literal(3).default(3),
|
|
2694
|
+
w: z24.string().default("1.2mm"),
|
|
2695
|
+
h: z24.string().default("1.2mm"),
|
|
2696
|
+
pw: z24.string().default("0.40mm"),
|
|
2697
|
+
pl: z24.string().default("0.45mm"),
|
|
2698
|
+
p: z24.string().default("0.575mm")
|
|
2639
2699
|
});
|
|
2640
2700
|
var sot723 = (raw_params) => {
|
|
2641
2701
|
const parameters = sot723_def.parse(raw_params);
|
|
2642
2702
|
const pad2 = sot723WithoutParsing(parameters);
|
|
2643
2703
|
const silkscreenRefText = silkscreenRef(
|
|
2644
2704
|
0,
|
|
2645
|
-
|
|
2705
|
+
length16.parse(parameters.h),
|
|
2646
2706
|
0.2
|
|
2647
2707
|
);
|
|
2648
2708
|
return {
|
|
@@ -2685,22 +2745,22 @@ var sot723WithoutParsing = (parameters) => {
|
|
|
2685
2745
|
};
|
|
2686
2746
|
|
|
2687
2747
|
// src/fn/sod123.ts
|
|
2688
|
-
import { z as
|
|
2689
|
-
import { length as
|
|
2748
|
+
import { z as z25 } from "zod";
|
|
2749
|
+
import { length as length17 } from "circuit-json";
|
|
2690
2750
|
var sod_def = base_def.extend({
|
|
2691
|
-
fn:
|
|
2692
|
-
num_pins:
|
|
2693
|
-
w:
|
|
2694
|
-
h:
|
|
2695
|
-
pl:
|
|
2696
|
-
pw:
|
|
2697
|
-
p:
|
|
2751
|
+
fn: z25.string(),
|
|
2752
|
+
num_pins: z25.literal(2).default(2),
|
|
2753
|
+
w: z25.string().default("2.36mm"),
|
|
2754
|
+
h: z25.string().default("1.22mm"),
|
|
2755
|
+
pl: z25.string().default("0.9mm"),
|
|
2756
|
+
pw: z25.string().default("1.2mm"),
|
|
2757
|
+
p: z25.string().default("3.30mm")
|
|
2698
2758
|
});
|
|
2699
2759
|
var sod123 = (raw_params) => {
|
|
2700
2760
|
const parameters = sod_def.parse(raw_params);
|
|
2701
2761
|
const silkscreenRefText = silkscreenRef(
|
|
2702
2762
|
0,
|
|
2703
|
-
|
|
2763
|
+
length17.parse(parameters.h) / 4 + 0.4,
|
|
2704
2764
|
0.3
|
|
2705
2765
|
);
|
|
2706
2766
|
return {
|
|
@@ -2740,14 +2800,14 @@ var sodWithoutParsing = (parameters) => {
|
|
|
2740
2800
|
|
|
2741
2801
|
// src/fn/axial.ts
|
|
2742
2802
|
import {
|
|
2743
|
-
length as
|
|
2803
|
+
length as length18
|
|
2744
2804
|
} from "circuit-json";
|
|
2745
|
-
import { z as
|
|
2805
|
+
import { z as z26 } from "zod";
|
|
2746
2806
|
var axial_def = base_def.extend({
|
|
2747
|
-
fn:
|
|
2748
|
-
p:
|
|
2749
|
-
id:
|
|
2750
|
-
od:
|
|
2807
|
+
fn: z26.string(),
|
|
2808
|
+
p: length18.optional().default("2.54mm"),
|
|
2809
|
+
id: length18.optional().default("0.7mm"),
|
|
2810
|
+
od: length18.optional().default("1.4mm")
|
|
2751
2811
|
});
|
|
2752
2812
|
var axial = (raw_params) => {
|
|
2753
2813
|
const parameters = axial_def.parse(raw_params);
|
|
@@ -2780,9 +2840,9 @@ var axial = (raw_params) => {
|
|
|
2780
2840
|
|
|
2781
2841
|
// src/fn/radial.ts
|
|
2782
2842
|
import {
|
|
2783
|
-
length as
|
|
2843
|
+
length as length19
|
|
2784
2844
|
} from "circuit-json";
|
|
2785
|
-
import { z as
|
|
2845
|
+
import { z as z27 } from "zod";
|
|
2786
2846
|
|
|
2787
2847
|
// src/helpers/generateCircleArcs.ts
|
|
2788
2848
|
var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLength = 0.1) => {
|
|
@@ -2813,13 +2873,13 @@ var generateCircleArcs = (centerX, centerY, radius, cut, cutHeight, segmentLengt
|
|
|
2813
2873
|
|
|
2814
2874
|
// src/fn/radial.ts
|
|
2815
2875
|
var radial_def = base_def.extend({
|
|
2816
|
-
fn:
|
|
2817
|
-
p:
|
|
2818
|
-
id:
|
|
2819
|
-
od:
|
|
2820
|
-
ceramic:
|
|
2821
|
-
electrolytic:
|
|
2822
|
-
polarized:
|
|
2876
|
+
fn: z27.string(),
|
|
2877
|
+
p: length19.optional().default("5mm"),
|
|
2878
|
+
id: length19.optional().default("0.8mm"),
|
|
2879
|
+
od: length19.optional().default("1.6mm"),
|
|
2880
|
+
ceramic: z27.boolean().optional(),
|
|
2881
|
+
electrolytic: z27.boolean().optional(),
|
|
2882
|
+
polarized: z27.boolean().optional()
|
|
2823
2883
|
});
|
|
2824
2884
|
var radial = (raw_params) => {
|
|
2825
2885
|
const parameters = radial_def.parse(raw_params);
|
|
@@ -2916,8 +2976,8 @@ var radial = (raw_params) => {
|
|
|
2916
2976
|
};
|
|
2917
2977
|
|
|
2918
2978
|
// src/fn/pushbutton.ts
|
|
2919
|
-
import { length as
|
|
2920
|
-
import { z as
|
|
2979
|
+
import { length as length20 } from "circuit-json";
|
|
2980
|
+
import { z as z28 } from "zod";
|
|
2921
2981
|
|
|
2922
2982
|
// src/helpers/silkscreenpath.ts
|
|
2923
2983
|
var silkscreenpath = (route, options = {}) => {
|
|
@@ -2933,11 +2993,11 @@ var silkscreenpath = (route, options = {}) => {
|
|
|
2933
2993
|
|
|
2934
2994
|
// src/fn/pushbutton.ts
|
|
2935
2995
|
var pushbutton_def = base_def.extend({
|
|
2936
|
-
fn:
|
|
2937
|
-
w:
|
|
2938
|
-
h:
|
|
2939
|
-
id:
|
|
2940
|
-
od:
|
|
2996
|
+
fn: z28.literal("pushbutton"),
|
|
2997
|
+
w: length20.default(4.5),
|
|
2998
|
+
h: length20.default(6.5),
|
|
2999
|
+
id: length20.default(1),
|
|
3000
|
+
od: length20.default(1.2)
|
|
2941
3001
|
});
|
|
2942
3002
|
var pushbutton = (raw_params) => {
|
|
2943
3003
|
const parameters = pushbutton_def.parse(raw_params);
|
|
@@ -2984,24 +3044,24 @@ var pushbutton = (raw_params) => {
|
|
|
2984
3044
|
|
|
2985
3045
|
// src/fn/stampboard.ts
|
|
2986
3046
|
import {
|
|
2987
|
-
length as
|
|
3047
|
+
length as length21
|
|
2988
3048
|
} from "circuit-json";
|
|
2989
|
-
import { z as
|
|
3049
|
+
import { z as z29 } from "zod";
|
|
2990
3050
|
var stampboard_def = base_def.extend({
|
|
2991
|
-
fn:
|
|
2992
|
-
w:
|
|
2993
|
-
h:
|
|
2994
|
-
left:
|
|
2995
|
-
right:
|
|
2996
|
-
top:
|
|
2997
|
-
bottom:
|
|
2998
|
-
p:
|
|
2999
|
-
pw:
|
|
3000
|
-
pl:
|
|
3001
|
-
innerhole:
|
|
3002
|
-
innerholeedgedistance:
|
|
3003
|
-
silkscreenlabels:
|
|
3004
|
-
silkscreenlabelmargin:
|
|
3051
|
+
fn: z29.string(),
|
|
3052
|
+
w: length21.default("22.58mm"),
|
|
3053
|
+
h: length21.optional(),
|
|
3054
|
+
left: length21.optional().default(20),
|
|
3055
|
+
right: length21.optional().default(20),
|
|
3056
|
+
top: length21.optional().default(2),
|
|
3057
|
+
bottom: length21.optional().default(2),
|
|
3058
|
+
p: length21.default(length21.parse("2.54mm")),
|
|
3059
|
+
pw: length21.default(length21.parse("1.6mm")),
|
|
3060
|
+
pl: length21.default(length21.parse("2.4mm")),
|
|
3061
|
+
innerhole: z29.boolean().default(false),
|
|
3062
|
+
innerholeedgedistance: length21.default(length21.parse("1.61mm")),
|
|
3063
|
+
silkscreenlabels: z29.boolean().default(false),
|
|
3064
|
+
silkscreenlabelmargin: length21.default(length21.parse("0.1mm"))
|
|
3005
3065
|
});
|
|
3006
3066
|
var getHeight = (parameters) => {
|
|
3007
3067
|
const params = stampboard_def.parse(parameters);
|
|
@@ -3410,22 +3470,22 @@ var stampboard = (raw_params) => {
|
|
|
3410
3470
|
|
|
3411
3471
|
// src/fn/stampreceiver.ts
|
|
3412
3472
|
import {
|
|
3413
|
-
length as
|
|
3473
|
+
length as length22
|
|
3414
3474
|
} from "circuit-json";
|
|
3415
|
-
import { z as
|
|
3475
|
+
import { z as z30 } from "zod";
|
|
3416
3476
|
var stampreceiver_def = base_def.extend({
|
|
3417
|
-
fn:
|
|
3418
|
-
w:
|
|
3419
|
-
h:
|
|
3420
|
-
left:
|
|
3421
|
-
right:
|
|
3422
|
-
top:
|
|
3423
|
-
bottom:
|
|
3424
|
-
p:
|
|
3425
|
-
pw:
|
|
3426
|
-
pl:
|
|
3427
|
-
innerhole:
|
|
3428
|
-
innerholeedgedistance:
|
|
3477
|
+
fn: z30.string(),
|
|
3478
|
+
w: length22.default("22.58mm"),
|
|
3479
|
+
h: length22.optional(),
|
|
3480
|
+
left: length22.optional().default(20),
|
|
3481
|
+
right: length22.optional().default(20),
|
|
3482
|
+
top: length22.optional().default(2),
|
|
3483
|
+
bottom: length22.optional().default(2),
|
|
3484
|
+
p: length22.default(length22.parse("2.54mm")),
|
|
3485
|
+
pw: length22.default(length22.parse("1.6mm")),
|
|
3486
|
+
pl: length22.default(length22.parse("3.2mm")),
|
|
3487
|
+
innerhole: z30.boolean().default(false),
|
|
3488
|
+
innerholeedgedistance: length22.default(length22.parse("1.61mm"))
|
|
3429
3489
|
});
|
|
3430
3490
|
var getHeight2 = (parameters) => {
|
|
3431
3491
|
const params = stampreceiver_def.parse(parameters);
|
|
@@ -3726,20 +3786,20 @@ var lqfp = (parameters) => {
|
|
|
3726
3786
|
|
|
3727
3787
|
// src/fn/breakoutheaders.ts
|
|
3728
3788
|
import {
|
|
3729
|
-
length as
|
|
3789
|
+
length as length23
|
|
3730
3790
|
} from "circuit-json";
|
|
3731
|
-
import { z as
|
|
3791
|
+
import { z as z31 } from "zod";
|
|
3732
3792
|
var breakoutheaders_def = base_def.extend({
|
|
3733
|
-
fn:
|
|
3734
|
-
w:
|
|
3735
|
-
h:
|
|
3736
|
-
left:
|
|
3737
|
-
right:
|
|
3738
|
-
top:
|
|
3739
|
-
bottom:
|
|
3740
|
-
p:
|
|
3741
|
-
id:
|
|
3742
|
-
od:
|
|
3793
|
+
fn: z31.string(),
|
|
3794
|
+
w: length23.default("10mm"),
|
|
3795
|
+
h: length23.optional(),
|
|
3796
|
+
left: length23.optional().default(20),
|
|
3797
|
+
right: length23.optional().default(20),
|
|
3798
|
+
top: length23.optional().default(0),
|
|
3799
|
+
bottom: length23.optional().default(0),
|
|
3800
|
+
p: length23.default(length23.parse("2.54mm")),
|
|
3801
|
+
id: length23.optional().default(length23.parse("1mm")),
|
|
3802
|
+
od: length23.optional().default(length23.parse("1.5mm"))
|
|
3743
3803
|
});
|
|
3744
3804
|
var getHeight3 = (parameters) => {
|
|
3745
3805
|
const params = breakoutheaders_def.parse(parameters);
|
|
@@ -3931,9 +3991,9 @@ var breakoutheaders = (raw_params) => {
|
|
|
3931
3991
|
|
|
3932
3992
|
// src/fn/hc49.ts
|
|
3933
3993
|
import {
|
|
3934
|
-
length as
|
|
3994
|
+
length as length24
|
|
3935
3995
|
} from "circuit-json";
|
|
3936
|
-
import { z as
|
|
3996
|
+
import { z as z32 } from "zod";
|
|
3937
3997
|
var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
3938
3998
|
return Array.from({ length: 25 }, (_, i) => {
|
|
3939
3999
|
const theta = i / 24 * Math.PI - Math.PI / 2;
|
|
@@ -3944,12 +4004,12 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
|
3944
4004
|
});
|
|
3945
4005
|
};
|
|
3946
4006
|
var hc49_def = base_def.extend({
|
|
3947
|
-
fn:
|
|
3948
|
-
p:
|
|
3949
|
-
id:
|
|
3950
|
-
od:
|
|
3951
|
-
w:
|
|
3952
|
-
h:
|
|
4007
|
+
fn: z32.string(),
|
|
4008
|
+
p: length24.optional().default("4.88mm"),
|
|
4009
|
+
id: length24.optional().default("0.8mm"),
|
|
4010
|
+
od: length24.optional().default("1.5mm"),
|
|
4011
|
+
w: length24.optional().default("5.6mm"),
|
|
4012
|
+
h: length24.optional().default("3.5mm")
|
|
3953
4013
|
});
|
|
3954
4014
|
var hc49 = (raw_params) => {
|
|
3955
4015
|
const parameters = hc49_def.parse(raw_params);
|
|
@@ -3990,11 +4050,11 @@ var hc49 = (raw_params) => {
|
|
|
3990
4050
|
|
|
3991
4051
|
// src/fn/pad.ts
|
|
3992
4052
|
import "zod";
|
|
3993
|
-
import { length as
|
|
4053
|
+
import { length as length25 } from "circuit-json";
|
|
3994
4054
|
import { mm as mm11 } from "@tscircuit/mm";
|
|
3995
4055
|
var pad_def = base_def.extend({
|
|
3996
|
-
w:
|
|
3997
|
-
h:
|
|
4056
|
+
w: length25,
|
|
4057
|
+
h: length25
|
|
3998
4058
|
});
|
|
3999
4059
|
var pad = (params) => {
|
|
4000
4060
|
const { w, h } = params;
|
|
@@ -4010,7 +4070,7 @@ var pad = (params) => {
|
|
|
4010
4070
|
};
|
|
4011
4071
|
|
|
4012
4072
|
// src/fn/to92.ts
|
|
4013
|
-
import { z as
|
|
4073
|
+
import { z as z34 } from "zod";
|
|
4014
4074
|
import "@tscircuit/mm";
|
|
4015
4075
|
|
|
4016
4076
|
// src/helpers/platedHolePill.ts
|
|
@@ -4035,15 +4095,15 @@ var platedHolePill = (pn, x, y, holeDiameter, outerWidth, outerHeight) => {
|
|
|
4035
4095
|
|
|
4036
4096
|
// src/fn/to92.ts
|
|
4037
4097
|
var to92_def = base_def.extend({
|
|
4038
|
-
fn:
|
|
4039
|
-
num_pins:
|
|
4040
|
-
p:
|
|
4041
|
-
id:
|
|
4042
|
-
od:
|
|
4043
|
-
w:
|
|
4044
|
-
h:
|
|
4045
|
-
inline:
|
|
4046
|
-
string:
|
|
4098
|
+
fn: z34.string(),
|
|
4099
|
+
num_pins: z34.union([z34.literal(3), z34.literal(2)]).default(3),
|
|
4100
|
+
p: z34.string().default("1.27mm"),
|
|
4101
|
+
id: z34.string().default("0.72mm"),
|
|
4102
|
+
od: z34.string().default("0.95mm"),
|
|
4103
|
+
w: z34.string().default("4.5mm"),
|
|
4104
|
+
h: z34.string().default("4.5mm"),
|
|
4105
|
+
inline: z34.boolean().default(false),
|
|
4106
|
+
string: z34.string().optional()
|
|
4047
4107
|
});
|
|
4048
4108
|
var generateSemicircle = (centerX, centerY, radius) => {
|
|
4049
4109
|
return Array.from({ length: 25 }, (_, i) => {
|
|
@@ -4153,22 +4213,22 @@ var to92 = (raw_params) => {
|
|
|
4153
4213
|
};
|
|
4154
4214
|
|
|
4155
4215
|
// src/fn/sod523.ts
|
|
4156
|
-
import { z as
|
|
4157
|
-
import { length as
|
|
4216
|
+
import { z as z35 } from "zod";
|
|
4217
|
+
import { length as length26 } from "circuit-json";
|
|
4158
4218
|
var sod_def2 = base_def.extend({
|
|
4159
|
-
fn:
|
|
4160
|
-
num_pins:
|
|
4161
|
-
w:
|
|
4162
|
-
h:
|
|
4163
|
-
pl:
|
|
4164
|
-
pw:
|
|
4165
|
-
p:
|
|
4219
|
+
fn: z35.string(),
|
|
4220
|
+
num_pins: z35.literal(2).default(2),
|
|
4221
|
+
w: z35.string().default("2.15mm"),
|
|
4222
|
+
h: z35.string().default("1.20mm"),
|
|
4223
|
+
pl: z35.string().default("0.5mm"),
|
|
4224
|
+
pw: z35.string().default("0.6mm"),
|
|
4225
|
+
p: z35.string().default("1.4mm")
|
|
4166
4226
|
});
|
|
4167
4227
|
var sod523 = (raw_params) => {
|
|
4168
4228
|
const parameters = sod_def2.parse(raw_params);
|
|
4169
4229
|
const silkscreenRefText = silkscreenRef(
|
|
4170
4230
|
0,
|
|
4171
|
-
|
|
4231
|
+
length26.parse(parameters.h),
|
|
4172
4232
|
0.3
|
|
4173
4233
|
);
|
|
4174
4234
|
const silkscreenLine = {
|
|
@@ -4177,20 +4237,20 @@ var sod523 = (raw_params) => {
|
|
|
4177
4237
|
pcb_component_id: "",
|
|
4178
4238
|
route: [
|
|
4179
4239
|
{
|
|
4180
|
-
x:
|
|
4181
|
-
y:
|
|
4240
|
+
x: length26.parse(parameters.p) / 2,
|
|
4241
|
+
y: length26.parse(parameters.h) / 2
|
|
4182
4242
|
},
|
|
4183
4243
|
{
|
|
4184
|
-
x: -
|
|
4185
|
-
y:
|
|
4244
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4245
|
+
y: length26.parse(parameters.h) / 2
|
|
4186
4246
|
},
|
|
4187
4247
|
{
|
|
4188
|
-
x: -
|
|
4189
|
-
y: -
|
|
4248
|
+
x: -length26.parse(parameters.w) / 2 - 0.2,
|
|
4249
|
+
y: -length26.parse(parameters.h) / 2
|
|
4190
4250
|
},
|
|
4191
4251
|
{
|
|
4192
|
-
x:
|
|
4193
|
-
y: -
|
|
4252
|
+
x: length26.parse(parameters.p) / 2,
|
|
4253
|
+
y: -length26.parse(parameters.h) / 2
|
|
4194
4254
|
}
|
|
4195
4255
|
],
|
|
4196
4256
|
stroke_width: 0.1,
|
|
@@ -4278,22 +4338,22 @@ var sop8 = (raw_params) => {
|
|
|
4278
4338
|
};
|
|
4279
4339
|
|
|
4280
4340
|
// src/fn/sod80.ts
|
|
4281
|
-
import { z as
|
|
4282
|
-
import { length as
|
|
4341
|
+
import { z as z36 } from "zod";
|
|
4342
|
+
import { length as length27 } from "circuit-json";
|
|
4283
4343
|
var sod80_def = base_def.extend({
|
|
4284
|
-
fn:
|
|
4285
|
-
num_pins:
|
|
4286
|
-
w:
|
|
4287
|
-
h:
|
|
4288
|
-
pl:
|
|
4289
|
-
pw:
|
|
4290
|
-
p:
|
|
4344
|
+
fn: z36.string(),
|
|
4345
|
+
num_pins: z36.literal(2).default(2),
|
|
4346
|
+
w: z36.string().default("5.0mm"),
|
|
4347
|
+
h: z36.string().default("2.30mm"),
|
|
4348
|
+
pl: z36.string().default("1.25mm"),
|
|
4349
|
+
pw: z36.string().default("2mm"),
|
|
4350
|
+
p: z36.string().default("3.75mm")
|
|
4291
4351
|
});
|
|
4292
4352
|
var sod80 = (raw_params) => {
|
|
4293
4353
|
const parameters = sod80_def.parse(raw_params);
|
|
4294
4354
|
const silkscreenRefText = silkscreenRef(
|
|
4295
4355
|
0,
|
|
4296
|
-
|
|
4356
|
+
length27.parse(parameters.h) / 2 + 1,
|
|
4297
4357
|
0.3
|
|
4298
4358
|
);
|
|
4299
4359
|
const silkscreenLine = {
|
|
@@ -4302,20 +4362,20 @@ var sod80 = (raw_params) => {
|
|
|
4302
4362
|
pcb_component_id: "",
|
|
4303
4363
|
route: [
|
|
4304
4364
|
{
|
|
4305
|
-
x:
|
|
4306
|
-
y:
|
|
4365
|
+
x: length27.parse(parameters.p) / 2 + 0.5,
|
|
4366
|
+
y: length27.parse(parameters.h) / 2 + 0.5
|
|
4307
4367
|
},
|
|
4308
4368
|
{
|
|
4309
|
-
x: -
|
|
4310
|
-
y:
|
|
4369
|
+
x: -length27.parse(parameters.w) / 2 - 0.5,
|
|
4370
|
+
y: length27.parse(parameters.h) / 2 + 0.5
|
|
4311
4371
|
},
|
|
4312
4372
|
{
|
|
4313
|
-
x: -
|
|
4314
|
-
y: -
|
|
4373
|
+
x: -length27.parse(parameters.w) / 2 - 0.5,
|
|
4374
|
+
y: -length27.parse(parameters.h) / 2 - 0.5
|
|
4315
4375
|
},
|
|
4316
4376
|
{
|
|
4317
|
-
x:
|
|
4318
|
-
y: -
|
|
4377
|
+
x: length27.parse(parameters.p) / 2 + 0.5,
|
|
4378
|
+
y: -length27.parse(parameters.h) / 2 - 0.5
|
|
4319
4379
|
}
|
|
4320
4380
|
],
|
|
4321
4381
|
stroke_width: 0.1,
|
|
@@ -4354,22 +4414,22 @@ var sod80WithoutParsing = (parameters) => {
|
|
|
4354
4414
|
};
|
|
4355
4415
|
|
|
4356
4416
|
// src/fn/sod123w.ts
|
|
4357
|
-
import { z as
|
|
4358
|
-
import { length as
|
|
4417
|
+
import { z as z37 } from "zod";
|
|
4418
|
+
import { length as length28 } from "circuit-json";
|
|
4359
4419
|
var sod_def3 = base_def.extend({
|
|
4360
|
-
fn:
|
|
4361
|
-
num_pins:
|
|
4362
|
-
w:
|
|
4363
|
-
h:
|
|
4364
|
-
pl:
|
|
4365
|
-
pw:
|
|
4366
|
-
p:
|
|
4420
|
+
fn: z37.string(),
|
|
4421
|
+
num_pins: z37.literal(2).default(2),
|
|
4422
|
+
w: z37.string().default("4.4mm"),
|
|
4423
|
+
h: z37.string().default("2.1mm"),
|
|
4424
|
+
pl: z37.string().default("1.2mm"),
|
|
4425
|
+
pw: z37.string().default("1.2mm"),
|
|
4426
|
+
p: z37.string().default("2.9mm")
|
|
4367
4427
|
});
|
|
4368
4428
|
var sod123w = (raw_params) => {
|
|
4369
4429
|
const parameters = sod_def3.parse(raw_params);
|
|
4370
4430
|
const silkscreenRefText = silkscreenRef(
|
|
4371
4431
|
0,
|
|
4372
|
-
|
|
4432
|
+
length28.parse(parameters.h) - 0.5,
|
|
4373
4433
|
0.3
|
|
4374
4434
|
);
|
|
4375
4435
|
const silkscreenLine = {
|
|
@@ -4378,20 +4438,20 @@ var sod123w = (raw_params) => {
|
|
|
4378
4438
|
pcb_component_id: "",
|
|
4379
4439
|
route: [
|
|
4380
4440
|
{
|
|
4381
|
-
x:
|
|
4382
|
-
y:
|
|
4441
|
+
x: length28.parse(parameters.p) / 2,
|
|
4442
|
+
y: length28.parse(parameters.h) / 2
|
|
4383
4443
|
},
|
|
4384
4444
|
{
|
|
4385
|
-
x: -
|
|
4386
|
-
y:
|
|
4445
|
+
x: -length28.parse(parameters.w) / 2 - 0.2,
|
|
4446
|
+
y: length28.parse(parameters.h) / 2
|
|
4387
4447
|
},
|
|
4388
4448
|
{
|
|
4389
|
-
x: -
|
|
4390
|
-
y: -
|
|
4449
|
+
x: -length28.parse(parameters.w) / 2 - 0.2,
|
|
4450
|
+
y: -length28.parse(parameters.h) / 2
|
|
4391
4451
|
},
|
|
4392
4452
|
{
|
|
4393
|
-
x:
|
|
4394
|
-
y: -
|
|
4453
|
+
x: length28.parse(parameters.p) / 2,
|
|
4454
|
+
y: -length28.parse(parameters.h) / 2
|
|
4395
4455
|
}
|
|
4396
4456
|
],
|
|
4397
4457
|
stroke_width: 0.1,
|
|
@@ -4433,22 +4493,22 @@ var sodWithoutParsing3 = (parameters) => {
|
|
|
4433
4493
|
};
|
|
4434
4494
|
|
|
4435
4495
|
// src/fn/sod323.ts
|
|
4436
|
-
import { z as
|
|
4437
|
-
import { length as
|
|
4496
|
+
import { z as z38 } from "zod";
|
|
4497
|
+
import { length as length29 } from "circuit-json";
|
|
4438
4498
|
var sod_def4 = base_def.extend({
|
|
4439
|
-
fn:
|
|
4440
|
-
num_pins:
|
|
4441
|
-
w:
|
|
4442
|
-
h:
|
|
4443
|
-
pl:
|
|
4444
|
-
pw:
|
|
4445
|
-
p:
|
|
4499
|
+
fn: z38.string(),
|
|
4500
|
+
num_pins: z38.literal(2).default(2),
|
|
4501
|
+
w: z38.string().default("3.30mm"),
|
|
4502
|
+
h: z38.string().default("1.80mm"),
|
|
4503
|
+
pl: z38.string().default("0.60mm"),
|
|
4504
|
+
pw: z38.string().default("0.45mm"),
|
|
4505
|
+
p: z38.string().default("2.1mm")
|
|
4446
4506
|
});
|
|
4447
4507
|
var sod323 = (raw_params) => {
|
|
4448
4508
|
const parameters = sod_def4.parse(raw_params);
|
|
4449
4509
|
const silkscreenRefText = silkscreenRef(
|
|
4450
4510
|
0,
|
|
4451
|
-
|
|
4511
|
+
length29.parse(parameters.h) - 0.5,
|
|
4452
4512
|
0.3
|
|
4453
4513
|
);
|
|
4454
4514
|
const silkscreenLine = {
|
|
@@ -4457,20 +4517,20 @@ var sod323 = (raw_params) => {
|
|
|
4457
4517
|
pcb_component_id: "",
|
|
4458
4518
|
route: [
|
|
4459
4519
|
{
|
|
4460
|
-
x:
|
|
4461
|
-
y:
|
|
4520
|
+
x: length29.parse(parameters.p) / 2,
|
|
4521
|
+
y: length29.parse(parameters.h) / 2
|
|
4462
4522
|
},
|
|
4463
4523
|
{
|
|
4464
|
-
x: -
|
|
4465
|
-
y:
|
|
4524
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4525
|
+
y: length29.parse(parameters.h) / 2
|
|
4466
4526
|
},
|
|
4467
4527
|
{
|
|
4468
|
-
x: -
|
|
4469
|
-
y: -
|
|
4528
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4529
|
+
y: -length29.parse(parameters.h) / 2
|
|
4470
4530
|
},
|
|
4471
4531
|
{
|
|
4472
|
-
x:
|
|
4473
|
-
y: -
|
|
4532
|
+
x: length29.parse(parameters.p) / 2,
|
|
4533
|
+
y: -length29.parse(parameters.h) / 2
|
|
4474
4534
|
}
|
|
4475
4535
|
],
|
|
4476
4536
|
stroke_width: 0.1,
|
|
@@ -4512,22 +4572,22 @@ var sodWithoutParsing4 = (parameters) => {
|
|
|
4512
4572
|
};
|
|
4513
4573
|
|
|
4514
4574
|
// src/fn/sod923.ts
|
|
4515
|
-
import { z as
|
|
4516
|
-
import { length as
|
|
4575
|
+
import { z as z39 } from "zod";
|
|
4576
|
+
import { length as length30 } from "circuit-json";
|
|
4517
4577
|
var sod_def5 = base_def.extend({
|
|
4518
|
-
fn:
|
|
4519
|
-
num_pins:
|
|
4520
|
-
w:
|
|
4521
|
-
h:
|
|
4522
|
-
pl:
|
|
4523
|
-
pw:
|
|
4524
|
-
p:
|
|
4578
|
+
fn: z39.string(),
|
|
4579
|
+
num_pins: z39.literal(2).default(2),
|
|
4580
|
+
w: z39.string().default("1.4mm"),
|
|
4581
|
+
h: z39.string().default("0.9mm"),
|
|
4582
|
+
pl: z39.string().default("0.36mm"),
|
|
4583
|
+
pw: z39.string().default("0.25mm"),
|
|
4584
|
+
p: z39.string().default("0.85mm")
|
|
4525
4585
|
});
|
|
4526
4586
|
var sod923 = (raw_params) => {
|
|
4527
4587
|
const parameters = sod_def5.parse(raw_params);
|
|
4528
4588
|
const silkscreenRefText = silkscreenRef(
|
|
4529
4589
|
0,
|
|
4530
|
-
|
|
4590
|
+
length30.parse(parameters.h),
|
|
4531
4591
|
0.3
|
|
4532
4592
|
);
|
|
4533
4593
|
const silkscreenLine = {
|
|
@@ -4536,20 +4596,20 @@ var sod923 = (raw_params) => {
|
|
|
4536
4596
|
pcb_component_id: "",
|
|
4537
4597
|
route: [
|
|
4538
4598
|
{
|
|
4539
|
-
x:
|
|
4540
|
-
y:
|
|
4599
|
+
x: length30.parse(parameters.p) / 2 + 0.15,
|
|
4600
|
+
y: length30.parse(parameters.h) / 2
|
|
4541
4601
|
},
|
|
4542
4602
|
{
|
|
4543
|
-
x: -
|
|
4544
|
-
y:
|
|
4603
|
+
x: -length30.parse(parameters.w) / 2 - 0.15,
|
|
4604
|
+
y: length30.parse(parameters.h) / 2
|
|
4545
4605
|
},
|
|
4546
4606
|
{
|
|
4547
|
-
x: -
|
|
4548
|
-
y: -
|
|
4607
|
+
x: -length30.parse(parameters.w) / 2 - 0.15,
|
|
4608
|
+
y: -length30.parse(parameters.h) / 2
|
|
4549
4609
|
},
|
|
4550
4610
|
{
|
|
4551
|
-
x:
|
|
4552
|
-
y: -
|
|
4611
|
+
x: length30.parse(parameters.p) / 2 + 0.15,
|
|
4612
|
+
y: -length30.parse(parameters.h) / 2
|
|
4553
4613
|
}
|
|
4554
4614
|
],
|
|
4555
4615
|
stroke_width: 0.1,
|
|
@@ -4592,22 +4652,22 @@ var sodWithoutParsing5 = (parameters) => {
|
|
|
4592
4652
|
};
|
|
4593
4653
|
|
|
4594
4654
|
// src/fn/sod882.ts
|
|
4595
|
-
import { z as
|
|
4596
|
-
import { length as
|
|
4655
|
+
import { z as z40 } from "zod";
|
|
4656
|
+
import { length as length31 } from "circuit-json";
|
|
4597
4657
|
var sod_def6 = base_def.extend({
|
|
4598
|
-
fn:
|
|
4599
|
-
num_pins:
|
|
4600
|
-
w:
|
|
4601
|
-
h:
|
|
4602
|
-
pl:
|
|
4603
|
-
pw:
|
|
4604
|
-
p:
|
|
4658
|
+
fn: z40.string(),
|
|
4659
|
+
num_pins: z40.literal(2).default(2),
|
|
4660
|
+
w: z40.string().default("1.3mm"),
|
|
4661
|
+
h: z40.string().default("0.9mm"),
|
|
4662
|
+
pl: z40.string().default("0.4mm"),
|
|
4663
|
+
pw: z40.string().default("0.7mm"),
|
|
4664
|
+
p: z40.string().default("0.7mm")
|
|
4605
4665
|
});
|
|
4606
4666
|
var sod882 = (raw_params) => {
|
|
4607
4667
|
const parameters = sod_def6.parse(raw_params);
|
|
4608
4668
|
const silkscreenRefText = silkscreenRef(
|
|
4609
4669
|
0,
|
|
4610
|
-
|
|
4670
|
+
length31.parse(parameters.h) + 0.1,
|
|
4611
4671
|
0.3
|
|
4612
4672
|
);
|
|
4613
4673
|
const silkscreenLine = {
|
|
@@ -4616,20 +4676,20 @@ var sod882 = (raw_params) => {
|
|
|
4616
4676
|
pcb_component_id: "",
|
|
4617
4677
|
route: [
|
|
4618
4678
|
{
|
|
4619
|
-
x:
|
|
4620
|
-
y:
|
|
4679
|
+
x: length31.parse(parameters.p) / 2 + 0.2,
|
|
4680
|
+
y: length31.parse(parameters.h) / 2 + 0.2
|
|
4621
4681
|
},
|
|
4622
4682
|
{
|
|
4623
|
-
x: -
|
|
4624
|
-
y:
|
|
4683
|
+
x: -length31.parse(parameters.w) / 2 - 0.2,
|
|
4684
|
+
y: length31.parse(parameters.h) / 2 + 0.2
|
|
4625
4685
|
},
|
|
4626
4686
|
{
|
|
4627
|
-
x: -
|
|
4628
|
-
y: -
|
|
4687
|
+
x: -length31.parse(parameters.w) / 2 - 0.2,
|
|
4688
|
+
y: -length31.parse(parameters.h) / 2 - 0.2
|
|
4629
4689
|
},
|
|
4630
4690
|
{
|
|
4631
|
-
x:
|
|
4632
|
-
y: -
|
|
4691
|
+
x: length31.parse(parameters.p) / 2 + 0.2,
|
|
4692
|
+
y: -length31.parse(parameters.h) / 2 - 0.2
|
|
4633
4693
|
}
|
|
4634
4694
|
],
|
|
4635
4695
|
stroke_width: 0.1,
|
|
@@ -4672,22 +4732,22 @@ var sodWithoutParsing6 = (parameters) => {
|
|
|
4672
4732
|
};
|
|
4673
4733
|
|
|
4674
4734
|
// src/fn/sod323f.ts
|
|
4675
|
-
import { z as
|
|
4676
|
-
import { length as
|
|
4735
|
+
import { z as z41 } from "zod";
|
|
4736
|
+
import { length as length32 } from "circuit-json";
|
|
4677
4737
|
var sod_def7 = base_def.extend({
|
|
4678
|
-
fn:
|
|
4679
|
-
num_pins:
|
|
4680
|
-
w:
|
|
4681
|
-
h:
|
|
4682
|
-
pl:
|
|
4683
|
-
pw:
|
|
4684
|
-
pad_spacing:
|
|
4738
|
+
fn: z41.string(),
|
|
4739
|
+
num_pins: z41.literal(2).default(2),
|
|
4740
|
+
w: z41.string().default("3,05mm"),
|
|
4741
|
+
h: z41.string().default("1.65mm"),
|
|
4742
|
+
pl: z41.string().default("0.6mm"),
|
|
4743
|
+
pw: z41.string().default("0.6mm"),
|
|
4744
|
+
pad_spacing: z41.string().default("2.2mm")
|
|
4685
4745
|
});
|
|
4686
4746
|
var sod323f = (raw_params) => {
|
|
4687
4747
|
const parameters = sod_def7.parse(raw_params);
|
|
4688
4748
|
const silkscreenRefText = silkscreenRef(
|
|
4689
4749
|
0,
|
|
4690
|
-
|
|
4750
|
+
length32.parse(parameters.h),
|
|
4691
4751
|
0.3
|
|
4692
4752
|
);
|
|
4693
4753
|
const silkscreenLine = {
|
|
@@ -4696,20 +4756,20 @@ var sod323f = (raw_params) => {
|
|
|
4696
4756
|
pcb_component_id: "",
|
|
4697
4757
|
route: [
|
|
4698
4758
|
{
|
|
4699
|
-
x:
|
|
4700
|
-
y:
|
|
4759
|
+
x: length32.parse(parameters.pad_spacing) / 2,
|
|
4760
|
+
y: length32.parse(parameters.h) / 2
|
|
4701
4761
|
},
|
|
4702
4762
|
{
|
|
4703
|
-
x: -
|
|
4704
|
-
y:
|
|
4763
|
+
x: -length32.parse(parameters.w) / 2 - 0.2,
|
|
4764
|
+
y: length32.parse(parameters.h) / 2
|
|
4705
4765
|
},
|
|
4706
4766
|
{
|
|
4707
|
-
x: -
|
|
4708
|
-
y: -
|
|
4767
|
+
x: -length32.parse(parameters.w) / 2 - 0.2,
|
|
4768
|
+
y: -length32.parse(parameters.h) / 2
|
|
4709
4769
|
},
|
|
4710
4770
|
{
|
|
4711
|
-
x:
|
|
4712
|
-
y: -
|
|
4771
|
+
x: length32.parse(parameters.pad_spacing) / 2,
|
|
4772
|
+
y: -length32.parse(parameters.h) / 2
|
|
4713
4773
|
}
|
|
4714
4774
|
],
|
|
4715
4775
|
stroke_width: 0.1,
|
|
@@ -4752,22 +4812,22 @@ var sodWithoutParsing7 = (parameters) => {
|
|
|
4752
4812
|
};
|
|
4753
4813
|
|
|
4754
4814
|
// src/fn/sod123f.ts
|
|
4755
|
-
import { z as
|
|
4756
|
-
import { length as
|
|
4815
|
+
import { z as z42 } from "zod";
|
|
4816
|
+
import { length as length33 } from "circuit-json";
|
|
4757
4817
|
var sod_def8 = base_def.extend({
|
|
4758
|
-
fn:
|
|
4759
|
-
num_pins:
|
|
4760
|
-
w:
|
|
4761
|
-
h:
|
|
4762
|
-
pl:
|
|
4763
|
-
pw:
|
|
4764
|
-
p:
|
|
4765
|
-
});
|
|
4766
|
-
var sod123f = (raw_params) => {
|
|
4818
|
+
fn: z42.string(),
|
|
4819
|
+
num_pins: z42.literal(2).default(2),
|
|
4820
|
+
w: z42.string().default("4.4mm"),
|
|
4821
|
+
h: z42.string().default("2.1mm"),
|
|
4822
|
+
pl: z42.string().default("1.2mm"),
|
|
4823
|
+
pw: z42.string().default("1.2mm"),
|
|
4824
|
+
p: z42.string().default("2.9mm")
|
|
4825
|
+
});
|
|
4826
|
+
var sod123f = (raw_params) => {
|
|
4767
4827
|
const parameters = sod_def8.parse(raw_params);
|
|
4768
4828
|
const silkscreenRefText = silkscreenRef(
|
|
4769
4829
|
0,
|
|
4770
|
-
|
|
4830
|
+
length33.parse(parameters.h),
|
|
4771
4831
|
0.3
|
|
4772
4832
|
);
|
|
4773
4833
|
const silkscreenLine = {
|
|
@@ -4776,20 +4836,20 @@ var sod123f = (raw_params) => {
|
|
|
4776
4836
|
pcb_component_id: "",
|
|
4777
4837
|
route: [
|
|
4778
4838
|
{
|
|
4779
|
-
x:
|
|
4780
|
-
y:
|
|
4839
|
+
x: length33.parse(parameters.p) / 2,
|
|
4840
|
+
y: length33.parse(parameters.h) / 2
|
|
4781
4841
|
},
|
|
4782
4842
|
{
|
|
4783
|
-
x: -
|
|
4784
|
-
y:
|
|
4843
|
+
x: -length33.parse(parameters.w) / 2 - 0.2,
|
|
4844
|
+
y: length33.parse(parameters.h) / 2
|
|
4785
4845
|
},
|
|
4786
4846
|
{
|
|
4787
|
-
x: -
|
|
4788
|
-
y: -
|
|
4847
|
+
x: -length33.parse(parameters.w) / 2 - 0.2,
|
|
4848
|
+
y: -length33.parse(parameters.h) / 2
|
|
4789
4849
|
},
|
|
4790
4850
|
{
|
|
4791
|
-
x:
|
|
4792
|
-
y: -
|
|
4851
|
+
x: length33.parse(parameters.p) / 2,
|
|
4852
|
+
y: -length33.parse(parameters.h) / 2
|
|
4793
4853
|
}
|
|
4794
4854
|
],
|
|
4795
4855
|
stroke_width: 0.1,
|
|
@@ -4832,22 +4892,22 @@ var sodWithoutParsing8 = (parameters) => {
|
|
|
4832
4892
|
};
|
|
4833
4893
|
|
|
4834
4894
|
// src/fn/sod123fl.ts
|
|
4835
|
-
import { z as
|
|
4836
|
-
import { length as
|
|
4895
|
+
import { z as z43 } from "zod";
|
|
4896
|
+
import { length as length34 } from "circuit-json";
|
|
4837
4897
|
var sod123FL_def = base_def.extend({
|
|
4838
|
-
fn:
|
|
4839
|
-
num_pins:
|
|
4840
|
-
w:
|
|
4841
|
-
h:
|
|
4842
|
-
pl:
|
|
4843
|
-
pw:
|
|
4844
|
-
p:
|
|
4898
|
+
fn: z43.string(),
|
|
4899
|
+
num_pins: z43.literal(2).default(2),
|
|
4900
|
+
w: z43.string().default("4.4mm"),
|
|
4901
|
+
h: z43.string().default("2.1mm"),
|
|
4902
|
+
pl: z43.string().default("0.91mm"),
|
|
4903
|
+
pw: z43.string().default("1.22mm"),
|
|
4904
|
+
p: z43.string().default("3.146mm")
|
|
4845
4905
|
});
|
|
4846
4906
|
var sod123fl = (raw_params) => {
|
|
4847
4907
|
const parameters = sod123FL_def.parse(raw_params);
|
|
4848
4908
|
const silkscreenRefText = silkscreenRef(
|
|
4849
4909
|
0,
|
|
4850
|
-
|
|
4910
|
+
length34.parse(parameters.h),
|
|
4851
4911
|
0.3
|
|
4852
4912
|
);
|
|
4853
4913
|
const silkscreenLine = {
|
|
@@ -4856,20 +4916,20 @@ var sod123fl = (raw_params) => {
|
|
|
4856
4916
|
pcb_component_id: "",
|
|
4857
4917
|
route: [
|
|
4858
4918
|
{
|
|
4859
|
-
x:
|
|
4860
|
-
y:
|
|
4919
|
+
x: length34.parse(parameters.p) / 2,
|
|
4920
|
+
y: length34.parse(parameters.h) / 2
|
|
4861
4921
|
},
|
|
4862
4922
|
{
|
|
4863
|
-
x: -
|
|
4864
|
-
y:
|
|
4923
|
+
x: -length34.parse(parameters.w) / 2 - 0.2,
|
|
4924
|
+
y: length34.parse(parameters.h) / 2
|
|
4865
4925
|
},
|
|
4866
4926
|
{
|
|
4867
|
-
x: -
|
|
4868
|
-
y: -
|
|
4927
|
+
x: -length34.parse(parameters.w) / 2 - 0.2,
|
|
4928
|
+
y: -length34.parse(parameters.h) / 2
|
|
4869
4929
|
},
|
|
4870
4930
|
{
|
|
4871
|
-
x:
|
|
4872
|
-
y: -
|
|
4931
|
+
x: length34.parse(parameters.p) / 2,
|
|
4932
|
+
y: -length34.parse(parameters.h) / 2
|
|
4873
4933
|
}
|
|
4874
4934
|
],
|
|
4875
4935
|
stroke_width: 0.1,
|
|
@@ -4912,22 +4972,22 @@ var sodWithoutParsing9 = (parameters) => {
|
|
|
4912
4972
|
};
|
|
4913
4973
|
|
|
4914
4974
|
// src/fn/sod723.ts
|
|
4915
|
-
import { z as
|
|
4916
|
-
import { length as
|
|
4975
|
+
import { z as z44 } from "zod";
|
|
4976
|
+
import { length as length35 } from "circuit-json";
|
|
4917
4977
|
var sod_def9 = base_def.extend({
|
|
4918
|
-
fn:
|
|
4919
|
-
num_pins:
|
|
4920
|
-
w:
|
|
4921
|
-
h:
|
|
4922
|
-
pl:
|
|
4923
|
-
pw:
|
|
4924
|
-
p:
|
|
4978
|
+
fn: z44.string(),
|
|
4979
|
+
num_pins: z44.literal(2).default(2),
|
|
4980
|
+
w: z44.string().default("1.80mm"),
|
|
4981
|
+
h: z44.string().default("1.00mm"),
|
|
4982
|
+
pl: z44.string().default("0.66mm"),
|
|
4983
|
+
pw: z44.string().default("0.5mm"),
|
|
4984
|
+
p: z44.string().default("0.8mm")
|
|
4925
4985
|
});
|
|
4926
4986
|
var sod723 = (raw_params) => {
|
|
4927
4987
|
const parameters = sod_def9.parse(raw_params);
|
|
4928
4988
|
const silkscreenRefText = silkscreenRef(
|
|
4929
4989
|
0,
|
|
4930
|
-
|
|
4990
|
+
length35.parse(parameters.h),
|
|
4931
4991
|
0.3
|
|
4932
4992
|
);
|
|
4933
4993
|
const silkscreenLine = {
|
|
@@ -4936,20 +4996,20 @@ var sod723 = (raw_params) => {
|
|
|
4936
4996
|
pcb_component_id: "",
|
|
4937
4997
|
route: [
|
|
4938
4998
|
{
|
|
4939
|
-
x:
|
|
4940
|
-
y:
|
|
4999
|
+
x: length35.parse(parameters.p) / 2,
|
|
5000
|
+
y: length35.parse(parameters.h) / 2
|
|
4941
5001
|
},
|
|
4942
5002
|
{
|
|
4943
|
-
x: -
|
|
4944
|
-
y:
|
|
5003
|
+
x: -length35.parse(parameters.w) / 2 - 0.1,
|
|
5004
|
+
y: length35.parse(parameters.h) / 2
|
|
4945
5005
|
},
|
|
4946
5006
|
{
|
|
4947
|
-
x: -
|
|
4948
|
-
y: -
|
|
5007
|
+
x: -length35.parse(parameters.w) / 2 - 0.1,
|
|
5008
|
+
y: -length35.parse(parameters.h) / 2
|
|
4949
5009
|
},
|
|
4950
5010
|
{
|
|
4951
|
-
x:
|
|
4952
|
-
y: -
|
|
5011
|
+
x: length35.parse(parameters.p) / 2,
|
|
5012
|
+
y: -length35.parse(parameters.h) / 2
|
|
4953
5013
|
}
|
|
4954
5014
|
],
|
|
4955
5015
|
stroke_width: 0.1,
|
|
@@ -4992,22 +5052,22 @@ var sodWithoutParsing10 = (parameters) => {
|
|
|
4992
5052
|
};
|
|
4993
5053
|
|
|
4994
5054
|
// src/fn/sod128.ts
|
|
4995
|
-
import { z as
|
|
4996
|
-
import { length as
|
|
5055
|
+
import { z as z45 } from "zod";
|
|
5056
|
+
import { length as length36 } from "circuit-json";
|
|
4997
5057
|
var sod_def10 = base_def.extend({
|
|
4998
|
-
fn:
|
|
4999
|
-
num_pins:
|
|
5000
|
-
w:
|
|
5001
|
-
h:
|
|
5002
|
-
pl:
|
|
5003
|
-
pw:
|
|
5004
|
-
p:
|
|
5058
|
+
fn: z45.string(),
|
|
5059
|
+
num_pins: z45.literal(2).default(2),
|
|
5060
|
+
w: z45.string().default("6.2mm"),
|
|
5061
|
+
h: z45.string().default("3.4mm"),
|
|
5062
|
+
pl: z45.string().default("1.4mm"),
|
|
5063
|
+
pw: z45.string().default("2.1mm"),
|
|
5064
|
+
p: z45.string().default("4.4mm")
|
|
5005
5065
|
});
|
|
5006
5066
|
var sod128 = (raw_params) => {
|
|
5007
5067
|
const parameters = sod_def10.parse(raw_params);
|
|
5008
5068
|
const silkscreenRefText = silkscreenRef(
|
|
5009
5069
|
0,
|
|
5010
|
-
|
|
5070
|
+
length36.parse(parameters.h) / 2 + 0.4,
|
|
5011
5071
|
0.3
|
|
5012
5072
|
);
|
|
5013
5073
|
const silkscreenLine = {
|
|
@@ -5016,20 +5076,20 @@ var sod128 = (raw_params) => {
|
|
|
5016
5076
|
pcb_component_id: "",
|
|
5017
5077
|
route: [
|
|
5018
5078
|
{
|
|
5019
|
-
x:
|
|
5020
|
-
y:
|
|
5079
|
+
x: length36.parse(parameters.p) / 2,
|
|
5080
|
+
y: length36.parse(parameters.h) / 2
|
|
5021
5081
|
},
|
|
5022
5082
|
{
|
|
5023
|
-
x: -
|
|
5024
|
-
y:
|
|
5083
|
+
x: -length36.parse(parameters.w) / 2 - 0.2,
|
|
5084
|
+
y: length36.parse(parameters.h) / 2
|
|
5025
5085
|
},
|
|
5026
5086
|
{
|
|
5027
|
-
x: -
|
|
5028
|
-
y: -
|
|
5087
|
+
x: -length36.parse(parameters.w) / 2 - 0.2,
|
|
5088
|
+
y: -length36.parse(parameters.h) / 2
|
|
5029
5089
|
},
|
|
5030
5090
|
{
|
|
5031
|
-
x:
|
|
5032
|
-
y: -
|
|
5091
|
+
x: length36.parse(parameters.p) / 2,
|
|
5092
|
+
y: -length36.parse(parameters.h) / 2
|
|
5033
5093
|
}
|
|
5034
5094
|
],
|
|
5035
5095
|
stroke_width: 0.1,
|
|
@@ -5072,29 +5132,29 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
5072
5132
|
};
|
|
5073
5133
|
|
|
5074
5134
|
// src/fn/sot89.ts
|
|
5075
|
-
import { z as
|
|
5135
|
+
import { z as z46 } from "zod";
|
|
5076
5136
|
var sot89_def = base_def.extend({
|
|
5077
|
-
fn:
|
|
5078
|
-
num_pins:
|
|
5079
|
-
w:
|
|
5080
|
-
h:
|
|
5081
|
-
pl:
|
|
5082
|
-
pw:
|
|
5083
|
-
p:
|
|
5084
|
-
string:
|
|
5137
|
+
fn: z46.string(),
|
|
5138
|
+
num_pins: z46.union([z46.literal(3), z46.literal(5)]).default(3),
|
|
5139
|
+
w: z46.string().default("4.20mm"),
|
|
5140
|
+
h: z46.string().default("4.80mm"),
|
|
5141
|
+
pl: z46.string().default("1.3mm"),
|
|
5142
|
+
pw: z46.string().default("0.9mm"),
|
|
5143
|
+
p: z46.string().default("1.5mm"),
|
|
5144
|
+
string: z46.string().optional()
|
|
5085
5145
|
});
|
|
5086
5146
|
var sot89_3 = (parameters) => {
|
|
5087
5147
|
const pads = [];
|
|
5088
5148
|
const padGap = Number.parseFloat(parameters.p);
|
|
5089
5149
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
5090
|
-
const
|
|
5150
|
+
const length60 = Number.parseFloat(parameters.w);
|
|
5091
5151
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
5092
5152
|
const centerExtra = 0.175;
|
|
5093
5153
|
const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
|
|
5094
5154
|
pads.push(
|
|
5095
|
-
rectpad(1, -
|
|
5096
|
-
rectpad(2, -
|
|
5097
|
-
rectpad(3, -
|
|
5155
|
+
rectpad(1, -length60 / 2 + outerPadXShift, padGap, padHeight, padWidth),
|
|
5156
|
+
rectpad(2, -length60 / 2, 0, padHeight + centerExtra, padWidth),
|
|
5157
|
+
rectpad(3, -length60 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
|
|
5098
5158
|
);
|
|
5099
5159
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
5100
5160
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -5134,7 +5194,7 @@ var sot89_5 = (parameters) => {
|
|
|
5134
5194
|
const pads = [];
|
|
5135
5195
|
const padGap = Number.parseFloat(parameters.p);
|
|
5136
5196
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
5137
|
-
const
|
|
5197
|
+
const length60 = Number.parseFloat(parameters.w);
|
|
5138
5198
|
pads.push(
|
|
5139
5199
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
5140
5200
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -5202,18 +5262,18 @@ var sot89 = (raw_params) => {
|
|
|
5202
5262
|
|
|
5203
5263
|
// src/fn/to220.ts
|
|
5204
5264
|
import {
|
|
5205
|
-
length as
|
|
5265
|
+
length as length37
|
|
5206
5266
|
} from "circuit-json";
|
|
5207
|
-
import { z as
|
|
5267
|
+
import { z as z47 } from "zod";
|
|
5208
5268
|
var to220_def = base_def.extend({
|
|
5209
|
-
fn:
|
|
5210
|
-
p:
|
|
5211
|
-
id:
|
|
5212
|
-
od:
|
|
5213
|
-
w:
|
|
5214
|
-
h:
|
|
5215
|
-
num_pins:
|
|
5216
|
-
string:
|
|
5269
|
+
fn: z47.string(),
|
|
5270
|
+
p: length37.optional().default("5.0mm"),
|
|
5271
|
+
id: length37.optional().default("1.0mm"),
|
|
5272
|
+
od: length37.optional().default("1.9mm"),
|
|
5273
|
+
w: length37.optional().default("13mm"),
|
|
5274
|
+
h: length37.optional().default("7mm"),
|
|
5275
|
+
num_pins: z47.number().optional(),
|
|
5276
|
+
string: z47.string().optional()
|
|
5217
5277
|
});
|
|
5218
5278
|
var to220 = (raw_params) => {
|
|
5219
5279
|
const parameters = to220_def.parse(raw_params);
|
|
@@ -5293,22 +5353,22 @@ var to220 = (raw_params) => {
|
|
|
5293
5353
|
};
|
|
5294
5354
|
|
|
5295
5355
|
// src/fn/minimelf.ts
|
|
5296
|
-
import { z as
|
|
5297
|
-
import { length as
|
|
5356
|
+
import { z as z48 } from "zod";
|
|
5357
|
+
import { length as length38 } from "circuit-json";
|
|
5298
5358
|
var minimelf_def = base_def.extend({
|
|
5299
|
-
fn:
|
|
5300
|
-
num_pins:
|
|
5301
|
-
w:
|
|
5302
|
-
h:
|
|
5303
|
-
pl:
|
|
5304
|
-
pw:
|
|
5305
|
-
p:
|
|
5359
|
+
fn: z48.string(),
|
|
5360
|
+
num_pins: z48.literal(2).default(2),
|
|
5361
|
+
w: z48.string().default("5.40mm"),
|
|
5362
|
+
h: z48.string().default("2.30mm"),
|
|
5363
|
+
pl: z48.string().default("1.30mm"),
|
|
5364
|
+
pw: z48.string().default("1.70mm"),
|
|
5365
|
+
p: z48.string().default("3.5mm")
|
|
5306
5366
|
});
|
|
5307
5367
|
var minimelf = (raw_params) => {
|
|
5308
5368
|
const parameters = minimelf_def.parse(raw_params);
|
|
5309
5369
|
const silkscreenRefText = silkscreenRef(
|
|
5310
5370
|
0,
|
|
5311
|
-
|
|
5371
|
+
length38.parse(parameters.h) / 2 + 0.4,
|
|
5312
5372
|
0.3
|
|
5313
5373
|
);
|
|
5314
5374
|
const silkscreenLine = {
|
|
@@ -5317,20 +5377,20 @@ var minimelf = (raw_params) => {
|
|
|
5317
5377
|
pcb_component_id: "",
|
|
5318
5378
|
route: [
|
|
5319
5379
|
{
|
|
5320
|
-
x:
|
|
5321
|
-
y:
|
|
5380
|
+
x: length38.parse(parameters.p) / 2,
|
|
5381
|
+
y: length38.parse(parameters.h) / 2
|
|
5322
5382
|
},
|
|
5323
5383
|
{
|
|
5324
|
-
x: -
|
|
5325
|
-
y:
|
|
5384
|
+
x: -length38.parse(parameters.w) / 2,
|
|
5385
|
+
y: length38.parse(parameters.h) / 2
|
|
5326
5386
|
},
|
|
5327
5387
|
{
|
|
5328
|
-
x: -
|
|
5329
|
-
y: -
|
|
5388
|
+
x: -length38.parse(parameters.w) / 2,
|
|
5389
|
+
y: -length38.parse(parameters.h) / 2
|
|
5330
5390
|
},
|
|
5331
5391
|
{
|
|
5332
|
-
x:
|
|
5333
|
-
y: -
|
|
5392
|
+
x: length38.parse(parameters.p) / 2,
|
|
5393
|
+
y: -length38.parse(parameters.h) / 2
|
|
5334
5394
|
}
|
|
5335
5395
|
],
|
|
5336
5396
|
stroke_width: 0.1,
|
|
@@ -5369,22 +5429,22 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
5369
5429
|
};
|
|
5370
5430
|
|
|
5371
5431
|
// src/fn/sod882d.ts
|
|
5372
|
-
import { z as
|
|
5373
|
-
import { length as
|
|
5432
|
+
import { z as z49 } from "zod";
|
|
5433
|
+
import { length as length39 } from "circuit-json";
|
|
5374
5434
|
var sod_def11 = base_def.extend({
|
|
5375
|
-
fn:
|
|
5376
|
-
num_pins:
|
|
5377
|
-
w:
|
|
5378
|
-
h:
|
|
5379
|
-
pl:
|
|
5380
|
-
pw:
|
|
5381
|
-
p:
|
|
5435
|
+
fn: z49.string(),
|
|
5436
|
+
num_pins: z49.literal(2).default(2),
|
|
5437
|
+
w: z49.string().default("1.90mm"),
|
|
5438
|
+
h: z49.string().default("1.33mm"),
|
|
5439
|
+
pl: z49.string().default("0.5mm"),
|
|
5440
|
+
pw: z49.string().default("0.7mm"),
|
|
5441
|
+
p: z49.string().default("0.8mm")
|
|
5382
5442
|
});
|
|
5383
5443
|
var sod882d = (raw_params) => {
|
|
5384
5444
|
const parameters = sod_def11.parse(raw_params);
|
|
5385
5445
|
const silkscreenRefText = silkscreenRef(
|
|
5386
5446
|
0,
|
|
5387
|
-
|
|
5447
|
+
length39.parse(parameters.h) + 0.1,
|
|
5388
5448
|
0.3
|
|
5389
5449
|
);
|
|
5390
5450
|
const silkscreenLine = {
|
|
@@ -5393,20 +5453,20 @@ var sod882d = (raw_params) => {
|
|
|
5393
5453
|
pcb_component_id: "",
|
|
5394
5454
|
route: [
|
|
5395
5455
|
{
|
|
5396
|
-
x:
|
|
5397
|
-
y:
|
|
5456
|
+
x: length39.parse(parameters.p) / 2 + 0.1,
|
|
5457
|
+
y: length39.parse(parameters.h) / 2
|
|
5398
5458
|
},
|
|
5399
5459
|
{
|
|
5400
|
-
x: -
|
|
5401
|
-
y:
|
|
5460
|
+
x: -length39.parse(parameters.w) / 2,
|
|
5461
|
+
y: length39.parse(parameters.h) / 2
|
|
5402
5462
|
},
|
|
5403
5463
|
{
|
|
5404
|
-
x: -
|
|
5405
|
-
y: -
|
|
5464
|
+
x: -length39.parse(parameters.w) / 2,
|
|
5465
|
+
y: -length39.parse(parameters.h) / 2
|
|
5406
5466
|
},
|
|
5407
5467
|
{
|
|
5408
|
-
x:
|
|
5409
|
-
y: -
|
|
5468
|
+
x: length39.parse(parameters.p) / 2 + 0.1,
|
|
5469
|
+
y: -length39.parse(parameters.h) / 2
|
|
5410
5470
|
}
|
|
5411
5471
|
],
|
|
5412
5472
|
stroke_width: 0.1,
|
|
@@ -5449,22 +5509,22 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
5449
5509
|
};
|
|
5450
5510
|
|
|
5451
5511
|
// src/fn/melf.ts
|
|
5452
|
-
import { z as
|
|
5453
|
-
import { length as
|
|
5512
|
+
import { z as z50 } from "zod";
|
|
5513
|
+
import { length as length40 } from "circuit-json";
|
|
5454
5514
|
var melf_def = base_def.extend({
|
|
5455
|
-
fn:
|
|
5456
|
-
num_pins:
|
|
5457
|
-
w:
|
|
5458
|
-
h:
|
|
5459
|
-
pl:
|
|
5460
|
-
pw:
|
|
5461
|
-
p:
|
|
5515
|
+
fn: z50.string(),
|
|
5516
|
+
num_pins: z50.literal(2).default(2),
|
|
5517
|
+
w: z50.string().default("7.0mm"),
|
|
5518
|
+
h: z50.string().default("3.35mm"),
|
|
5519
|
+
pl: z50.string().default("1.50mm"),
|
|
5520
|
+
pw: z50.string().default("2.70mm"),
|
|
5521
|
+
p: z50.string().default("4.8mm")
|
|
5462
5522
|
});
|
|
5463
5523
|
var melf = (raw_params) => {
|
|
5464
5524
|
const parameters = melf_def.parse(raw_params);
|
|
5465
5525
|
const silkscreenRefText = silkscreenRef(
|
|
5466
5526
|
0,
|
|
5467
|
-
|
|
5527
|
+
length40.parse(parameters.h),
|
|
5468
5528
|
0.3
|
|
5469
5529
|
);
|
|
5470
5530
|
const silkscreenLine = {
|
|
@@ -5473,20 +5533,20 @@ var melf = (raw_params) => {
|
|
|
5473
5533
|
pcb_component_id: "",
|
|
5474
5534
|
route: [
|
|
5475
5535
|
{
|
|
5476
|
-
x:
|
|
5477
|
-
y:
|
|
5536
|
+
x: length40.parse(parameters.p) / 2,
|
|
5537
|
+
y: length40.parse(parameters.h) / 2
|
|
5478
5538
|
},
|
|
5479
5539
|
{
|
|
5480
|
-
x: -
|
|
5481
|
-
y:
|
|
5540
|
+
x: -length40.parse(parameters.w) / 2,
|
|
5541
|
+
y: length40.parse(parameters.h) / 2
|
|
5482
5542
|
},
|
|
5483
5543
|
{
|
|
5484
|
-
x: -
|
|
5485
|
-
y: -
|
|
5544
|
+
x: -length40.parse(parameters.w) / 2,
|
|
5545
|
+
y: -length40.parse(parameters.h) / 2
|
|
5486
5546
|
},
|
|
5487
5547
|
{
|
|
5488
|
-
x:
|
|
5489
|
-
y: -
|
|
5548
|
+
x: length40.parse(parameters.p) / 2,
|
|
5549
|
+
y: -length40.parse(parameters.h) / 2
|
|
5490
5550
|
}
|
|
5491
5551
|
],
|
|
5492
5552
|
stroke_width: 0.1,
|
|
@@ -5529,22 +5589,22 @@ var melfWithoutParsing = (parameters) => {
|
|
|
5529
5589
|
};
|
|
5530
5590
|
|
|
5531
5591
|
// src/fn/micromelf.ts
|
|
5532
|
-
import { z as
|
|
5533
|
-
import { length as
|
|
5592
|
+
import { z as z51 } from "zod";
|
|
5593
|
+
import { length as length41 } from "circuit-json";
|
|
5534
5594
|
var micromelf_def = base_def.extend({
|
|
5535
|
-
fn:
|
|
5536
|
-
num_pins:
|
|
5537
|
-
w:
|
|
5538
|
-
h:
|
|
5539
|
-
pl:
|
|
5540
|
-
pw:
|
|
5541
|
-
p:
|
|
5595
|
+
fn: z51.string(),
|
|
5596
|
+
num_pins: z51.literal(2).default(2),
|
|
5597
|
+
w: z51.string().default("3.0mm"),
|
|
5598
|
+
h: z51.string().default("1.80mm"),
|
|
5599
|
+
pl: z51.string().default("0.80mm"),
|
|
5600
|
+
pw: z51.string().default("1.20mm"),
|
|
5601
|
+
p: z51.string().default("1.6mm")
|
|
5542
5602
|
});
|
|
5543
5603
|
var micromelf = (raw_params) => {
|
|
5544
5604
|
const parameters = micromelf_def.parse(raw_params);
|
|
5545
5605
|
const silkscreenRefText = silkscreenRef(
|
|
5546
5606
|
0,
|
|
5547
|
-
|
|
5607
|
+
length41.parse(parameters.h),
|
|
5548
5608
|
0.3
|
|
5549
5609
|
);
|
|
5550
5610
|
const silkscreenLine = {
|
|
@@ -5553,20 +5613,20 @@ var micromelf = (raw_params) => {
|
|
|
5553
5613
|
pcb_component_id: "",
|
|
5554
5614
|
route: [
|
|
5555
5615
|
{
|
|
5556
|
-
x:
|
|
5557
|
-
y:
|
|
5616
|
+
x: length41.parse(parameters.p) / 2,
|
|
5617
|
+
y: length41.parse(parameters.h) / 2
|
|
5558
5618
|
},
|
|
5559
5619
|
{
|
|
5560
|
-
x: -
|
|
5561
|
-
y:
|
|
5620
|
+
x: -length41.parse(parameters.w) / 2 - 0.1,
|
|
5621
|
+
y: length41.parse(parameters.h) / 2
|
|
5562
5622
|
},
|
|
5563
5623
|
{
|
|
5564
|
-
x: -
|
|
5565
|
-
y: -
|
|
5624
|
+
x: -length41.parse(parameters.w) / 2 - 0.1,
|
|
5625
|
+
y: -length41.parse(parameters.h) / 2
|
|
5566
5626
|
},
|
|
5567
5627
|
{
|
|
5568
|
-
x:
|
|
5569
|
-
y: -
|
|
5628
|
+
x: length41.parse(parameters.p) / 2,
|
|
5629
|
+
y: -length41.parse(parameters.h) / 2
|
|
5570
5630
|
}
|
|
5571
5631
|
],
|
|
5572
5632
|
stroke_width: 0.1,
|
|
@@ -5609,22 +5669,22 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
5609
5669
|
};
|
|
5610
5670
|
|
|
5611
5671
|
// src/fn/sma.ts
|
|
5612
|
-
import { z as
|
|
5613
|
-
import { length as
|
|
5672
|
+
import { z as z52 } from "zod";
|
|
5673
|
+
import { length as length42 } from "circuit-json";
|
|
5614
5674
|
var sma_def = base_def.extend({
|
|
5615
|
-
fn:
|
|
5616
|
-
num_pins:
|
|
5617
|
-
w:
|
|
5618
|
-
h:
|
|
5619
|
-
pl:
|
|
5620
|
-
pw:
|
|
5621
|
-
p:
|
|
5675
|
+
fn: z52.string(),
|
|
5676
|
+
num_pins: z52.literal(2).default(2),
|
|
5677
|
+
w: z52.string().default("7.10mm"),
|
|
5678
|
+
h: z52.string().default("3.40mm"),
|
|
5679
|
+
pl: z52.string().default("2.45mm"),
|
|
5680
|
+
pw: z52.string().default("1.80mm"),
|
|
5681
|
+
p: z52.string().default("4.05mm")
|
|
5622
5682
|
});
|
|
5623
5683
|
var sma = (raw_params) => {
|
|
5624
5684
|
const parameters = sma_def.parse(raw_params);
|
|
5625
5685
|
const silkscreenRefText = silkscreenRef(
|
|
5626
5686
|
0,
|
|
5627
|
-
|
|
5687
|
+
length42.parse(parameters.h) / 2 + 0.5,
|
|
5628
5688
|
0.3
|
|
5629
5689
|
);
|
|
5630
5690
|
const silkscreenLine = {
|
|
@@ -5633,20 +5693,20 @@ var sma = (raw_params) => {
|
|
|
5633
5693
|
pcb_component_id: "",
|
|
5634
5694
|
route: [
|
|
5635
5695
|
{
|
|
5636
|
-
x:
|
|
5637
|
-
y:
|
|
5696
|
+
x: length42.parse(parameters.p) / 2,
|
|
5697
|
+
y: length42.parse(parameters.h) / 2
|
|
5638
5698
|
},
|
|
5639
5699
|
{
|
|
5640
|
-
x: -
|
|
5641
|
-
y:
|
|
5700
|
+
x: -length42.parse(parameters.w) / 2 - 0.5,
|
|
5701
|
+
y: length42.parse(parameters.h) / 2
|
|
5642
5702
|
},
|
|
5643
5703
|
{
|
|
5644
|
-
x: -
|
|
5645
|
-
y: -
|
|
5704
|
+
x: -length42.parse(parameters.w) / 2 - 0.5,
|
|
5705
|
+
y: -length42.parse(parameters.h) / 2
|
|
5646
5706
|
},
|
|
5647
5707
|
{
|
|
5648
|
-
x:
|
|
5649
|
-
y: -
|
|
5708
|
+
x: length42.parse(parameters.p) / 2,
|
|
5709
|
+
y: -length42.parse(parameters.h) / 2
|
|
5650
5710
|
}
|
|
5651
5711
|
],
|
|
5652
5712
|
stroke_width: 0.1,
|
|
@@ -5688,22 +5748,22 @@ var smaWithoutParsing = (parameters) => {
|
|
|
5688
5748
|
};
|
|
5689
5749
|
|
|
5690
5750
|
// src/fn/smf.ts
|
|
5691
|
-
import { z as
|
|
5692
|
-
import { length as
|
|
5751
|
+
import { z as z53 } from "zod";
|
|
5752
|
+
import { length as length43 } from "circuit-json";
|
|
5693
5753
|
var smf_def = base_def.extend({
|
|
5694
|
-
fn:
|
|
5695
|
-
num_pins:
|
|
5696
|
-
w:
|
|
5697
|
-
h:
|
|
5698
|
-
pl:
|
|
5699
|
-
pw:
|
|
5700
|
-
p:
|
|
5754
|
+
fn: z53.string(),
|
|
5755
|
+
num_pins: z53.literal(2).default(2),
|
|
5756
|
+
w: z53.string().default("4.80mm"),
|
|
5757
|
+
h: z53.string().default("2.10mm"),
|
|
5758
|
+
pl: z53.string().default("1.30mm"),
|
|
5759
|
+
pw: z53.string().default("1.40mm"),
|
|
5760
|
+
p: z53.string().default("2.9mm")
|
|
5701
5761
|
});
|
|
5702
5762
|
var smf = (raw_params) => {
|
|
5703
5763
|
const parameters = smf_def.parse(raw_params);
|
|
5704
5764
|
const silkscreenRefText = silkscreenRef(
|
|
5705
5765
|
0,
|
|
5706
|
-
|
|
5766
|
+
length43.parse(parameters.h) - 0.5,
|
|
5707
5767
|
0.3
|
|
5708
5768
|
);
|
|
5709
5769
|
const silkscreenLine = {
|
|
@@ -5712,20 +5772,20 @@ var smf = (raw_params) => {
|
|
|
5712
5772
|
pcb_component_id: "",
|
|
5713
5773
|
route: [
|
|
5714
5774
|
{
|
|
5715
|
-
x:
|
|
5716
|
-
y:
|
|
5775
|
+
x: length43.parse(parameters.p) / 2,
|
|
5776
|
+
y: length43.parse(parameters.h) / 2
|
|
5717
5777
|
},
|
|
5718
5778
|
{
|
|
5719
|
-
x: -
|
|
5720
|
-
y:
|
|
5779
|
+
x: -length43.parse(parameters.w) / 2,
|
|
5780
|
+
y: length43.parse(parameters.h) / 2
|
|
5721
5781
|
},
|
|
5722
5782
|
{
|
|
5723
|
-
x: -
|
|
5724
|
-
y: -
|
|
5783
|
+
x: -length43.parse(parameters.w) / 2,
|
|
5784
|
+
y: -length43.parse(parameters.h) / 2
|
|
5725
5785
|
},
|
|
5726
5786
|
{
|
|
5727
|
-
x:
|
|
5728
|
-
y: -
|
|
5787
|
+
x: length43.parse(parameters.p) / 2,
|
|
5788
|
+
y: -length43.parse(parameters.h) / 2
|
|
5729
5789
|
}
|
|
5730
5790
|
],
|
|
5731
5791
|
stroke_width: 0.1,
|
|
@@ -5768,22 +5828,22 @@ var smfWithoutParsing = (parameters) => {
|
|
|
5768
5828
|
};
|
|
5769
5829
|
|
|
5770
5830
|
// src/fn/smb.ts
|
|
5771
|
-
import { z as
|
|
5772
|
-
import { length as
|
|
5831
|
+
import { z as z54 } from "zod";
|
|
5832
|
+
import { length as length44 } from "circuit-json";
|
|
5773
5833
|
var smb_def = base_def.extend({
|
|
5774
|
-
fn:
|
|
5775
|
-
num_pins:
|
|
5776
|
-
w:
|
|
5777
|
-
h:
|
|
5778
|
-
pl:
|
|
5779
|
-
pw:
|
|
5780
|
-
p:
|
|
5834
|
+
fn: z54.string(),
|
|
5835
|
+
num_pins: z54.literal(2).default(2),
|
|
5836
|
+
w: z54.string().default("7.30mm"),
|
|
5837
|
+
h: z54.string().default("4.40mm"),
|
|
5838
|
+
pl: z54.string().default("2.50mm"),
|
|
5839
|
+
pw: z54.string().default("2.30mm"),
|
|
5840
|
+
p: z54.string().default("4.30mm")
|
|
5781
5841
|
});
|
|
5782
5842
|
var smb = (raw_params) => {
|
|
5783
5843
|
const parameters = smb_def.parse(raw_params);
|
|
5784
5844
|
const silkscreenRefText = silkscreenRef(
|
|
5785
5845
|
0,
|
|
5786
|
-
|
|
5846
|
+
length44.parse(parameters.h) / 2 + 0.5,
|
|
5787
5847
|
0.3
|
|
5788
5848
|
);
|
|
5789
5849
|
const silkscreenLine = {
|
|
@@ -5792,20 +5852,20 @@ var smb = (raw_params) => {
|
|
|
5792
5852
|
pcb_component_id: "",
|
|
5793
5853
|
route: [
|
|
5794
5854
|
{
|
|
5795
|
-
x:
|
|
5796
|
-
y:
|
|
5855
|
+
x: length44.parse(parameters.p) / 2,
|
|
5856
|
+
y: length44.parse(parameters.h) / 2
|
|
5797
5857
|
},
|
|
5798
5858
|
{
|
|
5799
|
-
x: -
|
|
5800
|
-
y:
|
|
5859
|
+
x: -length44.parse(parameters.w) / 2 - 0.1,
|
|
5860
|
+
y: length44.parse(parameters.h) / 2
|
|
5801
5861
|
},
|
|
5802
5862
|
{
|
|
5803
|
-
x: -
|
|
5804
|
-
y: -
|
|
5863
|
+
x: -length44.parse(parameters.w) / 2 - 0.1,
|
|
5864
|
+
y: -length44.parse(parameters.h) / 2
|
|
5805
5865
|
},
|
|
5806
5866
|
{
|
|
5807
|
-
x:
|
|
5808
|
-
y: -
|
|
5867
|
+
x: length44.parse(parameters.p) / 2,
|
|
5868
|
+
y: -length44.parse(parameters.h) / 2
|
|
5809
5869
|
}
|
|
5810
5870
|
],
|
|
5811
5871
|
stroke_width: 0.1,
|
|
@@ -5848,16 +5908,16 @@ var smbWithoutParsing = (parameters) => {
|
|
|
5848
5908
|
};
|
|
5849
5909
|
|
|
5850
5910
|
// src/fn/smc.ts
|
|
5851
|
-
import { z as
|
|
5852
|
-
import { length as
|
|
5911
|
+
import { z as z55 } from "zod";
|
|
5912
|
+
import { length as length45 } from "circuit-json";
|
|
5853
5913
|
var smc_def = base_def.extend({
|
|
5854
|
-
fn:
|
|
5855
|
-
num_pins:
|
|
5856
|
-
w:
|
|
5857
|
-
h:
|
|
5858
|
-
pl:
|
|
5859
|
-
pw:
|
|
5860
|
-
p:
|
|
5914
|
+
fn: z55.string(),
|
|
5915
|
+
num_pins: z55.literal(2).default(2),
|
|
5916
|
+
w: z55.string().default("10.70mm"),
|
|
5917
|
+
h: z55.string().default("6.60mm"),
|
|
5918
|
+
pl: z55.string().default("3.30mm"),
|
|
5919
|
+
pw: z55.string().default("2.50mm"),
|
|
5920
|
+
p: z55.string().default("6.80mm")
|
|
5861
5921
|
});
|
|
5862
5922
|
var smc = (raw_params) => {
|
|
5863
5923
|
const parameters = smc_def.parse(raw_params);
|
|
@@ -5868,20 +5928,20 @@ var smc = (raw_params) => {
|
|
|
5868
5928
|
pcb_component_id: "",
|
|
5869
5929
|
route: [
|
|
5870
5930
|
{
|
|
5871
|
-
x:
|
|
5872
|
-
y:
|
|
5931
|
+
x: length45.parse(parameters.p) / 2,
|
|
5932
|
+
y: length45.parse(parameters.h) / 2 - 0.8
|
|
5873
5933
|
},
|
|
5874
5934
|
{
|
|
5875
|
-
x: -
|
|
5876
|
-
y:
|
|
5935
|
+
x: -length45.parse(parameters.w) / 2 - 0.8,
|
|
5936
|
+
y: length45.parse(parameters.h) / 2 - 0.8
|
|
5877
5937
|
},
|
|
5878
5938
|
{
|
|
5879
|
-
x: -
|
|
5880
|
-
y: -
|
|
5939
|
+
x: -length45.parse(parameters.w) / 2 - 0.8,
|
|
5940
|
+
y: -length45.parse(parameters.h) / 2 + 0.8
|
|
5881
5941
|
},
|
|
5882
5942
|
{
|
|
5883
|
-
x:
|
|
5884
|
-
y: -
|
|
5943
|
+
x: length45.parse(parameters.p) / 2,
|
|
5944
|
+
y: -length45.parse(parameters.h) / 2 + 0.8
|
|
5885
5945
|
}
|
|
5886
5946
|
],
|
|
5887
5947
|
stroke_width: 0.1,
|
|
@@ -5923,16 +5983,16 @@ var smcWithoutParsing = (parameters) => {
|
|
|
5923
5983
|
};
|
|
5924
5984
|
|
|
5925
5985
|
// src/fn/sot223.ts
|
|
5926
|
-
import { z as
|
|
5986
|
+
import { z as z56 } from "zod";
|
|
5927
5987
|
var sot223_def = base_def.extend({
|
|
5928
|
-
fn:
|
|
5929
|
-
num_pins:
|
|
5930
|
-
w:
|
|
5931
|
-
h:
|
|
5932
|
-
pl:
|
|
5933
|
-
pw:
|
|
5934
|
-
p:
|
|
5935
|
-
string:
|
|
5988
|
+
fn: z56.string(),
|
|
5989
|
+
num_pins: z56.number().default(4),
|
|
5990
|
+
w: z56.string().default("8.50mm"),
|
|
5991
|
+
h: z56.string().default("6.90mm"),
|
|
5992
|
+
pl: z56.string().default("2mm"),
|
|
5993
|
+
pw: z56.string().default("1.5mm"),
|
|
5994
|
+
p: z56.string().default("2.30mm"),
|
|
5995
|
+
string: z56.string().optional()
|
|
5936
5996
|
});
|
|
5937
5997
|
var sot223 = (raw_params) => {
|
|
5938
5998
|
const match = raw_params.string?.match(/^sot223_(\d+)/);
|
|
@@ -6178,16 +6238,16 @@ var sot223_6 = (parameters) => {
|
|
|
6178
6238
|
};
|
|
6179
6239
|
|
|
6180
6240
|
// src/fn/sot23w.ts
|
|
6181
|
-
import { z as
|
|
6241
|
+
import { z as z57 } from "zod";
|
|
6182
6242
|
var sot23w_def = base_def.extend({
|
|
6183
|
-
fn:
|
|
6184
|
-
num_pins:
|
|
6185
|
-
w:
|
|
6186
|
-
h:
|
|
6187
|
-
pl:
|
|
6188
|
-
pw:
|
|
6189
|
-
p:
|
|
6190
|
-
string:
|
|
6243
|
+
fn: z57.string(),
|
|
6244
|
+
num_pins: z57.number().default(3),
|
|
6245
|
+
w: z57.string().default("3.40mm"),
|
|
6246
|
+
h: z57.string().default("3.30mm"),
|
|
6247
|
+
pl: z57.string().default("1mm"),
|
|
6248
|
+
pw: z57.string().default("0.7mm"),
|
|
6249
|
+
p: z57.string().default("1.2mm"),
|
|
6250
|
+
string: z57.string().optional()
|
|
6191
6251
|
});
|
|
6192
6252
|
var sot23w = (raw_params) => {
|
|
6193
6253
|
const match = raw_params.string?.match(/^sot23w_(\d+)/);
|
|
@@ -6275,16 +6335,16 @@ var sot23w_3 = (parameters) => {
|
|
|
6275
6335
|
};
|
|
6276
6336
|
|
|
6277
6337
|
// src/fn/to92s.ts
|
|
6278
|
-
import { z as
|
|
6338
|
+
import { z as z58 } from "zod";
|
|
6279
6339
|
var to92s_def = base_def.extend({
|
|
6280
|
-
fn:
|
|
6281
|
-
num_pins:
|
|
6282
|
-
p:
|
|
6283
|
-
id:
|
|
6284
|
-
od:
|
|
6285
|
-
w:
|
|
6286
|
-
h:
|
|
6287
|
-
string:
|
|
6340
|
+
fn: z58.string(),
|
|
6341
|
+
num_pins: z58.union([z58.literal(3), z58.literal(2)]).default(3),
|
|
6342
|
+
p: z58.string().default("1.27mm"),
|
|
6343
|
+
id: z58.string().default("0.72mm"),
|
|
6344
|
+
od: z58.string().default("0.95mm"),
|
|
6345
|
+
w: z58.string().default("2.5mm"),
|
|
6346
|
+
h: z58.string().default("4.2mm"),
|
|
6347
|
+
string: z58.string().optional()
|
|
6288
6348
|
});
|
|
6289
6349
|
var to92s_3 = (parameters) => {
|
|
6290
6350
|
const { p, id, od, w, h } = parameters;
|
|
@@ -6351,18 +6411,18 @@ var to92s = (raw_params) => {
|
|
|
6351
6411
|
|
|
6352
6412
|
// src/fn/jst.ts
|
|
6353
6413
|
import {
|
|
6354
|
-
length as
|
|
6414
|
+
length as length46
|
|
6355
6415
|
} from "circuit-json";
|
|
6356
|
-
import { z as
|
|
6416
|
+
import { z as z59 } from "zod";
|
|
6357
6417
|
var jst_def = base_def.extend({
|
|
6358
|
-
fn:
|
|
6359
|
-
p:
|
|
6360
|
-
id:
|
|
6361
|
-
pw:
|
|
6362
|
-
pl:
|
|
6363
|
-
w:
|
|
6364
|
-
h:
|
|
6365
|
-
sh:
|
|
6418
|
+
fn: z59.string(),
|
|
6419
|
+
p: length46.optional(),
|
|
6420
|
+
id: length46.optional(),
|
|
6421
|
+
pw: length46.optional(),
|
|
6422
|
+
pl: length46.optional(),
|
|
6423
|
+
w: length46.optional(),
|
|
6424
|
+
h: length46.optional(),
|
|
6425
|
+
sh: z59.union([z59.boolean(), z59.string(), z59.number()]).optional().transform((v) => {
|
|
6366
6426
|
if (typeof v === "string") {
|
|
6367
6427
|
const n = Number(v);
|
|
6368
6428
|
return Number.isNaN(n) ? true : n;
|
|
@@ -6371,26 +6431,26 @@ var jst_def = base_def.extend({
|
|
|
6371
6431
|
}).describe(
|
|
6372
6432
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
6373
6433
|
),
|
|
6374
|
-
ph:
|
|
6434
|
+
ph: z59.boolean().optional().describe(
|
|
6375
6435
|
'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
|
|
6376
6436
|
),
|
|
6377
|
-
string:
|
|
6437
|
+
string: z59.string().optional()
|
|
6378
6438
|
});
|
|
6379
6439
|
var variantDefaults = {
|
|
6380
6440
|
ph: {
|
|
6381
|
-
p:
|
|
6382
|
-
id:
|
|
6383
|
-
pw:
|
|
6384
|
-
pl:
|
|
6385
|
-
w:
|
|
6386
|
-
h:
|
|
6441
|
+
p: length46.parse("2.2mm"),
|
|
6442
|
+
id: length46.parse("0.70mm"),
|
|
6443
|
+
pw: length46.parse("1.20mm"),
|
|
6444
|
+
pl: length46.parse("1.20mm"),
|
|
6445
|
+
w: length46.parse("6mm"),
|
|
6446
|
+
h: length46.parse("5mm")
|
|
6387
6447
|
},
|
|
6388
6448
|
sh: {
|
|
6389
|
-
p:
|
|
6390
|
-
pw:
|
|
6391
|
-
pl:
|
|
6392
|
-
w:
|
|
6393
|
-
h:
|
|
6449
|
+
p: length46.parse("1mm"),
|
|
6450
|
+
pw: length46.parse("0.6mm"),
|
|
6451
|
+
pl: length46.parse("1.55mm"),
|
|
6452
|
+
w: length46.parse("5.8mm"),
|
|
6453
|
+
h: length46.parse("7.8mm")
|
|
6394
6454
|
}
|
|
6395
6455
|
};
|
|
6396
6456
|
function getVariant(params) {
|
|
@@ -6507,22 +6567,22 @@ var jst = (raw_params) => {
|
|
|
6507
6567
|
};
|
|
6508
6568
|
|
|
6509
6569
|
// src/fn/sod110.ts
|
|
6510
|
-
import { z as
|
|
6511
|
-
import { length as
|
|
6570
|
+
import { z as z60 } from "zod";
|
|
6571
|
+
import { length as length47 } from "circuit-json";
|
|
6512
6572
|
var sod_def12 = base_def.extend({
|
|
6513
|
-
fn:
|
|
6514
|
-
num_pins:
|
|
6515
|
-
w:
|
|
6516
|
-
h:
|
|
6517
|
-
pl:
|
|
6518
|
-
pw:
|
|
6519
|
-
p:
|
|
6573
|
+
fn: z60.string(),
|
|
6574
|
+
num_pins: z60.literal(2).default(2),
|
|
6575
|
+
w: z60.string().default("3.30mm"),
|
|
6576
|
+
h: z60.string().default("1.70mm"),
|
|
6577
|
+
pl: z60.string().default("0.80mm"),
|
|
6578
|
+
pw: z60.string().default("1mm"),
|
|
6579
|
+
p: z60.string().default("1.90mm")
|
|
6520
6580
|
});
|
|
6521
6581
|
var sod110 = (raw_params) => {
|
|
6522
6582
|
const parameters = sod_def12.parse(raw_params);
|
|
6523
6583
|
const silkscreenRefText = silkscreenRef(
|
|
6524
6584
|
0,
|
|
6525
|
-
|
|
6585
|
+
length47.parse(parameters.h) / 2 + 0.5,
|
|
6526
6586
|
0.3
|
|
6527
6587
|
);
|
|
6528
6588
|
const silkscreenLine = {
|
|
@@ -6531,20 +6591,20 @@ var sod110 = (raw_params) => {
|
|
|
6531
6591
|
pcb_component_id: "",
|
|
6532
6592
|
route: [
|
|
6533
6593
|
{
|
|
6534
|
-
x:
|
|
6535
|
-
y:
|
|
6594
|
+
x: length47.parse(parameters.p) / 2,
|
|
6595
|
+
y: length47.parse(parameters.h) / 2
|
|
6536
6596
|
},
|
|
6537
6597
|
{
|
|
6538
|
-
x: -
|
|
6539
|
-
y:
|
|
6598
|
+
x: -length47.parse(parameters.w) / 2,
|
|
6599
|
+
y: length47.parse(parameters.h) / 2
|
|
6540
6600
|
},
|
|
6541
6601
|
{
|
|
6542
|
-
x: -
|
|
6543
|
-
y: -
|
|
6602
|
+
x: -length47.parse(parameters.w) / 2,
|
|
6603
|
+
y: -length47.parse(parameters.h) / 2
|
|
6544
6604
|
},
|
|
6545
6605
|
{
|
|
6546
|
-
x:
|
|
6547
|
-
y: -
|
|
6606
|
+
x: length47.parse(parameters.p) / 2,
|
|
6607
|
+
y: -length47.parse(parameters.h) / 2
|
|
6548
6608
|
}
|
|
6549
6609
|
],
|
|
6550
6610
|
stroke_width: 0.1,
|
|
@@ -6586,8 +6646,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
6586
6646
|
};
|
|
6587
6647
|
|
|
6588
6648
|
// src/fn/vssop.ts
|
|
6589
|
-
import { z as
|
|
6590
|
-
import { length as
|
|
6649
|
+
import { z as z61 } from "zod";
|
|
6650
|
+
import { length as length48 } from "circuit-json";
|
|
6591
6651
|
var getDefaultValues = (num_pins) => {
|
|
6592
6652
|
switch (num_pins) {
|
|
6593
6653
|
case 8:
|
|
@@ -6617,23 +6677,23 @@ var getDefaultValues = (num_pins) => {
|
|
|
6617
6677
|
}
|
|
6618
6678
|
};
|
|
6619
6679
|
var vssop_def = base_def.extend({
|
|
6620
|
-
fn:
|
|
6621
|
-
num_pins:
|
|
6622
|
-
w:
|
|
6623
|
-
h:
|
|
6624
|
-
p:
|
|
6625
|
-
pl:
|
|
6626
|
-
pw:
|
|
6627
|
-
string:
|
|
6680
|
+
fn: z61.string(),
|
|
6681
|
+
num_pins: z61.union([z61.literal(8), z61.literal(10)]).default(8),
|
|
6682
|
+
w: z61.string().optional(),
|
|
6683
|
+
h: z61.string().optional(),
|
|
6684
|
+
p: z61.string().optional(),
|
|
6685
|
+
pl: z61.string().optional(),
|
|
6686
|
+
pw: z61.string().optional(),
|
|
6687
|
+
string: z61.string().optional()
|
|
6628
6688
|
});
|
|
6629
6689
|
var vssop = (raw_params) => {
|
|
6630
6690
|
const parameters = vssop_def.parse(raw_params);
|
|
6631
6691
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
6632
|
-
const w =
|
|
6633
|
-
const h =
|
|
6634
|
-
const p =
|
|
6635
|
-
const pl =
|
|
6636
|
-
const pw =
|
|
6692
|
+
const w = length48.parse(parameters.w || defaults.w);
|
|
6693
|
+
const h = length48.parse(parameters.h || defaults.h);
|
|
6694
|
+
const p = length48.parse(parameters.p || defaults.p);
|
|
6695
|
+
const pl = length48.parse(parameters.pl || defaults.pl);
|
|
6696
|
+
const pw = length48.parse(parameters.pw || defaults.pw);
|
|
6637
6697
|
const pads = [];
|
|
6638
6698
|
const half = parameters.num_pins / 2;
|
|
6639
6699
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -6710,14 +6770,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
6710
6770
|
const col = pn <= half ? -1 : 1;
|
|
6711
6771
|
const row = (half - 1) / 2 - rowIndex;
|
|
6712
6772
|
return {
|
|
6713
|
-
x: col *
|
|
6773
|
+
x: col * length48.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
|
|
6714
6774
|
y: row * p
|
|
6715
6775
|
};
|
|
6716
6776
|
};
|
|
6717
6777
|
|
|
6718
6778
|
// src/fn/msop.ts
|
|
6719
|
-
import { z as
|
|
6720
|
-
import { length as
|
|
6779
|
+
import { z as z62 } from "zod";
|
|
6780
|
+
import { length as length49 } from "circuit-json";
|
|
6721
6781
|
var getDefaultValues2 = (num_pins) => {
|
|
6722
6782
|
switch (num_pins) {
|
|
6723
6783
|
case 10:
|
|
@@ -6755,14 +6815,14 @@ var getDefaultValues2 = (num_pins) => {
|
|
|
6755
6815
|
}
|
|
6756
6816
|
};
|
|
6757
6817
|
var msop_def = base_def.extend({
|
|
6758
|
-
fn:
|
|
6759
|
-
num_pins:
|
|
6760
|
-
w:
|
|
6761
|
-
h:
|
|
6762
|
-
p:
|
|
6763
|
-
pl:
|
|
6764
|
-
pw:
|
|
6765
|
-
string:
|
|
6818
|
+
fn: z62.string(),
|
|
6819
|
+
num_pins: z62.union([z62.literal(8), z62.literal(10), z62.literal(12), z62.literal(16)]).default(8),
|
|
6820
|
+
w: z62.string().optional(),
|
|
6821
|
+
h: z62.string().optional(),
|
|
6822
|
+
p: z62.string().optional(),
|
|
6823
|
+
pl: z62.string().optional(),
|
|
6824
|
+
pw: z62.string().optional(),
|
|
6825
|
+
string: z62.string().optional()
|
|
6766
6826
|
});
|
|
6767
6827
|
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
6768
6828
|
const half = pinCount / 2;
|
|
@@ -6770,18 +6830,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
|
|
|
6770
6830
|
const col = pn <= half ? -1 : 1;
|
|
6771
6831
|
const row = (half - 1) / 2 - rowIndex;
|
|
6772
6832
|
return {
|
|
6773
|
-
x: col *
|
|
6833
|
+
x: col * length49.parse("2mm"),
|
|
6774
6834
|
y: row * p
|
|
6775
6835
|
};
|
|
6776
6836
|
};
|
|
6777
6837
|
var msop = (raw_params) => {
|
|
6778
6838
|
const parameters = msop_def.parse(raw_params);
|
|
6779
6839
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
6780
|
-
const w =
|
|
6781
|
-
const h =
|
|
6782
|
-
const p =
|
|
6783
|
-
const pl =
|
|
6784
|
-
const pw =
|
|
6840
|
+
const w = length49.parse(parameters.w || defaults.w);
|
|
6841
|
+
const h = length49.parse(parameters.h || defaults.h);
|
|
6842
|
+
const p = length49.parse(parameters.p || defaults.p);
|
|
6843
|
+
const pl = length49.parse(parameters.pl || defaults.pl);
|
|
6844
|
+
const pw = length49.parse(parameters.pw || defaults.pw);
|
|
6785
6845
|
const pads = [];
|
|
6786
6846
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6787
6847
|
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
@@ -6852,22 +6912,22 @@ var msop = (raw_params) => {
|
|
|
6852
6912
|
};
|
|
6853
6913
|
|
|
6854
6914
|
// src/fn/sod323w.ts
|
|
6855
|
-
import { z as
|
|
6856
|
-
import { length as
|
|
6915
|
+
import { z as z63 } from "zod";
|
|
6916
|
+
import { length as length50 } from "circuit-json";
|
|
6857
6917
|
var sod323w_def = base_def.extend({
|
|
6858
|
-
fn:
|
|
6859
|
-
num_pins:
|
|
6860
|
-
w:
|
|
6861
|
-
h:
|
|
6862
|
-
pl:
|
|
6863
|
-
pw:
|
|
6864
|
-
pad_spacing:
|
|
6918
|
+
fn: z63.string(),
|
|
6919
|
+
num_pins: z63.literal(2).default(2),
|
|
6920
|
+
w: z63.string().default("3.8mm"),
|
|
6921
|
+
h: z63.string().default("1.65mm"),
|
|
6922
|
+
pl: z63.string().default("1.2mm"),
|
|
6923
|
+
pw: z63.string().default("1.2mm"),
|
|
6924
|
+
pad_spacing: z63.string().default("2.6mm")
|
|
6865
6925
|
});
|
|
6866
6926
|
var sod323w = (raw_params) => {
|
|
6867
6927
|
const parameters = sod323w_def.parse(raw_params);
|
|
6868
6928
|
const silkscreenRefText = silkscreenRef(
|
|
6869
6929
|
0,
|
|
6870
|
-
|
|
6930
|
+
length50.parse(parameters.h),
|
|
6871
6931
|
0.3
|
|
6872
6932
|
);
|
|
6873
6933
|
const silkscreenLine = {
|
|
@@ -6876,20 +6936,20 @@ var sod323w = (raw_params) => {
|
|
|
6876
6936
|
pcb_component_id: "",
|
|
6877
6937
|
route: [
|
|
6878
6938
|
{
|
|
6879
|
-
x:
|
|
6880
|
-
y:
|
|
6939
|
+
x: length50.parse(parameters.pad_spacing) / 2,
|
|
6940
|
+
y: length50.parse(parameters.h) / 2
|
|
6881
6941
|
},
|
|
6882
6942
|
{
|
|
6883
|
-
x: -
|
|
6884
|
-
y:
|
|
6943
|
+
x: -length50.parse(parameters.w) / 2 - 0.2,
|
|
6944
|
+
y: length50.parse(parameters.h) / 2
|
|
6885
6945
|
},
|
|
6886
6946
|
{
|
|
6887
|
-
x: -
|
|
6888
|
-
y: -
|
|
6947
|
+
x: -length50.parse(parameters.w) / 2 - 0.2,
|
|
6948
|
+
y: -length50.parse(parameters.h) / 2
|
|
6889
6949
|
},
|
|
6890
6950
|
{
|
|
6891
|
-
x:
|
|
6892
|
-
y: -
|
|
6951
|
+
x: length50.parse(parameters.pad_spacing) / 2,
|
|
6952
|
+
y: -length50.parse(parameters.h) / 2
|
|
6893
6953
|
}
|
|
6894
6954
|
],
|
|
6895
6955
|
stroke_width: 0.1,
|
|
@@ -6932,22 +6992,22 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
6932
6992
|
};
|
|
6933
6993
|
|
|
6934
6994
|
// src/fn/sod323fl.ts
|
|
6935
|
-
import { z as
|
|
6936
|
-
import { length as
|
|
6995
|
+
import { z as z64 } from "zod";
|
|
6996
|
+
import { length as length51 } from "circuit-json";
|
|
6937
6997
|
var sod323FL_def = base_def.extend({
|
|
6938
|
-
fn:
|
|
6939
|
-
num_pins:
|
|
6940
|
-
w:
|
|
6941
|
-
h:
|
|
6942
|
-
pl:
|
|
6943
|
-
pw:
|
|
6944
|
-
pad_spacing:
|
|
6998
|
+
fn: z64.string(),
|
|
6999
|
+
num_pins: z64.literal(2).default(2),
|
|
7000
|
+
w: z64.string().default("3.20mm"),
|
|
7001
|
+
h: z64.string().default("1.65mm"),
|
|
7002
|
+
pl: z64.string().default("0.8mm"),
|
|
7003
|
+
pw: z64.string().default("0.9mm"),
|
|
7004
|
+
pad_spacing: z64.string().default("2.1mm")
|
|
6945
7005
|
});
|
|
6946
7006
|
var sod323fl = (raw_params) => {
|
|
6947
7007
|
const parameters = sod323FL_def.parse(raw_params);
|
|
6948
7008
|
const silkscreenRefText = silkscreenRef(
|
|
6949
7009
|
0,
|
|
6950
|
-
|
|
7010
|
+
length51.parse(parameters.h),
|
|
6951
7011
|
0.3
|
|
6952
7012
|
);
|
|
6953
7013
|
const silkscreenLine = {
|
|
@@ -6956,20 +7016,20 @@ var sod323fl = (raw_params) => {
|
|
|
6956
7016
|
pcb_component_id: "",
|
|
6957
7017
|
route: [
|
|
6958
7018
|
{
|
|
6959
|
-
x:
|
|
6960
|
-
y:
|
|
7019
|
+
x: length51.parse(parameters.pad_spacing) / 2,
|
|
7020
|
+
y: length51.parse(parameters.h) / 2
|
|
6961
7021
|
},
|
|
6962
7022
|
{
|
|
6963
|
-
x: -
|
|
6964
|
-
y:
|
|
7023
|
+
x: -length51.parse(parameters.w) / 2 - 0.2,
|
|
7024
|
+
y: length51.parse(parameters.h) / 2
|
|
6965
7025
|
},
|
|
6966
7026
|
{
|
|
6967
|
-
x: -
|
|
6968
|
-
y: -
|
|
7027
|
+
x: -length51.parse(parameters.w) / 2 - 0.2,
|
|
7028
|
+
y: -length51.parse(parameters.h) / 2
|
|
6969
7029
|
},
|
|
6970
7030
|
{
|
|
6971
|
-
x:
|
|
6972
|
-
y: -
|
|
7031
|
+
x: length51.parse(parameters.pad_spacing) / 2,
|
|
7032
|
+
y: -length51.parse(parameters.h) / 2
|
|
6973
7033
|
}
|
|
6974
7034
|
],
|
|
6975
7035
|
stroke_width: 0.1,
|
|
@@ -7012,20 +7072,20 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
7012
7072
|
};
|
|
7013
7073
|
|
|
7014
7074
|
// src/fn/son.ts
|
|
7015
|
-
import { z as
|
|
7016
|
-
import { length as
|
|
7075
|
+
import { z as z65 } from "zod";
|
|
7076
|
+
import { length as length52 } from "circuit-json";
|
|
7017
7077
|
var son_def = base_def.extend({
|
|
7018
|
-
fn:
|
|
7019
|
-
num_pins:
|
|
7020
|
-
w:
|
|
7021
|
-
h:
|
|
7022
|
-
p:
|
|
7023
|
-
pl:
|
|
7024
|
-
pw:
|
|
7025
|
-
epw:
|
|
7026
|
-
eph:
|
|
7027
|
-
string:
|
|
7028
|
-
ep:
|
|
7078
|
+
fn: z65.string(),
|
|
7079
|
+
num_pins: z65.union([z65.literal(6), z65.literal(8)]).default(8),
|
|
7080
|
+
w: z65.string().default("3mm"),
|
|
7081
|
+
h: z65.string().default("3mm"),
|
|
7082
|
+
p: z65.string().default("0.5mm"),
|
|
7083
|
+
pl: z65.string().default("0.52mm"),
|
|
7084
|
+
pw: z65.string().default("0.35mm"),
|
|
7085
|
+
epw: z65.string().default("1.40mm"),
|
|
7086
|
+
eph: z65.string().default("1.60mm"),
|
|
7087
|
+
string: z65.string().optional(),
|
|
7088
|
+
ep: z65.boolean().default(false)
|
|
7029
7089
|
});
|
|
7030
7090
|
var son = (raw_params) => {
|
|
7031
7091
|
if (raw_params.string && raw_params.string.includes("_ep")) {
|
|
@@ -7037,13 +7097,13 @@ var son = (raw_params) => {
|
|
|
7037
7097
|
...raw_params,
|
|
7038
7098
|
num_pins: numPins
|
|
7039
7099
|
});
|
|
7040
|
-
const w =
|
|
7041
|
-
const h =
|
|
7042
|
-
const p =
|
|
7043
|
-
const pl =
|
|
7044
|
-
const pw =
|
|
7045
|
-
const epw =
|
|
7046
|
-
const eph =
|
|
7100
|
+
const w = length52.parse(parameters.w);
|
|
7101
|
+
const h = length52.parse(parameters.h);
|
|
7102
|
+
const p = length52.parse(parameters.p);
|
|
7103
|
+
const pl = length52.parse(parameters.pl);
|
|
7104
|
+
const pw = length52.parse(parameters.pw);
|
|
7105
|
+
const epw = length52.parse(parameters.epw);
|
|
7106
|
+
const eph = length52.parse(parameters.eph);
|
|
7047
7107
|
const pads = [];
|
|
7048
7108
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
7049
7109
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -7121,18 +7181,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
7121
7181
|
const col = pn <= half ? -1 : 1;
|
|
7122
7182
|
const row = (half - 1) / 2 - rowIndex;
|
|
7123
7183
|
return {
|
|
7124
|
-
x: col *
|
|
7184
|
+
x: col * length52.parse("1.4mm"),
|
|
7125
7185
|
y: row * p
|
|
7126
7186
|
};
|
|
7127
7187
|
};
|
|
7128
7188
|
|
|
7129
7189
|
// src/fn/solderjumper.ts
|
|
7130
|
-
import { length as
|
|
7190
|
+
import { length as length53 } from "circuit-json";
|
|
7131
7191
|
var solderjumper = (params) => {
|
|
7132
7192
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
7133
|
-
const padSpacing7 =
|
|
7134
|
-
const padWidth =
|
|
7135
|
-
const padHeight =
|
|
7193
|
+
const padSpacing7 = length53.parse(p);
|
|
7194
|
+
const padWidth = length53.parse(pw);
|
|
7195
|
+
const padHeight = length53.parse(ph);
|
|
7136
7196
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
7137
7197
|
const pads = [];
|
|
7138
7198
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -7220,34 +7280,34 @@ var solderjumper = (params) => {
|
|
|
7220
7280
|
};
|
|
7221
7281
|
|
|
7222
7282
|
// src/fn/sot457.ts
|
|
7223
|
-
import { z as
|
|
7283
|
+
import { z as z66 } from "zod";
|
|
7224
7284
|
var commonSchema = {
|
|
7225
|
-
fn:
|
|
7226
|
-
num_pins:
|
|
7227
|
-
pillh:
|
|
7228
|
-
pillw:
|
|
7229
|
-
pl:
|
|
7230
|
-
pw:
|
|
7231
|
-
p:
|
|
7232
|
-
wave:
|
|
7233
|
-
reflow:
|
|
7285
|
+
fn: z66.literal("sot457"),
|
|
7286
|
+
num_pins: z66.literal(6).default(6),
|
|
7287
|
+
pillh: z66.string().default("0.45mm"),
|
|
7288
|
+
pillw: z66.string().default("1.45mm"),
|
|
7289
|
+
pl: z66.string(),
|
|
7290
|
+
pw: z66.string(),
|
|
7291
|
+
p: z66.string(),
|
|
7292
|
+
wave: z66.boolean().optional(),
|
|
7293
|
+
reflow: z66.boolean().optional()
|
|
7234
7294
|
};
|
|
7235
7295
|
var sot457DefSchema = base_def.extend({
|
|
7236
7296
|
...commonSchema,
|
|
7237
|
-
h:
|
|
7238
|
-
w:
|
|
7239
|
-
pl:
|
|
7240
|
-
pw:
|
|
7241
|
-
p:
|
|
7297
|
+
h: z66.string().default("2.5mm"),
|
|
7298
|
+
w: z66.string().default("2.7mm"),
|
|
7299
|
+
pl: z66.string().default("0.8mm"),
|
|
7300
|
+
pw: z66.string().default("0.55mm"),
|
|
7301
|
+
p: z66.string().default("0.95mm")
|
|
7242
7302
|
});
|
|
7243
7303
|
var sot457WaveSchema = base_def.extend({
|
|
7244
7304
|
...commonSchema,
|
|
7245
|
-
h:
|
|
7246
|
-
w:
|
|
7247
|
-
pillr:
|
|
7248
|
-
pl:
|
|
7249
|
-
pw:
|
|
7250
|
-
p:
|
|
7305
|
+
h: z66.string().default("3mm"),
|
|
7306
|
+
w: z66.string().default("4mm"),
|
|
7307
|
+
pillr: z66.string().default("0.225mm"),
|
|
7308
|
+
pl: z66.string().default("1.45mm"),
|
|
7309
|
+
pw: z66.string().default("1.5mm"),
|
|
7310
|
+
p: z66.string().default("1.475mm")
|
|
7251
7311
|
}).transform((data) => ({
|
|
7252
7312
|
...data,
|
|
7253
7313
|
wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
|
|
@@ -7386,25 +7446,25 @@ var sot457 = (rawParams) => {
|
|
|
7386
7446
|
};
|
|
7387
7447
|
|
|
7388
7448
|
// src/fn/sot963.ts
|
|
7389
|
-
import { z as
|
|
7390
|
-
import { length as
|
|
7449
|
+
import { z as z67 } from "zod";
|
|
7450
|
+
import { length as length54 } from "circuit-json";
|
|
7391
7451
|
var sot963_def = base_def.extend({
|
|
7392
|
-
fn:
|
|
7393
|
-
num_pins:
|
|
7394
|
-
w:
|
|
7395
|
-
h:
|
|
7396
|
-
p:
|
|
7397
|
-
pl:
|
|
7398
|
-
pw:
|
|
7399
|
-
string:
|
|
7452
|
+
fn: z67.string(),
|
|
7453
|
+
num_pins: z67.literal(6).default(6),
|
|
7454
|
+
w: z67.string().default("1.1mm"),
|
|
7455
|
+
h: z67.string().default("1.45mm"),
|
|
7456
|
+
p: z67.string().default("0.35mm"),
|
|
7457
|
+
pl: z67.string().default("0.2mm"),
|
|
7458
|
+
pw: z67.string().default("0.2mm"),
|
|
7459
|
+
string: z67.string().optional()
|
|
7400
7460
|
});
|
|
7401
7461
|
var sot963 = (raw_params) => {
|
|
7402
7462
|
const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
|
|
7403
|
-
const w =
|
|
7404
|
-
const h =
|
|
7405
|
-
const p =
|
|
7406
|
-
const pl =
|
|
7407
|
-
const pw =
|
|
7463
|
+
const w = length54.parse(parameters.w);
|
|
7464
|
+
const h = length54.parse(parameters.h);
|
|
7465
|
+
const p = length54.parse(parameters.p);
|
|
7466
|
+
const pl = length54.parse(parameters.pl);
|
|
7467
|
+
const pw = length54.parse(parameters.pw);
|
|
7408
7468
|
const pads = [];
|
|
7409
7469
|
for (let i = 0; i < 6; i++) {
|
|
7410
7470
|
const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
|
|
@@ -7467,19 +7527,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
|
|
|
7467
7527
|
};
|
|
7468
7528
|
|
|
7469
7529
|
// src/fn/potentiometer.ts
|
|
7470
|
-
import { z as
|
|
7530
|
+
import { z as z68 } from "zod";
|
|
7471
7531
|
var potentiometer_def = base_def.extend({
|
|
7472
|
-
fn:
|
|
7473
|
-
num_pins:
|
|
7474
|
-
p:
|
|
7475
|
-
id:
|
|
7476
|
-
od:
|
|
7477
|
-
ca:
|
|
7532
|
+
fn: z68.string(),
|
|
7533
|
+
num_pins: z68.union([z68.literal(3), z68.literal(2)]).default(3),
|
|
7534
|
+
p: z68.string().default("3.8mm"),
|
|
7535
|
+
id: z68.string().default("1.25mm"),
|
|
7536
|
+
od: z68.string().default("2.35mm"),
|
|
7537
|
+
ca: z68.string().default("14mm").describe(
|
|
7478
7538
|
"Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
|
|
7479
7539
|
),
|
|
7480
|
-
w:
|
|
7481
|
-
h:
|
|
7482
|
-
string:
|
|
7540
|
+
w: z68.string().default("5.35mm"),
|
|
7541
|
+
h: z68.string().default("4mm"),
|
|
7542
|
+
string: z68.string().optional()
|
|
7483
7543
|
});
|
|
7484
7544
|
var potentiometer_acp = (parameters) => {
|
|
7485
7545
|
const { p, id, od, h, ca } = parameters;
|
|
@@ -7546,15 +7606,15 @@ var potentiometer = (raw_params) => {
|
|
|
7546
7606
|
|
|
7547
7607
|
// src/fn/electrolytic.ts
|
|
7548
7608
|
import {
|
|
7549
|
-
length as
|
|
7609
|
+
length as length55
|
|
7550
7610
|
} from "circuit-json";
|
|
7551
|
-
import { z as
|
|
7611
|
+
import { z as z69 } from "zod";
|
|
7552
7612
|
var electrolytic_def = base_def.extend({
|
|
7553
|
-
fn:
|
|
7554
|
-
p:
|
|
7555
|
-
id:
|
|
7556
|
-
od:
|
|
7557
|
-
d:
|
|
7613
|
+
fn: z69.string(),
|
|
7614
|
+
p: length55.optional().default("7.5mm"),
|
|
7615
|
+
id: length55.optional().default("1mm"),
|
|
7616
|
+
od: length55.optional().default("2mm"),
|
|
7617
|
+
d: length55.optional().default("10.5mm")
|
|
7558
7618
|
});
|
|
7559
7619
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
7560
7620
|
const topArc = [];
|
|
@@ -7661,22 +7721,22 @@ var electrolytic = (raw_params) => {
|
|
|
7661
7721
|
};
|
|
7662
7722
|
|
|
7663
7723
|
// src/fn/smbf.ts
|
|
7664
|
-
import { z as
|
|
7665
|
-
import { length as
|
|
7724
|
+
import { z as z70 } from "zod";
|
|
7725
|
+
import { length as length56 } from "circuit-json";
|
|
7666
7726
|
var smbf_def = base_def.extend({
|
|
7667
|
-
fn:
|
|
7668
|
-
num_pins:
|
|
7669
|
-
w:
|
|
7670
|
-
h:
|
|
7671
|
-
pl:
|
|
7672
|
-
pw:
|
|
7673
|
-
p:
|
|
7727
|
+
fn: z70.string(),
|
|
7728
|
+
num_pins: z70.literal(2).default(2),
|
|
7729
|
+
w: z70.string().default("6.5mm"),
|
|
7730
|
+
h: z70.string().default("3mm"),
|
|
7731
|
+
pl: z70.string().default("1.75mm"),
|
|
7732
|
+
pw: z70.string().default("2.40mm"),
|
|
7733
|
+
p: z70.string().default("4.75mm")
|
|
7674
7734
|
});
|
|
7675
7735
|
var smbf = (raw_params) => {
|
|
7676
7736
|
const parameters = smbf_def.parse(raw_params);
|
|
7677
7737
|
const silkscreenRefText = silkscreenRef(
|
|
7678
7738
|
0,
|
|
7679
|
-
|
|
7739
|
+
length56.parse(parameters.h) - 0.5,
|
|
7680
7740
|
0.3
|
|
7681
7741
|
);
|
|
7682
7742
|
const silkscreenLine = {
|
|
@@ -7685,20 +7745,20 @@ var smbf = (raw_params) => {
|
|
|
7685
7745
|
pcb_component_id: "",
|
|
7686
7746
|
route: [
|
|
7687
7747
|
{
|
|
7688
|
-
x:
|
|
7689
|
-
y:
|
|
7748
|
+
x: length56.parse(parameters.p) / 2,
|
|
7749
|
+
y: length56.parse(parameters.h) / 2
|
|
7690
7750
|
},
|
|
7691
7751
|
{
|
|
7692
|
-
x: -
|
|
7693
|
-
y:
|
|
7752
|
+
x: -length56.parse(parameters.w) / 2 - 0.3,
|
|
7753
|
+
y: length56.parse(parameters.h) / 2
|
|
7694
7754
|
},
|
|
7695
7755
|
{
|
|
7696
|
-
x: -
|
|
7697
|
-
y: -
|
|
7756
|
+
x: -length56.parse(parameters.w) / 2 - 0.3,
|
|
7757
|
+
y: -length56.parse(parameters.h) / 2
|
|
7698
7758
|
},
|
|
7699
7759
|
{
|
|
7700
|
-
x:
|
|
7701
|
-
y: -
|
|
7760
|
+
x: length56.parse(parameters.p) / 2,
|
|
7761
|
+
y: -length56.parse(parameters.h) / 2
|
|
7702
7762
|
}
|
|
7703
7763
|
],
|
|
7704
7764
|
stroke_width: 0.1,
|
|
@@ -7740,16 +7800,16 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
7740
7800
|
};
|
|
7741
7801
|
|
|
7742
7802
|
// src/fn/sot323.ts
|
|
7743
|
-
import { z as
|
|
7803
|
+
import { z as z71 } from "zod";
|
|
7744
7804
|
var sot323_def = base_def.extend({
|
|
7745
|
-
fn:
|
|
7746
|
-
num_pins:
|
|
7747
|
-
w:
|
|
7748
|
-
h:
|
|
7749
|
-
pl:
|
|
7750
|
-
pw:
|
|
7751
|
-
p:
|
|
7752
|
-
string:
|
|
7805
|
+
fn: z71.string(),
|
|
7806
|
+
num_pins: z71.number().default(3),
|
|
7807
|
+
w: z71.string().default("2.45mm"),
|
|
7808
|
+
h: z71.string().default("2.40mm"),
|
|
7809
|
+
pl: z71.string().default("1.225mm"),
|
|
7810
|
+
pw: z71.string().default("0.5mm"),
|
|
7811
|
+
p: z71.string().default("0.95mm"),
|
|
7812
|
+
string: z71.string().optional()
|
|
7753
7813
|
});
|
|
7754
7814
|
var sot323 = (raw_params) => {
|
|
7755
7815
|
const match = raw_params.string?.match(/^sot323_(\d+)/);
|
|
@@ -7837,30 +7897,30 @@ var sot323_3 = (parameters) => {
|
|
|
7837
7897
|
};
|
|
7838
7898
|
|
|
7839
7899
|
// src/fn/smtpad.ts
|
|
7840
|
-
import { z as
|
|
7841
|
-
import { length as
|
|
7900
|
+
import { z as z72 } from "zod";
|
|
7901
|
+
import { length as length57 } from "circuit-json";
|
|
7842
7902
|
import { mm as mm14 } from "@tscircuit/mm";
|
|
7843
7903
|
var smtpad_def = base_def.extend({
|
|
7844
|
-
fn:
|
|
7845
|
-
circle:
|
|
7846
|
-
rect:
|
|
7847
|
-
square:
|
|
7848
|
-
pill:
|
|
7849
|
-
d:
|
|
7850
|
-
pd:
|
|
7851
|
-
diameter:
|
|
7852
|
-
r:
|
|
7853
|
-
pr:
|
|
7854
|
-
radius:
|
|
7855
|
-
w:
|
|
7856
|
-
pw:
|
|
7857
|
-
width:
|
|
7858
|
-
h:
|
|
7859
|
-
ph:
|
|
7860
|
-
height:
|
|
7861
|
-
s:
|
|
7862
|
-
size:
|
|
7863
|
-
string:
|
|
7904
|
+
fn: z72.string(),
|
|
7905
|
+
circle: z72.boolean().optional(),
|
|
7906
|
+
rect: z72.boolean().optional(),
|
|
7907
|
+
square: z72.boolean().optional(),
|
|
7908
|
+
pill: z72.boolean().optional(),
|
|
7909
|
+
d: length57.optional(),
|
|
7910
|
+
pd: length57.optional(),
|
|
7911
|
+
diameter: length57.optional(),
|
|
7912
|
+
r: length57.optional(),
|
|
7913
|
+
pr: length57.optional(),
|
|
7914
|
+
radius: length57.optional(),
|
|
7915
|
+
w: length57.optional(),
|
|
7916
|
+
pw: length57.optional(),
|
|
7917
|
+
width: length57.optional(),
|
|
7918
|
+
h: length57.optional(),
|
|
7919
|
+
ph: length57.optional(),
|
|
7920
|
+
height: length57.optional(),
|
|
7921
|
+
s: length57.optional(),
|
|
7922
|
+
size: length57.optional(),
|
|
7923
|
+
string: z72.string().optional()
|
|
7864
7924
|
}).transform((v) => {
|
|
7865
7925
|
let shape = "rect";
|
|
7866
7926
|
if (v.circle) shape = "circle";
|
|
@@ -7926,18 +7986,18 @@ var smtpad = (raw_params) => {
|
|
|
7926
7986
|
};
|
|
7927
7987
|
|
|
7928
7988
|
// src/fn/platedhole.ts
|
|
7929
|
-
import { z as
|
|
7930
|
-
import { length as
|
|
7989
|
+
import { z as z73 } from "zod";
|
|
7990
|
+
import { length as length58 } from "circuit-json";
|
|
7931
7991
|
import { mm as mm15 } from "@tscircuit/mm";
|
|
7932
7992
|
var platedhole_def = base_def.extend({
|
|
7933
|
-
fn:
|
|
7934
|
-
d:
|
|
7935
|
-
hd:
|
|
7936
|
-
r:
|
|
7937
|
-
hr:
|
|
7938
|
-
pd:
|
|
7939
|
-
pr:
|
|
7940
|
-
squarepad:
|
|
7993
|
+
fn: z73.string(),
|
|
7994
|
+
d: length58.optional(),
|
|
7995
|
+
hd: length58.optional(),
|
|
7996
|
+
r: length58.optional(),
|
|
7997
|
+
hr: length58.optional(),
|
|
7998
|
+
pd: length58.optional(),
|
|
7999
|
+
pr: length58.optional(),
|
|
8000
|
+
squarepad: z73.boolean().optional().default(false)
|
|
7941
8001
|
}).transform((v) => {
|
|
7942
8002
|
let holeD;
|
|
7943
8003
|
if (v.d !== void 0) holeD = mm15(v.d);
|
|
@@ -7976,14 +8036,14 @@ var platedhole2 = (raw_params) => {
|
|
|
7976
8036
|
};
|
|
7977
8037
|
|
|
7978
8038
|
// src/fn/sot.ts
|
|
7979
|
-
import { z as
|
|
8039
|
+
import { z as z74 } from "zod";
|
|
7980
8040
|
var sot_def = base_def.extend({
|
|
7981
|
-
fn:
|
|
7982
|
-
num_pins:
|
|
7983
|
-
h:
|
|
7984
|
-
pl:
|
|
7985
|
-
pw:
|
|
7986
|
-
p:
|
|
8041
|
+
fn: z74.string(),
|
|
8042
|
+
num_pins: z74.literal(6).default(6),
|
|
8043
|
+
h: z74.string().default("1.6mm"),
|
|
8044
|
+
pl: z74.string().default("1mm"),
|
|
8045
|
+
pw: z74.string().default("0.7mm"),
|
|
8046
|
+
p: z74.string().default("0.95mm")
|
|
7987
8047
|
});
|
|
7988
8048
|
var sot = (raw_params) => {
|
|
7989
8049
|
const parameters = sot_def.parse(raw_params);
|
|
@@ -8100,16 +8160,16 @@ var sotWithoutParsing = (parameters) => {
|
|
|
8100
8160
|
};
|
|
8101
8161
|
|
|
8102
8162
|
// src/fn/sot343.ts
|
|
8103
|
-
import { z as
|
|
8163
|
+
import { z as z75 } from "zod";
|
|
8104
8164
|
var sot343_def = base_def.extend({
|
|
8105
|
-
fn:
|
|
8106
|
-
num_pins:
|
|
8107
|
-
w:
|
|
8108
|
-
h:
|
|
8109
|
-
pl:
|
|
8110
|
-
pw:
|
|
8111
|
-
p:
|
|
8112
|
-
string:
|
|
8165
|
+
fn: z75.string(),
|
|
8166
|
+
num_pins: z75.number().default(4),
|
|
8167
|
+
w: z75.string().default("3.2mm"),
|
|
8168
|
+
h: z75.string().default("2.6mm"),
|
|
8169
|
+
pl: z75.string().default("1.35mm"),
|
|
8170
|
+
pw: z75.string().default("0.50mm"),
|
|
8171
|
+
p: z75.string().default("0.6mm"),
|
|
8172
|
+
string: z75.string().optional()
|
|
8113
8173
|
});
|
|
8114
8174
|
var sot343 = (raw_params) => {
|
|
8115
8175
|
const match = raw_params.string?.match(/^sot343_(\d+)/);
|
|
@@ -8204,9 +8264,9 @@ var sot343_4 = (parameters) => {
|
|
|
8204
8264
|
};
|
|
8205
8265
|
|
|
8206
8266
|
// src/fn/m2host.ts
|
|
8207
|
-
import { z as
|
|
8267
|
+
import { z as z76 } from "zod";
|
|
8208
8268
|
var m2host_def = base_def.extend({
|
|
8209
|
-
fn:
|
|
8269
|
+
fn: z76.string()
|
|
8210
8270
|
});
|
|
8211
8271
|
var m2host = (raw_params) => {
|
|
8212
8272
|
const parameters = m2host_def.parse(raw_params);
|
|
@@ -8310,37 +8370,41 @@ var m2host = (raw_params) => {
|
|
|
8310
8370
|
};
|
|
8311
8371
|
|
|
8312
8372
|
// src/fn/mountedpcbmodule.ts
|
|
8313
|
-
import { length as
|
|
8314
|
-
import { z as
|
|
8373
|
+
import { length as length59 } from "circuit-json";
|
|
8374
|
+
import { z as z77 } from "zod";
|
|
8315
8375
|
var mountedpcbmodule_def = base_def.extend({
|
|
8316
|
-
fn:
|
|
8317
|
-
numPins:
|
|
8318
|
-
rows:
|
|
8319
|
-
p:
|
|
8320
|
-
id:
|
|
8321
|
-
od:
|
|
8322
|
-
male:
|
|
8323
|
-
female:
|
|
8324
|
-
smd:
|
|
8325
|
-
pinlabeltextalignleft:
|
|
8326
|
-
pinlabeltextaligncenter:
|
|
8327
|
-
pinlabeltextalignright:
|
|
8328
|
-
pinlabelverticallyinverted:
|
|
8329
|
-
pinlabelorthogonal:
|
|
8330
|
-
nopinlabels:
|
|
8331
|
-
doublesidedpinlabel:
|
|
8332
|
-
bottomsidepinlabel:
|
|
8376
|
+
fn: z77.string(),
|
|
8377
|
+
numPins: z77.number().optional().default(0),
|
|
8378
|
+
rows: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional().default(1).describe("number of rows"),
|
|
8379
|
+
p: length59.default("2.54mm").describe("pitch"),
|
|
8380
|
+
id: length59.default("1.0mm").describe("inner diameter"),
|
|
8381
|
+
od: length59.default("1.5mm").describe("outer diameter"),
|
|
8382
|
+
male: z77.boolean().optional().describe("the module uses male headers"),
|
|
8383
|
+
female: z77.boolean().optional().describe("the module uses female headers"),
|
|
8384
|
+
smd: z77.boolean().optional().describe("surface mount device"),
|
|
8385
|
+
pinlabeltextalignleft: z77.boolean().optional().default(false),
|
|
8386
|
+
pinlabeltextaligncenter: z77.boolean().optional().default(false),
|
|
8387
|
+
pinlabeltextalignright: z77.boolean().optional().default(false),
|
|
8388
|
+
pinlabelverticallyinverted: z77.boolean().optional().default(false),
|
|
8389
|
+
pinlabelorthogonal: z77.boolean().optional().default(false),
|
|
8390
|
+
nopinlabels: z77.boolean().optional().default(false).describe("omit silkscreen pin labels"),
|
|
8391
|
+
doublesidedpinlabel: z77.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers"),
|
|
8392
|
+
bottomsidepinlabel: z77.boolean().optional().default(false).describe(
|
|
8333
8393
|
"place the silkscreen reference text on the bottom layer instead of top"
|
|
8334
8394
|
),
|
|
8335
|
-
pinRowSide:
|
|
8336
|
-
pinrowleft:
|
|
8337
|
-
pinrowright:
|
|
8338
|
-
pinrowtop:
|
|
8339
|
-
pinrowbottom:
|
|
8340
|
-
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8395
|
+
pinRowSide: z77.enum(["left", "right", "top", "bottom"]).optional().default("left"),
|
|
8396
|
+
pinrowleft: z77.boolean().optional().default(false),
|
|
8397
|
+
pinrowright: z77.boolean().optional().default(false),
|
|
8398
|
+
pinrowtop: z77.boolean().optional().default(false),
|
|
8399
|
+
pinrowbottom: z77.boolean().optional().default(false),
|
|
8400
|
+
pinrowleftpins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
|
|
8401
|
+
pinrowrightpins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
|
|
8402
|
+
pinrowtoppins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
|
|
8403
|
+
pinrowbottompins: z77.union([z77.string(), z77.number()]).transform((val) => Number(val)).optional(),
|
|
8404
|
+
width: length59.optional(),
|
|
8405
|
+
height: length59.optional(),
|
|
8406
|
+
pinRowHoleEdgeToEdgeDist: length59.default("2mm"),
|
|
8407
|
+
holes: z77.union([z77.string(), z77.array(z77.string())]).optional().transform((val) => {
|
|
8344
8408
|
if (!val) return val;
|
|
8345
8409
|
if (Array.isArray(val)) return val;
|
|
8346
8410
|
if (val.startsWith("(") && val.endsWith(")")) {
|
|
@@ -8348,18 +8412,18 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
8348
8412
|
}
|
|
8349
8413
|
return [val];
|
|
8350
8414
|
}),
|
|
8351
|
-
holeXDist:
|
|
8352
|
-
holeYDist:
|
|
8353
|
-
holeInset:
|
|
8354
|
-
pinrow:
|
|
8355
|
-
usbposition:
|
|
8356
|
-
usbleft:
|
|
8357
|
-
usbtop:
|
|
8358
|
-
usbright:
|
|
8359
|
-
usbbottom:
|
|
8360
|
-
usbtype:
|
|
8361
|
-
usbmicro:
|
|
8362
|
-
usbc:
|
|
8415
|
+
holeXDist: length59.optional(),
|
|
8416
|
+
holeYDist: length59.optional(),
|
|
8417
|
+
holeInset: length59.default("1mm"),
|
|
8418
|
+
pinrow: z77.union([z77.string(), z77.number()]).optional(),
|
|
8419
|
+
usbposition: z77.enum(["left", "right", "top", "bottom"]).optional().default("left"),
|
|
8420
|
+
usbleft: z77.boolean().optional().default(false),
|
|
8421
|
+
usbtop: z77.boolean().optional().default(false),
|
|
8422
|
+
usbright: z77.boolean().optional().default(false),
|
|
8423
|
+
usbbottom: z77.boolean().optional().default(false),
|
|
8424
|
+
usbtype: z77.enum(["micro", "c"]).optional(),
|
|
8425
|
+
usbmicro: z77.boolean().optional().default(false),
|
|
8426
|
+
usbc: z77.boolean().optional().default(false)
|
|
8363
8427
|
}).transform((data) => {
|
|
8364
8428
|
const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
|
|
8365
8429
|
let pinRowSide = data.pinRowSide;
|
|
@@ -8378,10 +8442,41 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
8378
8442
|
if (data.pinrow !== void 0) {
|
|
8379
8443
|
data.numPins = Number(data.pinrow);
|
|
8380
8444
|
}
|
|
8445
|
+
const sidePinCounts = {
|
|
8446
|
+
left: data.pinrowleftpins,
|
|
8447
|
+
right: data.pinrowrightpins,
|
|
8448
|
+
top: data.pinrowtoppins,
|
|
8449
|
+
bottom: data.pinrowbottompins
|
|
8450
|
+
};
|
|
8451
|
+
const hasSidePins = Object.values(sidePinCounts).some(
|
|
8452
|
+
(value) => value !== void 0 && value > 0
|
|
8453
|
+
);
|
|
8454
|
+
const leftRightBoth = (sidePinCounts.left ?? 0) > 0 && (sidePinCounts.right ?? 0) > 0;
|
|
8455
|
+
const topBottomBoth = (sidePinCounts.top ?? 0) > 0 && (sidePinCounts.bottom ?? 0) > 0;
|
|
8456
|
+
if (hasSidePins) {
|
|
8457
|
+
if ((sidePinCounts.left ?? 0) > 0) pinRowSide = "left";
|
|
8458
|
+
else if ((sidePinCounts.right ?? 0) > 0) pinRowSide = "right";
|
|
8459
|
+
else if ((sidePinCounts.top ?? 0) > 0) pinRowSide = "top";
|
|
8460
|
+
else if ((sidePinCounts.bottom ?? 0) > 0) pinRowSide = "bottom";
|
|
8461
|
+
data.numPins = (sidePinCounts.left ?? 0) + (sidePinCounts.right ?? 0) + (sidePinCounts.top ?? 0) + (sidePinCounts.bottom ?? 0);
|
|
8462
|
+
}
|
|
8381
8463
|
const numPinsPerRow = Math.ceil(data.numPins / data.rows);
|
|
8464
|
+
const verticalPins = Math.max(
|
|
8465
|
+
sidePinCounts.left ?? 0,
|
|
8466
|
+
sidePinCounts.right ?? 0
|
|
8467
|
+
);
|
|
8468
|
+
const horizontalPins = Math.max(
|
|
8469
|
+
sidePinCounts.top ?? 0,
|
|
8470
|
+
sidePinCounts.bottom ?? 0
|
|
8471
|
+
);
|
|
8382
8472
|
let calculatedWidth;
|
|
8383
8473
|
let calculatedHeight;
|
|
8384
|
-
if (
|
|
8474
|
+
if (hasSidePins) {
|
|
8475
|
+
const widthGap = leftRightBoth ? data.p : 0;
|
|
8476
|
+
const heightGap = topBottomBoth ? data.p : 0;
|
|
8477
|
+
calculatedWidth = (horizontalPins > 0 ? (horizontalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + widthGap;
|
|
8478
|
+
calculatedHeight = (verticalPins > 0 ? (verticalPins - 1) * data.p : 0) + 2 * data.pinRowHoleEdgeToEdgeDist + heightGap;
|
|
8479
|
+
} else if (pinRowSide === "left" || pinRowSide === "right") {
|
|
8385
8480
|
calculatedWidth = (data.rows - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
|
|
8386
8481
|
calculatedHeight = (numPinsPerRow - 1) * data.p + 2 * data.pinRowHoleEdgeToEdgeDist;
|
|
8387
8482
|
} else {
|
|
@@ -8396,15 +8491,21 @@ var mountedpcbmodule_def = base_def.extend({
|
|
|
8396
8491
|
...data,
|
|
8397
8492
|
pinlabelAnchorSide,
|
|
8398
8493
|
pinRowSide,
|
|
8494
|
+
usbposition,
|
|
8495
|
+
usbtype,
|
|
8399
8496
|
male: data.male ?? !data.female,
|
|
8400
8497
|
female: data.female ?? false,
|
|
8401
8498
|
width: data.width ?? calculatedWidth,
|
|
8402
|
-
height: data.height ?? calculatedHeight
|
|
8499
|
+
height: data.height ?? calculatedHeight,
|
|
8500
|
+
pinrowleftpins: sidePinCounts.left,
|
|
8501
|
+
pinrowrightpins: sidePinCounts.right,
|
|
8502
|
+
pinrowtoppins: sidePinCounts.top,
|
|
8503
|
+
pinrowbottompins: sidePinCounts.bottom
|
|
8403
8504
|
};
|
|
8404
8505
|
}).superRefine((data, ctx) => {
|
|
8405
8506
|
if (data.male && data.female) {
|
|
8406
8507
|
ctx.addIssue({
|
|
8407
|
-
code:
|
|
8508
|
+
code: z77.ZodIssueCode.custom,
|
|
8408
8509
|
message: "'male' and 'female' cannot both be true; it should be male or female.",
|
|
8409
8510
|
path: ["male", "female"]
|
|
8410
8511
|
});
|
|
@@ -8433,95 +8534,195 @@ var mountedpcbmodule = (raw_params) => {
|
|
|
8433
8534
|
holes,
|
|
8434
8535
|
holeXDist,
|
|
8435
8536
|
holeYDist,
|
|
8436
|
-
holeInset
|
|
8537
|
+
holeInset,
|
|
8538
|
+
pinrowleftpins,
|
|
8539
|
+
pinrowrightpins,
|
|
8540
|
+
pinrowtoppins,
|
|
8541
|
+
pinrowbottompins,
|
|
8542
|
+
usbposition,
|
|
8543
|
+
usbtype
|
|
8437
8544
|
} = parameters;
|
|
8438
8545
|
let pinlabelTextAlign = "center";
|
|
8439
8546
|
if (pinlabeltextalignleft) pinlabelTextAlign = "left";
|
|
8440
8547
|
else if (pinlabeltextalignright) pinlabelTextAlign = "right";
|
|
8441
8548
|
const elements = [];
|
|
8442
|
-
const
|
|
8443
|
-
|
|
8444
|
-
|
|
8445
|
-
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
|
|
8457
|
-
|
|
8458
|
-
|
|
8459
|
-
|
|
8460
|
-
|
|
8461
|
-
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8465
|
-
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8549
|
+
const sidePinCounts = {
|
|
8550
|
+
left: pinrowleftpins,
|
|
8551
|
+
right: pinrowrightpins,
|
|
8552
|
+
top: pinrowtoppins,
|
|
8553
|
+
bottom: pinrowbottompins
|
|
8554
|
+
};
|
|
8555
|
+
const hasSidePins = Object.values(sidePinCounts).some(
|
|
8556
|
+
(value) => value !== void 0 && value > 0
|
|
8557
|
+
);
|
|
8558
|
+
const addPin = (pinNumber, xoff, yoff, anchorSide) => {
|
|
8559
|
+
if (parameters.smd) {
|
|
8560
|
+
elements.push(
|
|
8561
|
+
rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
|
|
8562
|
+
);
|
|
8563
|
+
} else if (pinNumber === 1) {
|
|
8564
|
+
elements.push(
|
|
8565
|
+
platedHoleWithRectPad({
|
|
8566
|
+
pn: pinNumber,
|
|
8567
|
+
x: xoff,
|
|
8568
|
+
y: yoff,
|
|
8569
|
+
holeDiameter: id,
|
|
8570
|
+
rectPadWidth: od,
|
|
8571
|
+
rectPadHeight: od
|
|
8572
|
+
})
|
|
8573
|
+
);
|
|
8574
|
+
} else {
|
|
8575
|
+
elements.push(platedhole(pinNumber, xoff, yoff, id, od));
|
|
8576
|
+
}
|
|
8577
|
+
if (!nopinlabels) {
|
|
8578
|
+
const anchor_x = xoff + (anchorSide === "left" ? -od : anchorSide === "right" ? od : 0);
|
|
8579
|
+
const anchor_y = yoff + (anchorSide === "top" ? od : anchorSide === "bottom" ? -od : 0);
|
|
8580
|
+
if (!bottomsidepinlabel) {
|
|
8471
8581
|
elements.push(
|
|
8472
|
-
|
|
8582
|
+
silkscreenPin({
|
|
8583
|
+
fs: od / 5,
|
|
8584
|
+
pn: pinNumber,
|
|
8585
|
+
anchor_x,
|
|
8586
|
+
anchor_y,
|
|
8587
|
+
anchorplacement: anchorSide,
|
|
8588
|
+
textalign: pinlabelTextAlign,
|
|
8589
|
+
orthogonal: pinlabelorthogonal,
|
|
8590
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
8591
|
+
layer: "top"
|
|
8592
|
+
})
|
|
8593
|
+
);
|
|
8594
|
+
}
|
|
8595
|
+
if (doublesidedpinlabel || bottomsidepinlabel) {
|
|
8596
|
+
elements.push(
|
|
8597
|
+
silkscreenPin({
|
|
8598
|
+
fs: od / 5,
|
|
8599
|
+
pn: pinNumber,
|
|
8600
|
+
anchor_x,
|
|
8601
|
+
anchor_y,
|
|
8602
|
+
anchorplacement: anchorSide,
|
|
8603
|
+
textalign: pinlabelTextAlign,
|
|
8604
|
+
orthogonal: pinlabelorthogonal,
|
|
8605
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
8606
|
+
layer: "bottom"
|
|
8607
|
+
})
|
|
8473
8608
|
);
|
|
8609
|
+
}
|
|
8610
|
+
}
|
|
8611
|
+
};
|
|
8612
|
+
if (hasSidePins) {
|
|
8613
|
+
const pinSpacing = p;
|
|
8614
|
+
let pinNumber = 1;
|
|
8615
|
+
const leftCount = sidePinCounts.left ?? 0;
|
|
8616
|
+
const rightCount = sidePinCounts.right ?? 0;
|
|
8617
|
+
const topCount = sidePinCounts.top ?? 0;
|
|
8618
|
+
const bottomCount = sidePinCounts.bottom ?? 0;
|
|
8619
|
+
const addSidePins = (side, count) => {
|
|
8620
|
+
if (count <= 0) return;
|
|
8621
|
+
if (side === "left" || side === "right") {
|
|
8622
|
+
const xoff = side === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
|
|
8623
|
+
const startY = (count - 1) / 2 * pinSpacing;
|
|
8624
|
+
for (let i = 0; i < count; i++) {
|
|
8625
|
+
addPin(pinNumber, xoff, startY - i * pinSpacing, side);
|
|
8626
|
+
pinNumber++;
|
|
8627
|
+
}
|
|
8474
8628
|
} else {
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8479
|
-
|
|
8480
|
-
y: yoff,
|
|
8481
|
-
holeDiameter: id,
|
|
8482
|
-
rectPadWidth: od,
|
|
8483
|
-
rectPadHeight: od
|
|
8484
|
-
})
|
|
8485
|
-
);
|
|
8486
|
-
} else {
|
|
8487
|
-
elements.push(platedhole(pinNumber, xoff, yoff, id, od));
|
|
8629
|
+
const yoff = side === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
|
|
8630
|
+
const startX = -((count - 1) / 2) * pinSpacing;
|
|
8631
|
+
for (let i = 0; i < count; i++) {
|
|
8632
|
+
addPin(pinNumber, startX + i * pinSpacing, yoff, side);
|
|
8633
|
+
pinNumber++;
|
|
8488
8634
|
}
|
|
8489
8635
|
}
|
|
8490
|
-
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8636
|
+
};
|
|
8637
|
+
addSidePins("left", leftCount);
|
|
8638
|
+
addSidePins("right", rightCount);
|
|
8639
|
+
addSidePins("top", topCount);
|
|
8640
|
+
addSidePins("bottom", bottomCount);
|
|
8641
|
+
} else {
|
|
8642
|
+
const pinSpacing = p;
|
|
8643
|
+
let pinStartX = 0;
|
|
8644
|
+
let pinStartY = 0;
|
|
8645
|
+
let pinDirectionX = 0;
|
|
8646
|
+
let pinDirectionY = 0;
|
|
8647
|
+
let rowDirectionX = 0;
|
|
8648
|
+
let rowDirectionY = 0;
|
|
8649
|
+
const numPinsPerRow = Math.ceil(numPins / rows);
|
|
8650
|
+
if (pinRowSide === "left" || pinRowSide === "right") {
|
|
8651
|
+
pinStartX = pinRowSide === "left" ? -width / 2 + pinRowHoleEdgeToEdgeDist : width / 2 - pinRowHoleEdgeToEdgeDist;
|
|
8652
|
+
pinStartY = (numPinsPerRow - 1) / 2 * pinSpacing;
|
|
8653
|
+
pinDirectionX = 0;
|
|
8654
|
+
pinDirectionY = -pinSpacing;
|
|
8655
|
+
rowDirectionX = pinRowSide === "left" ? pinSpacing : -pinSpacing;
|
|
8656
|
+
rowDirectionY = 0;
|
|
8657
|
+
} else {
|
|
8658
|
+
pinStartX = -(numPinsPerRow - 1) / 2 * pinSpacing;
|
|
8659
|
+
pinStartY = pinRowSide === "top" ? height / 2 - pinRowHoleEdgeToEdgeDist : -height / 2 + pinRowHoleEdgeToEdgeDist;
|
|
8660
|
+
pinDirectionX = pinSpacing;
|
|
8661
|
+
pinDirectionY = 0;
|
|
8662
|
+
rowDirectionX = 0;
|
|
8663
|
+
rowDirectionY = pinRowSide === "top" ? -pinSpacing : pinSpacing;
|
|
8664
|
+
}
|
|
8665
|
+
let pinNumber = 1;
|
|
8666
|
+
for (let row = 0; row < rows && pinNumber <= numPins; row++) {
|
|
8667
|
+
for (let col = 0; col < numPinsPerRow && pinNumber <= numPins; col++) {
|
|
8668
|
+
const xoff = pinStartX + col * pinDirectionX + row * rowDirectionX;
|
|
8669
|
+
const yoff = pinStartY + col * pinDirectionY + row * rowDirectionY;
|
|
8670
|
+
if (parameters.smd) {
|
|
8494
8671
|
elements.push(
|
|
8495
|
-
|
|
8496
|
-
fs: od / 5,
|
|
8497
|
-
pn: pinNumber,
|
|
8498
|
-
anchor_x,
|
|
8499
|
-
anchor_y,
|
|
8500
|
-
anchorplacement: pinlabelAnchorSide,
|
|
8501
|
-
textalign: pinlabelTextAlign,
|
|
8502
|
-
orthogonal: pinlabelorthogonal,
|
|
8503
|
-
verticallyinverted: pinlabelverticallyinverted,
|
|
8504
|
-
layer: "top"
|
|
8505
|
-
})
|
|
8672
|
+
rectpad(pinNumber, xoff, yoff, parameters.od, parameters.od)
|
|
8506
8673
|
);
|
|
8674
|
+
} else {
|
|
8675
|
+
if (pinNumber === 1) {
|
|
8676
|
+
elements.push(
|
|
8677
|
+
platedHoleWithRectPad({
|
|
8678
|
+
pn: pinNumber,
|
|
8679
|
+
x: xoff,
|
|
8680
|
+
y: yoff,
|
|
8681
|
+
holeDiameter: id,
|
|
8682
|
+
rectPadWidth: od,
|
|
8683
|
+
rectPadHeight: od
|
|
8684
|
+
})
|
|
8685
|
+
);
|
|
8686
|
+
} else {
|
|
8687
|
+
elements.push(platedhole(pinNumber, xoff, yoff, id, od));
|
|
8688
|
+
}
|
|
8507
8689
|
}
|
|
8508
|
-
if (
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8512
|
-
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8520
|
-
|
|
8521
|
-
|
|
8690
|
+
if (!nopinlabels) {
|
|
8691
|
+
const anchor_x = xoff + (pinRowSide === "left" ? -od : pinRowSide === "right" ? od : 0);
|
|
8692
|
+
const anchor_y = yoff + (pinRowSide === "top" ? od : pinRowSide === "bottom" ? -od : 0);
|
|
8693
|
+
if (!bottomsidepinlabel) {
|
|
8694
|
+
elements.push(
|
|
8695
|
+
silkscreenPin({
|
|
8696
|
+
fs: od / 5,
|
|
8697
|
+
pn: pinNumber,
|
|
8698
|
+
anchor_x,
|
|
8699
|
+
anchor_y,
|
|
8700
|
+
anchorplacement: pinlabelAnchorSide,
|
|
8701
|
+
textalign: pinlabelTextAlign,
|
|
8702
|
+
orthogonal: pinlabelorthogonal,
|
|
8703
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
8704
|
+
layer: "top"
|
|
8705
|
+
})
|
|
8706
|
+
);
|
|
8707
|
+
}
|
|
8708
|
+
if (doublesidedpinlabel || bottomsidepinlabel) {
|
|
8709
|
+
elements.push(
|
|
8710
|
+
silkscreenPin({
|
|
8711
|
+
fs: od / 5,
|
|
8712
|
+
pn: pinNumber,
|
|
8713
|
+
anchor_x,
|
|
8714
|
+
anchor_y,
|
|
8715
|
+
anchorplacement: pinlabelAnchorSide,
|
|
8716
|
+
textalign: pinlabelTextAlign,
|
|
8717
|
+
orthogonal: pinlabelorthogonal,
|
|
8718
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
8719
|
+
layer: "bottom"
|
|
8720
|
+
})
|
|
8721
|
+
);
|
|
8722
|
+
}
|
|
8522
8723
|
}
|
|
8724
|
+
pinNumber++;
|
|
8523
8725
|
}
|
|
8524
|
-
pinNumber++;
|
|
8525
8726
|
}
|
|
8526
8727
|
}
|
|
8527
8728
|
if (holes) {
|
|
@@ -8563,6 +8764,62 @@ var mountedpcbmodule = (raw_params) => {
|
|
|
8563
8764
|
}
|
|
8564
8765
|
const refText = silkscreenRef(0, height / 2 + 1, 0.5);
|
|
8565
8766
|
elements.push(refText);
|
|
8767
|
+
if (usbposition && usbtype) {
|
|
8768
|
+
let usbRectWidth;
|
|
8769
|
+
let usbRectHeight;
|
|
8770
|
+
if (usbtype === "c") {
|
|
8771
|
+
usbRectWidth = 8;
|
|
8772
|
+
usbRectHeight = 3;
|
|
8773
|
+
} else if (usbtype === "micro") {
|
|
8774
|
+
usbRectWidth = 6;
|
|
8775
|
+
usbRectHeight = 2;
|
|
8776
|
+
} else {
|
|
8777
|
+
return {
|
|
8778
|
+
circuitJson: elements,
|
|
8779
|
+
parameters
|
|
8780
|
+
};
|
|
8781
|
+
}
|
|
8782
|
+
let usbRect;
|
|
8783
|
+
if (usbposition === "left") {
|
|
8784
|
+
usbRect = [
|
|
8785
|
+
{ x: -width / 2, y: -usbRectWidth / 2 },
|
|
8786
|
+
{ x: -width / 2 + usbRectHeight, y: -usbRectWidth / 2 },
|
|
8787
|
+
{ x: -width / 2 + usbRectHeight, y: usbRectWidth / 2 },
|
|
8788
|
+
{ x: -width / 2, y: usbRectWidth / 2 },
|
|
8789
|
+
{ x: -width / 2, y: -usbRectWidth / 2 }
|
|
8790
|
+
];
|
|
8791
|
+
} else if (usbposition === "right") {
|
|
8792
|
+
usbRect = [
|
|
8793
|
+
{ x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 },
|
|
8794
|
+
{ x: width / 2, y: -usbRectWidth / 2 },
|
|
8795
|
+
{ x: width / 2, y: usbRectWidth / 2 },
|
|
8796
|
+
{ x: width / 2 - usbRectHeight, y: usbRectWidth / 2 },
|
|
8797
|
+
{ x: width / 2 - usbRectHeight, y: -usbRectWidth / 2 }
|
|
8798
|
+
];
|
|
8799
|
+
} else if (usbposition === "top") {
|
|
8800
|
+
usbRect = [
|
|
8801
|
+
{ x: -usbRectWidth / 2, y: height / 2 - usbRectHeight },
|
|
8802
|
+
{ x: usbRectWidth / 2, y: height / 2 - usbRectHeight },
|
|
8803
|
+
{ x: usbRectWidth / 2, y: height / 2 },
|
|
8804
|
+
{ x: -usbRectWidth / 2, y: height / 2 },
|
|
8805
|
+
{ x: -usbRectWidth / 2, y: height / 2 - usbRectHeight }
|
|
8806
|
+
];
|
|
8807
|
+
} else if (usbposition === "bottom") {
|
|
8808
|
+
usbRect = [
|
|
8809
|
+
{ x: -usbRectWidth / 2, y: -height / 2 },
|
|
8810
|
+
{ x: usbRectWidth / 2, y: -height / 2 },
|
|
8811
|
+
{ x: usbRectWidth / 2, y: -height / 2 + usbRectHeight },
|
|
8812
|
+
{ x: -usbRectWidth / 2, y: -height / 2 + usbRectHeight },
|
|
8813
|
+
{ x: -usbRectWidth / 2, y: -height / 2 }
|
|
8814
|
+
];
|
|
8815
|
+
} else {
|
|
8816
|
+
return {
|
|
8817
|
+
circuitJson: elements,
|
|
8818
|
+
parameters
|
|
8819
|
+
};
|
|
8820
|
+
}
|
|
8821
|
+
elements.push(silkscreenpath(usbRect, { stroke_width: 0.1, layer: "top" }));
|
|
8822
|
+
}
|
|
8566
8823
|
return {
|
|
8567
8824
|
circuitJson: elements,
|
|
8568
8825
|
parameters
|
|
@@ -8570,16 +8827,16 @@ var mountedpcbmodule = (raw_params) => {
|
|
|
8570
8827
|
};
|
|
8571
8828
|
|
|
8572
8829
|
// src/fn/to92l.ts
|
|
8573
|
-
import { z as
|
|
8830
|
+
import { z as z78 } from "zod";
|
|
8574
8831
|
var to92l_def = base_def.extend({
|
|
8575
|
-
fn:
|
|
8576
|
-
num_pins:
|
|
8577
|
-
inline:
|
|
8578
|
-
p:
|
|
8579
|
-
id:
|
|
8580
|
-
od:
|
|
8581
|
-
w:
|
|
8582
|
-
h:
|
|
8832
|
+
fn: z78.string(),
|
|
8833
|
+
num_pins: z78.number().default(3),
|
|
8834
|
+
inline: z78.boolean().default(false),
|
|
8835
|
+
p: z78.string().default("1.27mm"),
|
|
8836
|
+
id: z78.string().default("0.75mm"),
|
|
8837
|
+
od: z78.string().default("1.3mm"),
|
|
8838
|
+
w: z78.string().default("4.8mm"),
|
|
8839
|
+
h: z78.string().default("4.0mm")
|
|
8583
8840
|
});
|
|
8584
8841
|
var to92l = (raw_params) => {
|
|
8585
8842
|
const parameters = to92l_def.parse(raw_params);
|