@tscircuit/footprinter 0.0.261 → 0.0.262
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 +22 -45
- package/dist/index.js +874 -811
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2066,22 +2066,85 @@ var pinrow = (raw_params) => {
|
|
|
2066
2066
|
};
|
|
2067
2067
|
|
|
2068
2068
|
// src/fn/sot563.ts
|
|
2069
|
-
|
|
2069
|
+
import { z as z14 } from "zod";
|
|
2070
|
+
import { length as length7 } from "circuit-json";
|
|
2071
|
+
var sot563_def = z14.object({
|
|
2072
|
+
fn: z14.string(),
|
|
2073
|
+
num_pins: z14.literal(6).default(6),
|
|
2074
|
+
w: z14.string().default("2.1mm"),
|
|
2075
|
+
h: z14.string().default("2.45mm"),
|
|
2076
|
+
p: z14.string().default("0.5mm"),
|
|
2077
|
+
pl: z14.string().default("0.675mm"),
|
|
2078
|
+
pw: z14.string().default("0.35mm"),
|
|
2079
|
+
string: z14.string().optional()
|
|
2080
|
+
});
|
|
2070
2081
|
var sot563 = (raw_params) => {
|
|
2071
|
-
const parameters = sot563_def.parse({
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2082
|
+
const parameters = sot563_def.parse({ ...raw_params, fn: "sot563" });
|
|
2083
|
+
const w = length7.parse(parameters.w);
|
|
2084
|
+
const h = length7.parse(parameters.h);
|
|
2085
|
+
const p = length7.parse(parameters.p);
|
|
2086
|
+
const pl = length7.parse(parameters.pl);
|
|
2087
|
+
const pw = length7.parse(parameters.pw);
|
|
2088
|
+
const pads = [];
|
|
2089
|
+
for (let i = 0; i < 6; i++) {
|
|
2090
|
+
const { x, y } = getSot563PadCoord(i + 1, w, p, pl);
|
|
2091
|
+
pads.push(rectpad(i + 1, x, y, pl, pw));
|
|
2092
|
+
}
|
|
2093
|
+
const silkscreenTopLine = {
|
|
2094
|
+
type: "pcb_silkscreen_path",
|
|
2095
|
+
layer: "top",
|
|
2096
|
+
pcb_component_id: "",
|
|
2097
|
+
route: [
|
|
2098
|
+
{ x: -w / 2, y: h / 2 },
|
|
2099
|
+
{ x: w / 2, y: h / 2 }
|
|
2100
|
+
],
|
|
2101
|
+
stroke_width: 0.05,
|
|
2102
|
+
pcb_silkscreen_path_id: ""
|
|
2103
|
+
};
|
|
2104
|
+
const silkscreenBottomLine = {
|
|
2105
|
+
type: "pcb_silkscreen_path",
|
|
2106
|
+
layer: "top",
|
|
2107
|
+
pcb_component_id: "",
|
|
2108
|
+
route: [
|
|
2109
|
+
{ x: -w / 2, y: -h / 2 },
|
|
2110
|
+
{ x: w / 2, y: -h / 2 }
|
|
2111
|
+
],
|
|
2112
|
+
stroke_width: 0.05,
|
|
2113
|
+
pcb_silkscreen_path_id: ""
|
|
2114
|
+
};
|
|
2115
|
+
const pin1Position = getSot563PadCoord(1, w, p, pl);
|
|
2116
|
+
const pin1Marking = {
|
|
2117
|
+
type: "pcb_silkscreen_path",
|
|
2118
|
+
layer: "top",
|
|
2119
|
+
pcb_component_id: "pin_marker_1",
|
|
2120
|
+
route: [
|
|
2121
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y },
|
|
2122
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y + 0.15 },
|
|
2123
|
+
{ x: pin1Position.x - pl / 2 - 0.45, y: pin1Position.y - 0.15 },
|
|
2124
|
+
{ x: pin1Position.x - pl / 2 - 0.3, y: pin1Position.y }
|
|
2125
|
+
],
|
|
2126
|
+
stroke_width: 0.05,
|
|
2127
|
+
pcb_silkscreen_path_id: "pin_marker_1"
|
|
2128
|
+
};
|
|
2129
|
+
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
2080
2130
|
return {
|
|
2081
|
-
circuitJson:
|
|
2131
|
+
circuitJson: [
|
|
2132
|
+
...pads,
|
|
2133
|
+
silkscreenTopLine,
|
|
2134
|
+
silkscreenBottomLine,
|
|
2135
|
+
silkscreenRefText,
|
|
2136
|
+
pin1Marking
|
|
2137
|
+
],
|
|
2082
2138
|
parameters
|
|
2083
2139
|
};
|
|
2084
2140
|
};
|
|
2141
|
+
var getSot563PadCoord = (pn, w, p, pl) => {
|
|
2142
|
+
const padCenterOffset = w / 2 - pl / 2;
|
|
2143
|
+
if (pn <= 3) {
|
|
2144
|
+
return { x: -padCenterOffset, y: p - (pn - 1) * p };
|
|
2145
|
+
}
|
|
2146
|
+
return { x: padCenterOffset, y: -p + (pn - 4) * p };
|
|
2147
|
+
};
|
|
2085
2148
|
|
|
2086
2149
|
// src/fn/ms012.ts
|
|
2087
2150
|
var ms012_def = extendSoicDef({
|
|
@@ -2112,23 +2175,23 @@ var ms013 = (raw_params) => {
|
|
|
2112
2175
|
};
|
|
2113
2176
|
|
|
2114
2177
|
// src/fn/sot723.ts
|
|
2115
|
-
import { length as
|
|
2116
|
-
import { z as
|
|
2117
|
-
var sot723_def =
|
|
2118
|
-
fn:
|
|
2119
|
-
num_pins:
|
|
2120
|
-
w:
|
|
2121
|
-
h:
|
|
2122
|
-
pw:
|
|
2123
|
-
pl:
|
|
2124
|
-
p:
|
|
2178
|
+
import { length as length8 } from "circuit-json";
|
|
2179
|
+
import { z as z15 } from "zod";
|
|
2180
|
+
var sot723_def = z15.object({
|
|
2181
|
+
fn: z15.string(),
|
|
2182
|
+
num_pins: z15.literal(3).default(3),
|
|
2183
|
+
w: z15.string().default("1.2mm"),
|
|
2184
|
+
h: z15.string().default("1.2mm"),
|
|
2185
|
+
pw: z15.string().default("0.40mm"),
|
|
2186
|
+
pl: z15.string().default("0.45mm"),
|
|
2187
|
+
p: z15.string().default("0.575mm")
|
|
2125
2188
|
});
|
|
2126
2189
|
var sot723 = (raw_params) => {
|
|
2127
2190
|
const parameters = sot723_def.parse(raw_params);
|
|
2128
2191
|
const pad2 = sot723WithoutParsing(parameters);
|
|
2129
2192
|
const silkscreenRefText = silkscreenRef(
|
|
2130
2193
|
0,
|
|
2131
|
-
|
|
2194
|
+
length8.parse(parameters.h),
|
|
2132
2195
|
0.2
|
|
2133
2196
|
);
|
|
2134
2197
|
return {
|
|
@@ -2140,11 +2203,11 @@ var getCcwSot723Coords = (parameters) => {
|
|
|
2140
2203
|
const { pn, w, h, pl, p } = parameters;
|
|
2141
2204
|
if (pn === 1) {
|
|
2142
2205
|
return { x: p, y: 0 };
|
|
2143
|
-
}
|
|
2206
|
+
}
|
|
2207
|
+
if (pn === 2) {
|
|
2144
2208
|
return { x: -p, y: -0.4 };
|
|
2145
|
-
} else {
|
|
2146
|
-
return { x: -p, y: 0.4 };
|
|
2147
2209
|
}
|
|
2210
|
+
return { x: -p, y: 0.4 };
|
|
2148
2211
|
};
|
|
2149
2212
|
var sot723WithoutParsing = (parameters) => {
|
|
2150
2213
|
const pads = [];
|
|
@@ -2171,22 +2234,22 @@ var sot723WithoutParsing = (parameters) => {
|
|
|
2171
2234
|
};
|
|
2172
2235
|
|
|
2173
2236
|
// src/fn/sod123.ts
|
|
2174
|
-
import { z as
|
|
2175
|
-
import { length as
|
|
2176
|
-
var sod_def =
|
|
2177
|
-
fn:
|
|
2178
|
-
num_pins:
|
|
2179
|
-
w:
|
|
2180
|
-
h:
|
|
2181
|
-
pl:
|
|
2182
|
-
pw:
|
|
2183
|
-
p:
|
|
2237
|
+
import { z as z16 } from "zod";
|
|
2238
|
+
import { length as length9 } from "circuit-json";
|
|
2239
|
+
var sod_def = z16.object({
|
|
2240
|
+
fn: z16.string(),
|
|
2241
|
+
num_pins: z16.literal(2).default(2),
|
|
2242
|
+
w: z16.string().default("2.36mm"),
|
|
2243
|
+
h: z16.string().default("1.22mm"),
|
|
2244
|
+
pl: z16.string().default("0.9mm"),
|
|
2245
|
+
pw: z16.string().default("1.2mm"),
|
|
2246
|
+
p: z16.string().default("3.30mm")
|
|
2184
2247
|
});
|
|
2185
2248
|
var sod123 = (raw_params) => {
|
|
2186
2249
|
const parameters = sod_def.parse(raw_params);
|
|
2187
2250
|
const silkscreenRefText = silkscreenRef(
|
|
2188
2251
|
0,
|
|
2189
|
-
|
|
2252
|
+
length9.parse(parameters.h) / 4 + 0.4,
|
|
2190
2253
|
0.3
|
|
2191
2254
|
);
|
|
2192
2255
|
return {
|
|
@@ -2226,14 +2289,14 @@ var sodWithoutParsing = (parameters) => {
|
|
|
2226
2289
|
|
|
2227
2290
|
// src/fn/axial.ts
|
|
2228
2291
|
import {
|
|
2229
|
-
length as
|
|
2292
|
+
length as length10
|
|
2230
2293
|
} from "circuit-json";
|
|
2231
|
-
import { z as
|
|
2232
|
-
var axial_def =
|
|
2233
|
-
fn:
|
|
2234
|
-
p:
|
|
2235
|
-
id:
|
|
2236
|
-
od:
|
|
2294
|
+
import { z as z17 } from "zod";
|
|
2295
|
+
var axial_def = z17.object({
|
|
2296
|
+
fn: z17.string(),
|
|
2297
|
+
p: length10.optional().default("2.54mm"),
|
|
2298
|
+
id: length10.optional().default("0.7mm"),
|
|
2299
|
+
od: length10.optional().default("1.4mm")
|
|
2237
2300
|
});
|
|
2238
2301
|
var axial = (raw_params) => {
|
|
2239
2302
|
const parameters = axial_def.parse(raw_params);
|
|
@@ -2265,8 +2328,8 @@ var axial = (raw_params) => {
|
|
|
2265
2328
|
};
|
|
2266
2329
|
|
|
2267
2330
|
// src/fn/pushbutton.ts
|
|
2268
|
-
import { length as
|
|
2269
|
-
import { z as
|
|
2331
|
+
import { length as length11 } from "circuit-json";
|
|
2332
|
+
import { z as z18 } from "zod";
|
|
2270
2333
|
|
|
2271
2334
|
// src/helpers/silkscreenpath.ts
|
|
2272
2335
|
var silkscreenpath = (route, options = {}) => {
|
|
@@ -2281,12 +2344,12 @@ var silkscreenpath = (route, options = {}) => {
|
|
|
2281
2344
|
};
|
|
2282
2345
|
|
|
2283
2346
|
// src/fn/pushbutton.ts
|
|
2284
|
-
var pushbutton_def =
|
|
2285
|
-
fn:
|
|
2286
|
-
w:
|
|
2287
|
-
h:
|
|
2288
|
-
id:
|
|
2289
|
-
od:
|
|
2347
|
+
var pushbutton_def = z18.object({
|
|
2348
|
+
fn: z18.literal("pushbutton"),
|
|
2349
|
+
w: length11.default(4.5),
|
|
2350
|
+
h: length11.default(6.5),
|
|
2351
|
+
id: length11.default(1),
|
|
2352
|
+
od: length11.default(1.2)
|
|
2290
2353
|
});
|
|
2291
2354
|
var pushbutton = (raw_params) => {
|
|
2292
2355
|
const parameters = pushbutton_def.parse(raw_params);
|
|
@@ -2333,24 +2396,24 @@ var pushbutton = (raw_params) => {
|
|
|
2333
2396
|
|
|
2334
2397
|
// src/fn/stampboard.ts
|
|
2335
2398
|
import {
|
|
2336
|
-
length as
|
|
2399
|
+
length as length12
|
|
2337
2400
|
} from "circuit-json";
|
|
2338
|
-
import { z as
|
|
2339
|
-
var stampboard_def =
|
|
2340
|
-
fn:
|
|
2341
|
-
w:
|
|
2342
|
-
h:
|
|
2343
|
-
left:
|
|
2344
|
-
right:
|
|
2345
|
-
top:
|
|
2346
|
-
bottom:
|
|
2347
|
-
p:
|
|
2348
|
-
pw:
|
|
2349
|
-
pl:
|
|
2350
|
-
innerhole:
|
|
2351
|
-
innerholeedgedistance:
|
|
2352
|
-
silkscreenlabels:
|
|
2353
|
-
silkscreenlabelmargin:
|
|
2401
|
+
import { z as z19 } from "zod";
|
|
2402
|
+
var stampboard_def = z19.object({
|
|
2403
|
+
fn: z19.string(),
|
|
2404
|
+
w: length12.default("22.58mm"),
|
|
2405
|
+
h: length12.optional(),
|
|
2406
|
+
left: length12.optional().default(20),
|
|
2407
|
+
right: length12.optional().default(20),
|
|
2408
|
+
top: length12.optional().default(2),
|
|
2409
|
+
bottom: length12.optional().default(2),
|
|
2410
|
+
p: length12.default(length12.parse("2.54mm")),
|
|
2411
|
+
pw: length12.default(length12.parse("1.6mm")),
|
|
2412
|
+
pl: length12.default(length12.parse("2.4mm")),
|
|
2413
|
+
innerhole: z19.boolean().default(false),
|
|
2414
|
+
innerholeedgedistance: length12.default(length12.parse("1.61mm")),
|
|
2415
|
+
silkscreenlabels: z19.boolean().default(false),
|
|
2416
|
+
silkscreenlabelmargin: length12.default(length12.parse("0.1mm"))
|
|
2354
2417
|
});
|
|
2355
2418
|
var getHeight = (parameters) => {
|
|
2356
2419
|
const params = stampboard_def.parse(parameters);
|
|
@@ -2759,22 +2822,22 @@ var stampboard = (raw_params) => {
|
|
|
2759
2822
|
|
|
2760
2823
|
// src/fn/stampreceiver.ts
|
|
2761
2824
|
import {
|
|
2762
|
-
length as
|
|
2825
|
+
length as length13
|
|
2763
2826
|
} from "circuit-json";
|
|
2764
|
-
import { z as
|
|
2765
|
-
var stampreceiver_def =
|
|
2766
|
-
fn:
|
|
2767
|
-
w:
|
|
2768
|
-
h:
|
|
2769
|
-
left:
|
|
2770
|
-
right:
|
|
2771
|
-
top:
|
|
2772
|
-
bottom:
|
|
2773
|
-
p:
|
|
2774
|
-
pw:
|
|
2775
|
-
pl:
|
|
2776
|
-
innerhole:
|
|
2777
|
-
innerholeedgedistance:
|
|
2827
|
+
import { z as z20 } from "zod";
|
|
2828
|
+
var stampreceiver_def = z20.object({
|
|
2829
|
+
fn: z20.string(),
|
|
2830
|
+
w: length13.default("22.58mm"),
|
|
2831
|
+
h: length13.optional(),
|
|
2832
|
+
left: length13.optional().default(20),
|
|
2833
|
+
right: length13.optional().default(20),
|
|
2834
|
+
top: length13.optional().default(2),
|
|
2835
|
+
bottom: length13.optional().default(2),
|
|
2836
|
+
p: length13.default(length13.parse("2.54mm")),
|
|
2837
|
+
pw: length13.default(length13.parse("1.6mm")),
|
|
2838
|
+
pl: length13.default(length13.parse("3.2mm")),
|
|
2839
|
+
innerhole: z20.boolean().default(false),
|
|
2840
|
+
innerholeedgedistance: length13.default(length13.parse("1.61mm"))
|
|
2778
2841
|
});
|
|
2779
2842
|
var getHeight2 = (parameters) => {
|
|
2780
2843
|
const params = stampreceiver_def.parse(parameters);
|
|
@@ -3075,20 +3138,20 @@ var lqfp = (parameters) => {
|
|
|
3075
3138
|
|
|
3076
3139
|
// src/fn/breakoutheaders.ts
|
|
3077
3140
|
import {
|
|
3078
|
-
length as
|
|
3141
|
+
length as length14
|
|
3079
3142
|
} from "circuit-json";
|
|
3080
|
-
import { z as
|
|
3081
|
-
var breakoutheaders_def =
|
|
3082
|
-
fn:
|
|
3083
|
-
w:
|
|
3084
|
-
h:
|
|
3085
|
-
left:
|
|
3086
|
-
right:
|
|
3087
|
-
top:
|
|
3088
|
-
bottom:
|
|
3089
|
-
p:
|
|
3090
|
-
id:
|
|
3091
|
-
od:
|
|
3143
|
+
import { z as z21 } from "zod";
|
|
3144
|
+
var breakoutheaders_def = z21.object({
|
|
3145
|
+
fn: z21.string(),
|
|
3146
|
+
w: length14.default("10mm"),
|
|
3147
|
+
h: length14.optional(),
|
|
3148
|
+
left: length14.optional().default(20),
|
|
3149
|
+
right: length14.optional().default(20),
|
|
3150
|
+
top: length14.optional().default(0),
|
|
3151
|
+
bottom: length14.optional().default(0),
|
|
3152
|
+
p: length14.default(length14.parse("2.54mm")),
|
|
3153
|
+
id: length14.optional().default(length14.parse("1mm")),
|
|
3154
|
+
od: length14.optional().default(length14.parse("1.5mm"))
|
|
3092
3155
|
});
|
|
3093
3156
|
var getHeight3 = (parameters) => {
|
|
3094
3157
|
const params = breakoutheaders_def.parse(parameters);
|
|
@@ -3280,9 +3343,9 @@ var breakoutheaders = (raw_params) => {
|
|
|
3280
3343
|
|
|
3281
3344
|
// src/fn/hc49.ts
|
|
3282
3345
|
import {
|
|
3283
|
-
length as
|
|
3346
|
+
length as length15
|
|
3284
3347
|
} from "circuit-json";
|
|
3285
|
-
import { z as
|
|
3348
|
+
import { z as z22 } from "zod";
|
|
3286
3349
|
var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
3287
3350
|
return Array.from({ length: 25 }, (_, i) => {
|
|
3288
3351
|
const theta = i / 24 * Math.PI - Math.PI / 2;
|
|
@@ -3292,13 +3355,13 @@ var generate_u_curve = (centerX, centerY, radius, direction) => {
|
|
|
3292
3355
|
};
|
|
3293
3356
|
});
|
|
3294
3357
|
};
|
|
3295
|
-
var hc49_def =
|
|
3296
|
-
fn:
|
|
3297
|
-
p:
|
|
3298
|
-
id:
|
|
3299
|
-
od:
|
|
3300
|
-
w:
|
|
3301
|
-
h:
|
|
3358
|
+
var hc49_def = z22.object({
|
|
3359
|
+
fn: z22.string(),
|
|
3360
|
+
p: length15.optional().default("4.88mm"),
|
|
3361
|
+
id: length15.optional().default("0.8mm"),
|
|
3362
|
+
od: length15.optional().default("1.5mm"),
|
|
3363
|
+
w: length15.optional().default("5.6mm"),
|
|
3364
|
+
h: length15.optional().default("3.5mm")
|
|
3302
3365
|
});
|
|
3303
3366
|
var hc49 = (raw_params) => {
|
|
3304
3367
|
const parameters = hc49_def.parse(raw_params);
|
|
@@ -3338,12 +3401,12 @@ var hc49 = (raw_params) => {
|
|
|
3338
3401
|
};
|
|
3339
3402
|
|
|
3340
3403
|
// src/fn/pad.ts
|
|
3341
|
-
import { z as
|
|
3342
|
-
import { length as
|
|
3404
|
+
import { z as z23 } from "zod";
|
|
3405
|
+
import { length as length16 } from "circuit-json";
|
|
3343
3406
|
import { mm as mm5 } from "@tscircuit/mm";
|
|
3344
|
-
var pad_def =
|
|
3345
|
-
w:
|
|
3346
|
-
h:
|
|
3407
|
+
var pad_def = z23.object({
|
|
3408
|
+
w: length16,
|
|
3409
|
+
h: length16
|
|
3347
3410
|
});
|
|
3348
3411
|
var pad = (params) => {
|
|
3349
3412
|
const { w, h } = params;
|
|
@@ -3359,17 +3422,17 @@ var pad = (params) => {
|
|
|
3359
3422
|
};
|
|
3360
3423
|
|
|
3361
3424
|
// src/fn/to92.ts
|
|
3362
|
-
import { z as
|
|
3363
|
-
var to92_def =
|
|
3364
|
-
fn:
|
|
3365
|
-
num_pins:
|
|
3366
|
-
p:
|
|
3367
|
-
id:
|
|
3368
|
-
od:
|
|
3369
|
-
w:
|
|
3370
|
-
h:
|
|
3371
|
-
inline:
|
|
3372
|
-
string:
|
|
3425
|
+
import { z as z24 } from "zod";
|
|
3426
|
+
var to92_def = z24.object({
|
|
3427
|
+
fn: z24.string(),
|
|
3428
|
+
num_pins: z24.union([z24.literal(3), z24.literal(2)]).default(3),
|
|
3429
|
+
p: z24.string().default("1.27mm"),
|
|
3430
|
+
id: z24.string().default("0.72mm"),
|
|
3431
|
+
od: z24.string().default("0.95mm"),
|
|
3432
|
+
w: z24.string().default("4.5mm"),
|
|
3433
|
+
h: z24.string().default("4.5mm"),
|
|
3434
|
+
inline: z24.boolean().default(false),
|
|
3435
|
+
string: z24.string().optional()
|
|
3373
3436
|
});
|
|
3374
3437
|
var generateSemicircle = (centerX, centerY, radius) => {
|
|
3375
3438
|
return Array.from({ length: 25 }, (_, i) => {
|
|
@@ -3442,22 +3505,22 @@ var to92 = (raw_params) => {
|
|
|
3442
3505
|
};
|
|
3443
3506
|
|
|
3444
3507
|
// src/fn/sod523.ts
|
|
3445
|
-
import { z as
|
|
3446
|
-
import { length as
|
|
3447
|
-
var sod_def2 =
|
|
3448
|
-
fn:
|
|
3449
|
-
num_pins:
|
|
3450
|
-
w:
|
|
3451
|
-
h:
|
|
3452
|
-
pl:
|
|
3453
|
-
pw:
|
|
3454
|
-
p:
|
|
3508
|
+
import { z as z25 } from "zod";
|
|
3509
|
+
import { length as length17 } from "circuit-json";
|
|
3510
|
+
var sod_def2 = z25.object({
|
|
3511
|
+
fn: z25.string(),
|
|
3512
|
+
num_pins: z25.literal(2).default(2),
|
|
3513
|
+
w: z25.string().default("2.15mm"),
|
|
3514
|
+
h: z25.string().default("1.20mm"),
|
|
3515
|
+
pl: z25.string().default("0.5mm"),
|
|
3516
|
+
pw: z25.string().default("0.6mm"),
|
|
3517
|
+
p: z25.string().default("1.4mm")
|
|
3455
3518
|
});
|
|
3456
3519
|
var sod523 = (raw_params) => {
|
|
3457
3520
|
const parameters = sod_def2.parse(raw_params);
|
|
3458
3521
|
const silkscreenRefText = silkscreenRef(
|
|
3459
3522
|
0,
|
|
3460
|
-
|
|
3523
|
+
length17.parse(parameters.h),
|
|
3461
3524
|
0.3
|
|
3462
3525
|
);
|
|
3463
3526
|
const silkscreenLine = {
|
|
@@ -3466,20 +3529,20 @@ var sod523 = (raw_params) => {
|
|
|
3466
3529
|
pcb_component_id: "",
|
|
3467
3530
|
route: [
|
|
3468
3531
|
{
|
|
3469
|
-
x:
|
|
3470
|
-
y:
|
|
3532
|
+
x: length17.parse(parameters.p) / 2,
|
|
3533
|
+
y: length17.parse(parameters.h) / 2
|
|
3471
3534
|
},
|
|
3472
3535
|
{
|
|
3473
|
-
x: -
|
|
3474
|
-
y:
|
|
3536
|
+
x: -length17.parse(parameters.w) / 2 - 0.2,
|
|
3537
|
+
y: length17.parse(parameters.h) / 2
|
|
3475
3538
|
},
|
|
3476
3539
|
{
|
|
3477
|
-
x: -
|
|
3478
|
-
y: -
|
|
3540
|
+
x: -length17.parse(parameters.w) / 2 - 0.2,
|
|
3541
|
+
y: -length17.parse(parameters.h) / 2
|
|
3479
3542
|
},
|
|
3480
3543
|
{
|
|
3481
|
-
x:
|
|
3482
|
-
y: -
|
|
3544
|
+
x: length17.parse(parameters.p) / 2,
|
|
3545
|
+
y: -length17.parse(parameters.h) / 2
|
|
3483
3546
|
}
|
|
3484
3547
|
],
|
|
3485
3548
|
stroke_width: 0.1,
|
|
@@ -3567,22 +3630,22 @@ var sop8 = (raw_params) => {
|
|
|
3567
3630
|
};
|
|
3568
3631
|
|
|
3569
3632
|
// src/fn/sod80.ts
|
|
3570
|
-
import { z as
|
|
3571
|
-
import { length as
|
|
3572
|
-
var sod80_def =
|
|
3573
|
-
fn:
|
|
3574
|
-
num_pins:
|
|
3575
|
-
w:
|
|
3576
|
-
h:
|
|
3577
|
-
pl:
|
|
3578
|
-
pw:
|
|
3579
|
-
p:
|
|
3633
|
+
import { z as z26 } from "zod";
|
|
3634
|
+
import { length as length18 } from "circuit-json";
|
|
3635
|
+
var sod80_def = z26.object({
|
|
3636
|
+
fn: z26.string(),
|
|
3637
|
+
num_pins: z26.literal(2).default(2),
|
|
3638
|
+
w: z26.string().default("5.0mm"),
|
|
3639
|
+
h: z26.string().default("2.30mm"),
|
|
3640
|
+
pl: z26.string().default("1.25mm"),
|
|
3641
|
+
pw: z26.string().default("2mm"),
|
|
3642
|
+
p: z26.string().default("3.75mm")
|
|
3580
3643
|
});
|
|
3581
3644
|
var sod80 = (raw_params) => {
|
|
3582
3645
|
const parameters = sod80_def.parse(raw_params);
|
|
3583
3646
|
const silkscreenRefText = silkscreenRef(
|
|
3584
3647
|
0,
|
|
3585
|
-
|
|
3648
|
+
length18.parse(parameters.h) / 2 + 1,
|
|
3586
3649
|
0.3
|
|
3587
3650
|
);
|
|
3588
3651
|
const silkscreenLine = {
|
|
@@ -3591,20 +3654,20 @@ var sod80 = (raw_params) => {
|
|
|
3591
3654
|
pcb_component_id: "",
|
|
3592
3655
|
route: [
|
|
3593
3656
|
{
|
|
3594
|
-
x:
|
|
3595
|
-
y:
|
|
3657
|
+
x: length18.parse(parameters.p) / 2 + 0.5,
|
|
3658
|
+
y: length18.parse(parameters.h) / 2 + 0.5
|
|
3596
3659
|
},
|
|
3597
3660
|
{
|
|
3598
|
-
x: -
|
|
3599
|
-
y:
|
|
3661
|
+
x: -length18.parse(parameters.w) / 2 - 0.5,
|
|
3662
|
+
y: length18.parse(parameters.h) / 2 + 0.5
|
|
3600
3663
|
},
|
|
3601
3664
|
{
|
|
3602
|
-
x: -
|
|
3603
|
-
y: -
|
|
3665
|
+
x: -length18.parse(parameters.w) / 2 - 0.5,
|
|
3666
|
+
y: -length18.parse(parameters.h) / 2 - 0.5
|
|
3604
3667
|
},
|
|
3605
3668
|
{
|
|
3606
|
-
x:
|
|
3607
|
-
y: -
|
|
3669
|
+
x: length18.parse(parameters.p) / 2 + 0.5,
|
|
3670
|
+
y: -length18.parse(parameters.h) / 2 - 0.5
|
|
3608
3671
|
}
|
|
3609
3672
|
],
|
|
3610
3673
|
stroke_width: 0.1,
|
|
@@ -3643,22 +3706,22 @@ var sod80WithoutParsing = (parameters) => {
|
|
|
3643
3706
|
};
|
|
3644
3707
|
|
|
3645
3708
|
// src/fn/sod123w.ts
|
|
3646
|
-
import { z as
|
|
3647
|
-
import { length as
|
|
3648
|
-
var sod_def3 =
|
|
3649
|
-
fn:
|
|
3650
|
-
num_pins:
|
|
3651
|
-
w:
|
|
3652
|
-
h:
|
|
3653
|
-
pl:
|
|
3654
|
-
pw:
|
|
3655
|
-
p:
|
|
3709
|
+
import { z as z27 } from "zod";
|
|
3710
|
+
import { length as length19 } from "circuit-json";
|
|
3711
|
+
var sod_def3 = z27.object({
|
|
3712
|
+
fn: z27.string(),
|
|
3713
|
+
num_pins: z27.literal(2).default(2),
|
|
3714
|
+
w: z27.string().default("4.4mm"),
|
|
3715
|
+
h: z27.string().default("2.1mm"),
|
|
3716
|
+
pl: z27.string().default("1.2mm"),
|
|
3717
|
+
pw: z27.string().default("1.2mm"),
|
|
3718
|
+
p: z27.string().default("2.9mm")
|
|
3656
3719
|
});
|
|
3657
3720
|
var sod123w = (raw_params) => {
|
|
3658
3721
|
const parameters = sod_def3.parse(raw_params);
|
|
3659
3722
|
const silkscreenRefText = silkscreenRef(
|
|
3660
3723
|
0,
|
|
3661
|
-
|
|
3724
|
+
length19.parse(parameters.h) - 0.5,
|
|
3662
3725
|
0.3
|
|
3663
3726
|
);
|
|
3664
3727
|
const silkscreenLine = {
|
|
@@ -3667,20 +3730,20 @@ var sod123w = (raw_params) => {
|
|
|
3667
3730
|
pcb_component_id: "",
|
|
3668
3731
|
route: [
|
|
3669
3732
|
{
|
|
3670
|
-
x:
|
|
3671
|
-
y:
|
|
3733
|
+
x: length19.parse(parameters.p) / 2,
|
|
3734
|
+
y: length19.parse(parameters.h) / 2
|
|
3672
3735
|
},
|
|
3673
3736
|
{
|
|
3674
|
-
x: -
|
|
3675
|
-
y:
|
|
3737
|
+
x: -length19.parse(parameters.w) / 2 - 0.2,
|
|
3738
|
+
y: length19.parse(parameters.h) / 2
|
|
3676
3739
|
},
|
|
3677
3740
|
{
|
|
3678
|
-
x: -
|
|
3679
|
-
y: -
|
|
3741
|
+
x: -length19.parse(parameters.w) / 2 - 0.2,
|
|
3742
|
+
y: -length19.parse(parameters.h) / 2
|
|
3680
3743
|
},
|
|
3681
3744
|
{
|
|
3682
|
-
x:
|
|
3683
|
-
y: -
|
|
3745
|
+
x: length19.parse(parameters.p) / 2,
|
|
3746
|
+
y: -length19.parse(parameters.h) / 2
|
|
3684
3747
|
}
|
|
3685
3748
|
],
|
|
3686
3749
|
stroke_width: 0.1,
|
|
@@ -3722,22 +3785,22 @@ var sodWithoutParsing3 = (parameters) => {
|
|
|
3722
3785
|
};
|
|
3723
3786
|
|
|
3724
3787
|
// src/fn/sod323.ts
|
|
3725
|
-
import { z as
|
|
3726
|
-
import { length as
|
|
3727
|
-
var sod_def4 =
|
|
3728
|
-
fn:
|
|
3729
|
-
num_pins:
|
|
3730
|
-
w:
|
|
3731
|
-
h:
|
|
3732
|
-
pl:
|
|
3733
|
-
pw:
|
|
3734
|
-
p:
|
|
3788
|
+
import { z as z28 } from "zod";
|
|
3789
|
+
import { length as length20 } from "circuit-json";
|
|
3790
|
+
var sod_def4 = z28.object({
|
|
3791
|
+
fn: z28.string(),
|
|
3792
|
+
num_pins: z28.literal(2).default(2),
|
|
3793
|
+
w: z28.string().default("3.30mm"),
|
|
3794
|
+
h: z28.string().default("1.80mm"),
|
|
3795
|
+
pl: z28.string().default("0.60mm"),
|
|
3796
|
+
pw: z28.string().default("0.45mm"),
|
|
3797
|
+
p: z28.string().default("2.1mm")
|
|
3735
3798
|
});
|
|
3736
3799
|
var sod323 = (raw_params) => {
|
|
3737
3800
|
const parameters = sod_def4.parse(raw_params);
|
|
3738
3801
|
const silkscreenRefText = silkscreenRef(
|
|
3739
3802
|
0,
|
|
3740
|
-
|
|
3803
|
+
length20.parse(parameters.h) - 0.5,
|
|
3741
3804
|
0.3
|
|
3742
3805
|
);
|
|
3743
3806
|
const silkscreenLine = {
|
|
@@ -3746,20 +3809,20 @@ var sod323 = (raw_params) => {
|
|
|
3746
3809
|
pcb_component_id: "",
|
|
3747
3810
|
route: [
|
|
3748
3811
|
{
|
|
3749
|
-
x:
|
|
3750
|
-
y:
|
|
3812
|
+
x: length20.parse(parameters.p) / 2,
|
|
3813
|
+
y: length20.parse(parameters.h) / 2
|
|
3751
3814
|
},
|
|
3752
3815
|
{
|
|
3753
|
-
x: -
|
|
3754
|
-
y:
|
|
3816
|
+
x: -length20.parse(parameters.w) / 2,
|
|
3817
|
+
y: length20.parse(parameters.h) / 2
|
|
3755
3818
|
},
|
|
3756
3819
|
{
|
|
3757
|
-
x: -
|
|
3758
|
-
y: -
|
|
3820
|
+
x: -length20.parse(parameters.w) / 2,
|
|
3821
|
+
y: -length20.parse(parameters.h) / 2
|
|
3759
3822
|
},
|
|
3760
3823
|
{
|
|
3761
|
-
x:
|
|
3762
|
-
y: -
|
|
3824
|
+
x: length20.parse(parameters.p) / 2,
|
|
3825
|
+
y: -length20.parse(parameters.h) / 2
|
|
3763
3826
|
}
|
|
3764
3827
|
],
|
|
3765
3828
|
stroke_width: 0.1,
|
|
@@ -3801,22 +3864,22 @@ var sodWithoutParsing4 = (parameters) => {
|
|
|
3801
3864
|
};
|
|
3802
3865
|
|
|
3803
3866
|
// src/fn/sod923.ts
|
|
3804
|
-
import { z as
|
|
3805
|
-
import { length as
|
|
3806
|
-
var sod_def5 =
|
|
3807
|
-
fn:
|
|
3808
|
-
num_pins:
|
|
3809
|
-
w:
|
|
3810
|
-
h:
|
|
3811
|
-
pl:
|
|
3812
|
-
pw:
|
|
3813
|
-
p:
|
|
3867
|
+
import { z as z29 } from "zod";
|
|
3868
|
+
import { length as length21 } from "circuit-json";
|
|
3869
|
+
var sod_def5 = z29.object({
|
|
3870
|
+
fn: z29.string(),
|
|
3871
|
+
num_pins: z29.literal(2).default(2),
|
|
3872
|
+
w: z29.string().default("1.4mm"),
|
|
3873
|
+
h: z29.string().default("0.9mm"),
|
|
3874
|
+
pl: z29.string().default("0.36mm"),
|
|
3875
|
+
pw: z29.string().default("0.25mm"),
|
|
3876
|
+
p: z29.string().default("0.85mm")
|
|
3814
3877
|
});
|
|
3815
3878
|
var sod923 = (raw_params) => {
|
|
3816
3879
|
const parameters = sod_def5.parse(raw_params);
|
|
3817
3880
|
const silkscreenRefText = silkscreenRef(
|
|
3818
3881
|
0,
|
|
3819
|
-
|
|
3882
|
+
length21.parse(parameters.h),
|
|
3820
3883
|
0.3
|
|
3821
3884
|
);
|
|
3822
3885
|
const silkscreenLine = {
|
|
@@ -3825,20 +3888,20 @@ var sod923 = (raw_params) => {
|
|
|
3825
3888
|
pcb_component_id: "",
|
|
3826
3889
|
route: [
|
|
3827
3890
|
{
|
|
3828
|
-
x:
|
|
3829
|
-
y:
|
|
3891
|
+
x: length21.parse(parameters.p) / 2 + 0.15,
|
|
3892
|
+
y: length21.parse(parameters.h) / 2
|
|
3830
3893
|
},
|
|
3831
3894
|
{
|
|
3832
|
-
x: -
|
|
3833
|
-
y:
|
|
3895
|
+
x: -length21.parse(parameters.w) / 2 - 0.15,
|
|
3896
|
+
y: length21.parse(parameters.h) / 2
|
|
3834
3897
|
},
|
|
3835
3898
|
{
|
|
3836
|
-
x: -
|
|
3837
|
-
y: -
|
|
3899
|
+
x: -length21.parse(parameters.w) / 2 - 0.15,
|
|
3900
|
+
y: -length21.parse(parameters.h) / 2
|
|
3838
3901
|
},
|
|
3839
3902
|
{
|
|
3840
|
-
x:
|
|
3841
|
-
y: -
|
|
3903
|
+
x: length21.parse(parameters.p) / 2 + 0.15,
|
|
3904
|
+
y: -length21.parse(parameters.h) / 2
|
|
3842
3905
|
}
|
|
3843
3906
|
],
|
|
3844
3907
|
stroke_width: 0.1,
|
|
@@ -3881,22 +3944,22 @@ var sodWithoutParsing5 = (parameters) => {
|
|
|
3881
3944
|
};
|
|
3882
3945
|
|
|
3883
3946
|
// src/fn/sod882.ts
|
|
3884
|
-
import { z as
|
|
3885
|
-
import { length as
|
|
3886
|
-
var sod_def6 =
|
|
3887
|
-
fn:
|
|
3888
|
-
num_pins:
|
|
3889
|
-
w:
|
|
3890
|
-
h:
|
|
3891
|
-
pl:
|
|
3892
|
-
pw:
|
|
3893
|
-
p:
|
|
3947
|
+
import { z as z30 } from "zod";
|
|
3948
|
+
import { length as length22 } from "circuit-json";
|
|
3949
|
+
var sod_def6 = z30.object({
|
|
3950
|
+
fn: z30.string(),
|
|
3951
|
+
num_pins: z30.literal(2).default(2),
|
|
3952
|
+
w: z30.string().default("1.3mm"),
|
|
3953
|
+
h: z30.string().default("0.9mm"),
|
|
3954
|
+
pl: z30.string().default("0.4mm"),
|
|
3955
|
+
pw: z30.string().default("0.7mm"),
|
|
3956
|
+
p: z30.string().default("0.7mm")
|
|
3894
3957
|
});
|
|
3895
3958
|
var sod882 = (raw_params) => {
|
|
3896
3959
|
const parameters = sod_def6.parse(raw_params);
|
|
3897
3960
|
const silkscreenRefText = silkscreenRef(
|
|
3898
3961
|
0,
|
|
3899
|
-
|
|
3962
|
+
length22.parse(parameters.h) + 0.1,
|
|
3900
3963
|
0.3
|
|
3901
3964
|
);
|
|
3902
3965
|
const silkscreenLine = {
|
|
@@ -3905,20 +3968,20 @@ var sod882 = (raw_params) => {
|
|
|
3905
3968
|
pcb_component_id: "",
|
|
3906
3969
|
route: [
|
|
3907
3970
|
{
|
|
3908
|
-
x:
|
|
3909
|
-
y:
|
|
3971
|
+
x: length22.parse(parameters.p) / 2 + 0.2,
|
|
3972
|
+
y: length22.parse(parameters.h) / 2 + 0.2
|
|
3910
3973
|
},
|
|
3911
3974
|
{
|
|
3912
|
-
x: -
|
|
3913
|
-
y:
|
|
3975
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3976
|
+
y: length22.parse(parameters.h) / 2 + 0.2
|
|
3914
3977
|
},
|
|
3915
3978
|
{
|
|
3916
|
-
x: -
|
|
3917
|
-
y: -
|
|
3979
|
+
x: -length22.parse(parameters.w) / 2 - 0.2,
|
|
3980
|
+
y: -length22.parse(parameters.h) / 2 - 0.2
|
|
3918
3981
|
},
|
|
3919
3982
|
{
|
|
3920
|
-
x:
|
|
3921
|
-
y: -
|
|
3983
|
+
x: length22.parse(parameters.p) / 2 + 0.2,
|
|
3984
|
+
y: -length22.parse(parameters.h) / 2 - 0.2
|
|
3922
3985
|
}
|
|
3923
3986
|
],
|
|
3924
3987
|
stroke_width: 0.1,
|
|
@@ -3961,22 +4024,22 @@ var sodWithoutParsing6 = (parameters) => {
|
|
|
3961
4024
|
};
|
|
3962
4025
|
|
|
3963
4026
|
// src/fn/sod323f.ts
|
|
3964
|
-
import { z as
|
|
3965
|
-
import { length as
|
|
3966
|
-
var sod_def7 =
|
|
3967
|
-
fn:
|
|
3968
|
-
num_pins:
|
|
3969
|
-
w:
|
|
3970
|
-
h:
|
|
3971
|
-
pl:
|
|
3972
|
-
pw:
|
|
3973
|
-
pad_spacing:
|
|
4027
|
+
import { z as z31 } from "zod";
|
|
4028
|
+
import { length as length23 } from "circuit-json";
|
|
4029
|
+
var sod_def7 = z31.object({
|
|
4030
|
+
fn: z31.string(),
|
|
4031
|
+
num_pins: z31.literal(2).default(2),
|
|
4032
|
+
w: z31.string().default("3,05mm"),
|
|
4033
|
+
h: z31.string().default("1.65mm"),
|
|
4034
|
+
pl: z31.string().default("0.6mm"),
|
|
4035
|
+
pw: z31.string().default("0.6mm"),
|
|
4036
|
+
pad_spacing: z31.string().default("2.2mm")
|
|
3974
4037
|
});
|
|
3975
4038
|
var sod323f = (raw_params) => {
|
|
3976
4039
|
const parameters = sod_def7.parse(raw_params);
|
|
3977
4040
|
const silkscreenRefText = silkscreenRef(
|
|
3978
4041
|
0,
|
|
3979
|
-
|
|
4042
|
+
length23.parse(parameters.h),
|
|
3980
4043
|
0.3
|
|
3981
4044
|
);
|
|
3982
4045
|
const silkscreenLine = {
|
|
@@ -3985,20 +4048,20 @@ var sod323f = (raw_params) => {
|
|
|
3985
4048
|
pcb_component_id: "",
|
|
3986
4049
|
route: [
|
|
3987
4050
|
{
|
|
3988
|
-
x:
|
|
3989
|
-
y:
|
|
4051
|
+
x: length23.parse(parameters.pad_spacing) / 2,
|
|
4052
|
+
y: length23.parse(parameters.h) / 2
|
|
3990
4053
|
},
|
|
3991
4054
|
{
|
|
3992
|
-
x: -
|
|
3993
|
-
y:
|
|
4055
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4056
|
+
y: length23.parse(parameters.h) / 2
|
|
3994
4057
|
},
|
|
3995
4058
|
{
|
|
3996
|
-
x: -
|
|
3997
|
-
y: -
|
|
4059
|
+
x: -length23.parse(parameters.w) / 2 - 0.2,
|
|
4060
|
+
y: -length23.parse(parameters.h) / 2
|
|
3998
4061
|
},
|
|
3999
4062
|
{
|
|
4000
|
-
x:
|
|
4001
|
-
y: -
|
|
4063
|
+
x: length23.parse(parameters.pad_spacing) / 2,
|
|
4064
|
+
y: -length23.parse(parameters.h) / 2
|
|
4002
4065
|
}
|
|
4003
4066
|
],
|
|
4004
4067
|
stroke_width: 0.1,
|
|
@@ -4041,22 +4104,22 @@ var sodWithoutParsing7 = (parameters) => {
|
|
|
4041
4104
|
};
|
|
4042
4105
|
|
|
4043
4106
|
// src/fn/sod123f.ts
|
|
4044
|
-
import { z as
|
|
4045
|
-
import { length as
|
|
4046
|
-
var sod_def8 =
|
|
4047
|
-
fn:
|
|
4048
|
-
num_pins:
|
|
4049
|
-
w:
|
|
4050
|
-
h:
|
|
4051
|
-
pl:
|
|
4052
|
-
pw:
|
|
4053
|
-
p:
|
|
4107
|
+
import { z as z32 } from "zod";
|
|
4108
|
+
import { length as length24 } from "circuit-json";
|
|
4109
|
+
var sod_def8 = z32.object({
|
|
4110
|
+
fn: z32.string(),
|
|
4111
|
+
num_pins: z32.literal(2).default(2),
|
|
4112
|
+
w: z32.string().default("4.4mm"),
|
|
4113
|
+
h: z32.string().default("2.1mm"),
|
|
4114
|
+
pl: z32.string().default("1.2mm"),
|
|
4115
|
+
pw: z32.string().default("1.2mm"),
|
|
4116
|
+
p: z32.string().default("2.9mm")
|
|
4054
4117
|
});
|
|
4055
4118
|
var sod123f = (raw_params) => {
|
|
4056
4119
|
const parameters = sod_def8.parse(raw_params);
|
|
4057
4120
|
const silkscreenRefText = silkscreenRef(
|
|
4058
4121
|
0,
|
|
4059
|
-
|
|
4122
|
+
length24.parse(parameters.h),
|
|
4060
4123
|
0.3
|
|
4061
4124
|
);
|
|
4062
4125
|
const silkscreenLine = {
|
|
@@ -4065,20 +4128,20 @@ var sod123f = (raw_params) => {
|
|
|
4065
4128
|
pcb_component_id: "",
|
|
4066
4129
|
route: [
|
|
4067
4130
|
{
|
|
4068
|
-
x:
|
|
4069
|
-
y:
|
|
4131
|
+
x: length24.parse(parameters.p) / 2,
|
|
4132
|
+
y: length24.parse(parameters.h) / 2
|
|
4070
4133
|
},
|
|
4071
4134
|
{
|
|
4072
|
-
x: -
|
|
4073
|
-
y:
|
|
4135
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4136
|
+
y: length24.parse(parameters.h) / 2
|
|
4074
4137
|
},
|
|
4075
4138
|
{
|
|
4076
|
-
x: -
|
|
4077
|
-
y: -
|
|
4139
|
+
x: -length24.parse(parameters.w) / 2 - 0.2,
|
|
4140
|
+
y: -length24.parse(parameters.h) / 2
|
|
4078
4141
|
},
|
|
4079
4142
|
{
|
|
4080
|
-
x:
|
|
4081
|
-
y: -
|
|
4143
|
+
x: length24.parse(parameters.p) / 2,
|
|
4144
|
+
y: -length24.parse(parameters.h) / 2
|
|
4082
4145
|
}
|
|
4083
4146
|
],
|
|
4084
4147
|
stroke_width: 0.1,
|
|
@@ -4121,22 +4184,22 @@ var sodWithoutParsing8 = (parameters) => {
|
|
|
4121
4184
|
};
|
|
4122
4185
|
|
|
4123
4186
|
// src/fn/sod123fl.ts
|
|
4124
|
-
import { z as
|
|
4125
|
-
import { length as
|
|
4126
|
-
var sod123FL_def =
|
|
4127
|
-
fn:
|
|
4128
|
-
num_pins:
|
|
4129
|
-
w:
|
|
4130
|
-
h:
|
|
4131
|
-
pl:
|
|
4132
|
-
pw:
|
|
4133
|
-
p:
|
|
4187
|
+
import { z as z33 } from "zod";
|
|
4188
|
+
import { length as length25 } from "circuit-json";
|
|
4189
|
+
var sod123FL_def = z33.object({
|
|
4190
|
+
fn: z33.string(),
|
|
4191
|
+
num_pins: z33.literal(2).default(2),
|
|
4192
|
+
w: z33.string().default("4.4mm"),
|
|
4193
|
+
h: z33.string().default("2.1mm"),
|
|
4194
|
+
pl: z33.string().default("0.91mm"),
|
|
4195
|
+
pw: z33.string().default("1.22mm"),
|
|
4196
|
+
p: z33.string().default("3.146mm")
|
|
4134
4197
|
});
|
|
4135
4198
|
var sod123fl = (raw_params) => {
|
|
4136
4199
|
const parameters = sod123FL_def.parse(raw_params);
|
|
4137
4200
|
const silkscreenRefText = silkscreenRef(
|
|
4138
4201
|
0,
|
|
4139
|
-
|
|
4202
|
+
length25.parse(parameters.h),
|
|
4140
4203
|
0.3
|
|
4141
4204
|
);
|
|
4142
4205
|
const silkscreenLine = {
|
|
@@ -4145,20 +4208,20 @@ var sod123fl = (raw_params) => {
|
|
|
4145
4208
|
pcb_component_id: "",
|
|
4146
4209
|
route: [
|
|
4147
4210
|
{
|
|
4148
|
-
x:
|
|
4149
|
-
y:
|
|
4211
|
+
x: length25.parse(parameters.p) / 2,
|
|
4212
|
+
y: length25.parse(parameters.h) / 2
|
|
4150
4213
|
},
|
|
4151
4214
|
{
|
|
4152
|
-
x: -
|
|
4153
|
-
y:
|
|
4215
|
+
x: -length25.parse(parameters.w) / 2 - 0.2,
|
|
4216
|
+
y: length25.parse(parameters.h) / 2
|
|
4154
4217
|
},
|
|
4155
4218
|
{
|
|
4156
|
-
x: -
|
|
4157
|
-
y: -
|
|
4219
|
+
x: -length25.parse(parameters.w) / 2 - 0.2,
|
|
4220
|
+
y: -length25.parse(parameters.h) / 2
|
|
4158
4221
|
},
|
|
4159
4222
|
{
|
|
4160
|
-
x:
|
|
4161
|
-
y: -
|
|
4223
|
+
x: length25.parse(parameters.p) / 2,
|
|
4224
|
+
y: -length25.parse(parameters.h) / 2
|
|
4162
4225
|
}
|
|
4163
4226
|
],
|
|
4164
4227
|
stroke_width: 0.1,
|
|
@@ -4201,22 +4264,22 @@ var sodWithoutParsing9 = (parameters) => {
|
|
|
4201
4264
|
};
|
|
4202
4265
|
|
|
4203
4266
|
// src/fn/sod723.ts
|
|
4204
|
-
import { z as
|
|
4205
|
-
import { length as
|
|
4206
|
-
var sod_def9 =
|
|
4207
|
-
fn:
|
|
4208
|
-
num_pins:
|
|
4209
|
-
w:
|
|
4210
|
-
h:
|
|
4211
|
-
pl:
|
|
4212
|
-
pw:
|
|
4213
|
-
p:
|
|
4267
|
+
import { z as z34 } from "zod";
|
|
4268
|
+
import { length as length26 } from "circuit-json";
|
|
4269
|
+
var sod_def9 = z34.object({
|
|
4270
|
+
fn: z34.string(),
|
|
4271
|
+
num_pins: z34.literal(2).default(2),
|
|
4272
|
+
w: z34.string().default("1.80mm"),
|
|
4273
|
+
h: z34.string().default("1.00mm"),
|
|
4274
|
+
pl: z34.string().default("0.66mm"),
|
|
4275
|
+
pw: z34.string().default("0.5mm"),
|
|
4276
|
+
p: z34.string().default("0.8mm")
|
|
4214
4277
|
});
|
|
4215
4278
|
var sod723 = (raw_params) => {
|
|
4216
4279
|
const parameters = sod_def9.parse(raw_params);
|
|
4217
4280
|
const silkscreenRefText = silkscreenRef(
|
|
4218
4281
|
0,
|
|
4219
|
-
|
|
4282
|
+
length26.parse(parameters.h),
|
|
4220
4283
|
0.3
|
|
4221
4284
|
);
|
|
4222
4285
|
const silkscreenLine = {
|
|
@@ -4225,20 +4288,20 @@ var sod723 = (raw_params) => {
|
|
|
4225
4288
|
pcb_component_id: "",
|
|
4226
4289
|
route: [
|
|
4227
4290
|
{
|
|
4228
|
-
x:
|
|
4229
|
-
y:
|
|
4291
|
+
x: length26.parse(parameters.p) / 2,
|
|
4292
|
+
y: length26.parse(parameters.h) / 2
|
|
4230
4293
|
},
|
|
4231
4294
|
{
|
|
4232
|
-
x: -
|
|
4233
|
-
y:
|
|
4295
|
+
x: -length26.parse(parameters.w) / 2 - 0.1,
|
|
4296
|
+
y: length26.parse(parameters.h) / 2
|
|
4234
4297
|
},
|
|
4235
4298
|
{
|
|
4236
|
-
x: -
|
|
4237
|
-
y: -
|
|
4299
|
+
x: -length26.parse(parameters.w) / 2 - 0.1,
|
|
4300
|
+
y: -length26.parse(parameters.h) / 2
|
|
4238
4301
|
},
|
|
4239
4302
|
{
|
|
4240
|
-
x:
|
|
4241
|
-
y: -
|
|
4303
|
+
x: length26.parse(parameters.p) / 2,
|
|
4304
|
+
y: -length26.parse(parameters.h) / 2
|
|
4242
4305
|
}
|
|
4243
4306
|
],
|
|
4244
4307
|
stroke_width: 0.1,
|
|
@@ -4281,22 +4344,22 @@ var sodWithoutParsing10 = (parameters) => {
|
|
|
4281
4344
|
};
|
|
4282
4345
|
|
|
4283
4346
|
// src/fn/sod128.ts
|
|
4284
|
-
import { z as
|
|
4285
|
-
import { length as
|
|
4286
|
-
var sod_def10 =
|
|
4287
|
-
fn:
|
|
4288
|
-
num_pins:
|
|
4289
|
-
w:
|
|
4290
|
-
h:
|
|
4291
|
-
pl:
|
|
4292
|
-
pw:
|
|
4293
|
-
p:
|
|
4347
|
+
import { z as z35 } from "zod";
|
|
4348
|
+
import { length as length27 } from "circuit-json";
|
|
4349
|
+
var sod_def10 = z35.object({
|
|
4350
|
+
fn: z35.string(),
|
|
4351
|
+
num_pins: z35.literal(2).default(2),
|
|
4352
|
+
w: z35.string().default("6.2mm"),
|
|
4353
|
+
h: z35.string().default("3.4mm"),
|
|
4354
|
+
pl: z35.string().default("1.4mm"),
|
|
4355
|
+
pw: z35.string().default("2.1mm"),
|
|
4356
|
+
p: z35.string().default("4.4mm")
|
|
4294
4357
|
});
|
|
4295
4358
|
var sod128 = (raw_params) => {
|
|
4296
4359
|
const parameters = sod_def10.parse(raw_params);
|
|
4297
4360
|
const silkscreenRefText = silkscreenRef(
|
|
4298
4361
|
0,
|
|
4299
|
-
|
|
4362
|
+
length27.parse(parameters.h) / 2 + 0.4,
|
|
4300
4363
|
0.3
|
|
4301
4364
|
);
|
|
4302
4365
|
const silkscreenLine = {
|
|
@@ -4305,20 +4368,20 @@ var sod128 = (raw_params) => {
|
|
|
4305
4368
|
pcb_component_id: "",
|
|
4306
4369
|
route: [
|
|
4307
4370
|
{
|
|
4308
|
-
x:
|
|
4309
|
-
y:
|
|
4371
|
+
x: length27.parse(parameters.p) / 2,
|
|
4372
|
+
y: length27.parse(parameters.h) / 2
|
|
4310
4373
|
},
|
|
4311
4374
|
{
|
|
4312
|
-
x: -
|
|
4313
|
-
y:
|
|
4375
|
+
x: -length27.parse(parameters.w) / 2 - 0.2,
|
|
4376
|
+
y: length27.parse(parameters.h) / 2
|
|
4314
4377
|
},
|
|
4315
4378
|
{
|
|
4316
|
-
x: -
|
|
4317
|
-
y: -
|
|
4379
|
+
x: -length27.parse(parameters.w) / 2 - 0.2,
|
|
4380
|
+
y: -length27.parse(parameters.h) / 2
|
|
4318
4381
|
},
|
|
4319
4382
|
{
|
|
4320
|
-
x:
|
|
4321
|
-
y: -
|
|
4383
|
+
x: length27.parse(parameters.p) / 2,
|
|
4384
|
+
y: -length27.parse(parameters.h) / 2
|
|
4322
4385
|
}
|
|
4323
4386
|
],
|
|
4324
4387
|
stroke_width: 0.1,
|
|
@@ -4361,29 +4424,29 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
4361
4424
|
};
|
|
4362
4425
|
|
|
4363
4426
|
// src/fn/sot89.ts
|
|
4364
|
-
import { z as
|
|
4365
|
-
var sot89_def =
|
|
4366
|
-
fn:
|
|
4367
|
-
num_pins:
|
|
4368
|
-
w:
|
|
4369
|
-
h:
|
|
4370
|
-
pl:
|
|
4371
|
-
pw:
|
|
4372
|
-
p:
|
|
4373
|
-
string:
|
|
4427
|
+
import { z as z36 } from "zod";
|
|
4428
|
+
var sot89_def = z36.object({
|
|
4429
|
+
fn: z36.string(),
|
|
4430
|
+
num_pins: z36.union([z36.literal(3), z36.literal(5)]).default(3),
|
|
4431
|
+
w: z36.string().default("4.20mm"),
|
|
4432
|
+
h: z36.string().default("4.80mm"),
|
|
4433
|
+
pl: z36.string().default("1.3mm"),
|
|
4434
|
+
pw: z36.string().default("0.9mm"),
|
|
4435
|
+
p: z36.string().default("1.5mm"),
|
|
4436
|
+
string: z36.string().optional()
|
|
4374
4437
|
});
|
|
4375
4438
|
var sot89_3 = (parameters) => {
|
|
4376
4439
|
const pads = [];
|
|
4377
4440
|
const padGap = Number.parseFloat(parameters.p);
|
|
4378
4441
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4379
|
-
const
|
|
4442
|
+
const length50 = Number.parseFloat(parameters.w);
|
|
4380
4443
|
const padHeight = Number.parseFloat(parameters.pl);
|
|
4381
4444
|
const centerExtra = 0.175;
|
|
4382
4445
|
const outerPadXShift = (padHeight - (padHeight + centerExtra)) / 2;
|
|
4383
4446
|
pads.push(
|
|
4384
|
-
rectpad(1, -
|
|
4385
|
-
rectpad(2, -
|
|
4386
|
-
rectpad(3, -
|
|
4447
|
+
rectpad(1, -length50 / 2 + outerPadXShift, padGap, padHeight, padWidth),
|
|
4448
|
+
rectpad(2, -length50 / 2, 0, padHeight + centerExtra, padWidth),
|
|
4449
|
+
rectpad(3, -length50 / 2 + outerPadXShift, -padGap, padHeight, padWidth)
|
|
4387
4450
|
);
|
|
4388
4451
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
4389
4452
|
const width = Number.parseFloat(parameters.w) / 2 - 1;
|
|
@@ -4423,7 +4486,7 @@ var sot89_5 = (parameters) => {
|
|
|
4423
4486
|
const pads = [];
|
|
4424
4487
|
const padGap = Number.parseFloat(parameters.p);
|
|
4425
4488
|
const padWidth = Number.parseFloat(parameters.pw);
|
|
4426
|
-
const
|
|
4489
|
+
const length50 = Number.parseFloat(parameters.w);
|
|
4427
4490
|
pads.push(
|
|
4428
4491
|
rectpad(1, -1.85, -1.5, 1.5, 0.7),
|
|
4429
4492
|
rectpad(2, -1.85, 1.5, 1.5, 0.7),
|
|
@@ -4491,18 +4554,18 @@ var sot89 = (raw_params) => {
|
|
|
4491
4554
|
|
|
4492
4555
|
// src/fn/to220.ts
|
|
4493
4556
|
import {
|
|
4494
|
-
length as
|
|
4557
|
+
length as length28
|
|
4495
4558
|
} from "circuit-json";
|
|
4496
|
-
import { z as
|
|
4497
|
-
var to220_def =
|
|
4498
|
-
fn:
|
|
4499
|
-
p:
|
|
4500
|
-
id:
|
|
4501
|
-
od:
|
|
4502
|
-
w:
|
|
4503
|
-
h:
|
|
4504
|
-
num_pins:
|
|
4505
|
-
string:
|
|
4559
|
+
import { z as z37 } from "zod";
|
|
4560
|
+
var to220_def = z37.object({
|
|
4561
|
+
fn: z37.string(),
|
|
4562
|
+
p: length28.optional().default("5.0mm"),
|
|
4563
|
+
id: length28.optional().default("1.0mm"),
|
|
4564
|
+
od: length28.optional().default("1.9mm"),
|
|
4565
|
+
w: length28.optional().default("13mm"),
|
|
4566
|
+
h: length28.optional().default("7mm"),
|
|
4567
|
+
num_pins: z37.number().optional(),
|
|
4568
|
+
string: z37.string().optional()
|
|
4506
4569
|
});
|
|
4507
4570
|
var to220 = (raw_params) => {
|
|
4508
4571
|
const parameters = to220_def.parse(raw_params);
|
|
@@ -4582,22 +4645,22 @@ var to220 = (raw_params) => {
|
|
|
4582
4645
|
};
|
|
4583
4646
|
|
|
4584
4647
|
// src/fn/minimelf.ts
|
|
4585
|
-
import { z as
|
|
4586
|
-
import { length as
|
|
4587
|
-
var minimelf_def =
|
|
4588
|
-
fn:
|
|
4589
|
-
num_pins:
|
|
4590
|
-
w:
|
|
4591
|
-
h:
|
|
4592
|
-
pl:
|
|
4593
|
-
pw:
|
|
4594
|
-
p:
|
|
4648
|
+
import { z as z38 } from "zod";
|
|
4649
|
+
import { length as length29 } from "circuit-json";
|
|
4650
|
+
var minimelf_def = z38.object({
|
|
4651
|
+
fn: z38.string(),
|
|
4652
|
+
num_pins: z38.literal(2).default(2),
|
|
4653
|
+
w: z38.string().default("5.40mm"),
|
|
4654
|
+
h: z38.string().default("2.30mm"),
|
|
4655
|
+
pl: z38.string().default("1.30mm"),
|
|
4656
|
+
pw: z38.string().default("1.70mm"),
|
|
4657
|
+
p: z38.string().default("3.5mm")
|
|
4595
4658
|
});
|
|
4596
4659
|
var minimelf = (raw_params) => {
|
|
4597
4660
|
const parameters = minimelf_def.parse(raw_params);
|
|
4598
4661
|
const silkscreenRefText = silkscreenRef(
|
|
4599
4662
|
0,
|
|
4600
|
-
|
|
4663
|
+
length29.parse(parameters.h) / 2 + 0.4,
|
|
4601
4664
|
0.3
|
|
4602
4665
|
);
|
|
4603
4666
|
const silkscreenLine = {
|
|
@@ -4606,20 +4669,20 @@ var minimelf = (raw_params) => {
|
|
|
4606
4669
|
pcb_component_id: "",
|
|
4607
4670
|
route: [
|
|
4608
4671
|
{
|
|
4609
|
-
x:
|
|
4610
|
-
y:
|
|
4672
|
+
x: length29.parse(parameters.p) / 2,
|
|
4673
|
+
y: length29.parse(parameters.h) / 2
|
|
4611
4674
|
},
|
|
4612
4675
|
{
|
|
4613
|
-
x: -
|
|
4614
|
-
y:
|
|
4676
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4677
|
+
y: length29.parse(parameters.h) / 2
|
|
4615
4678
|
},
|
|
4616
4679
|
{
|
|
4617
|
-
x: -
|
|
4618
|
-
y: -
|
|
4680
|
+
x: -length29.parse(parameters.w) / 2,
|
|
4681
|
+
y: -length29.parse(parameters.h) / 2
|
|
4619
4682
|
},
|
|
4620
4683
|
{
|
|
4621
|
-
x:
|
|
4622
|
-
y: -
|
|
4684
|
+
x: length29.parse(parameters.p) / 2,
|
|
4685
|
+
y: -length29.parse(parameters.h) / 2
|
|
4623
4686
|
}
|
|
4624
4687
|
],
|
|
4625
4688
|
stroke_width: 0.1,
|
|
@@ -4658,22 +4721,22 @@ var miniMelfWithoutParsing = (parameters) => {
|
|
|
4658
4721
|
};
|
|
4659
4722
|
|
|
4660
4723
|
// src/fn/sod882d.ts
|
|
4661
|
-
import { z as
|
|
4662
|
-
import { length as
|
|
4663
|
-
var sod_def11 =
|
|
4664
|
-
fn:
|
|
4665
|
-
num_pins:
|
|
4666
|
-
w:
|
|
4667
|
-
h:
|
|
4668
|
-
pl:
|
|
4669
|
-
pw:
|
|
4670
|
-
p:
|
|
4724
|
+
import { z as z39 } from "zod";
|
|
4725
|
+
import { length as length30 } from "circuit-json";
|
|
4726
|
+
var sod_def11 = z39.object({
|
|
4727
|
+
fn: z39.string(),
|
|
4728
|
+
num_pins: z39.literal(2).default(2),
|
|
4729
|
+
w: z39.string().default("1.90mm"),
|
|
4730
|
+
h: z39.string().default("1.33mm"),
|
|
4731
|
+
pl: z39.string().default("0.5mm"),
|
|
4732
|
+
pw: z39.string().default("0.7mm"),
|
|
4733
|
+
p: z39.string().default("0.8mm")
|
|
4671
4734
|
});
|
|
4672
4735
|
var sod882d = (raw_params) => {
|
|
4673
4736
|
const parameters = sod_def11.parse(raw_params);
|
|
4674
4737
|
const silkscreenRefText = silkscreenRef(
|
|
4675
4738
|
0,
|
|
4676
|
-
|
|
4739
|
+
length30.parse(parameters.h) + 0.1,
|
|
4677
4740
|
0.3
|
|
4678
4741
|
);
|
|
4679
4742
|
const silkscreenLine = {
|
|
@@ -4682,20 +4745,20 @@ var sod882d = (raw_params) => {
|
|
|
4682
4745
|
pcb_component_id: "",
|
|
4683
4746
|
route: [
|
|
4684
4747
|
{
|
|
4685
|
-
x:
|
|
4686
|
-
y:
|
|
4748
|
+
x: length30.parse(parameters.p) / 2 + 0.1,
|
|
4749
|
+
y: length30.parse(parameters.h) / 2
|
|
4687
4750
|
},
|
|
4688
4751
|
{
|
|
4689
|
-
x: -
|
|
4690
|
-
y:
|
|
4752
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4753
|
+
y: length30.parse(parameters.h) / 2
|
|
4691
4754
|
},
|
|
4692
4755
|
{
|
|
4693
|
-
x: -
|
|
4694
|
-
y: -
|
|
4756
|
+
x: -length30.parse(parameters.w) / 2,
|
|
4757
|
+
y: -length30.parse(parameters.h) / 2
|
|
4695
4758
|
},
|
|
4696
4759
|
{
|
|
4697
|
-
x:
|
|
4698
|
-
y: -
|
|
4760
|
+
x: length30.parse(parameters.p) / 2 + 0.1,
|
|
4761
|
+
y: -length30.parse(parameters.h) / 2
|
|
4699
4762
|
}
|
|
4700
4763
|
],
|
|
4701
4764
|
stroke_width: 0.1,
|
|
@@ -4738,22 +4801,22 @@ var sodWithoutParsing12 = (parameters) => {
|
|
|
4738
4801
|
};
|
|
4739
4802
|
|
|
4740
4803
|
// src/fn/melf.ts
|
|
4741
|
-
import { z as
|
|
4742
|
-
import { length as
|
|
4743
|
-
var melf_def =
|
|
4744
|
-
fn:
|
|
4745
|
-
num_pins:
|
|
4746
|
-
w:
|
|
4747
|
-
h:
|
|
4748
|
-
pl:
|
|
4749
|
-
pw:
|
|
4750
|
-
p:
|
|
4804
|
+
import { z as z40 } from "zod";
|
|
4805
|
+
import { length as length31 } from "circuit-json";
|
|
4806
|
+
var melf_def = z40.object({
|
|
4807
|
+
fn: z40.string(),
|
|
4808
|
+
num_pins: z40.literal(2).default(2),
|
|
4809
|
+
w: z40.string().default("7.0mm"),
|
|
4810
|
+
h: z40.string().default("3.35mm"),
|
|
4811
|
+
pl: z40.string().default("1.50mm"),
|
|
4812
|
+
pw: z40.string().default("2.70mm"),
|
|
4813
|
+
p: z40.string().default("4.8mm")
|
|
4751
4814
|
});
|
|
4752
4815
|
var melf = (raw_params) => {
|
|
4753
4816
|
const parameters = melf_def.parse(raw_params);
|
|
4754
4817
|
const silkscreenRefText = silkscreenRef(
|
|
4755
4818
|
0,
|
|
4756
|
-
|
|
4819
|
+
length31.parse(parameters.h),
|
|
4757
4820
|
0.3
|
|
4758
4821
|
);
|
|
4759
4822
|
const silkscreenLine = {
|
|
@@ -4762,20 +4825,20 @@ var melf = (raw_params) => {
|
|
|
4762
4825
|
pcb_component_id: "",
|
|
4763
4826
|
route: [
|
|
4764
4827
|
{
|
|
4765
|
-
x:
|
|
4766
|
-
y:
|
|
4828
|
+
x: length31.parse(parameters.p) / 2,
|
|
4829
|
+
y: length31.parse(parameters.h) / 2
|
|
4767
4830
|
},
|
|
4768
4831
|
{
|
|
4769
|
-
x: -
|
|
4770
|
-
y:
|
|
4832
|
+
x: -length31.parse(parameters.w) / 2,
|
|
4833
|
+
y: length31.parse(parameters.h) / 2
|
|
4771
4834
|
},
|
|
4772
4835
|
{
|
|
4773
|
-
x: -
|
|
4774
|
-
y: -
|
|
4836
|
+
x: -length31.parse(parameters.w) / 2,
|
|
4837
|
+
y: -length31.parse(parameters.h) / 2
|
|
4775
4838
|
},
|
|
4776
4839
|
{
|
|
4777
|
-
x:
|
|
4778
|
-
y: -
|
|
4840
|
+
x: length31.parse(parameters.p) / 2,
|
|
4841
|
+
y: -length31.parse(parameters.h) / 2
|
|
4779
4842
|
}
|
|
4780
4843
|
],
|
|
4781
4844
|
stroke_width: 0.1,
|
|
@@ -4818,22 +4881,22 @@ var melfWithoutParsing = (parameters) => {
|
|
|
4818
4881
|
};
|
|
4819
4882
|
|
|
4820
4883
|
// src/fn/micromelf.ts
|
|
4821
|
-
import { z as
|
|
4822
|
-
import { length as
|
|
4823
|
-
var micromelf_def =
|
|
4824
|
-
fn:
|
|
4825
|
-
num_pins:
|
|
4826
|
-
w:
|
|
4827
|
-
h:
|
|
4828
|
-
pl:
|
|
4829
|
-
pw:
|
|
4830
|
-
p:
|
|
4884
|
+
import { z as z41 } from "zod";
|
|
4885
|
+
import { length as length32 } from "circuit-json";
|
|
4886
|
+
var micromelf_def = z41.object({
|
|
4887
|
+
fn: z41.string(),
|
|
4888
|
+
num_pins: z41.literal(2).default(2),
|
|
4889
|
+
w: z41.string().default("3.0mm"),
|
|
4890
|
+
h: z41.string().default("1.80mm"),
|
|
4891
|
+
pl: z41.string().default("0.80mm"),
|
|
4892
|
+
pw: z41.string().default("1.20mm"),
|
|
4893
|
+
p: z41.string().default("1.6mm")
|
|
4831
4894
|
});
|
|
4832
4895
|
var micromelf = (raw_params) => {
|
|
4833
4896
|
const parameters = micromelf_def.parse(raw_params);
|
|
4834
4897
|
const silkscreenRefText = silkscreenRef(
|
|
4835
4898
|
0,
|
|
4836
|
-
|
|
4899
|
+
length32.parse(parameters.h),
|
|
4837
4900
|
0.3
|
|
4838
4901
|
);
|
|
4839
4902
|
const silkscreenLine = {
|
|
@@ -4842,20 +4905,20 @@ var micromelf = (raw_params) => {
|
|
|
4842
4905
|
pcb_component_id: "",
|
|
4843
4906
|
route: [
|
|
4844
4907
|
{
|
|
4845
|
-
x:
|
|
4846
|
-
y:
|
|
4908
|
+
x: length32.parse(parameters.p) / 2,
|
|
4909
|
+
y: length32.parse(parameters.h) / 2
|
|
4847
4910
|
},
|
|
4848
4911
|
{
|
|
4849
|
-
x: -
|
|
4850
|
-
y:
|
|
4912
|
+
x: -length32.parse(parameters.w) / 2 - 0.1,
|
|
4913
|
+
y: length32.parse(parameters.h) / 2
|
|
4851
4914
|
},
|
|
4852
4915
|
{
|
|
4853
|
-
x: -
|
|
4854
|
-
y: -
|
|
4916
|
+
x: -length32.parse(parameters.w) / 2 - 0.1,
|
|
4917
|
+
y: -length32.parse(parameters.h) / 2
|
|
4855
4918
|
},
|
|
4856
4919
|
{
|
|
4857
|
-
x:
|
|
4858
|
-
y: -
|
|
4920
|
+
x: length32.parse(parameters.p) / 2,
|
|
4921
|
+
y: -length32.parse(parameters.h) / 2
|
|
4859
4922
|
}
|
|
4860
4923
|
],
|
|
4861
4924
|
stroke_width: 0.1,
|
|
@@ -4898,22 +4961,22 @@ var microMelfWithoutParsing = (parameters) => {
|
|
|
4898
4961
|
};
|
|
4899
4962
|
|
|
4900
4963
|
// src/fn/sma.ts
|
|
4901
|
-
import { z as
|
|
4902
|
-
import { length as
|
|
4903
|
-
var sma_def =
|
|
4904
|
-
fn:
|
|
4905
|
-
num_pins:
|
|
4906
|
-
w:
|
|
4907
|
-
h:
|
|
4908
|
-
pl:
|
|
4909
|
-
pw:
|
|
4910
|
-
p:
|
|
4964
|
+
import { z as z42 } from "zod";
|
|
4965
|
+
import { length as length33 } from "circuit-json";
|
|
4966
|
+
var sma_def = z42.object({
|
|
4967
|
+
fn: z42.string(),
|
|
4968
|
+
num_pins: z42.literal(2).default(2),
|
|
4969
|
+
w: z42.string().default("7.10mm"),
|
|
4970
|
+
h: z42.string().default("3.40mm"),
|
|
4971
|
+
pl: z42.string().default("2.45mm"),
|
|
4972
|
+
pw: z42.string().default("1.80mm"),
|
|
4973
|
+
p: z42.string().default("4.05mm")
|
|
4911
4974
|
});
|
|
4912
4975
|
var sma = (raw_params) => {
|
|
4913
4976
|
const parameters = sma_def.parse(raw_params);
|
|
4914
4977
|
const silkscreenRefText = silkscreenRef(
|
|
4915
4978
|
0,
|
|
4916
|
-
|
|
4979
|
+
length33.parse(parameters.h) / 2 + 0.5,
|
|
4917
4980
|
0.3
|
|
4918
4981
|
);
|
|
4919
4982
|
const silkscreenLine = {
|
|
@@ -4922,20 +4985,20 @@ var sma = (raw_params) => {
|
|
|
4922
4985
|
pcb_component_id: "",
|
|
4923
4986
|
route: [
|
|
4924
4987
|
{
|
|
4925
|
-
x:
|
|
4926
|
-
y:
|
|
4988
|
+
x: length33.parse(parameters.p) / 2,
|
|
4989
|
+
y: length33.parse(parameters.h) / 2
|
|
4927
4990
|
},
|
|
4928
4991
|
{
|
|
4929
|
-
x: -
|
|
4930
|
-
y:
|
|
4992
|
+
x: -length33.parse(parameters.w) / 2 - 0.5,
|
|
4993
|
+
y: length33.parse(parameters.h) / 2
|
|
4931
4994
|
},
|
|
4932
4995
|
{
|
|
4933
|
-
x: -
|
|
4934
|
-
y: -
|
|
4996
|
+
x: -length33.parse(parameters.w) / 2 - 0.5,
|
|
4997
|
+
y: -length33.parse(parameters.h) / 2
|
|
4935
4998
|
},
|
|
4936
4999
|
{
|
|
4937
|
-
x:
|
|
4938
|
-
y: -
|
|
5000
|
+
x: length33.parse(parameters.p) / 2,
|
|
5001
|
+
y: -length33.parse(parameters.h) / 2
|
|
4939
5002
|
}
|
|
4940
5003
|
],
|
|
4941
5004
|
stroke_width: 0.1,
|
|
@@ -4977,22 +5040,22 @@ var smaWithoutParsing = (parameters) => {
|
|
|
4977
5040
|
};
|
|
4978
5041
|
|
|
4979
5042
|
// src/fn/smf.ts
|
|
4980
|
-
import { z as
|
|
4981
|
-
import { length as
|
|
4982
|
-
var smf_def =
|
|
4983
|
-
fn:
|
|
4984
|
-
num_pins:
|
|
4985
|
-
w:
|
|
4986
|
-
h:
|
|
4987
|
-
pl:
|
|
4988
|
-
pw:
|
|
4989
|
-
p:
|
|
5043
|
+
import { z as z43 } from "zod";
|
|
5044
|
+
import { length as length34 } from "circuit-json";
|
|
5045
|
+
var smf_def = z43.object({
|
|
5046
|
+
fn: z43.string(),
|
|
5047
|
+
num_pins: z43.literal(2).default(2),
|
|
5048
|
+
w: z43.string().default("4.80mm"),
|
|
5049
|
+
h: z43.string().default("2.10mm"),
|
|
5050
|
+
pl: z43.string().default("1.30mm"),
|
|
5051
|
+
pw: z43.string().default("1.40mm"),
|
|
5052
|
+
p: z43.string().default("2.9mm")
|
|
4990
5053
|
});
|
|
4991
5054
|
var smf = (raw_params) => {
|
|
4992
5055
|
const parameters = smf_def.parse(raw_params);
|
|
4993
5056
|
const silkscreenRefText = silkscreenRef(
|
|
4994
5057
|
0,
|
|
4995
|
-
|
|
5058
|
+
length34.parse(parameters.h) - 0.5,
|
|
4996
5059
|
0.3
|
|
4997
5060
|
);
|
|
4998
5061
|
const silkscreenLine = {
|
|
@@ -5001,20 +5064,20 @@ var smf = (raw_params) => {
|
|
|
5001
5064
|
pcb_component_id: "",
|
|
5002
5065
|
route: [
|
|
5003
5066
|
{
|
|
5004
|
-
x:
|
|
5005
|
-
y:
|
|
5067
|
+
x: length34.parse(parameters.p) / 2,
|
|
5068
|
+
y: length34.parse(parameters.h) / 2
|
|
5006
5069
|
},
|
|
5007
5070
|
{
|
|
5008
|
-
x: -
|
|
5009
|
-
y:
|
|
5071
|
+
x: -length34.parse(parameters.w) / 2,
|
|
5072
|
+
y: length34.parse(parameters.h) / 2
|
|
5010
5073
|
},
|
|
5011
5074
|
{
|
|
5012
|
-
x: -
|
|
5013
|
-
y: -
|
|
5075
|
+
x: -length34.parse(parameters.w) / 2,
|
|
5076
|
+
y: -length34.parse(parameters.h) / 2
|
|
5014
5077
|
},
|
|
5015
5078
|
{
|
|
5016
|
-
x:
|
|
5017
|
-
y: -
|
|
5079
|
+
x: length34.parse(parameters.p) / 2,
|
|
5080
|
+
y: -length34.parse(parameters.h) / 2
|
|
5018
5081
|
}
|
|
5019
5082
|
],
|
|
5020
5083
|
stroke_width: 0.1,
|
|
@@ -5057,22 +5120,22 @@ var smfWithoutParsing = (parameters) => {
|
|
|
5057
5120
|
};
|
|
5058
5121
|
|
|
5059
5122
|
// src/fn/smb.ts
|
|
5060
|
-
import { z as
|
|
5061
|
-
import { length as
|
|
5062
|
-
var smb_def =
|
|
5063
|
-
fn:
|
|
5064
|
-
num_pins:
|
|
5065
|
-
w:
|
|
5066
|
-
h:
|
|
5067
|
-
pl:
|
|
5068
|
-
pw:
|
|
5069
|
-
p:
|
|
5123
|
+
import { z as z44 } from "zod";
|
|
5124
|
+
import { length as length35 } from "circuit-json";
|
|
5125
|
+
var smb_def = z44.object({
|
|
5126
|
+
fn: z44.string(),
|
|
5127
|
+
num_pins: z44.literal(2).default(2),
|
|
5128
|
+
w: z44.string().default("7.30mm"),
|
|
5129
|
+
h: z44.string().default("4.40mm"),
|
|
5130
|
+
pl: z44.string().default("2.50mm"),
|
|
5131
|
+
pw: z44.string().default("2.30mm"),
|
|
5132
|
+
p: z44.string().default("4.30mm")
|
|
5070
5133
|
});
|
|
5071
5134
|
var smb = (raw_params) => {
|
|
5072
5135
|
const parameters = smb_def.parse(raw_params);
|
|
5073
5136
|
const silkscreenRefText = silkscreenRef(
|
|
5074
5137
|
0,
|
|
5075
|
-
|
|
5138
|
+
length35.parse(parameters.h) / 2 + 0.5,
|
|
5076
5139
|
0.3
|
|
5077
5140
|
);
|
|
5078
5141
|
const silkscreenLine = {
|
|
@@ -5081,20 +5144,20 @@ var smb = (raw_params) => {
|
|
|
5081
5144
|
pcb_component_id: "",
|
|
5082
5145
|
route: [
|
|
5083
5146
|
{
|
|
5084
|
-
x:
|
|
5085
|
-
y:
|
|
5147
|
+
x: length35.parse(parameters.p) / 2,
|
|
5148
|
+
y: length35.parse(parameters.h) / 2
|
|
5086
5149
|
},
|
|
5087
5150
|
{
|
|
5088
|
-
x: -
|
|
5089
|
-
y:
|
|
5151
|
+
x: -length35.parse(parameters.w) / 2 - 0.1,
|
|
5152
|
+
y: length35.parse(parameters.h) / 2
|
|
5090
5153
|
},
|
|
5091
5154
|
{
|
|
5092
|
-
x: -
|
|
5093
|
-
y: -
|
|
5155
|
+
x: -length35.parse(parameters.w) / 2 - 0.1,
|
|
5156
|
+
y: -length35.parse(parameters.h) / 2
|
|
5094
5157
|
},
|
|
5095
5158
|
{
|
|
5096
|
-
x:
|
|
5097
|
-
y: -
|
|
5159
|
+
x: length35.parse(parameters.p) / 2,
|
|
5160
|
+
y: -length35.parse(parameters.h) / 2
|
|
5098
5161
|
}
|
|
5099
5162
|
],
|
|
5100
5163
|
stroke_width: 0.1,
|
|
@@ -5137,16 +5200,16 @@ var smbWithoutParsing = (parameters) => {
|
|
|
5137
5200
|
};
|
|
5138
5201
|
|
|
5139
5202
|
// src/fn/smc.ts
|
|
5140
|
-
import { z as
|
|
5141
|
-
import { length as
|
|
5142
|
-
var smc_def =
|
|
5143
|
-
fn:
|
|
5144
|
-
num_pins:
|
|
5145
|
-
w:
|
|
5146
|
-
h:
|
|
5147
|
-
pl:
|
|
5148
|
-
pw:
|
|
5149
|
-
p:
|
|
5203
|
+
import { z as z45 } from "zod";
|
|
5204
|
+
import { length as length36 } from "circuit-json";
|
|
5205
|
+
var smc_def = z45.object({
|
|
5206
|
+
fn: z45.string(),
|
|
5207
|
+
num_pins: z45.literal(2).default(2),
|
|
5208
|
+
w: z45.string().default("10.70mm"),
|
|
5209
|
+
h: z45.string().default("6.60mm"),
|
|
5210
|
+
pl: z45.string().default("3.30mm"),
|
|
5211
|
+
pw: z45.string().default("2.50mm"),
|
|
5212
|
+
p: z45.string().default("6.80mm")
|
|
5150
5213
|
});
|
|
5151
5214
|
var smc = (raw_params) => {
|
|
5152
5215
|
const parameters = smc_def.parse(raw_params);
|
|
@@ -5157,20 +5220,20 @@ var smc = (raw_params) => {
|
|
|
5157
5220
|
pcb_component_id: "",
|
|
5158
5221
|
route: [
|
|
5159
5222
|
{
|
|
5160
|
-
x:
|
|
5161
|
-
y:
|
|
5223
|
+
x: length36.parse(parameters.p) / 2,
|
|
5224
|
+
y: length36.parse(parameters.h) / 2 - 0.8
|
|
5162
5225
|
},
|
|
5163
5226
|
{
|
|
5164
|
-
x: -
|
|
5165
|
-
y:
|
|
5227
|
+
x: -length36.parse(parameters.w) / 2 - 0.8,
|
|
5228
|
+
y: length36.parse(parameters.h) / 2 - 0.8
|
|
5166
5229
|
},
|
|
5167
5230
|
{
|
|
5168
|
-
x: -
|
|
5169
|
-
y: -
|
|
5231
|
+
x: -length36.parse(parameters.w) / 2 - 0.8,
|
|
5232
|
+
y: -length36.parse(parameters.h) / 2 + 0.8
|
|
5170
5233
|
},
|
|
5171
5234
|
{
|
|
5172
|
-
x:
|
|
5173
|
-
y: -
|
|
5235
|
+
x: length36.parse(parameters.p) / 2,
|
|
5236
|
+
y: -length36.parse(parameters.h) / 2 + 0.8
|
|
5174
5237
|
}
|
|
5175
5238
|
],
|
|
5176
5239
|
stroke_width: 0.1,
|
|
@@ -5212,16 +5275,16 @@ var smcWithoutParsing = (parameters) => {
|
|
|
5212
5275
|
};
|
|
5213
5276
|
|
|
5214
5277
|
// src/fn/sot223.ts
|
|
5215
|
-
import { z as
|
|
5216
|
-
var sot223_def =
|
|
5217
|
-
fn:
|
|
5218
|
-
num_pins:
|
|
5219
|
-
w:
|
|
5220
|
-
h:
|
|
5221
|
-
pl:
|
|
5222
|
-
pw:
|
|
5223
|
-
p:
|
|
5224
|
-
string:
|
|
5278
|
+
import { z as z46 } from "zod";
|
|
5279
|
+
var sot223_def = z46.object({
|
|
5280
|
+
fn: z46.string(),
|
|
5281
|
+
num_pins: z46.number().default(4),
|
|
5282
|
+
w: z46.string().default("8.50mm"),
|
|
5283
|
+
h: z46.string().default("6.90mm"),
|
|
5284
|
+
pl: z46.string().default("2mm"),
|
|
5285
|
+
pw: z46.string().default("1.5mm"),
|
|
5286
|
+
p: z46.string().default("2.30mm"),
|
|
5287
|
+
string: z46.string().optional()
|
|
5225
5288
|
});
|
|
5226
5289
|
var sot223 = (raw_params) => {
|
|
5227
5290
|
const match = raw_params.string?.match(/^sot223_(\d+)/);
|
|
@@ -5467,16 +5530,16 @@ var sot223_6 = (parameters) => {
|
|
|
5467
5530
|
};
|
|
5468
5531
|
|
|
5469
5532
|
// src/fn/sot23w.ts
|
|
5470
|
-
import { z as
|
|
5471
|
-
var sot23w_def =
|
|
5472
|
-
fn:
|
|
5473
|
-
num_pins:
|
|
5474
|
-
w:
|
|
5475
|
-
h:
|
|
5476
|
-
pl:
|
|
5477
|
-
pw:
|
|
5478
|
-
p:
|
|
5479
|
-
string:
|
|
5533
|
+
import { z as z47 } from "zod";
|
|
5534
|
+
var sot23w_def = z47.object({
|
|
5535
|
+
fn: z47.string(),
|
|
5536
|
+
num_pins: z47.number().default(3),
|
|
5537
|
+
w: z47.string().default("3.40mm"),
|
|
5538
|
+
h: z47.string().default("3.30mm"),
|
|
5539
|
+
pl: z47.string().default("1mm"),
|
|
5540
|
+
pw: z47.string().default("0.7mm"),
|
|
5541
|
+
p: z47.string().default("1.2mm"),
|
|
5542
|
+
string: z47.string().optional()
|
|
5480
5543
|
});
|
|
5481
5544
|
var sot23w = (raw_params) => {
|
|
5482
5545
|
const match = raw_params.string?.match(/^sot23w_(\d+)/);
|
|
@@ -5564,16 +5627,16 @@ var sot23w_3 = (parameters) => {
|
|
|
5564
5627
|
};
|
|
5565
5628
|
|
|
5566
5629
|
// src/fn/to92s.ts
|
|
5567
|
-
import { z as
|
|
5568
|
-
var to92s_def =
|
|
5569
|
-
fn:
|
|
5570
|
-
num_pins:
|
|
5571
|
-
p:
|
|
5572
|
-
id:
|
|
5573
|
-
od:
|
|
5574
|
-
w:
|
|
5575
|
-
h:
|
|
5576
|
-
string:
|
|
5630
|
+
import { z as z48 } from "zod";
|
|
5631
|
+
var to92s_def = z48.object({
|
|
5632
|
+
fn: z48.string(),
|
|
5633
|
+
num_pins: z48.union([z48.literal(3), z48.literal(2)]).default(3),
|
|
5634
|
+
p: z48.string().default("1.27mm"),
|
|
5635
|
+
id: z48.string().default("0.72mm"),
|
|
5636
|
+
od: z48.string().default("0.95mm"),
|
|
5637
|
+
w: z48.string().default("2.5mm"),
|
|
5638
|
+
h: z48.string().default("4.2mm"),
|
|
5639
|
+
string: z48.string().optional()
|
|
5577
5640
|
});
|
|
5578
5641
|
var to92s_3 = (parameters) => {
|
|
5579
5642
|
const { p, id, od, w, h } = parameters;
|
|
@@ -5640,18 +5703,18 @@ var to92s = (raw_params) => {
|
|
|
5640
5703
|
|
|
5641
5704
|
// src/fn/jst.ts
|
|
5642
5705
|
import {
|
|
5643
|
-
length as
|
|
5706
|
+
length as length37
|
|
5644
5707
|
} from "circuit-json";
|
|
5645
|
-
import { z as
|
|
5646
|
-
var jst_def =
|
|
5647
|
-
fn:
|
|
5648
|
-
p:
|
|
5649
|
-
id:
|
|
5650
|
-
pw:
|
|
5651
|
-
pl:
|
|
5652
|
-
w:
|
|
5653
|
-
h:
|
|
5654
|
-
sh:
|
|
5708
|
+
import { z as z49 } from "zod";
|
|
5709
|
+
var jst_def = z49.object({
|
|
5710
|
+
fn: z49.string(),
|
|
5711
|
+
p: length37.optional(),
|
|
5712
|
+
id: length37.optional(),
|
|
5713
|
+
pw: length37.optional(),
|
|
5714
|
+
pl: length37.optional(),
|
|
5715
|
+
w: length37.optional(),
|
|
5716
|
+
h: length37.optional(),
|
|
5717
|
+
sh: z49.union([z49.boolean(), z49.string(), z49.number()]).optional().transform((v) => {
|
|
5655
5718
|
if (typeof v === "string") {
|
|
5656
5719
|
const n = Number(v);
|
|
5657
5720
|
return Number.isNaN(n) ? true : n;
|
|
@@ -5660,26 +5723,26 @@ var jst_def = z48.object({
|
|
|
5660
5723
|
}).describe(
|
|
5661
5724
|
'JST SH (Surface-mount) connector family. SH stands for "Super High-density".'
|
|
5662
5725
|
),
|
|
5663
|
-
ph:
|
|
5726
|
+
ph: z49.boolean().optional().describe(
|
|
5664
5727
|
'JST PH (Through-hole) connector family. PH stands for "Pin Header".'
|
|
5665
5728
|
),
|
|
5666
|
-
string:
|
|
5729
|
+
string: z49.string().optional()
|
|
5667
5730
|
});
|
|
5668
5731
|
var variantDefaults = {
|
|
5669
5732
|
ph: {
|
|
5670
|
-
p:
|
|
5671
|
-
id:
|
|
5672
|
-
pw:
|
|
5673
|
-
pl:
|
|
5674
|
-
w:
|
|
5675
|
-
h:
|
|
5733
|
+
p: length37.parse("2.2mm"),
|
|
5734
|
+
id: length37.parse("0.70mm"),
|
|
5735
|
+
pw: length37.parse("1.20mm"),
|
|
5736
|
+
pl: length37.parse("1.20mm"),
|
|
5737
|
+
w: length37.parse("6mm"),
|
|
5738
|
+
h: length37.parse("5mm")
|
|
5676
5739
|
},
|
|
5677
5740
|
sh: {
|
|
5678
|
-
p:
|
|
5679
|
-
pw:
|
|
5680
|
-
pl:
|
|
5681
|
-
w:
|
|
5682
|
-
h:
|
|
5741
|
+
p: length37.parse("1mm"),
|
|
5742
|
+
pw: length37.parse("0.6mm"),
|
|
5743
|
+
pl: length37.parse("1.55mm"),
|
|
5744
|
+
w: length37.parse("5.8mm"),
|
|
5745
|
+
h: length37.parse("7.8mm")
|
|
5683
5746
|
}
|
|
5684
5747
|
};
|
|
5685
5748
|
function getVariant(params) {
|
|
@@ -5778,22 +5841,22 @@ var jst = (raw_params) => {
|
|
|
5778
5841
|
};
|
|
5779
5842
|
|
|
5780
5843
|
// src/fn/sod110.ts
|
|
5781
|
-
import { z as
|
|
5782
|
-
import { length as
|
|
5783
|
-
var sod_def12 =
|
|
5784
|
-
fn:
|
|
5785
|
-
num_pins:
|
|
5786
|
-
w:
|
|
5787
|
-
h:
|
|
5788
|
-
pl:
|
|
5789
|
-
pw:
|
|
5790
|
-
p:
|
|
5844
|
+
import { z as z50 } from "zod";
|
|
5845
|
+
import { length as length38 } from "circuit-json";
|
|
5846
|
+
var sod_def12 = z50.object({
|
|
5847
|
+
fn: z50.string(),
|
|
5848
|
+
num_pins: z50.literal(2).default(2),
|
|
5849
|
+
w: z50.string().default("3.30mm"),
|
|
5850
|
+
h: z50.string().default("1.70mm"),
|
|
5851
|
+
pl: z50.string().default("0.80mm"),
|
|
5852
|
+
pw: z50.string().default("1mm"),
|
|
5853
|
+
p: z50.string().default("1.90mm")
|
|
5791
5854
|
});
|
|
5792
5855
|
var sod110 = (raw_params) => {
|
|
5793
5856
|
const parameters = sod_def12.parse(raw_params);
|
|
5794
5857
|
const silkscreenRefText = silkscreenRef(
|
|
5795
5858
|
0,
|
|
5796
|
-
|
|
5859
|
+
length38.parse(parameters.h) / 2 + 0.5,
|
|
5797
5860
|
0.3
|
|
5798
5861
|
);
|
|
5799
5862
|
const silkscreenLine = {
|
|
@@ -5802,20 +5865,20 @@ var sod110 = (raw_params) => {
|
|
|
5802
5865
|
pcb_component_id: "",
|
|
5803
5866
|
route: [
|
|
5804
5867
|
{
|
|
5805
|
-
x:
|
|
5806
|
-
y:
|
|
5868
|
+
x: length38.parse(parameters.p) / 2,
|
|
5869
|
+
y: length38.parse(parameters.h) / 2
|
|
5807
5870
|
},
|
|
5808
5871
|
{
|
|
5809
|
-
x: -
|
|
5810
|
-
y:
|
|
5872
|
+
x: -length38.parse(parameters.w) / 2,
|
|
5873
|
+
y: length38.parse(parameters.h) / 2
|
|
5811
5874
|
},
|
|
5812
5875
|
{
|
|
5813
|
-
x: -
|
|
5814
|
-
y: -
|
|
5876
|
+
x: -length38.parse(parameters.w) / 2,
|
|
5877
|
+
y: -length38.parse(parameters.h) / 2
|
|
5815
5878
|
},
|
|
5816
5879
|
{
|
|
5817
|
-
x:
|
|
5818
|
-
y: -
|
|
5880
|
+
x: length38.parse(parameters.p) / 2,
|
|
5881
|
+
y: -length38.parse(parameters.h) / 2
|
|
5819
5882
|
}
|
|
5820
5883
|
],
|
|
5821
5884
|
stroke_width: 0.1,
|
|
@@ -5857,8 +5920,8 @@ var sodWithoutParsing13 = (parameters) => {
|
|
|
5857
5920
|
};
|
|
5858
5921
|
|
|
5859
5922
|
// src/fn/vssop.ts
|
|
5860
|
-
import { z as
|
|
5861
|
-
import { length as
|
|
5923
|
+
import { z as z51 } from "zod";
|
|
5924
|
+
import { length as length39 } from "circuit-json";
|
|
5862
5925
|
var getDefaultValues = (num_pins) => {
|
|
5863
5926
|
switch (num_pins) {
|
|
5864
5927
|
case 8:
|
|
@@ -5887,24 +5950,24 @@ var getDefaultValues = (num_pins) => {
|
|
|
5887
5950
|
};
|
|
5888
5951
|
}
|
|
5889
5952
|
};
|
|
5890
|
-
var vssop_def =
|
|
5891
|
-
fn:
|
|
5892
|
-
num_pins:
|
|
5893
|
-
w:
|
|
5894
|
-
h:
|
|
5895
|
-
p:
|
|
5896
|
-
pl:
|
|
5897
|
-
pw:
|
|
5898
|
-
string:
|
|
5953
|
+
var vssop_def = z51.object({
|
|
5954
|
+
fn: z51.string(),
|
|
5955
|
+
num_pins: z51.union([z51.literal(8), z51.literal(10)]).default(8),
|
|
5956
|
+
w: z51.string().optional(),
|
|
5957
|
+
h: z51.string().optional(),
|
|
5958
|
+
p: z51.string().optional(),
|
|
5959
|
+
pl: z51.string().optional(),
|
|
5960
|
+
pw: z51.string().optional(),
|
|
5961
|
+
string: z51.string().optional()
|
|
5899
5962
|
});
|
|
5900
5963
|
var vssop = (raw_params) => {
|
|
5901
5964
|
const parameters = vssop_def.parse(raw_params);
|
|
5902
5965
|
const defaults = getDefaultValues(parameters.num_pins);
|
|
5903
|
-
const w =
|
|
5904
|
-
const h =
|
|
5905
|
-
const p =
|
|
5906
|
-
const pl =
|
|
5907
|
-
const pw =
|
|
5966
|
+
const w = length39.parse(parameters.w || defaults.w);
|
|
5967
|
+
const h = length39.parse(parameters.h || defaults.h);
|
|
5968
|
+
const p = length39.parse(parameters.p || defaults.p);
|
|
5969
|
+
const pl = length39.parse(parameters.pl || defaults.pl);
|
|
5970
|
+
const pw = length39.parse(parameters.pw || defaults.pw);
|
|
5908
5971
|
const pads = [];
|
|
5909
5972
|
const half = parameters.num_pins / 2;
|
|
5910
5973
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
@@ -5981,14 +6044,14 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
5981
6044
|
const col = pn <= half ? -1 : 1;
|
|
5982
6045
|
const row = (half - 1) / 2 - rowIndex;
|
|
5983
6046
|
return {
|
|
5984
|
-
x: col *
|
|
6047
|
+
x: col * length39.parse(pinCount === 8 ? "1.8mm" : "2.2mm"),
|
|
5985
6048
|
y: row * p
|
|
5986
6049
|
};
|
|
5987
6050
|
};
|
|
5988
6051
|
|
|
5989
6052
|
// src/fn/msop.ts
|
|
5990
|
-
import { z as
|
|
5991
|
-
import { length as
|
|
6053
|
+
import { z as z52 } from "zod";
|
|
6054
|
+
import { length as length40 } from "circuit-json";
|
|
5992
6055
|
var getDefaultValues2 = (num_pins) => {
|
|
5993
6056
|
switch (num_pins) {
|
|
5994
6057
|
case 10:
|
|
@@ -6025,15 +6088,15 @@ var getDefaultValues2 = (num_pins) => {
|
|
|
6025
6088
|
};
|
|
6026
6089
|
}
|
|
6027
6090
|
};
|
|
6028
|
-
var msop_def =
|
|
6029
|
-
fn:
|
|
6030
|
-
num_pins:
|
|
6031
|
-
w:
|
|
6032
|
-
h:
|
|
6033
|
-
p:
|
|
6034
|
-
pl:
|
|
6035
|
-
pw:
|
|
6036
|
-
string:
|
|
6091
|
+
var msop_def = z52.object({
|
|
6092
|
+
fn: z52.string(),
|
|
6093
|
+
num_pins: z52.union([z52.literal(8), z52.literal(10), z52.literal(12), z52.literal(16)]).default(8),
|
|
6094
|
+
w: z52.string().optional(),
|
|
6095
|
+
h: z52.string().optional(),
|
|
6096
|
+
p: z52.string().optional(),
|
|
6097
|
+
pl: z52.string().optional(),
|
|
6098
|
+
pw: z52.string().optional(),
|
|
6099
|
+
string: z52.string().optional()
|
|
6037
6100
|
});
|
|
6038
6101
|
var getMsopCoords = (pinCount, pn, w, p) => {
|
|
6039
6102
|
const half = pinCount / 2;
|
|
@@ -6041,18 +6104,18 @@ var getMsopCoords = (pinCount, pn, w, p) => {
|
|
|
6041
6104
|
const col = pn <= half ? -1 : 1;
|
|
6042
6105
|
const row = (half - 1) / 2 - rowIndex;
|
|
6043
6106
|
return {
|
|
6044
|
-
x: col *
|
|
6107
|
+
x: col * length40.parse("2mm"),
|
|
6045
6108
|
y: row * p
|
|
6046
6109
|
};
|
|
6047
6110
|
};
|
|
6048
6111
|
var msop = (raw_params) => {
|
|
6049
6112
|
const parameters = msop_def.parse(raw_params);
|
|
6050
6113
|
const defaults = getDefaultValues2(parameters.num_pins);
|
|
6051
|
-
const w =
|
|
6052
|
-
const h =
|
|
6053
|
-
const p =
|
|
6054
|
-
const pl =
|
|
6055
|
-
const pw =
|
|
6114
|
+
const w = length40.parse(parameters.w || defaults.w);
|
|
6115
|
+
const h = length40.parse(parameters.h || defaults.h);
|
|
6116
|
+
const p = length40.parse(parameters.p || defaults.p);
|
|
6117
|
+
const pl = length40.parse(parameters.pl || defaults.pl);
|
|
6118
|
+
const pw = length40.parse(parameters.pw || defaults.pw);
|
|
6056
6119
|
const pads = [];
|
|
6057
6120
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6058
6121
|
const { x, y } = getMsopCoords(parameters.num_pins, i + 1, w, p);
|
|
@@ -6123,22 +6186,22 @@ var msop = (raw_params) => {
|
|
|
6123
6186
|
};
|
|
6124
6187
|
|
|
6125
6188
|
// src/fn/sod323w.ts
|
|
6126
|
-
import { z as
|
|
6127
|
-
import { length as
|
|
6128
|
-
var sod323w_def =
|
|
6129
|
-
fn:
|
|
6130
|
-
num_pins:
|
|
6131
|
-
w:
|
|
6132
|
-
h:
|
|
6133
|
-
pl:
|
|
6134
|
-
pw:
|
|
6135
|
-
pad_spacing:
|
|
6189
|
+
import { z as z53 } from "zod";
|
|
6190
|
+
import { length as length41 } from "circuit-json";
|
|
6191
|
+
var sod323w_def = z53.object({
|
|
6192
|
+
fn: z53.string(),
|
|
6193
|
+
num_pins: z53.literal(2).default(2),
|
|
6194
|
+
w: z53.string().default("3.8mm"),
|
|
6195
|
+
h: z53.string().default("1.65mm"),
|
|
6196
|
+
pl: z53.string().default("1.2mm"),
|
|
6197
|
+
pw: z53.string().default("1.2mm"),
|
|
6198
|
+
pad_spacing: z53.string().default("2.6mm")
|
|
6136
6199
|
});
|
|
6137
6200
|
var sod323w = (raw_params) => {
|
|
6138
6201
|
const parameters = sod323w_def.parse(raw_params);
|
|
6139
6202
|
const silkscreenRefText = silkscreenRef(
|
|
6140
6203
|
0,
|
|
6141
|
-
|
|
6204
|
+
length41.parse(parameters.h),
|
|
6142
6205
|
0.3
|
|
6143
6206
|
);
|
|
6144
6207
|
const silkscreenLine = {
|
|
@@ -6147,20 +6210,20 @@ var sod323w = (raw_params) => {
|
|
|
6147
6210
|
pcb_component_id: "",
|
|
6148
6211
|
route: [
|
|
6149
6212
|
{
|
|
6150
|
-
x:
|
|
6151
|
-
y:
|
|
6213
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6214
|
+
y: length41.parse(parameters.h) / 2
|
|
6152
6215
|
},
|
|
6153
6216
|
{
|
|
6154
|
-
x: -
|
|
6155
|
-
y:
|
|
6217
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6218
|
+
y: length41.parse(parameters.h) / 2
|
|
6156
6219
|
},
|
|
6157
6220
|
{
|
|
6158
|
-
x: -
|
|
6159
|
-
y: -
|
|
6221
|
+
x: -length41.parse(parameters.w) / 2 - 0.2,
|
|
6222
|
+
y: -length41.parse(parameters.h) / 2
|
|
6160
6223
|
},
|
|
6161
6224
|
{
|
|
6162
|
-
x:
|
|
6163
|
-
y: -
|
|
6225
|
+
x: length41.parse(parameters.pad_spacing) / 2,
|
|
6226
|
+
y: -length41.parse(parameters.h) / 2
|
|
6164
6227
|
}
|
|
6165
6228
|
],
|
|
6166
6229
|
stroke_width: 0.1,
|
|
@@ -6203,22 +6266,22 @@ var sodWithoutParsing14 = (parameters) => {
|
|
|
6203
6266
|
};
|
|
6204
6267
|
|
|
6205
6268
|
// src/fn/sod323fl.ts
|
|
6206
|
-
import { z as
|
|
6207
|
-
import { length as
|
|
6208
|
-
var sod323FL_def =
|
|
6209
|
-
fn:
|
|
6210
|
-
num_pins:
|
|
6211
|
-
w:
|
|
6212
|
-
h:
|
|
6213
|
-
pl:
|
|
6214
|
-
pw:
|
|
6215
|
-
pad_spacing:
|
|
6269
|
+
import { z as z54 } from "zod";
|
|
6270
|
+
import { length as length42 } from "circuit-json";
|
|
6271
|
+
var sod323FL_def = z54.object({
|
|
6272
|
+
fn: z54.string(),
|
|
6273
|
+
num_pins: z54.literal(2).default(2),
|
|
6274
|
+
w: z54.string().default("3.20mm"),
|
|
6275
|
+
h: z54.string().default("1.65mm"),
|
|
6276
|
+
pl: z54.string().default("0.8mm"),
|
|
6277
|
+
pw: z54.string().default("0.9mm"),
|
|
6278
|
+
pad_spacing: z54.string().default("2.1mm")
|
|
6216
6279
|
});
|
|
6217
6280
|
var sod323fl = (raw_params) => {
|
|
6218
6281
|
const parameters = sod323FL_def.parse(raw_params);
|
|
6219
6282
|
const silkscreenRefText = silkscreenRef(
|
|
6220
6283
|
0,
|
|
6221
|
-
|
|
6284
|
+
length42.parse(parameters.h),
|
|
6222
6285
|
0.3
|
|
6223
6286
|
);
|
|
6224
6287
|
const silkscreenLine = {
|
|
@@ -6227,20 +6290,20 @@ var sod323fl = (raw_params) => {
|
|
|
6227
6290
|
pcb_component_id: "",
|
|
6228
6291
|
route: [
|
|
6229
6292
|
{
|
|
6230
|
-
x:
|
|
6231
|
-
y:
|
|
6293
|
+
x: length42.parse(parameters.pad_spacing) / 2,
|
|
6294
|
+
y: length42.parse(parameters.h) / 2
|
|
6232
6295
|
},
|
|
6233
6296
|
{
|
|
6234
|
-
x: -
|
|
6235
|
-
y:
|
|
6297
|
+
x: -length42.parse(parameters.w) / 2 - 0.2,
|
|
6298
|
+
y: length42.parse(parameters.h) / 2
|
|
6236
6299
|
},
|
|
6237
6300
|
{
|
|
6238
|
-
x: -
|
|
6239
|
-
y: -
|
|
6301
|
+
x: -length42.parse(parameters.w) / 2 - 0.2,
|
|
6302
|
+
y: -length42.parse(parameters.h) / 2
|
|
6240
6303
|
},
|
|
6241
6304
|
{
|
|
6242
|
-
x:
|
|
6243
|
-
y: -
|
|
6305
|
+
x: length42.parse(parameters.pad_spacing) / 2,
|
|
6306
|
+
y: -length42.parse(parameters.h) / 2
|
|
6244
6307
|
}
|
|
6245
6308
|
],
|
|
6246
6309
|
stroke_width: 0.1,
|
|
@@ -6283,20 +6346,20 @@ var sodWithoutParsing15 = (parameters) => {
|
|
|
6283
6346
|
};
|
|
6284
6347
|
|
|
6285
6348
|
// src/fn/son.ts
|
|
6286
|
-
import { z as
|
|
6287
|
-
import { length as
|
|
6288
|
-
var son_def =
|
|
6289
|
-
fn:
|
|
6290
|
-
num_pins:
|
|
6291
|
-
w:
|
|
6292
|
-
h:
|
|
6293
|
-
p:
|
|
6294
|
-
pl:
|
|
6295
|
-
pw:
|
|
6296
|
-
epw:
|
|
6297
|
-
eph:
|
|
6298
|
-
string:
|
|
6299
|
-
ep:
|
|
6349
|
+
import { z as z55 } from "zod";
|
|
6350
|
+
import { length as length43 } from "circuit-json";
|
|
6351
|
+
var son_def = z55.object({
|
|
6352
|
+
fn: z55.string(),
|
|
6353
|
+
num_pins: z55.union([z55.literal(6), z55.literal(8)]).default(8),
|
|
6354
|
+
w: z55.string().default("3mm"),
|
|
6355
|
+
h: z55.string().default("3mm"),
|
|
6356
|
+
p: z55.string().default("0.5mm"),
|
|
6357
|
+
pl: z55.string().default("0.52mm"),
|
|
6358
|
+
pw: z55.string().default("0.35mm"),
|
|
6359
|
+
epw: z55.string().default("1.40mm"),
|
|
6360
|
+
eph: z55.string().default("1.60mm"),
|
|
6361
|
+
string: z55.string().optional(),
|
|
6362
|
+
ep: z55.boolean().default(false)
|
|
6300
6363
|
});
|
|
6301
6364
|
var son = (raw_params) => {
|
|
6302
6365
|
if (raw_params.string && raw_params.string.includes("_ep")) {
|
|
@@ -6308,13 +6371,13 @@ var son = (raw_params) => {
|
|
|
6308
6371
|
...raw_params,
|
|
6309
6372
|
num_pins: numPins
|
|
6310
6373
|
});
|
|
6311
|
-
const w =
|
|
6312
|
-
const h =
|
|
6313
|
-
const p =
|
|
6314
|
-
const pl =
|
|
6315
|
-
const pw =
|
|
6316
|
-
const epw =
|
|
6317
|
-
const eph =
|
|
6374
|
+
const w = length43.parse(parameters.w);
|
|
6375
|
+
const h = length43.parse(parameters.h);
|
|
6376
|
+
const p = length43.parse(parameters.p);
|
|
6377
|
+
const pl = length43.parse(parameters.pl);
|
|
6378
|
+
const pw = length43.parse(parameters.pw);
|
|
6379
|
+
const epw = length43.parse(parameters.epw);
|
|
6380
|
+
const eph = length43.parse(parameters.eph);
|
|
6318
6381
|
const pads = [];
|
|
6319
6382
|
for (let i = 0; i < parameters.num_pins; i++) {
|
|
6320
6383
|
const { x, y } = getSonPadCoord(parameters.num_pins, i + 1, w, p);
|
|
@@ -6392,18 +6455,18 @@ var getSonPadCoord = (num_pins, pn, w, p) => {
|
|
|
6392
6455
|
const col = pn <= half ? -1 : 1;
|
|
6393
6456
|
const row = (half - 1) / 2 - rowIndex;
|
|
6394
6457
|
return {
|
|
6395
|
-
x: col *
|
|
6458
|
+
x: col * length43.parse("1.4mm"),
|
|
6396
6459
|
y: row * p
|
|
6397
6460
|
};
|
|
6398
6461
|
};
|
|
6399
6462
|
|
|
6400
6463
|
// src/fn/solderjumper.ts
|
|
6401
|
-
import { length as
|
|
6464
|
+
import { length as length44 } from "circuit-json";
|
|
6402
6465
|
var solderjumper = (params) => {
|
|
6403
6466
|
const { num_pins, bridged, p = 2.54, pw = 1.5, ph = 1.5 } = params;
|
|
6404
|
-
const padSpacing =
|
|
6405
|
-
const padWidth =
|
|
6406
|
-
const padHeight =
|
|
6467
|
+
const padSpacing = length44.parse(p);
|
|
6468
|
+
const padWidth = length44.parse(pw);
|
|
6469
|
+
const padHeight = length44.parse(ph);
|
|
6407
6470
|
const traceWidth = Math.min(padHeight / 4, 0.5);
|
|
6408
6471
|
const pads = [];
|
|
6409
6472
|
for (let i = 0; i < num_pins; i++) {
|
|
@@ -6491,34 +6554,34 @@ var solderjumper = (params) => {
|
|
|
6491
6554
|
};
|
|
6492
6555
|
|
|
6493
6556
|
// src/fn/sot457.ts
|
|
6494
|
-
import { z as
|
|
6557
|
+
import { z as z56 } from "zod";
|
|
6495
6558
|
var commonSchema = {
|
|
6496
|
-
fn:
|
|
6497
|
-
num_pins:
|
|
6498
|
-
pillh:
|
|
6499
|
-
pillw:
|
|
6500
|
-
pl:
|
|
6501
|
-
pw:
|
|
6502
|
-
p:
|
|
6503
|
-
wave:
|
|
6504
|
-
reflow:
|
|
6505
|
-
};
|
|
6506
|
-
var sot457DefSchema =
|
|
6559
|
+
fn: z56.literal("sot457"),
|
|
6560
|
+
num_pins: z56.literal(6).default(6),
|
|
6561
|
+
pillh: z56.string().default("0.45mm"),
|
|
6562
|
+
pillw: z56.string().default("1.45mm"),
|
|
6563
|
+
pl: z56.string(),
|
|
6564
|
+
pw: z56.string(),
|
|
6565
|
+
p: z56.string(),
|
|
6566
|
+
wave: z56.boolean().optional(),
|
|
6567
|
+
reflow: z56.boolean().optional()
|
|
6568
|
+
};
|
|
6569
|
+
var sot457DefSchema = z56.object({
|
|
6507
6570
|
...commonSchema,
|
|
6508
|
-
h:
|
|
6509
|
-
w:
|
|
6510
|
-
pl:
|
|
6511
|
-
pw:
|
|
6512
|
-
p:
|
|
6571
|
+
h: z56.string().default("2.5mm"),
|
|
6572
|
+
w: z56.string().default("2.7mm"),
|
|
6573
|
+
pl: z56.string().default("0.8mm"),
|
|
6574
|
+
pw: z56.string().default("0.55mm"),
|
|
6575
|
+
p: z56.string().default("0.95mm")
|
|
6513
6576
|
});
|
|
6514
|
-
var sot457WaveSchema =
|
|
6577
|
+
var sot457WaveSchema = z56.object({
|
|
6515
6578
|
...commonSchema,
|
|
6516
|
-
h:
|
|
6517
|
-
w:
|
|
6518
|
-
pillr:
|
|
6519
|
-
pl:
|
|
6520
|
-
pw:
|
|
6521
|
-
p:
|
|
6579
|
+
h: z56.string().default("3mm"),
|
|
6580
|
+
w: z56.string().default("4mm"),
|
|
6581
|
+
pillr: z56.string().default("0.225mm"),
|
|
6582
|
+
pl: z56.string().default("1.45mm"),
|
|
6583
|
+
pw: z56.string().default("1.5mm"),
|
|
6584
|
+
p: z56.string().default("1.475mm")
|
|
6522
6585
|
}).transform((data) => ({
|
|
6523
6586
|
...data,
|
|
6524
6587
|
wave: data.wave ?? (data.reflow === void 0 ? true : !data.reflow),
|
|
@@ -6657,25 +6720,25 @@ var sot457 = (rawParams) => {
|
|
|
6657
6720
|
};
|
|
6658
6721
|
|
|
6659
6722
|
// src/fn/sot963.ts
|
|
6660
|
-
import { z as
|
|
6661
|
-
import { length as
|
|
6662
|
-
var sot963_def =
|
|
6663
|
-
fn:
|
|
6664
|
-
num_pins:
|
|
6665
|
-
w:
|
|
6666
|
-
h:
|
|
6667
|
-
p:
|
|
6668
|
-
pl:
|
|
6669
|
-
pw:
|
|
6670
|
-
string:
|
|
6723
|
+
import { z as z57 } from "zod";
|
|
6724
|
+
import { length as length45 } from "circuit-json";
|
|
6725
|
+
var sot963_def = z57.object({
|
|
6726
|
+
fn: z57.string(),
|
|
6727
|
+
num_pins: z57.literal(6).default(6),
|
|
6728
|
+
w: z57.string().default("1.1mm"),
|
|
6729
|
+
h: z57.string().default("1.45mm"),
|
|
6730
|
+
p: z57.string().default("0.35mm"),
|
|
6731
|
+
pl: z57.string().default("0.2mm"),
|
|
6732
|
+
pw: z57.string().default("0.2mm"),
|
|
6733
|
+
string: z57.string().optional()
|
|
6671
6734
|
});
|
|
6672
6735
|
var sot963 = (raw_params) => {
|
|
6673
6736
|
const parameters = sot963_def.parse({ ...raw_params, fn: "sot963" });
|
|
6674
|
-
const w =
|
|
6675
|
-
const h =
|
|
6676
|
-
const p =
|
|
6677
|
-
const pl =
|
|
6678
|
-
const pw =
|
|
6737
|
+
const w = length45.parse(parameters.w);
|
|
6738
|
+
const h = length45.parse(parameters.h);
|
|
6739
|
+
const p = length45.parse(parameters.p);
|
|
6740
|
+
const pl = length45.parse(parameters.pl);
|
|
6741
|
+
const pw = length45.parse(parameters.pw);
|
|
6679
6742
|
const pads = [];
|
|
6680
6743
|
for (let i = 0; i < 6; i++) {
|
|
6681
6744
|
const { x, y } = getSot963PadCoord(i + 1, w, p, pl);
|
|
@@ -6738,19 +6801,19 @@ var getSot963PadCoord = (pn, w, p, pl) => {
|
|
|
6738
6801
|
};
|
|
6739
6802
|
|
|
6740
6803
|
// src/fn/potentiometer.ts
|
|
6741
|
-
import { z as
|
|
6742
|
-
var potentiometer_def =
|
|
6743
|
-
fn:
|
|
6744
|
-
num_pins:
|
|
6745
|
-
p:
|
|
6746
|
-
id:
|
|
6747
|
-
od:
|
|
6748
|
-
ca:
|
|
6804
|
+
import { z as z58 } from "zod";
|
|
6805
|
+
var potentiometer_def = z58.object({
|
|
6806
|
+
fn: z58.string(),
|
|
6807
|
+
num_pins: z58.union([z58.literal(3), z58.literal(2)]).default(3),
|
|
6808
|
+
p: z58.string().default("3.8mm"),
|
|
6809
|
+
id: z58.string().default("1.25mm"),
|
|
6810
|
+
od: z58.string().default("2.35mm"),
|
|
6811
|
+
ca: z58.string().default("14mm").describe(
|
|
6749
6812
|
"Caliper axis (width or diameter of the potentiometer body or adjustment knob)"
|
|
6750
6813
|
),
|
|
6751
|
-
w:
|
|
6752
|
-
h:
|
|
6753
|
-
string:
|
|
6814
|
+
w: z58.string().default("5.35mm"),
|
|
6815
|
+
h: z58.string().default("4mm"),
|
|
6816
|
+
string: z58.string().optional()
|
|
6754
6817
|
});
|
|
6755
6818
|
var potentiometer_acp = (parameters) => {
|
|
6756
6819
|
const { p, id, od, h, ca } = parameters;
|
|
@@ -6817,15 +6880,15 @@ var potentiometer = (raw_params) => {
|
|
|
6817
6880
|
|
|
6818
6881
|
// src/fn/electrolytic.ts
|
|
6819
6882
|
import {
|
|
6820
|
-
length as
|
|
6883
|
+
length as length46
|
|
6821
6884
|
} from "circuit-json";
|
|
6822
|
-
import { z as
|
|
6823
|
-
var electrolytic_def =
|
|
6824
|
-
fn:
|
|
6825
|
-
p:
|
|
6826
|
-
id:
|
|
6827
|
-
od:
|
|
6828
|
-
d:
|
|
6885
|
+
import { z as z59 } from "zod";
|
|
6886
|
+
var electrolytic_def = z59.object({
|
|
6887
|
+
fn: z59.string(),
|
|
6888
|
+
p: length46.optional().default("7.5mm"),
|
|
6889
|
+
id: length46.optional().default("1mm"),
|
|
6890
|
+
od: length46.optional().default("2mm"),
|
|
6891
|
+
d: length46.optional().default("10.5mm")
|
|
6829
6892
|
});
|
|
6830
6893
|
var generate_circle_arcs = (centerX, centerY, radius, cut, cutHeight) => {
|
|
6831
6894
|
const topArc = [];
|
|
@@ -6932,22 +6995,22 @@ var electrolytic = (raw_params) => {
|
|
|
6932
6995
|
};
|
|
6933
6996
|
|
|
6934
6997
|
// src/fn/smbf.ts
|
|
6935
|
-
import { z as
|
|
6936
|
-
import { length as
|
|
6937
|
-
var smbf_def =
|
|
6938
|
-
fn:
|
|
6939
|
-
num_pins:
|
|
6940
|
-
w:
|
|
6941
|
-
h:
|
|
6942
|
-
pl:
|
|
6943
|
-
pw:
|
|
6944
|
-
p:
|
|
6998
|
+
import { z as z60 } from "zod";
|
|
6999
|
+
import { length as length47 } from "circuit-json";
|
|
7000
|
+
var smbf_def = z60.object({
|
|
7001
|
+
fn: z60.string(),
|
|
7002
|
+
num_pins: z60.literal(2).default(2),
|
|
7003
|
+
w: z60.string().default("6.5mm"),
|
|
7004
|
+
h: z60.string().default("3mm"),
|
|
7005
|
+
pl: z60.string().default("1.75mm"),
|
|
7006
|
+
pw: z60.string().default("2.40mm"),
|
|
7007
|
+
p: z60.string().default("4.75mm")
|
|
6945
7008
|
});
|
|
6946
7009
|
var smbf = (raw_params) => {
|
|
6947
7010
|
const parameters = smbf_def.parse(raw_params);
|
|
6948
7011
|
const silkscreenRefText = silkscreenRef(
|
|
6949
7012
|
0,
|
|
6950
|
-
|
|
7013
|
+
length47.parse(parameters.h) - 0.5,
|
|
6951
7014
|
0.3
|
|
6952
7015
|
);
|
|
6953
7016
|
const silkscreenLine = {
|
|
@@ -6956,20 +7019,20 @@ var smbf = (raw_params) => {
|
|
|
6956
7019
|
pcb_component_id: "",
|
|
6957
7020
|
route: [
|
|
6958
7021
|
{
|
|
6959
|
-
x:
|
|
6960
|
-
y:
|
|
7022
|
+
x: length47.parse(parameters.p) / 2,
|
|
7023
|
+
y: length47.parse(parameters.h) / 2
|
|
6961
7024
|
},
|
|
6962
7025
|
{
|
|
6963
|
-
x: -
|
|
6964
|
-
y:
|
|
7026
|
+
x: -length47.parse(parameters.w) / 2 - 0.3,
|
|
7027
|
+
y: length47.parse(parameters.h) / 2
|
|
6965
7028
|
},
|
|
6966
7029
|
{
|
|
6967
|
-
x: -
|
|
6968
|
-
y: -
|
|
7030
|
+
x: -length47.parse(parameters.w) / 2 - 0.3,
|
|
7031
|
+
y: -length47.parse(parameters.h) / 2
|
|
6969
7032
|
},
|
|
6970
7033
|
{
|
|
6971
|
-
x:
|
|
6972
|
-
y: -
|
|
7034
|
+
x: length47.parse(parameters.p) / 2,
|
|
7035
|
+
y: -length47.parse(parameters.h) / 2
|
|
6973
7036
|
}
|
|
6974
7037
|
],
|
|
6975
7038
|
stroke_width: 0.1,
|
|
@@ -7011,16 +7074,16 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
7011
7074
|
};
|
|
7012
7075
|
|
|
7013
7076
|
// src/fn/sot323.ts
|
|
7014
|
-
import { z as
|
|
7015
|
-
var sot323_def =
|
|
7016
|
-
fn:
|
|
7017
|
-
num_pins:
|
|
7018
|
-
w:
|
|
7019
|
-
h:
|
|
7020
|
-
pl:
|
|
7021
|
-
pw:
|
|
7022
|
-
p:
|
|
7023
|
-
string:
|
|
7077
|
+
import { z as z61 } from "zod";
|
|
7078
|
+
var sot323_def = z61.object({
|
|
7079
|
+
fn: z61.string(),
|
|
7080
|
+
num_pins: z61.number().default(3),
|
|
7081
|
+
w: z61.string().default("2.45mm"),
|
|
7082
|
+
h: z61.string().default("2.40mm"),
|
|
7083
|
+
pl: z61.string().default("0.70mm"),
|
|
7084
|
+
pw: z61.string().default("0.45mm"),
|
|
7085
|
+
p: z61.string().default("1mm"),
|
|
7086
|
+
string: z61.string().optional()
|
|
7024
7087
|
});
|
|
7025
7088
|
var sot323 = (raw_params) => {
|
|
7026
7089
|
const match = raw_params.string?.match(/^sot323_(\d+)/);
|
|
@@ -7108,30 +7171,30 @@ var sot323_3 = (parameters) => {
|
|
|
7108
7171
|
};
|
|
7109
7172
|
|
|
7110
7173
|
// src/fn/smtpad.ts
|
|
7111
|
-
import { z as
|
|
7112
|
-
import { length as
|
|
7174
|
+
import { z as z62 } from "zod";
|
|
7175
|
+
import { length as length48 } from "circuit-json";
|
|
7113
7176
|
import { mm as mm6 } from "@tscircuit/mm";
|
|
7114
|
-
var smtpad_def =
|
|
7115
|
-
fn:
|
|
7116
|
-
circle:
|
|
7117
|
-
rect:
|
|
7118
|
-
square:
|
|
7119
|
-
pill:
|
|
7120
|
-
d:
|
|
7121
|
-
pd:
|
|
7122
|
-
diameter:
|
|
7123
|
-
r:
|
|
7124
|
-
pr:
|
|
7125
|
-
radius:
|
|
7126
|
-
w:
|
|
7127
|
-
pw:
|
|
7128
|
-
width:
|
|
7129
|
-
h:
|
|
7130
|
-
ph:
|
|
7131
|
-
height:
|
|
7132
|
-
s:
|
|
7133
|
-
size:
|
|
7134
|
-
string:
|
|
7177
|
+
var smtpad_def = z62.object({
|
|
7178
|
+
fn: z62.string(),
|
|
7179
|
+
circle: z62.boolean().optional(),
|
|
7180
|
+
rect: z62.boolean().optional(),
|
|
7181
|
+
square: z62.boolean().optional(),
|
|
7182
|
+
pill: z62.boolean().optional(),
|
|
7183
|
+
d: length48.optional(),
|
|
7184
|
+
pd: length48.optional(),
|
|
7185
|
+
diameter: length48.optional(),
|
|
7186
|
+
r: length48.optional(),
|
|
7187
|
+
pr: length48.optional(),
|
|
7188
|
+
radius: length48.optional(),
|
|
7189
|
+
w: length48.optional(),
|
|
7190
|
+
pw: length48.optional(),
|
|
7191
|
+
width: length48.optional(),
|
|
7192
|
+
h: length48.optional(),
|
|
7193
|
+
ph: length48.optional(),
|
|
7194
|
+
height: length48.optional(),
|
|
7195
|
+
s: length48.optional(),
|
|
7196
|
+
size: length48.optional(),
|
|
7197
|
+
string: z62.string().optional()
|
|
7135
7198
|
}).transform((v) => {
|
|
7136
7199
|
let shape = "rect";
|
|
7137
7200
|
if (v.circle) shape = "circle";
|
|
@@ -7197,18 +7260,18 @@ var smtpad = (raw_params) => {
|
|
|
7197
7260
|
};
|
|
7198
7261
|
|
|
7199
7262
|
// src/fn/platedhole.ts
|
|
7200
|
-
import { z as
|
|
7201
|
-
import { length as
|
|
7263
|
+
import { z as z63 } from "zod";
|
|
7264
|
+
import { length as length49 } from "circuit-json";
|
|
7202
7265
|
import { mm as mm7 } from "@tscircuit/mm";
|
|
7203
|
-
var platedhole_def =
|
|
7204
|
-
fn:
|
|
7205
|
-
d:
|
|
7206
|
-
hd:
|
|
7207
|
-
r:
|
|
7208
|
-
hr:
|
|
7209
|
-
pd:
|
|
7210
|
-
pr:
|
|
7211
|
-
squarepad:
|
|
7266
|
+
var platedhole_def = z63.object({
|
|
7267
|
+
fn: z63.string(),
|
|
7268
|
+
d: length49.optional(),
|
|
7269
|
+
hd: length49.optional(),
|
|
7270
|
+
r: length49.optional(),
|
|
7271
|
+
hr: length49.optional(),
|
|
7272
|
+
pd: length49.optional(),
|
|
7273
|
+
pr: length49.optional(),
|
|
7274
|
+
squarepad: z63.boolean().optional().default(false)
|
|
7212
7275
|
}).transform((v) => {
|
|
7213
7276
|
let holeD;
|
|
7214
7277
|
if (v.d !== void 0) holeD = mm7(v.d);
|
|
@@ -7240,14 +7303,14 @@ var platedhole2 = (raw_params) => {
|
|
|
7240
7303
|
};
|
|
7241
7304
|
|
|
7242
7305
|
// src/fn/sot.ts
|
|
7243
|
-
import { z as
|
|
7244
|
-
var sot_def =
|
|
7245
|
-
fn:
|
|
7246
|
-
num_pins:
|
|
7247
|
-
h:
|
|
7248
|
-
pl:
|
|
7249
|
-
pw:
|
|
7250
|
-
p:
|
|
7306
|
+
import { z as z64 } from "zod";
|
|
7307
|
+
var sot_def = z64.object({
|
|
7308
|
+
fn: z64.string(),
|
|
7309
|
+
num_pins: z64.literal(6).default(6),
|
|
7310
|
+
h: z64.string().default("1.6mm"),
|
|
7311
|
+
pl: z64.string().default("1mm"),
|
|
7312
|
+
pw: z64.string().default("0.7mm"),
|
|
7313
|
+
p: z64.string().default("0.95mm")
|
|
7251
7314
|
});
|
|
7252
7315
|
var sot = (raw_params) => {
|
|
7253
7316
|
const parameters = sot_def.parse(raw_params);
|
|
@@ -7364,9 +7427,9 @@ var sotWithoutParsing = (parameters) => {
|
|
|
7364
7427
|
};
|
|
7365
7428
|
|
|
7366
7429
|
// src/fn/m2host.ts
|
|
7367
|
-
import { z as
|
|
7368
|
-
var m2host_def =
|
|
7369
|
-
fn:
|
|
7430
|
+
import { z as z65 } from "zod";
|
|
7431
|
+
var m2host_def = z65.object({
|
|
7432
|
+
fn: z65.string()
|
|
7370
7433
|
});
|
|
7371
7434
|
var m2host = (raw_params) => {
|
|
7372
7435
|
const parameters = m2host_def.parse(raw_params);
|