@tscircuit/footprinter 0.0.337 → 0.0.339
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.js +261 -231
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1313,22 +1313,33 @@ var soicWithoutParsing = (parameters) => {
|
|
|
1313
1313
|
{ x: -sw / 2, y: -sh / 2 }
|
|
1314
1314
|
]
|
|
1315
1315
|
};
|
|
1316
|
-
const
|
|
1317
|
-
const
|
|
1318
|
-
const
|
|
1319
|
-
const
|
|
1320
|
-
|
|
1321
|
-
|
|
1322
|
-
const
|
|
1323
|
-
const
|
|
1316
|
+
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
1317
|
+
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
1318
|
+
const courtyardStepInnerHalfX = roundToCourtyardGrid(parameters.w / 2 + 0.25);
|
|
1319
|
+
const courtyardStepOuterHalfX = roundToCourtyardGrid(
|
|
1320
|
+
courtyardStepInnerHalfX + 1.93
|
|
1321
|
+
);
|
|
1322
|
+
const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.27);
|
|
1323
|
+
const courtyardStepOuterHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.63);
|
|
1324
1324
|
const courtyard = {
|
|
1325
|
-
type: "
|
|
1326
|
-
|
|
1325
|
+
type: "pcb_courtyard_outline",
|
|
1326
|
+
pcb_courtyard_outline_id: "",
|
|
1327
1327
|
pcb_component_id: "",
|
|
1328
|
-
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1328
|
+
layer: "top",
|
|
1329
|
+
outline: [
|
|
1330
|
+
{ x: -courtyardStepOuterHalfX, y: courtyardStepInnerHalfY },
|
|
1331
|
+
{ x: -courtyardStepInnerHalfX, y: courtyardStepInnerHalfY },
|
|
1332
|
+
{ x: -courtyardStepInnerHalfX, y: courtyardStepOuterHalfY },
|
|
1333
|
+
{ x: courtyardStepInnerHalfX, y: courtyardStepOuterHalfY },
|
|
1334
|
+
{ x: courtyardStepInnerHalfX, y: courtyardStepInnerHalfY },
|
|
1335
|
+
{ x: courtyardStepOuterHalfX, y: courtyardStepInnerHalfY },
|
|
1336
|
+
{ x: courtyardStepOuterHalfX, y: -courtyardStepInnerHalfY },
|
|
1337
|
+
{ x: courtyardStepInnerHalfX, y: -courtyardStepInnerHalfY },
|
|
1338
|
+
{ x: courtyardStepInnerHalfX, y: -courtyardStepOuterHalfY },
|
|
1339
|
+
{ x: -courtyardStepInnerHalfX, y: -courtyardStepOuterHalfY },
|
|
1340
|
+
{ x: -courtyardStepInnerHalfX, y: -courtyardStepInnerHalfY },
|
|
1341
|
+
{ x: -courtyardStepOuterHalfX, y: -courtyardStepInnerHalfY }
|
|
1342
|
+
]
|
|
1332
1343
|
};
|
|
1333
1344
|
return [
|
|
1334
1345
|
...pads,
|
|
@@ -2018,6 +2029,20 @@ var tssop = (raw_params) => {
|
|
|
2018
2029
|
// src/fn/sot363.ts
|
|
2019
2030
|
import { z as z18 } from "zod";
|
|
2020
2031
|
import { length as length13 } from "circuit-json";
|
|
2032
|
+
var sot363CourtyardOutline = [
|
|
2033
|
+
{ x: -1.45, y: 0.93 },
|
|
2034
|
+
{ x: -0.73, y: 0.93 },
|
|
2035
|
+
{ x: -0.73, y: 1.1 },
|
|
2036
|
+
{ x: 0.73, y: 1.1 },
|
|
2037
|
+
{ x: 0.73, y: 0.93 },
|
|
2038
|
+
{ x: 1.45, y: 0.93 },
|
|
2039
|
+
{ x: 1.45, y: -0.93 },
|
|
2040
|
+
{ x: 0.73, y: -0.93 },
|
|
2041
|
+
{ x: 0.73, y: -1.1 },
|
|
2042
|
+
{ x: -0.73, y: -1.1 },
|
|
2043
|
+
{ x: -0.73, y: -0.93 },
|
|
2044
|
+
{ x: -1.45, y: -0.93 }
|
|
2045
|
+
];
|
|
2021
2046
|
var sot363_def = base_def.extend({
|
|
2022
2047
|
fn: z18.string(),
|
|
2023
2048
|
num_pins: z18.literal(6).default(6),
|
|
@@ -2077,18 +2102,11 @@ var sot363 = (raw_params) => {
|
|
|
2077
2102
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
2078
2103
|
};
|
|
2079
2104
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
2080
|
-
const courtyardPadding = 0.25;
|
|
2081
|
-
const crtMinX = -(0.84 + pl / 2) - courtyardPadding;
|
|
2082
|
-
const crtMaxX = 0.84 + pl / 2 + courtyardPadding;
|
|
2083
|
-
const crtMinY = -(h / 2 + 0.1) - courtyardPadding;
|
|
2084
|
-
const crtMaxY = h / 2 + 0.1 + courtyardPadding;
|
|
2085
2105
|
const courtyard = {
|
|
2086
|
-
type: "
|
|
2087
|
-
|
|
2106
|
+
type: "pcb_courtyard_outline",
|
|
2107
|
+
pcb_courtyard_outline_id: "",
|
|
2088
2108
|
pcb_component_id: "",
|
|
2089
|
-
|
|
2090
|
-
width: crtMaxX - crtMinX,
|
|
2091
|
-
height: crtMaxY - crtMinY,
|
|
2109
|
+
outline: sot363CourtyardOutline,
|
|
2092
2110
|
layer: "top"
|
|
2093
2111
|
};
|
|
2094
2112
|
return {
|
|
@@ -2114,6 +2132,12 @@ var getSot363PadCoord = (pn, w, p, pl) => {
|
|
|
2114
2132
|
// src/fn/sot886.ts
|
|
2115
2133
|
import { z as z19 } from "zod";
|
|
2116
2134
|
import { length as length14 } from "circuit-json";
|
|
2135
|
+
var sot886CourtyardOutline = [
|
|
2136
|
+
{ x: -0.75, y: 1 },
|
|
2137
|
+
{ x: -0.75, y: -1 },
|
|
2138
|
+
{ x: 0.75, y: -1 },
|
|
2139
|
+
{ x: 0.75, y: 1 }
|
|
2140
|
+
];
|
|
2117
2141
|
var sot886_def = base_def.extend({
|
|
2118
2142
|
fn: z19.string(),
|
|
2119
2143
|
num_pins: z19.literal(6).default(6),
|
|
@@ -2173,18 +2197,11 @@ var sot886 = (raw_params) => {
|
|
|
2173
2197
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
2174
2198
|
};
|
|
2175
2199
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
2176
|
-
const courtyardPadding = 0.25;
|
|
2177
|
-
const crtMinX = -w / 2 - courtyardPadding;
|
|
2178
|
-
const crtMaxX = w / 2 + courtyardPadding;
|
|
2179
|
-
const crtMinY = -h / 2 - courtyardPadding;
|
|
2180
|
-
const crtMaxY = h / 2 + courtyardPadding;
|
|
2181
2200
|
const courtyard = {
|
|
2182
|
-
type: "
|
|
2183
|
-
|
|
2201
|
+
type: "pcb_courtyard_outline",
|
|
2202
|
+
pcb_courtyard_outline_id: "",
|
|
2184
2203
|
pcb_component_id: "",
|
|
2185
|
-
|
|
2186
|
-
width: crtMaxX - crtMinX,
|
|
2187
|
-
height: crtMaxY - crtMinY,
|
|
2204
|
+
outline: sot886CourtyardOutline,
|
|
2188
2205
|
layer: "top"
|
|
2189
2206
|
};
|
|
2190
2207
|
return {
|
|
@@ -2209,6 +2226,42 @@ var getSot886PadCoord = (pn, w, p, pl) => {
|
|
|
2209
2226
|
|
|
2210
2227
|
// src/fn/sot23.ts
|
|
2211
2228
|
import { z as z20 } from "zod";
|
|
2229
|
+
var sot23_3CourtyardOutline = [
|
|
2230
|
+
{ x: -2.05, y: 1.5 },
|
|
2231
|
+
{ x: -1.05, y: 1.5 },
|
|
2232
|
+
{ x: -1.05, y: 1.7 },
|
|
2233
|
+
{ x: 1.05, y: 1.7 },
|
|
2234
|
+
{ x: 1.05, y: 0.55 },
|
|
2235
|
+
{ x: 2.05, y: 0.55 },
|
|
2236
|
+
{ x: 2.05, y: -0.55 },
|
|
2237
|
+
{ x: 1.05, y: -0.55 },
|
|
2238
|
+
{ x: 1.05, y: -1.7 },
|
|
2239
|
+
{ x: -1.05, y: -1.7 },
|
|
2240
|
+
{ x: -1.05, y: -1.5 },
|
|
2241
|
+
{ x: -2.05, y: -1.5 },
|
|
2242
|
+
{ x: -2.05, y: -0.39 },
|
|
2243
|
+
{ x: -1.05, y: -0.39 },
|
|
2244
|
+
{ x: -1.05, y: 0.39 },
|
|
2245
|
+
{ x: -2.05, y: 0.39 }
|
|
2246
|
+
];
|
|
2247
|
+
var sot23_5CourtyardOutline = [
|
|
2248
|
+
{ x: -2.05, y: 1.5 },
|
|
2249
|
+
{ x: -1.05, y: 1.5 },
|
|
2250
|
+
{ x: -1.05, y: 1.7 },
|
|
2251
|
+
{ x: 1.05, y: 1.7 },
|
|
2252
|
+
{ x: 1.05, y: 1.5 },
|
|
2253
|
+
{ x: 2.05, y: 1.5 },
|
|
2254
|
+
{ x: 2.05, y: 0.39 },
|
|
2255
|
+
{ x: 1.05, y: 0.39 },
|
|
2256
|
+
{ x: 1.05, y: -0.39 },
|
|
2257
|
+
{ x: 2.05, y: -0.39 },
|
|
2258
|
+
{ x: 2.05, y: -1.5 },
|
|
2259
|
+
{ x: 1.05, y: -1.5 },
|
|
2260
|
+
{ x: 1.05, y: -1.7 },
|
|
2261
|
+
{ x: -1.05, y: -1.7 },
|
|
2262
|
+
{ x: -1.05, y: -1.5 },
|
|
2263
|
+
{ x: -2.05, y: -1.5 }
|
|
2264
|
+
];
|
|
2212
2265
|
var sot23_def = base_def.extend({
|
|
2213
2266
|
fn: z20.string(),
|
|
2214
2267
|
num_pins: z20.number().default(3),
|
|
@@ -2291,21 +2344,11 @@ var sot23_3 = (parameters) => {
|
|
|
2291
2344
|
Number.parseInt(parameters.h),
|
|
2292
2345
|
0.3
|
|
2293
2346
|
);
|
|
2294
|
-
const courtyardPadding = 0.25;
|
|
2295
|
-
const pl_val = Number.parseFloat(parameters.pl);
|
|
2296
|
-
const pw_val = Number.parseFloat(parameters.pw);
|
|
2297
|
-
const p_val = Number.parseFloat(parameters.p);
|
|
2298
|
-
const crtMinX = -1.1375 - pl_val / 2 - courtyardPadding;
|
|
2299
|
-
const crtMaxX = 1.1375 + pl_val / 2 + courtyardPadding;
|
|
2300
|
-
const crtMinY = -(p_val + pw_val / 2) - courtyardPadding;
|
|
2301
|
-
const crtMaxY = p_val + pw_val / 2 + courtyardPadding;
|
|
2302
2347
|
const courtyard = {
|
|
2303
|
-
type: "
|
|
2304
|
-
|
|
2348
|
+
type: "pcb_courtyard_outline",
|
|
2349
|
+
pcb_courtyard_outline_id: "",
|
|
2305
2350
|
pcb_component_id: "",
|
|
2306
|
-
|
|
2307
|
-
width: crtMaxX - crtMinX,
|
|
2308
|
-
height: crtMaxY - crtMinY,
|
|
2351
|
+
outline: sot23_3CourtyardOutline,
|
|
2309
2352
|
layer: "top"
|
|
2310
2353
|
};
|
|
2311
2354
|
return [...pads, silkscreenRefText, courtyard];
|
|
@@ -2409,24 +2452,11 @@ var sot23_5 = (parameters) => {
|
|
|
2409
2452
|
],
|
|
2410
2453
|
stroke_width: 0.05
|
|
2411
2454
|
};
|
|
2412
|
-
const courtyardPadding = 0.25;
|
|
2413
|
-
const pl_val = Number.parseFloat(parameters.pl);
|
|
2414
|
-
const pw_val = Number.parseFloat(parameters.pw);
|
|
2415
|
-
const p_val = Number.parseFloat(parameters.p);
|
|
2416
|
-
const silkY = height / 2 + p_val / 1.3;
|
|
2417
|
-
const padYExtent = p_val + pw_val / 2;
|
|
2418
|
-
const padXExtent = 1.1375 + pl_val / 2;
|
|
2419
|
-
const crtMinX = -padXExtent - courtyardPadding;
|
|
2420
|
-
const crtMaxX = padXExtent + courtyardPadding;
|
|
2421
|
-
const crtMinY = -Math.max(silkY, padYExtent) - courtyardPadding;
|
|
2422
|
-
const crtMaxY = Math.max(silkY, padYExtent) + courtyardPadding;
|
|
2423
2455
|
const courtyard = {
|
|
2424
|
-
type: "
|
|
2425
|
-
|
|
2456
|
+
type: "pcb_courtyard_outline",
|
|
2457
|
+
pcb_courtyard_outline_id: "",
|
|
2426
2458
|
pcb_component_id: "",
|
|
2427
|
-
|
|
2428
|
-
width: crtMaxX - crtMinX,
|
|
2429
|
-
height: crtMaxY - crtMinY,
|
|
2459
|
+
outline: sot23_5CourtyardOutline,
|
|
2430
2460
|
layer: "top"
|
|
2431
2461
|
};
|
|
2432
2462
|
return [
|
|
@@ -2534,18 +2564,17 @@ var dfn = (raw_params) => {
|
|
|
2534
2564
|
sh / 2 + 0.4,
|
|
2535
2565
|
sh / 12
|
|
2536
2566
|
);
|
|
2537
|
-
const
|
|
2538
|
-
const
|
|
2539
|
-
const
|
|
2540
|
-
const
|
|
2541
|
-
const crtMaxY = sh / 2 + courtyardPadding;
|
|
2567
|
+
const roundUpToCourtyardGrid = (value) => Math.ceil(value / 0.05) * 0.05;
|
|
2568
|
+
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
2569
|
+
const courtyardHalfWidthMm = roundUpToCourtyardGrid(parameters.w / 2 + 0.25);
|
|
2570
|
+
const courtyardHalfHeightMm = roundUpToCourtyardGrid(pinRowSpanY / 2 + 0.45);
|
|
2542
2571
|
const courtyard = {
|
|
2543
2572
|
type: "pcb_courtyard_rect",
|
|
2544
2573
|
pcb_courtyard_rect_id: "",
|
|
2545
2574
|
pcb_component_id: "",
|
|
2546
|
-
center: { x:
|
|
2547
|
-
width:
|
|
2548
|
-
height:
|
|
2575
|
+
center: { x: 0, y: 0 },
|
|
2576
|
+
width: courtyardHalfWidthMm * 2,
|
|
2577
|
+
height: courtyardHalfHeightMm * 2,
|
|
2549
2578
|
layer: "top"
|
|
2550
2579
|
};
|
|
2551
2580
|
return {
|
|
@@ -2940,6 +2969,20 @@ var pinrow = (raw_params) => {
|
|
|
2940
2969
|
// src/fn/sot563.ts
|
|
2941
2970
|
import { z as z24 } from "zod";
|
|
2942
2971
|
import { length as length16 } from "circuit-json";
|
|
2972
|
+
var sot563CourtyardOutline = [
|
|
2973
|
+
{ x: -1.2, y: 0.83 },
|
|
2974
|
+
{ x: -0.75, y: 0.83 },
|
|
2975
|
+
{ x: -0.75, y: 0.95 },
|
|
2976
|
+
{ x: 0.75, y: 0.95 },
|
|
2977
|
+
{ x: 0.75, y: 0.83 },
|
|
2978
|
+
{ x: 1.2, y: 0.83 },
|
|
2979
|
+
{ x: 1.2, y: -0.83 },
|
|
2980
|
+
{ x: 0.75, y: -0.83 },
|
|
2981
|
+
{ x: 0.75, y: -0.95 },
|
|
2982
|
+
{ x: -0.75, y: -0.95 },
|
|
2983
|
+
{ x: -0.75, y: -0.83 },
|
|
2984
|
+
{ x: -1.2, y: -0.83 }
|
|
2985
|
+
];
|
|
2943
2986
|
var sot563_def = base_def.extend({
|
|
2944
2987
|
fn: z24.string(),
|
|
2945
2988
|
num_pins: z24.literal(6).default(6),
|
|
@@ -2999,18 +3042,11 @@ var sot563 = (raw_params) => {
|
|
|
2999
3042
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
3000
3043
|
};
|
|
3001
3044
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
3002
|
-
const courtyardPadding = 0.25;
|
|
3003
|
-
const crtMinX = -w / 2 - courtyardPadding;
|
|
3004
|
-
const crtMaxX = w / 2 + courtyardPadding;
|
|
3005
|
-
const crtMinY = -h / 2 - courtyardPadding;
|
|
3006
|
-
const crtMaxY = h / 2 + courtyardPadding;
|
|
3007
3045
|
const courtyard = {
|
|
3008
|
-
type: "
|
|
3009
|
-
|
|
3046
|
+
type: "pcb_courtyard_outline",
|
|
3047
|
+
pcb_courtyard_outline_id: "",
|
|
3010
3048
|
pcb_component_id: "",
|
|
3011
|
-
|
|
3012
|
-
width: crtMaxX - crtMinX,
|
|
3013
|
-
height: crtMaxY - crtMinY,
|
|
3049
|
+
outline: sot563CourtyardOutline,
|
|
3014
3050
|
layer: "top"
|
|
3015
3051
|
};
|
|
3016
3052
|
return {
|
|
@@ -3083,22 +3119,18 @@ var sot723 = (raw_params) => {
|
|
|
3083
3119
|
length17.parse(parameters.h),
|
|
3084
3120
|
0.2
|
|
3085
3121
|
);
|
|
3086
|
-
const
|
|
3087
|
-
const
|
|
3088
|
-
const pw_val = length17.parse(parameters.pw);
|
|
3089
|
-
const h_val = length17.parse(parameters.h);
|
|
3090
|
-
const courtyardPadding = 0.25;
|
|
3091
|
-
const crtMinX = -(p_val + pl_val / 2 + courtyardPadding);
|
|
3092
|
-
const crtMaxX = p_val + pl_val / 2 + courtyardPadding;
|
|
3093
|
-
const crtMinY = -(Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding);
|
|
3094
|
-
const crtMaxY = Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding;
|
|
3122
|
+
const courtyardWidthMm = 1.8;
|
|
3123
|
+
const courtyardHeightMm = 1.8;
|
|
3095
3124
|
const courtyard = {
|
|
3096
|
-
type: "
|
|
3097
|
-
|
|
3125
|
+
type: "pcb_courtyard_outline",
|
|
3126
|
+
pcb_courtyard_outline_id: "",
|
|
3098
3127
|
pcb_component_id: "",
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3128
|
+
outline: [
|
|
3129
|
+
{ x: -courtyardWidthMm / 2, y: courtyardHeightMm / 2 },
|
|
3130
|
+
{ x: courtyardWidthMm / 2, y: courtyardHeightMm / 2 },
|
|
3131
|
+
{ x: courtyardWidthMm / 2, y: -courtyardHeightMm / 2 },
|
|
3132
|
+
{ x: -courtyardWidthMm / 2, y: -courtyardHeightMm / 2 }
|
|
3133
|
+
],
|
|
3102
3134
|
layer: "top"
|
|
3103
3135
|
};
|
|
3104
3136
|
return {
|
|
@@ -3392,18 +3424,13 @@ var radial = (raw_params) => {
|
|
|
3392
3424
|
if (hasPolarity) {
|
|
3393
3425
|
circuitJson.push(plusHoriz, plusVert);
|
|
3394
3426
|
}
|
|
3395
|
-
const
|
|
3396
|
-
const crtMinX = hasPolarity ? plusX - plusSize - courtyardPadding : -(bodyR + courtyardPadding);
|
|
3397
|
-
const crtMaxX = bodyR + courtyardPadding;
|
|
3398
|
-
const crtMinY = -(bodyR + courtyardPadding);
|
|
3399
|
-
const crtMaxY = bodyR + courtyardPadding;
|
|
3427
|
+
const courtyardRadiusMm = p + 0.25;
|
|
3400
3428
|
const courtyard = {
|
|
3401
|
-
type: "
|
|
3402
|
-
|
|
3429
|
+
type: "pcb_courtyard_circle",
|
|
3430
|
+
pcb_courtyard_circle_id: "",
|
|
3403
3431
|
pcb_component_id: "",
|
|
3404
|
-
center: { x:
|
|
3405
|
-
|
|
3406
|
-
height: crtMaxY - crtMinY,
|
|
3432
|
+
center: { x: 0, y: 0 },
|
|
3433
|
+
radius: courtyardRadiusMm,
|
|
3407
3434
|
layer: "top"
|
|
3408
3435
|
};
|
|
3409
3436
|
circuitJson.push(courtyard);
|
|
@@ -4560,6 +4587,12 @@ var platedHolePill = (pn, x, y, holeDiameter, outerWidth, outerHeight) => {
|
|
|
4560
4587
|
};
|
|
4561
4588
|
|
|
4562
4589
|
// src/fn/to92.ts
|
|
4590
|
+
var to92CourtyardOutline = [
|
|
4591
|
+
{ x: -2.73, y: 3.71 },
|
|
4592
|
+
{ x: -2.73, y: -1.03 },
|
|
4593
|
+
{ x: 2.73, y: -1.03 },
|
|
4594
|
+
{ x: 2.73, y: 3.71 }
|
|
4595
|
+
];
|
|
4563
4596
|
var to92_def = base_def.extend({
|
|
4564
4597
|
fn: z35.string(),
|
|
4565
4598
|
num_pins: z35.union([z35.literal(3), z35.literal(2)]).default(3),
|
|
@@ -4668,18 +4701,11 @@ var to92 = (raw_params) => {
|
|
|
4668
4701
|
pcb_silkscreen_path_id: ""
|
|
4669
4702
|
};
|
|
4670
4703
|
const silkscreenRefText = silkscreenRef(0, holeY + 1, 0.5);
|
|
4671
|
-
const courtyardPadding = 0.25;
|
|
4672
|
-
const crtMinX = -(radius + courtyardPadding);
|
|
4673
|
-
const crtMaxX = radius + courtyardPadding;
|
|
4674
|
-
const crtMaxY = holeY + radius + courtyardPadding;
|
|
4675
|
-
const crtMinY = -courtyardPadding;
|
|
4676
4704
|
const courtyard = {
|
|
4677
|
-
type: "
|
|
4678
|
-
|
|
4705
|
+
type: "pcb_courtyard_outline",
|
|
4706
|
+
pcb_courtyard_outline_id: "",
|
|
4679
4707
|
pcb_component_id: "",
|
|
4680
|
-
|
|
4681
|
-
width: crtMaxX - crtMinX,
|
|
4682
|
-
height: crtMaxY - crtMinY,
|
|
4708
|
+
outline: to92CourtyardOutline,
|
|
4683
4709
|
layer: "top"
|
|
4684
4710
|
};
|
|
4685
4711
|
return {
|
|
@@ -5762,6 +5788,18 @@ var sodWithoutParsing11 = (parameters) => {
|
|
|
5762
5788
|
|
|
5763
5789
|
// src/fn/sot89.ts
|
|
5764
5790
|
import { z as z47 } from "zod";
|
|
5791
|
+
var sot89_3CourtyardOutline = [
|
|
5792
|
+
{ x: -3.0875, y: -2.5 },
|
|
5793
|
+
{ x: -3.0875, y: 2.5 },
|
|
5794
|
+
{ x: 2.0125, y: 2.5 },
|
|
5795
|
+
{ x: 2.0125, y: -2.5 }
|
|
5796
|
+
];
|
|
5797
|
+
var sot89_5CourtyardOutline = [
|
|
5798
|
+
{ x: -2.85, y: -2.5 },
|
|
5799
|
+
{ x: -2.85, y: 2.5 },
|
|
5800
|
+
{ x: 2.85, y: 2.5 },
|
|
5801
|
+
{ x: 2.85, y: -2.5 }
|
|
5802
|
+
];
|
|
5765
5803
|
var sot89_def = base_def.extend({
|
|
5766
5804
|
fn: z47.string(),
|
|
5767
5805
|
num_pins: z47.union([z47.literal(3), z47.literal(5)]).default(3),
|
|
@@ -5812,19 +5850,11 @@ var sot89_3 = (parameters) => {
|
|
|
5812
5850
|
type: "pcb_silkscreen_path",
|
|
5813
5851
|
stroke_width: 0.1
|
|
5814
5852
|
};
|
|
5815
|
-
const courtyardPadding = 0.25;
|
|
5816
|
-
const padOuterX = length63 / 2 + (padHeight + centerExtra) / 2;
|
|
5817
|
-
const crtMinX = -(padOuterX + courtyardPadding);
|
|
5818
|
-
const crtMaxX = length63 / 2 - 1 + courtyardPadding;
|
|
5819
|
-
const crtMinY = -(height + courtyardPadding);
|
|
5820
|
-
const crtMaxY = height + courtyardPadding;
|
|
5821
5853
|
const courtyard = {
|
|
5822
|
-
type: "
|
|
5823
|
-
|
|
5854
|
+
type: "pcb_courtyard_outline",
|
|
5855
|
+
pcb_courtyard_outline_id: "",
|
|
5824
5856
|
pcb_component_id: "",
|
|
5825
|
-
|
|
5826
|
-
width: crtMaxX - crtMinX,
|
|
5827
|
-
height: crtMaxY - crtMinY,
|
|
5857
|
+
outline: sot89_3CourtyardOutline,
|
|
5828
5858
|
layer: "top"
|
|
5829
5859
|
};
|
|
5830
5860
|
return [
|
|
@@ -5876,18 +5906,11 @@ var sot89_5 = (parameters) => {
|
|
|
5876
5906
|
type: "pcb_silkscreen_path",
|
|
5877
5907
|
stroke_width: 0.1
|
|
5878
5908
|
};
|
|
5879
|
-
const courtyardPadding = 0.25;
|
|
5880
|
-
const crtMinX = -(2.6 + courtyardPadding);
|
|
5881
|
-
const crtMaxX = 2.6 + courtyardPadding;
|
|
5882
|
-
const crtMinY = -(height + courtyardPadding);
|
|
5883
|
-
const crtMaxY = height + courtyardPadding;
|
|
5884
5909
|
const courtyard = {
|
|
5885
|
-
type: "
|
|
5886
|
-
|
|
5910
|
+
type: "pcb_courtyard_outline",
|
|
5911
|
+
pcb_courtyard_outline_id: "",
|
|
5887
5912
|
pcb_component_id: "",
|
|
5888
|
-
|
|
5889
|
-
width: crtMaxX - crtMinX,
|
|
5890
|
-
height: crtMaxY - crtMinY,
|
|
5913
|
+
outline: sot89_5CourtyardOutline,
|
|
5891
5914
|
layer: "top"
|
|
5892
5915
|
};
|
|
5893
5916
|
return [
|
|
@@ -6132,23 +6155,15 @@ var minimelf = (raw_params) => {
|
|
|
6132
6155
|
stroke_width: 0.1,
|
|
6133
6156
|
pcb_silkscreen_path_id: ""
|
|
6134
6157
|
};
|
|
6135
|
-
const
|
|
6136
|
-
const
|
|
6137
|
-
const pw_v = length40.parse(parameters.pw);
|
|
6138
|
-
const h_v = length40.parse(parameters.h);
|
|
6139
|
-
const w_v = length40.parse(parameters.w);
|
|
6140
|
-
const courtyardPadding = 0.25;
|
|
6141
|
-
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6142
|
-
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6143
|
-
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6144
|
-
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6158
|
+
const courtyardWidthMm = 5.3;
|
|
6159
|
+
const courtyardHeightMm = 2.2;
|
|
6145
6160
|
const courtyard = {
|
|
6146
6161
|
type: "pcb_courtyard_rect",
|
|
6147
6162
|
pcb_courtyard_rect_id: "",
|
|
6148
6163
|
pcb_component_id: "",
|
|
6149
|
-
center: { x:
|
|
6150
|
-
width:
|
|
6151
|
-
height:
|
|
6164
|
+
center: { x: 0, y: 0 },
|
|
6165
|
+
width: courtyardWidthMm,
|
|
6166
|
+
height: courtyardHeightMm,
|
|
6152
6167
|
layer: "top"
|
|
6153
6168
|
};
|
|
6154
6169
|
return {
|
|
@@ -6320,23 +6335,15 @@ var melf = (raw_params) => {
|
|
|
6320
6335
|
stroke_width: 0.1,
|
|
6321
6336
|
pcb_silkscreen_path_id: ""
|
|
6322
6337
|
};
|
|
6323
|
-
const
|
|
6324
|
-
const
|
|
6325
|
-
const pw_v = length42.parse(parameters.pw);
|
|
6326
|
-
const h_v = length42.parse(parameters.h);
|
|
6327
|
-
const w_v = length42.parse(parameters.w);
|
|
6328
|
-
const courtyardPadding = 0.25;
|
|
6329
|
-
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6330
|
-
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6331
|
-
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6332
|
-
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6338
|
+
const courtyardWidthMm = 6.8;
|
|
6339
|
+
const courtyardHeightMm = 3.2;
|
|
6333
6340
|
const courtyard = {
|
|
6334
6341
|
type: "pcb_courtyard_rect",
|
|
6335
6342
|
pcb_courtyard_rect_id: "",
|
|
6336
6343
|
pcb_component_id: "",
|
|
6337
|
-
center: { x:
|
|
6338
|
-
width:
|
|
6339
|
-
height:
|
|
6344
|
+
center: { x: 0, y: 0 },
|
|
6345
|
+
width: courtyardWidthMm,
|
|
6346
|
+
height: courtyardHeightMm,
|
|
6340
6347
|
layer: "top"
|
|
6341
6348
|
};
|
|
6342
6349
|
return {
|
|
@@ -6420,23 +6427,15 @@ var micromelf = (raw_params) => {
|
|
|
6420
6427
|
stroke_width: 0.1,
|
|
6421
6428
|
pcb_silkscreen_path_id: ""
|
|
6422
6429
|
};
|
|
6423
|
-
const
|
|
6424
|
-
const
|
|
6425
|
-
const pw_v = length43.parse(parameters.pw);
|
|
6426
|
-
const h_v = length43.parse(parameters.h);
|
|
6427
|
-
const w_v = length43.parse(parameters.w);
|
|
6428
|
-
const courtyardPadding = 0.25;
|
|
6429
|
-
const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6430
|
-
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6431
|
-
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6432
|
-
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6430
|
+
const courtyardWidthMm = 2.9;
|
|
6431
|
+
const courtyardHeightMm = 1.7;
|
|
6433
6432
|
const courtyard = {
|
|
6434
6433
|
type: "pcb_courtyard_rect",
|
|
6435
6434
|
pcb_courtyard_rect_id: "",
|
|
6436
6435
|
pcb_component_id: "",
|
|
6437
|
-
center: { x:
|
|
6438
|
-
width:
|
|
6439
|
-
height:
|
|
6436
|
+
center: { x: 0, y: 0 },
|
|
6437
|
+
width: courtyardWidthMm,
|
|
6438
|
+
height: courtyardHeightMm,
|
|
6440
6439
|
layer: "top"
|
|
6441
6440
|
};
|
|
6442
6441
|
return {
|
|
@@ -7969,20 +7968,33 @@ var msop = (raw_params) => {
|
|
|
7969
7968
|
silkscreenBoxHeight / 2 + 0.5,
|
|
7970
7969
|
0.3
|
|
7971
7970
|
);
|
|
7972
|
-
const
|
|
7973
|
-
const
|
|
7974
|
-
const
|
|
7975
|
-
const
|
|
7976
|
-
|
|
7977
|
-
|
|
7971
|
+
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
7972
|
+
const pinRowSpanY = (parameters.num_pins / 2 - 1) * p + pw;
|
|
7973
|
+
const courtyardStepInnerHalfX = roundToCourtyardGrid(w / 2 + 0.25);
|
|
7974
|
+
const courtyardStepOuterHalfX = roundToCourtyardGrid(
|
|
7975
|
+
courtyardStepInnerHalfX + 1.43
|
|
7976
|
+
);
|
|
7977
|
+
const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.255);
|
|
7978
|
+
const courtyardStepOuterHalfY = roundToCourtyardGrid(h / 2 + 0.25);
|
|
7978
7979
|
const courtyard = {
|
|
7979
|
-
type: "
|
|
7980
|
-
|
|
7980
|
+
type: "pcb_courtyard_outline",
|
|
7981
|
+
pcb_courtyard_outline_id: "",
|
|
7981
7982
|
pcb_component_id: "",
|
|
7982
|
-
|
|
7983
|
-
|
|
7984
|
-
|
|
7985
|
-
|
|
7983
|
+
layer: "top",
|
|
7984
|
+
outline: [
|
|
7985
|
+
{ x: -courtyardStepOuterHalfX, y: courtyardStepInnerHalfY },
|
|
7986
|
+
{ x: -courtyardStepInnerHalfX, y: courtyardStepInnerHalfY },
|
|
7987
|
+
{ x: -courtyardStepInnerHalfX, y: courtyardStepOuterHalfY },
|
|
7988
|
+
{ x: courtyardStepInnerHalfX, y: courtyardStepOuterHalfY },
|
|
7989
|
+
{ x: courtyardStepInnerHalfX, y: courtyardStepInnerHalfY },
|
|
7990
|
+
{ x: courtyardStepOuterHalfX, y: courtyardStepInnerHalfY },
|
|
7991
|
+
{ x: courtyardStepOuterHalfX, y: -courtyardStepInnerHalfY },
|
|
7992
|
+
{ x: courtyardStepInnerHalfX, y: -courtyardStepInnerHalfY },
|
|
7993
|
+
{ x: courtyardStepInnerHalfX, y: -courtyardStepOuterHalfY },
|
|
7994
|
+
{ x: -courtyardStepInnerHalfX, y: -courtyardStepOuterHalfY },
|
|
7995
|
+
{ x: -courtyardStepInnerHalfX, y: -courtyardStepInnerHalfY },
|
|
7996
|
+
{ x: -courtyardStepOuterHalfX, y: -courtyardStepInnerHalfY }
|
|
7997
|
+
]
|
|
7986
7998
|
};
|
|
7987
7999
|
return {
|
|
7988
8000
|
circuitJson: [
|
|
@@ -8745,6 +8757,12 @@ var sot457 = (rawParams) => {
|
|
|
8745
8757
|
// src/fn/sot963.ts
|
|
8746
8758
|
import { z as z70 } from "zod";
|
|
8747
8759
|
import { length as length57 } from "circuit-json";
|
|
8760
|
+
var sot963CourtyardOutline = [
|
|
8761
|
+
{ x: -0.8, y: 0.75 },
|
|
8762
|
+
{ x: 0.8, y: 0.75 },
|
|
8763
|
+
{ x: 0.8, y: -0.75 },
|
|
8764
|
+
{ x: -0.8, y: -0.75 }
|
|
8765
|
+
];
|
|
8748
8766
|
var sot963_def = base_def.extend({
|
|
8749
8767
|
fn: z70.string(),
|
|
8750
8768
|
num_pins: z70.literal(6).default(6),
|
|
@@ -8804,18 +8822,11 @@ var sot963 = (raw_params) => {
|
|
|
8804
8822
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
8805
8823
|
};
|
|
8806
8824
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
8807
|
-
const courtyardPadding = 0.25;
|
|
8808
|
-
const crtMinX = -(w / 2 + courtyardPadding);
|
|
8809
|
-
const crtMaxX = w / 2 + courtyardPadding;
|
|
8810
|
-
const crtMinY = -(Math.max(h / 2, p + pw / 2) + courtyardPadding);
|
|
8811
|
-
const crtMaxY = Math.max(h / 2, p + pw / 2) + courtyardPadding;
|
|
8812
8825
|
const courtyard = {
|
|
8813
|
-
type: "
|
|
8814
|
-
|
|
8826
|
+
type: "pcb_courtyard_outline",
|
|
8827
|
+
pcb_courtyard_outline_id: "",
|
|
8815
8828
|
pcb_component_id: "",
|
|
8816
|
-
|
|
8817
|
-
width: crtMaxX - crtMinX,
|
|
8818
|
-
height: crtMaxY - crtMinY,
|
|
8829
|
+
outline: sot963CourtyardOutline,
|
|
8819
8830
|
layer: "top"
|
|
8820
8831
|
};
|
|
8821
8832
|
return {
|
|
@@ -9159,6 +9170,24 @@ var smbfWithoutParsing = (parameters) => {
|
|
|
9159
9170
|
|
|
9160
9171
|
// src/fn/sot323.ts
|
|
9161
9172
|
import { z as z74 } from "zod";
|
|
9173
|
+
var sot323CourtyardOutline = [
|
|
9174
|
+
{ x: -1.45, y: 0.98 },
|
|
9175
|
+
{ x: -0.73, y: 0.98 },
|
|
9176
|
+
{ x: -0.73, y: 1.1 },
|
|
9177
|
+
{ x: 0.73, y: 1.1 },
|
|
9178
|
+
{ x: 0.73, y: 0.33 },
|
|
9179
|
+
{ x: 1.45, y: 0.33 },
|
|
9180
|
+
{ x: 1.45, y: -0.33 },
|
|
9181
|
+
{ x: 0.73, y: -0.33 },
|
|
9182
|
+
{ x: 0.73, y: -1.1 },
|
|
9183
|
+
{ x: -0.73, y: -1.1 },
|
|
9184
|
+
{ x: -0.73, y: -0.98 },
|
|
9185
|
+
{ x: -1.45, y: -0.98 },
|
|
9186
|
+
{ x: -1.45, y: -0.32 },
|
|
9187
|
+
{ x: -0.73, y: -0.32 },
|
|
9188
|
+
{ x: -0.73, y: 0.32 },
|
|
9189
|
+
{ x: -1.45, y: 0.32 }
|
|
9190
|
+
];
|
|
9162
9191
|
var sot323_def = base_def.extend({
|
|
9163
9192
|
fn: z74.string(),
|
|
9164
9193
|
num_pins: z74.number().default(3),
|
|
@@ -9246,22 +9275,11 @@ var sot323_3 = (parameters) => {
|
|
|
9246
9275
|
type: "pcb_silkscreen_path",
|
|
9247
9276
|
stroke_width: 0.1
|
|
9248
9277
|
};
|
|
9249
|
-
const p = Number.parseFloat(parameters.p);
|
|
9250
|
-
const pl = Number.parseFloat(parameters.pl);
|
|
9251
|
-
const pw = Number.parseFloat(parameters.pw);
|
|
9252
|
-
const h = Number.parseFloat(parameters.h);
|
|
9253
|
-
const courtyardPadding = 0.25;
|
|
9254
|
-
const crtMinX = -(p + pl / 2 + courtyardPadding);
|
|
9255
|
-
const crtMaxX = p + pl / 2 + courtyardPadding;
|
|
9256
|
-
const crtMinY = -(Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding);
|
|
9257
|
-
const crtMaxY = Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding;
|
|
9258
9278
|
const courtyard = {
|
|
9259
|
-
type: "
|
|
9260
|
-
|
|
9279
|
+
type: "pcb_courtyard_outline",
|
|
9280
|
+
pcb_courtyard_outline_id: "",
|
|
9261
9281
|
pcb_component_id: "",
|
|
9262
|
-
|
|
9263
|
-
width: crtMaxX - crtMinX,
|
|
9264
|
-
height: crtMaxY - crtMinY,
|
|
9282
|
+
outline: sot323CourtyardOutline,
|
|
9265
9283
|
layer: "top"
|
|
9266
9284
|
};
|
|
9267
9285
|
return [
|
|
@@ -9559,6 +9577,20 @@ var sotWithoutParsing = (parameters) => {
|
|
|
9559
9577
|
|
|
9560
9578
|
// src/fn/sot343.ts
|
|
9561
9579
|
import { z as z78 } from "zod";
|
|
9580
|
+
var sot343CourtyardOutline = [
|
|
9581
|
+
{ x: -1.703, y: 0.98 },
|
|
9582
|
+
{ x: -0.983, y: 0.98 },
|
|
9583
|
+
{ x: -0.983, y: 1.1 },
|
|
9584
|
+
{ x: 0.477, y: 1.1 },
|
|
9585
|
+
{ x: 0.477, y: 0.98 },
|
|
9586
|
+
{ x: 1.197, y: 0.98 },
|
|
9587
|
+
{ x: 1.197, y: -0.98 },
|
|
9588
|
+
{ x: 0.477, y: -0.98 },
|
|
9589
|
+
{ x: 0.477, y: -1.1 },
|
|
9590
|
+
{ x: -0.983, y: -1.1 },
|
|
9591
|
+
{ x: -0.983, y: -0.98 },
|
|
9592
|
+
{ x: -1.703, y: -0.98 }
|
|
9593
|
+
];
|
|
9562
9594
|
var sot343_def = base_def.extend({
|
|
9563
9595
|
fn: z78.string(),
|
|
9564
9596
|
num_pins: z78.number().default(4),
|
|
@@ -9653,18 +9685,11 @@ var sot343_4 = (parameters) => {
|
|
|
9653
9685
|
type: "pcb_silkscreen_path",
|
|
9654
9686
|
stroke_width: 0.1
|
|
9655
9687
|
};
|
|
9656
|
-
const courtyardPadding = 0.25;
|
|
9657
|
-
const crtMinX = minX - pl / 2 - courtyardPadding;
|
|
9658
|
-
const crtMaxX = maxX + pl / 2 + courtyardPadding;
|
|
9659
|
-
const crtMinY = -(offsetY + courtyardPadding);
|
|
9660
|
-
const crtMaxY = offsetY + courtyardPadding;
|
|
9661
9688
|
const courtyard = {
|
|
9662
|
-
type: "
|
|
9663
|
-
|
|
9689
|
+
type: "pcb_courtyard_outline",
|
|
9690
|
+
pcb_courtyard_outline_id: "",
|
|
9664
9691
|
pcb_component_id: "",
|
|
9665
|
-
|
|
9666
|
-
width: crtMaxX - crtMinX,
|
|
9667
|
-
height: crtMaxY - crtMinY,
|
|
9692
|
+
outline: sot343CourtyardOutline,
|
|
9668
9693
|
layer: "top"
|
|
9669
9694
|
};
|
|
9670
9695
|
return [
|
|
@@ -10278,6 +10303,18 @@ var mountedpcbmodule = (raw_params) => {
|
|
|
10278
10303
|
|
|
10279
10304
|
// src/fn/to92l.ts
|
|
10280
10305
|
import { z as z81 } from "zod";
|
|
10306
|
+
var to92lCourtyardOutline = [
|
|
10307
|
+
{ x: -1.45, y: 2.75 },
|
|
10308
|
+
{ x: -1.45, y: -1.85 },
|
|
10309
|
+
{ x: 4.05, y: -1.85 },
|
|
10310
|
+
{ x: 4.05, y: 2.75 }
|
|
10311
|
+
];
|
|
10312
|
+
var to92lInlineCourtyardOutline = [
|
|
10313
|
+
{ x: -1.55, y: 2.75 },
|
|
10314
|
+
{ x: -1.55, y: -1.85 },
|
|
10315
|
+
{ x: 3.95, y: -1.85 },
|
|
10316
|
+
{ x: 3.95, y: 2.75 }
|
|
10317
|
+
];
|
|
10281
10318
|
var to92l_def = base_def.extend({
|
|
10282
10319
|
fn: z81.string(),
|
|
10283
10320
|
num_pins: z81.number().default(3),
|
|
@@ -10336,18 +10373,11 @@ var to92l = (raw_params) => {
|
|
|
10336
10373
|
cy + radius + 1,
|
|
10337
10374
|
0.5
|
|
10338
10375
|
);
|
|
10339
|
-
const courtyardPadding = 0.25;
|
|
10340
|
-
const crtMinX = cx - radius - courtyardPadding;
|
|
10341
|
-
const crtMaxX = cx + radius + courtyardPadding;
|
|
10342
|
-
const crtMaxY = cy + radius + courtyardPadding;
|
|
10343
|
-
const crtMinY = y_bottom - courtyardPadding;
|
|
10344
10376
|
const courtyard = {
|
|
10345
|
-
type: "
|
|
10346
|
-
|
|
10377
|
+
type: "pcb_courtyard_outline",
|
|
10378
|
+
pcb_courtyard_outline_id: "",
|
|
10347
10379
|
pcb_component_id: "",
|
|
10348
|
-
|
|
10349
|
-
width: crtMaxX - crtMinX,
|
|
10350
|
-
height: crtMaxY - crtMinY,
|
|
10380
|
+
outline: parameters.inline ? to92lInlineCourtyardOutline : to92lCourtyardOutline,
|
|
10351
10381
|
layer: "top"
|
|
10352
10382
|
};
|
|
10353
10383
|
return {
|