@tscircuit/footprinter 0.0.330 → 0.0.332
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 +1011 -53
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1116,8 +1116,23 @@ var bga = (raw_params) => {
|
|
|
1116
1116
|
route: markerRoute,
|
|
1117
1117
|
stroke_width: 0.05
|
|
1118
1118
|
};
|
|
1119
|
+
const courtyardPadding = 0.25;
|
|
1120
|
+
const courtyard = {
|
|
1121
|
+
type: "pcb_courtyard_rect",
|
|
1122
|
+
pcb_courtyard_rect_id: "",
|
|
1123
|
+
pcb_component_id: "",
|
|
1124
|
+
center: { x: 0, y: 0 },
|
|
1125
|
+
width: 2 * (edgeX + courtyardPadding),
|
|
1126
|
+
height: 2 * (edgeY + courtyardPadding),
|
|
1127
|
+
layer: "top"
|
|
1128
|
+
};
|
|
1119
1129
|
return {
|
|
1120
|
-
circuitJson: [
|
|
1130
|
+
circuitJson: [
|
|
1131
|
+
...pads,
|
|
1132
|
+
silkscreenRefText,
|
|
1133
|
+
pin1Marker,
|
|
1134
|
+
courtyard
|
|
1135
|
+
],
|
|
1121
1136
|
parameters
|
|
1122
1137
|
};
|
|
1123
1138
|
};
|
|
@@ -2479,7 +2494,9 @@ var dfn = (raw_params) => {
|
|
|
2479
2494
|
|
|
2480
2495
|
// src/fn/pinrow.ts
|
|
2481
2496
|
import { z as z23 } from "zod";
|
|
2482
|
-
import {
|
|
2497
|
+
import {
|
|
2498
|
+
length as length15
|
|
2499
|
+
} from "circuit-json";
|
|
2483
2500
|
|
|
2484
2501
|
// src/helpers/silkscreenPin.ts
|
|
2485
2502
|
var silkscreenPin = ({
|
|
@@ -2834,8 +2851,21 @@ var pinrow = (raw_params) => {
|
|
|
2834
2851
|
}
|
|
2835
2852
|
}
|
|
2836
2853
|
const refText = silkscreenRef(0, p, 0.5);
|
|
2854
|
+
const halfSpanX = (numPinsPerRow - 1) / 2 * p;
|
|
2855
|
+
const padHalfX = parameters.smd ? parameters.pw / 2 : od / 2;
|
|
2856
|
+
const padHalfY = parameters.smd ? parameters.pl / 2 : od / 2;
|
|
2857
|
+
const courtyardPadding = 0.25;
|
|
2858
|
+
const courtyard = {
|
|
2859
|
+
type: "pcb_courtyard_rect",
|
|
2860
|
+
pcb_courtyard_rect_id: "",
|
|
2861
|
+
pcb_component_id: "",
|
|
2862
|
+
center: { x: 0, y: -((rows - 1) * p) / 2 },
|
|
2863
|
+
width: 2 * (halfSpanX + padHalfX + courtyardPadding),
|
|
2864
|
+
height: (rows - 1) * p + 2 * (padHalfY + courtyardPadding),
|
|
2865
|
+
layer: "top"
|
|
2866
|
+
};
|
|
2837
2867
|
return {
|
|
2838
|
-
circuitJson: [...holes, refText],
|
|
2868
|
+
circuitJson: [...holes, refText, courtyard],
|
|
2839
2869
|
parameters
|
|
2840
2870
|
};
|
|
2841
2871
|
};
|
|
@@ -2965,7 +2995,9 @@ var ms013 = (raw_params) => {
|
|
|
2965
2995
|
};
|
|
2966
2996
|
|
|
2967
2997
|
// src/fn/sot723.ts
|
|
2968
|
-
import {
|
|
2998
|
+
import {
|
|
2999
|
+
length as length17
|
|
3000
|
+
} from "circuit-json";
|
|
2969
3001
|
import { z as z25 } from "zod";
|
|
2970
3002
|
var sot723_def = base_def.extend({
|
|
2971
3003
|
fn: z25.string(),
|
|
@@ -2984,8 +3016,26 @@ var sot723 = (raw_params) => {
|
|
|
2984
3016
|
length17.parse(parameters.h),
|
|
2985
3017
|
0.2
|
|
2986
3018
|
);
|
|
3019
|
+
const p_val = length17.parse(parameters.p);
|
|
3020
|
+
const pl_val = length17.parse(parameters.pl);
|
|
3021
|
+
const pw_val = length17.parse(parameters.pw);
|
|
3022
|
+
const h_val = length17.parse(parameters.h);
|
|
3023
|
+
const courtyardPadding = 0.25;
|
|
3024
|
+
const crtMinX = -(p_val + pl_val / 2 + courtyardPadding);
|
|
3025
|
+
const crtMaxX = p_val + pl_val / 2 + courtyardPadding;
|
|
3026
|
+
const crtMinY = -(Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding);
|
|
3027
|
+
const crtMaxY = Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding;
|
|
3028
|
+
const courtyard = {
|
|
3029
|
+
type: "pcb_courtyard_rect",
|
|
3030
|
+
pcb_courtyard_rect_id: "",
|
|
3031
|
+
pcb_component_id: "",
|
|
3032
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
3033
|
+
width: crtMaxX - crtMinX,
|
|
3034
|
+
height: crtMaxY - crtMinY,
|
|
3035
|
+
layer: "top"
|
|
3036
|
+
};
|
|
2987
3037
|
return {
|
|
2988
|
-
circuitJson: [...pad2, silkscreenRefText],
|
|
3038
|
+
circuitJson: [...pad2, silkscreenRefText, courtyard],
|
|
2989
3039
|
parameters
|
|
2990
3040
|
};
|
|
2991
3041
|
};
|
|
@@ -3042,9 +3092,27 @@ var sod123 = (raw_params) => {
|
|
|
3042
3092
|
length18.parse(parameters.h) / 4 + 0.4,
|
|
3043
3093
|
0.3
|
|
3044
3094
|
);
|
|
3095
|
+
const p_val = length18.parse(parameters.p);
|
|
3096
|
+
const pl_val = length18.parse(parameters.pl);
|
|
3097
|
+
const pw_val = length18.parse(parameters.pw);
|
|
3098
|
+
const courtyardPadding = 0.25;
|
|
3099
|
+
const crtMinX = -(p_val / 2 + pl_val / 2 + courtyardPadding);
|
|
3100
|
+
const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
|
|
3101
|
+
const crtMinY = -(pw_val / 2 + courtyardPadding);
|
|
3102
|
+
const crtMaxY = pw_val / 2 + courtyardPadding;
|
|
3103
|
+
const courtyard = {
|
|
3104
|
+
type: "pcb_courtyard_rect",
|
|
3105
|
+
pcb_courtyard_rect_id: "",
|
|
3106
|
+
pcb_component_id: "",
|
|
3107
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
3108
|
+
width: crtMaxX - crtMinX,
|
|
3109
|
+
height: crtMaxY - crtMinY,
|
|
3110
|
+
layer: "top"
|
|
3111
|
+
};
|
|
3045
3112
|
return {
|
|
3046
3113
|
circuitJson: sodWithoutParsing(parameters).concat(
|
|
3047
|
-
silkscreenRefText
|
|
3114
|
+
silkscreenRefText,
|
|
3115
|
+
courtyard
|
|
3048
3116
|
),
|
|
3049
3117
|
parameters
|
|
3050
3118
|
};
|
|
@@ -3107,11 +3175,26 @@ var axial = (raw_params) => {
|
|
|
3107
3175
|
pcb_silkscreen_path_id: ""
|
|
3108
3176
|
};
|
|
3109
3177
|
const silkscreenRefText = silkscreenRef(0, 1.5, 0.5);
|
|
3178
|
+
const courtyardPadding = 0.25;
|
|
3179
|
+
const crtMinX = -(p / 2 + od / 2 + courtyardPadding);
|
|
3180
|
+
const crtMaxX = p / 2 + od / 2 + courtyardPadding;
|
|
3181
|
+
const crtMinY = -(od / 2 + courtyardPadding);
|
|
3182
|
+
const crtMaxY = od / 2 + courtyardPadding;
|
|
3183
|
+
const courtyard = {
|
|
3184
|
+
type: "pcb_courtyard_rect",
|
|
3185
|
+
pcb_courtyard_rect_id: "",
|
|
3186
|
+
pcb_component_id: "",
|
|
3187
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
3188
|
+
width: crtMaxX - crtMinX,
|
|
3189
|
+
height: crtMaxY - crtMinY,
|
|
3190
|
+
layer: "top"
|
|
3191
|
+
};
|
|
3110
3192
|
return {
|
|
3111
3193
|
circuitJson: [
|
|
3112
3194
|
...plated_holes,
|
|
3113
3195
|
silkscreenLine,
|
|
3114
|
-
silkscreenRefText
|
|
3196
|
+
silkscreenRefText,
|
|
3197
|
+
courtyard
|
|
3115
3198
|
],
|
|
3116
3199
|
parameters
|
|
3117
3200
|
};
|
|
@@ -3248,6 +3331,21 @@ var radial = (raw_params) => {
|
|
|
3248
3331
|
if (hasPolarity) {
|
|
3249
3332
|
circuitJson.push(plusHoriz, plusVert);
|
|
3250
3333
|
}
|
|
3334
|
+
const courtyardPadding = 0.25;
|
|
3335
|
+
const crtMinX = hasPolarity ? plusX - plusSize - courtyardPadding : -(bodyR + courtyardPadding);
|
|
3336
|
+
const crtMaxX = bodyR + courtyardPadding;
|
|
3337
|
+
const crtMinY = -(bodyR + courtyardPadding);
|
|
3338
|
+
const crtMaxY = bodyR + courtyardPadding;
|
|
3339
|
+
const courtyard = {
|
|
3340
|
+
type: "pcb_courtyard_rect",
|
|
3341
|
+
pcb_courtyard_rect_id: "",
|
|
3342
|
+
pcb_component_id: "",
|
|
3343
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: 0 },
|
|
3344
|
+
width: crtMaxX - crtMinX,
|
|
3345
|
+
height: crtMaxY - crtMinY,
|
|
3346
|
+
layer: "top"
|
|
3347
|
+
};
|
|
3348
|
+
circuitJson.push(courtyard);
|
|
3251
3349
|
return {
|
|
3252
3350
|
circuitJson,
|
|
3253
3351
|
parameters
|
|
@@ -3255,7 +3353,9 @@ var radial = (raw_params) => {
|
|
|
3255
3353
|
};
|
|
3256
3354
|
|
|
3257
3355
|
// src/fn/pushbutton.ts
|
|
3258
|
-
import {
|
|
3356
|
+
import {
|
|
3357
|
+
length as length21
|
|
3358
|
+
} from "circuit-json";
|
|
3259
3359
|
import { z as z29 } from "zod";
|
|
3260
3360
|
|
|
3261
3361
|
// src/helpers/silkscreenpath.ts
|
|
@@ -3315,8 +3415,19 @@ var pushbutton = (raw_params) => {
|
|
|
3315
3415
|
height / 2 + 0.4,
|
|
3316
3416
|
0.5
|
|
3317
3417
|
);
|
|
3418
|
+
const outerRadius = holeDiameter * 1.5 / 2;
|
|
3419
|
+
const courtyardPadding = 0.25;
|
|
3420
|
+
const courtyard = {
|
|
3421
|
+
type: "pcb_courtyard_rect",
|
|
3422
|
+
pcb_courtyard_rect_id: "",
|
|
3423
|
+
pcb_component_id: "",
|
|
3424
|
+
center: { x: 0, y: 0 },
|
|
3425
|
+
width: width + 2 * outerRadius + 2 * courtyardPadding,
|
|
3426
|
+
height: height + 2 * outerRadius + 2 * courtyardPadding,
|
|
3427
|
+
layer: "top"
|
|
3428
|
+
};
|
|
3318
3429
|
return {
|
|
3319
|
-
circuitJson: [...holes, ...silkscreenLines, silkscreenRefText],
|
|
3430
|
+
circuitJson: [...holes, ...silkscreenLines, silkscreenRefText, courtyard],
|
|
3320
3431
|
parameters
|
|
3321
3432
|
};
|
|
3322
3433
|
};
|
|
@@ -4317,11 +4428,26 @@ var hc49 = (raw_params) => {
|
|
|
4317
4428
|
pcb_silkscreen_path_id: ""
|
|
4318
4429
|
};
|
|
4319
4430
|
const silkscreenRefText = silkscreenRef(0, p / 4, 0.5);
|
|
4431
|
+
const courtyardPadding = 0.25;
|
|
4432
|
+
const crtMinX = -(w / 2 + radius + courtyardPadding);
|
|
4433
|
+
const crtMaxX = w / 2 + radius + courtyardPadding;
|
|
4434
|
+
const crtMinY = -(radius + courtyardPadding);
|
|
4435
|
+
const crtMaxY = radius + courtyardPadding;
|
|
4436
|
+
const courtyard = {
|
|
4437
|
+
type: "pcb_courtyard_rect",
|
|
4438
|
+
pcb_courtyard_rect_id: "",
|
|
4439
|
+
pcb_component_id: "",
|
|
4440
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4441
|
+
width: crtMaxX - crtMinX,
|
|
4442
|
+
height: crtMaxY - crtMinY,
|
|
4443
|
+
layer: "top"
|
|
4444
|
+
};
|
|
4320
4445
|
return {
|
|
4321
4446
|
circuitJson: [
|
|
4322
4447
|
...plated_holes,
|
|
4323
4448
|
silkscreenBody,
|
|
4324
|
-
silkscreenRefText
|
|
4449
|
+
silkscreenRefText,
|
|
4450
|
+
courtyard
|
|
4325
4451
|
],
|
|
4326
4452
|
parameters
|
|
4327
4453
|
};
|
|
@@ -4481,11 +4607,26 @@ var to92 = (raw_params) => {
|
|
|
4481
4607
|
pcb_silkscreen_path_id: ""
|
|
4482
4608
|
};
|
|
4483
4609
|
const silkscreenRefText = silkscreenRef(0, holeY + 1, 0.5);
|
|
4610
|
+
const courtyardPadding = 0.25;
|
|
4611
|
+
const crtMinX = -(radius + courtyardPadding);
|
|
4612
|
+
const crtMaxX = radius + courtyardPadding;
|
|
4613
|
+
const crtMaxY = holeY + radius + courtyardPadding;
|
|
4614
|
+
const crtMinY = -courtyardPadding;
|
|
4615
|
+
const courtyard = {
|
|
4616
|
+
type: "pcb_courtyard_rect",
|
|
4617
|
+
pcb_courtyard_rect_id: "",
|
|
4618
|
+
pcb_component_id: "",
|
|
4619
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4620
|
+
width: crtMaxX - crtMinX,
|
|
4621
|
+
height: crtMaxY - crtMinY,
|
|
4622
|
+
layer: "top"
|
|
4623
|
+
};
|
|
4484
4624
|
return {
|
|
4485
4625
|
circuitJson: [
|
|
4486
4626
|
...platedHoles,
|
|
4487
4627
|
silkscreenBody,
|
|
4488
|
-
silkscreenRefText
|
|
4628
|
+
silkscreenRefText,
|
|
4629
|
+
courtyard
|
|
4489
4630
|
],
|
|
4490
4631
|
parameters
|
|
4491
4632
|
};
|
|
@@ -4535,10 +4676,30 @@ var sod523 = (raw_params) => {
|
|
|
4535
4676
|
stroke_width: 0.1,
|
|
4536
4677
|
pcb_silkscreen_path_id: ""
|
|
4537
4678
|
};
|
|
4679
|
+
const p_v = length27.parse(parameters.p);
|
|
4680
|
+
const pl_v = length27.parse(parameters.pl);
|
|
4681
|
+
const pw_v = length27.parse(parameters.pw);
|
|
4682
|
+
const h_v = length27.parse(parameters.h);
|
|
4683
|
+
const w_v = length27.parse(parameters.w);
|
|
4684
|
+
const courtyardPadding = 0.25;
|
|
4685
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
4686
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
4687
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
4688
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
4689
|
+
const courtyard = {
|
|
4690
|
+
type: "pcb_courtyard_rect",
|
|
4691
|
+
pcb_courtyard_rect_id: "",
|
|
4692
|
+
pcb_component_id: "",
|
|
4693
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4694
|
+
width: crtMaxX - crtMinX,
|
|
4695
|
+
height: crtMaxY - crtMinY,
|
|
4696
|
+
layer: "top"
|
|
4697
|
+
};
|
|
4538
4698
|
return {
|
|
4539
4699
|
circuitJson: sodWithoutParsing2(parameters).concat(
|
|
4540
4700
|
silkscreenLine,
|
|
4541
|
-
silkscreenRefText
|
|
4701
|
+
silkscreenRefText,
|
|
4702
|
+
courtyard
|
|
4542
4703
|
),
|
|
4543
4704
|
parameters
|
|
4544
4705
|
};
|
|
@@ -4676,10 +4837,30 @@ var sod80 = (raw_params) => {
|
|
|
4676
4837
|
stroke_width: 0.1,
|
|
4677
4838
|
pcb_silkscreen_path_id: ""
|
|
4678
4839
|
};
|
|
4840
|
+
const p_v = length28.parse(parameters.p);
|
|
4841
|
+
const pl_v = length28.parse(parameters.pl);
|
|
4842
|
+
const pw_v = length28.parse(parameters.pw);
|
|
4843
|
+
const h_v = length28.parse(parameters.h);
|
|
4844
|
+
const w_v = length28.parse(parameters.w);
|
|
4845
|
+
const courtyardPadding = 0.25;
|
|
4846
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.5, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
4847
|
+
const crtMaxX = Math.max(p_v / 2 + 0.5, p_v / 2 + pl_v / 2) + courtyardPadding;
|
|
4848
|
+
const crtMinY = -(Math.max(h_v / 2 + 0.5, pw_v / 2) + courtyardPadding);
|
|
4849
|
+
const crtMaxY = Math.max(h_v / 2 + 0.5, pw_v / 2) + courtyardPadding;
|
|
4850
|
+
const courtyard = {
|
|
4851
|
+
type: "pcb_courtyard_rect",
|
|
4852
|
+
pcb_courtyard_rect_id: "",
|
|
4853
|
+
pcb_component_id: "",
|
|
4854
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4855
|
+
width: crtMaxX - crtMinX,
|
|
4856
|
+
height: crtMaxY - crtMinY,
|
|
4857
|
+
layer: "top"
|
|
4858
|
+
};
|
|
4679
4859
|
return {
|
|
4680
4860
|
circuitJson: sod80WithoutParsing(parameters).concat(
|
|
4681
4861
|
silkscreenLine,
|
|
4682
|
-
silkscreenRefText
|
|
4862
|
+
silkscreenRefText,
|
|
4863
|
+
courtyard
|
|
4683
4864
|
),
|
|
4684
4865
|
parameters
|
|
4685
4866
|
};
|
|
@@ -4752,10 +4933,30 @@ var sod123w = (raw_params) => {
|
|
|
4752
4933
|
stroke_width: 0.1,
|
|
4753
4934
|
pcb_silkscreen_path_id: ""
|
|
4754
4935
|
};
|
|
4936
|
+
const p_v = length29.parse(parameters.p);
|
|
4937
|
+
const pl_v = length29.parse(parameters.pl);
|
|
4938
|
+
const pw_v = length29.parse(parameters.pw);
|
|
4939
|
+
const h_v = length29.parse(parameters.h);
|
|
4940
|
+
const w_v = length29.parse(parameters.w);
|
|
4941
|
+
const courtyardPadding = 0.25;
|
|
4942
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
4943
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
4944
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
4945
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
4946
|
+
const courtyard = {
|
|
4947
|
+
type: "pcb_courtyard_rect",
|
|
4948
|
+
pcb_courtyard_rect_id: "",
|
|
4949
|
+
pcb_component_id: "",
|
|
4950
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4951
|
+
width: crtMaxX - crtMinX,
|
|
4952
|
+
height: crtMaxY - crtMinY,
|
|
4953
|
+
layer: "top"
|
|
4954
|
+
};
|
|
4755
4955
|
return {
|
|
4756
4956
|
circuitJson: sodWithoutParsing3(parameters).concat(
|
|
4757
4957
|
silkscreenLine,
|
|
4758
|
-
silkscreenRefText
|
|
4958
|
+
silkscreenRefText,
|
|
4959
|
+
courtyard
|
|
4759
4960
|
),
|
|
4760
4961
|
parameters
|
|
4761
4962
|
};
|
|
@@ -4831,10 +5032,30 @@ var sod323 = (raw_params) => {
|
|
|
4831
5032
|
stroke_width: 0.1,
|
|
4832
5033
|
pcb_silkscreen_path_id: ""
|
|
4833
5034
|
};
|
|
5035
|
+
const p_v = length30.parse(parameters.p);
|
|
5036
|
+
const pl_v = length30.parse(parameters.pl);
|
|
5037
|
+
const pw_v = length30.parse(parameters.pw);
|
|
5038
|
+
const h_v = length30.parse(parameters.h);
|
|
5039
|
+
const w_v = length30.parse(parameters.w);
|
|
5040
|
+
const courtyardPadding = 0.25;
|
|
5041
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5042
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5043
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5044
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5045
|
+
const courtyard = {
|
|
5046
|
+
type: "pcb_courtyard_rect",
|
|
5047
|
+
pcb_courtyard_rect_id: "",
|
|
5048
|
+
pcb_component_id: "",
|
|
5049
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5050
|
+
width: crtMaxX - crtMinX,
|
|
5051
|
+
height: crtMaxY - crtMinY,
|
|
5052
|
+
layer: "top"
|
|
5053
|
+
};
|
|
4834
5054
|
return {
|
|
4835
5055
|
circuitJson: sodWithoutParsing4(parameters).concat(
|
|
4836
5056
|
silkscreenLine,
|
|
4837
|
-
silkscreenRefText
|
|
5057
|
+
silkscreenRefText,
|
|
5058
|
+
courtyard
|
|
4838
5059
|
),
|
|
4839
5060
|
parameters
|
|
4840
5061
|
};
|
|
@@ -4910,10 +5131,30 @@ var sod923 = (raw_params) => {
|
|
|
4910
5131
|
stroke_width: 0.1,
|
|
4911
5132
|
pcb_silkscreen_path_id: ""
|
|
4912
5133
|
};
|
|
5134
|
+
const p_v = length31.parse(parameters.p);
|
|
5135
|
+
const pl_v = length31.parse(parameters.pl);
|
|
5136
|
+
const pw_v = length31.parse(parameters.pw);
|
|
5137
|
+
const h_v = length31.parse(parameters.h);
|
|
5138
|
+
const w_v = length31.parse(parameters.w);
|
|
5139
|
+
const courtyardPadding = 0.25;
|
|
5140
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.15, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5141
|
+
const crtMaxX = Math.max(p_v / 2 + 0.15, p_v / 2 + pl_v / 2) + courtyardPadding;
|
|
5142
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5143
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5144
|
+
const courtyard = {
|
|
5145
|
+
type: "pcb_courtyard_rect",
|
|
5146
|
+
pcb_courtyard_rect_id: "",
|
|
5147
|
+
pcb_component_id: "",
|
|
5148
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5149
|
+
width: crtMaxX - crtMinX,
|
|
5150
|
+
height: crtMaxY - crtMinY,
|
|
5151
|
+
layer: "top"
|
|
5152
|
+
};
|
|
4913
5153
|
return {
|
|
4914
5154
|
circuitJson: sodWithoutParsing5(parameters).concat(
|
|
4915
5155
|
silkscreenLine,
|
|
4916
|
-
silkscreenRefText
|
|
5156
|
+
silkscreenRefText,
|
|
5157
|
+
courtyard
|
|
4917
5158
|
),
|
|
4918
5159
|
parameters
|
|
4919
5160
|
};
|
|
@@ -4990,10 +5231,30 @@ var sod882 = (raw_params) => {
|
|
|
4990
5231
|
stroke_width: 0.1,
|
|
4991
5232
|
pcb_silkscreen_path_id: ""
|
|
4992
5233
|
};
|
|
5234
|
+
const p_v = length32.parse(parameters.p);
|
|
5235
|
+
const pl_v = length32.parse(parameters.pl);
|
|
5236
|
+
const pw_v = length32.parse(parameters.pw);
|
|
5237
|
+
const h_v = length32.parse(parameters.h);
|
|
5238
|
+
const w_v = length32.parse(parameters.w);
|
|
5239
|
+
const courtyardPadding = 0.25;
|
|
5240
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5241
|
+
const crtMaxX = Math.max(p_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding;
|
|
5242
|
+
const crtMinY = -(Math.max(h_v / 2 + 0.2, pw_v / 2) + courtyardPadding);
|
|
5243
|
+
const crtMaxY = Math.max(h_v / 2 + 0.2, pw_v / 2) + courtyardPadding;
|
|
5244
|
+
const courtyard = {
|
|
5245
|
+
type: "pcb_courtyard_rect",
|
|
5246
|
+
pcb_courtyard_rect_id: "",
|
|
5247
|
+
pcb_component_id: "",
|
|
5248
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5249
|
+
width: crtMaxX - crtMinX,
|
|
5250
|
+
height: crtMaxY - crtMinY,
|
|
5251
|
+
layer: "top"
|
|
5252
|
+
};
|
|
4993
5253
|
return {
|
|
4994
5254
|
circuitJson: sodWithoutParsing6(parameters).concat(
|
|
4995
5255
|
silkscreenLine,
|
|
4996
|
-
silkscreenRefText
|
|
5256
|
+
silkscreenRefText,
|
|
5257
|
+
courtyard
|
|
4997
5258
|
),
|
|
4998
5259
|
parameters
|
|
4999
5260
|
};
|
|
@@ -5070,10 +5331,30 @@ var sod323f = (raw_params) => {
|
|
|
5070
5331
|
stroke_width: 0.1,
|
|
5071
5332
|
pcb_silkscreen_path_id: ""
|
|
5072
5333
|
};
|
|
5334
|
+
const pl_v = length33.parse(parameters.pl);
|
|
5335
|
+
const pw_v = length33.parse(parameters.pw);
|
|
5336
|
+
const h_v = length33.parse(parameters.h);
|
|
5337
|
+
const w_v = length33.parse(parameters.w);
|
|
5338
|
+
const ps_v = length33.parse(parameters.pad_spacing);
|
|
5339
|
+
const courtyardPadding = 0.25;
|
|
5340
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5341
|
+
const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5342
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5343
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5344
|
+
const courtyard = {
|
|
5345
|
+
type: "pcb_courtyard_rect",
|
|
5346
|
+
pcb_courtyard_rect_id: "",
|
|
5347
|
+
pcb_component_id: "",
|
|
5348
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5349
|
+
width: crtMaxX - crtMinX,
|
|
5350
|
+
height: crtMaxY - crtMinY,
|
|
5351
|
+
layer: "top"
|
|
5352
|
+
};
|
|
5073
5353
|
return {
|
|
5074
5354
|
circuitJson: sodWithoutParsing7(parameters).concat(
|
|
5075
5355
|
silkscreenLine,
|
|
5076
|
-
silkscreenRefText
|
|
5356
|
+
silkscreenRefText,
|
|
5357
|
+
courtyard
|
|
5077
5358
|
),
|
|
5078
5359
|
parameters
|
|
5079
5360
|
};
|
|
@@ -5150,10 +5431,30 @@ var sod123f = (raw_params) => {
|
|
|
5150
5431
|
stroke_width: 0.1,
|
|
5151
5432
|
pcb_silkscreen_path_id: ""
|
|
5152
5433
|
};
|
|
5434
|
+
const p_v = length34.parse(parameters.p);
|
|
5435
|
+
const pl_v = length34.parse(parameters.pl);
|
|
5436
|
+
const pw_v = length34.parse(parameters.pw);
|
|
5437
|
+
const h_v = length34.parse(parameters.h);
|
|
5438
|
+
const w_v = length34.parse(parameters.w);
|
|
5439
|
+
const courtyardPadding = 0.25;
|
|
5440
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5441
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5442
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5443
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5444
|
+
const courtyard = {
|
|
5445
|
+
type: "pcb_courtyard_rect",
|
|
5446
|
+
pcb_courtyard_rect_id: "",
|
|
5447
|
+
pcb_component_id: "",
|
|
5448
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5449
|
+
width: crtMaxX - crtMinX,
|
|
5450
|
+
height: crtMaxY - crtMinY,
|
|
5451
|
+
layer: "top"
|
|
5452
|
+
};
|
|
5153
5453
|
return {
|
|
5154
5454
|
circuitJson: sodWithoutParsing8(parameters).concat(
|
|
5155
5455
|
silkscreenLine,
|
|
5156
|
-
silkscreenRefText
|
|
5456
|
+
silkscreenRefText,
|
|
5457
|
+
courtyard
|
|
5157
5458
|
),
|
|
5158
5459
|
parameters
|
|
5159
5460
|
};
|
|
@@ -5230,10 +5531,30 @@ var sod123fl = (raw_params) => {
|
|
|
5230
5531
|
stroke_width: 0.1,
|
|
5231
5532
|
pcb_silkscreen_path_id: ""
|
|
5232
5533
|
};
|
|
5534
|
+
const p_v = length35.parse(parameters.p);
|
|
5535
|
+
const pl_v = length35.parse(parameters.pl);
|
|
5536
|
+
const pw_v = length35.parse(parameters.pw);
|
|
5537
|
+
const h_v = length35.parse(parameters.h);
|
|
5538
|
+
const w_v = length35.parse(parameters.w);
|
|
5539
|
+
const courtyardPadding = 0.25;
|
|
5540
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5541
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5542
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5543
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5544
|
+
const courtyard = {
|
|
5545
|
+
type: "pcb_courtyard_rect",
|
|
5546
|
+
pcb_courtyard_rect_id: "",
|
|
5547
|
+
pcb_component_id: "",
|
|
5548
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5549
|
+
width: crtMaxX - crtMinX,
|
|
5550
|
+
height: crtMaxY - crtMinY,
|
|
5551
|
+
layer: "top"
|
|
5552
|
+
};
|
|
5233
5553
|
return {
|
|
5234
5554
|
circuitJson: sodWithoutParsing9(parameters).concat(
|
|
5235
5555
|
silkscreenLine,
|
|
5236
|
-
silkscreenRefText
|
|
5556
|
+
silkscreenRefText,
|
|
5557
|
+
courtyard
|
|
5237
5558
|
),
|
|
5238
5559
|
parameters
|
|
5239
5560
|
};
|
|
@@ -5310,10 +5631,30 @@ var sod723 = (raw_params) => {
|
|
|
5310
5631
|
stroke_width: 0.1,
|
|
5311
5632
|
pcb_silkscreen_path_id: ""
|
|
5312
5633
|
};
|
|
5634
|
+
const p_v = length36.parse(parameters.p);
|
|
5635
|
+
const pl_v = length36.parse(parameters.pl);
|
|
5636
|
+
const pw_v = length36.parse(parameters.pw);
|
|
5637
|
+
const h_v = length36.parse(parameters.h);
|
|
5638
|
+
const w_v = length36.parse(parameters.w);
|
|
5639
|
+
const courtyardPadding = 0.25;
|
|
5640
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5641
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5642
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5643
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5644
|
+
const courtyard = {
|
|
5645
|
+
type: "pcb_courtyard_rect",
|
|
5646
|
+
pcb_courtyard_rect_id: "",
|
|
5647
|
+
pcb_component_id: "",
|
|
5648
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5649
|
+
width: crtMaxX - crtMinX,
|
|
5650
|
+
height: crtMaxY - crtMinY,
|
|
5651
|
+
layer: "top"
|
|
5652
|
+
};
|
|
5313
5653
|
return {
|
|
5314
5654
|
circuitJson: sodWithoutParsing10(parameters).concat(
|
|
5315
5655
|
silkscreenLine,
|
|
5316
|
-
silkscreenRefText
|
|
5656
|
+
silkscreenRefText,
|
|
5657
|
+
courtyard
|
|
5317
5658
|
),
|
|
5318
5659
|
parameters
|
|
5319
5660
|
};
|
|
@@ -5390,10 +5731,30 @@ var sod128 = (raw_params) => {
|
|
|
5390
5731
|
stroke_width: 0.1,
|
|
5391
5732
|
pcb_silkscreen_path_id: ""
|
|
5392
5733
|
};
|
|
5734
|
+
const p_v = length37.parse(parameters.p);
|
|
5735
|
+
const pl_v = length37.parse(parameters.pl);
|
|
5736
|
+
const pw_v = length37.parse(parameters.pw);
|
|
5737
|
+
const h_v = length37.parse(parameters.h);
|
|
5738
|
+
const w_v = length37.parse(parameters.w);
|
|
5739
|
+
const courtyardPadding = 0.25;
|
|
5740
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
5741
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
5742
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
5743
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
5744
|
+
const courtyard = {
|
|
5745
|
+
type: "pcb_courtyard_rect",
|
|
5746
|
+
pcb_courtyard_rect_id: "",
|
|
5747
|
+
pcb_component_id: "",
|
|
5748
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5749
|
+
width: crtMaxX - crtMinX,
|
|
5750
|
+
height: crtMaxY - crtMinY,
|
|
5751
|
+
layer: "top"
|
|
5752
|
+
};
|
|
5393
5753
|
return {
|
|
5394
5754
|
circuitJson: sodWithoutParsing11(parameters).concat(
|
|
5395
5755
|
silkscreenLine,
|
|
5396
|
-
silkscreenRefText
|
|
5756
|
+
silkscreenRefText,
|
|
5757
|
+
courtyard
|
|
5397
5758
|
),
|
|
5398
5759
|
parameters
|
|
5399
5760
|
};
|
|
@@ -5478,11 +5839,27 @@ var sot89_3 = (parameters) => {
|
|
|
5478
5839
|
type: "pcb_silkscreen_path",
|
|
5479
5840
|
stroke_width: 0.1
|
|
5480
5841
|
};
|
|
5842
|
+
const courtyardPadding = 0.25;
|
|
5843
|
+
const padOuterX = length63 / 2 + (padHeight + centerExtra) / 2;
|
|
5844
|
+
const crtMinX = -(padOuterX + courtyardPadding);
|
|
5845
|
+
const crtMaxX = length63 / 2 - 1 + courtyardPadding;
|
|
5846
|
+
const crtMinY = -(height + courtyardPadding);
|
|
5847
|
+
const crtMaxY = height + courtyardPadding;
|
|
5848
|
+
const courtyard = {
|
|
5849
|
+
type: "pcb_courtyard_rect",
|
|
5850
|
+
pcb_courtyard_rect_id: "",
|
|
5851
|
+
pcb_component_id: "",
|
|
5852
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5853
|
+
width: crtMaxX - crtMinX,
|
|
5854
|
+
height: crtMaxY - crtMinY,
|
|
5855
|
+
layer: "top"
|
|
5856
|
+
};
|
|
5481
5857
|
return [
|
|
5482
5858
|
...pads,
|
|
5483
5859
|
silkscreenPath1,
|
|
5484
5860
|
silkscreenPath2,
|
|
5485
|
-
silkscreenRefText
|
|
5861
|
+
silkscreenRefText,
|
|
5862
|
+
courtyard
|
|
5486
5863
|
];
|
|
5487
5864
|
};
|
|
5488
5865
|
var sot89_5 = (parameters) => {
|
|
@@ -5526,11 +5903,26 @@ var sot89_5 = (parameters) => {
|
|
|
5526
5903
|
type: "pcb_silkscreen_path",
|
|
5527
5904
|
stroke_width: 0.1
|
|
5528
5905
|
};
|
|
5906
|
+
const courtyardPadding = 0.25;
|
|
5907
|
+
const crtMinX = -(2.6 + courtyardPadding);
|
|
5908
|
+
const crtMaxX = 2.6 + courtyardPadding;
|
|
5909
|
+
const crtMinY = -(height + courtyardPadding);
|
|
5910
|
+
const crtMaxY = height + courtyardPadding;
|
|
5911
|
+
const courtyard = {
|
|
5912
|
+
type: "pcb_courtyard_rect",
|
|
5913
|
+
pcb_courtyard_rect_id: "",
|
|
5914
|
+
pcb_component_id: "",
|
|
5915
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
5916
|
+
width: crtMaxX - crtMinX,
|
|
5917
|
+
height: crtMaxY - crtMinY,
|
|
5918
|
+
layer: "top"
|
|
5919
|
+
};
|
|
5529
5920
|
return [
|
|
5530
5921
|
...pads,
|
|
5531
5922
|
silkscreenPath1,
|
|
5532
5923
|
silkscreenPath2,
|
|
5533
|
-
silkscreenRefText
|
|
5924
|
+
silkscreenRefText,
|
|
5925
|
+
courtyard
|
|
5534
5926
|
];
|
|
5535
5927
|
};
|
|
5536
5928
|
var sot89 = (raw_params) => {
|
|
@@ -5635,13 +6027,28 @@ var to220 = (raw_params) => {
|
|
|
5635
6027
|
}
|
|
5636
6028
|
];
|
|
5637
6029
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.6, 0.5);
|
|
6030
|
+
const courtyardPadding = 0.25;
|
|
6031
|
+
const crtMinX = -(halfWidth + courtyardPadding);
|
|
6032
|
+
const crtMaxX = halfWidth + courtyardPadding;
|
|
6033
|
+
const crtMinY = -(halfHeight + courtyardPadding);
|
|
6034
|
+
const crtMaxY = halfHeight + courtyardPadding;
|
|
6035
|
+
const courtyard = {
|
|
6036
|
+
type: "pcb_courtyard_rect",
|
|
6037
|
+
pcb_courtyard_rect_id: "",
|
|
6038
|
+
pcb_component_id: "",
|
|
6039
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6040
|
+
width: crtMaxX - crtMinX,
|
|
6041
|
+
height: crtMaxY - crtMinY,
|
|
6042
|
+
layer: "top"
|
|
6043
|
+
};
|
|
5638
6044
|
return {
|
|
5639
6045
|
circuitJson: [
|
|
5640
6046
|
...plated_holes,
|
|
5641
6047
|
silkscreenBody,
|
|
5642
6048
|
horizontalLine,
|
|
5643
6049
|
...verticalLines,
|
|
5644
|
-
silkscreenRefText
|
|
6050
|
+
silkscreenRefText,
|
|
6051
|
+
courtyard
|
|
5645
6052
|
],
|
|
5646
6053
|
parameters: { ...parameters, p: computedPitch }
|
|
5647
6054
|
};
|
|
@@ -5752,10 +6159,30 @@ var minimelf = (raw_params) => {
|
|
|
5752
6159
|
stroke_width: 0.1,
|
|
5753
6160
|
pcb_silkscreen_path_id: ""
|
|
5754
6161
|
};
|
|
6162
|
+
const p_v = length40.parse(parameters.p);
|
|
6163
|
+
const pl_v = length40.parse(parameters.pl);
|
|
6164
|
+
const pw_v = length40.parse(parameters.pw);
|
|
6165
|
+
const h_v = length40.parse(parameters.h);
|
|
6166
|
+
const w_v = length40.parse(parameters.w);
|
|
6167
|
+
const courtyardPadding = 0.25;
|
|
6168
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6169
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6170
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6171
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6172
|
+
const courtyard = {
|
|
6173
|
+
type: "pcb_courtyard_rect",
|
|
6174
|
+
pcb_courtyard_rect_id: "",
|
|
6175
|
+
pcb_component_id: "",
|
|
6176
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6177
|
+
width: crtMaxX - crtMinX,
|
|
6178
|
+
height: crtMaxY - crtMinY,
|
|
6179
|
+
layer: "top"
|
|
6180
|
+
};
|
|
5755
6181
|
return {
|
|
5756
6182
|
circuitJson: miniMelfWithoutParsing(parameters).concat(
|
|
5757
6183
|
silkscreenLine,
|
|
5758
|
-
silkscreenRefText
|
|
6184
|
+
silkscreenRefText,
|
|
6185
|
+
courtyard
|
|
5759
6186
|
),
|
|
5760
6187
|
parameters
|
|
5761
6188
|
};
|
|
@@ -5828,10 +6255,30 @@ var sod882d = (raw_params) => {
|
|
|
5828
6255
|
stroke_width: 0.1,
|
|
5829
6256
|
pcb_silkscreen_path_id: ""
|
|
5830
6257
|
};
|
|
6258
|
+
const p_v = length41.parse(parameters.p);
|
|
6259
|
+
const pl_v = length41.parse(parameters.pl);
|
|
6260
|
+
const pw_v = length41.parse(parameters.pw);
|
|
6261
|
+
const h_v = length41.parse(parameters.h);
|
|
6262
|
+
const w_v = length41.parse(parameters.w);
|
|
6263
|
+
const courtyardPadding = 0.25;
|
|
6264
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6265
|
+
const crtMaxX = Math.max(p_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding;
|
|
6266
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6267
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6268
|
+
const courtyard = {
|
|
6269
|
+
type: "pcb_courtyard_rect",
|
|
6270
|
+
pcb_courtyard_rect_id: "",
|
|
6271
|
+
pcb_component_id: "",
|
|
6272
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6273
|
+
width: crtMaxX - crtMinX,
|
|
6274
|
+
height: crtMaxY - crtMinY,
|
|
6275
|
+
layer: "top"
|
|
6276
|
+
};
|
|
5831
6277
|
return {
|
|
5832
6278
|
circuitJson: sodWithoutParsing12(parameters).concat(
|
|
5833
6279
|
silkscreenLine,
|
|
5834
|
-
silkscreenRefText
|
|
6280
|
+
silkscreenRefText,
|
|
6281
|
+
courtyard
|
|
5835
6282
|
),
|
|
5836
6283
|
parameters
|
|
5837
6284
|
};
|
|
@@ -5908,10 +6355,30 @@ var melf = (raw_params) => {
|
|
|
5908
6355
|
stroke_width: 0.1,
|
|
5909
6356
|
pcb_silkscreen_path_id: ""
|
|
5910
6357
|
};
|
|
6358
|
+
const p_v = length42.parse(parameters.p);
|
|
6359
|
+
const pl_v = length42.parse(parameters.pl);
|
|
6360
|
+
const pw_v = length42.parse(parameters.pw);
|
|
6361
|
+
const h_v = length42.parse(parameters.h);
|
|
6362
|
+
const w_v = length42.parse(parameters.w);
|
|
6363
|
+
const courtyardPadding = 0.25;
|
|
6364
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6365
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6366
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6367
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6368
|
+
const courtyard = {
|
|
6369
|
+
type: "pcb_courtyard_rect",
|
|
6370
|
+
pcb_courtyard_rect_id: "",
|
|
6371
|
+
pcb_component_id: "",
|
|
6372
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6373
|
+
width: crtMaxX - crtMinX,
|
|
6374
|
+
height: crtMaxY - crtMinY,
|
|
6375
|
+
layer: "top"
|
|
6376
|
+
};
|
|
5911
6377
|
return {
|
|
5912
6378
|
circuitJson: melfWithoutParsing(parameters).concat(
|
|
5913
6379
|
silkscreenLine,
|
|
5914
|
-
silkscreenRefText
|
|
6380
|
+
silkscreenRefText,
|
|
6381
|
+
courtyard
|
|
5915
6382
|
),
|
|
5916
6383
|
parameters
|
|
5917
6384
|
};
|
|
@@ -5988,10 +6455,30 @@ var micromelf = (raw_params) => {
|
|
|
5988
6455
|
stroke_width: 0.1,
|
|
5989
6456
|
pcb_silkscreen_path_id: ""
|
|
5990
6457
|
};
|
|
6458
|
+
const p_v = length43.parse(parameters.p);
|
|
6459
|
+
const pl_v = length43.parse(parameters.pl);
|
|
6460
|
+
const pw_v = length43.parse(parameters.pw);
|
|
6461
|
+
const h_v = length43.parse(parameters.h);
|
|
6462
|
+
const w_v = length43.parse(parameters.w);
|
|
6463
|
+
const courtyardPadding = 0.25;
|
|
6464
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6465
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6466
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6467
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6468
|
+
const courtyard = {
|
|
6469
|
+
type: "pcb_courtyard_rect",
|
|
6470
|
+
pcb_courtyard_rect_id: "",
|
|
6471
|
+
pcb_component_id: "",
|
|
6472
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6473
|
+
width: crtMaxX - crtMinX,
|
|
6474
|
+
height: crtMaxY - crtMinY,
|
|
6475
|
+
layer: "top"
|
|
6476
|
+
};
|
|
5991
6477
|
return {
|
|
5992
6478
|
circuitJson: microMelfWithoutParsing(parameters).concat(
|
|
5993
6479
|
silkscreenLine,
|
|
5994
|
-
silkscreenRefText
|
|
6480
|
+
silkscreenRefText,
|
|
6481
|
+
courtyard
|
|
5995
6482
|
),
|
|
5996
6483
|
parameters
|
|
5997
6484
|
};
|
|
@@ -6068,10 +6555,29 @@ var sma = (raw_params) => {
|
|
|
6068
6555
|
stroke_width: 0.1,
|
|
6069
6556
|
pcb_silkscreen_path_id: ""
|
|
6070
6557
|
};
|
|
6558
|
+
const p_val = length44.parse(parameters.p);
|
|
6559
|
+
const pl_val = length44.parse(parameters.pl);
|
|
6560
|
+
const h_val = length44.parse(parameters.h);
|
|
6561
|
+
const w_val = length44.parse(parameters.w);
|
|
6562
|
+
const courtyardPadding = 0.25;
|
|
6563
|
+
const crtMinX = -(w_val / 2 + 0.5 + courtyardPadding);
|
|
6564
|
+
const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
|
|
6565
|
+
const crtMinY = -(h_val / 2 + courtyardPadding);
|
|
6566
|
+
const crtMaxY = h_val / 2 + courtyardPadding;
|
|
6567
|
+
const courtyard = {
|
|
6568
|
+
type: "pcb_courtyard_rect",
|
|
6569
|
+
pcb_courtyard_rect_id: "",
|
|
6570
|
+
pcb_component_id: "",
|
|
6571
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6572
|
+
width: crtMaxX - crtMinX,
|
|
6573
|
+
height: crtMaxY - crtMinY,
|
|
6574
|
+
layer: "top"
|
|
6575
|
+
};
|
|
6071
6576
|
return {
|
|
6072
6577
|
circuitJson: smaWithoutParsing(parameters).concat(
|
|
6073
6578
|
silkscreenLine,
|
|
6074
|
-
silkscreenRefText
|
|
6579
|
+
silkscreenRefText,
|
|
6580
|
+
courtyard
|
|
6075
6581
|
),
|
|
6076
6582
|
parameters
|
|
6077
6583
|
};
|
|
@@ -6147,10 +6653,30 @@ var smf = (raw_params) => {
|
|
|
6147
6653
|
stroke_width: 0.1,
|
|
6148
6654
|
pcb_silkscreen_path_id: ""
|
|
6149
6655
|
};
|
|
6656
|
+
const p_v = length45.parse(parameters.p);
|
|
6657
|
+
const pl_v = length45.parse(parameters.pl);
|
|
6658
|
+
const pw_v = length45.parse(parameters.pw);
|
|
6659
|
+
const h_v = length45.parse(parameters.h);
|
|
6660
|
+
const w_v = length45.parse(parameters.w);
|
|
6661
|
+
const courtyardPadding = 0.25;
|
|
6662
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6663
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6664
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6665
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6666
|
+
const courtyard = {
|
|
6667
|
+
type: "pcb_courtyard_rect",
|
|
6668
|
+
pcb_courtyard_rect_id: "",
|
|
6669
|
+
pcb_component_id: "",
|
|
6670
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6671
|
+
width: crtMaxX - crtMinX,
|
|
6672
|
+
height: crtMaxY - crtMinY,
|
|
6673
|
+
layer: "top"
|
|
6674
|
+
};
|
|
6150
6675
|
return {
|
|
6151
6676
|
circuitJson: smfWithoutParsing(parameters).concat(
|
|
6152
6677
|
silkscreenLine,
|
|
6153
|
-
silkscreenRefText
|
|
6678
|
+
silkscreenRefText,
|
|
6679
|
+
courtyard
|
|
6154
6680
|
),
|
|
6155
6681
|
parameters
|
|
6156
6682
|
};
|
|
@@ -6227,10 +6753,30 @@ var smb = (raw_params) => {
|
|
|
6227
6753
|
stroke_width: 0.1,
|
|
6228
6754
|
pcb_silkscreen_path_id: ""
|
|
6229
6755
|
};
|
|
6756
|
+
const p_v = length46.parse(parameters.p);
|
|
6757
|
+
const pl_v = length46.parse(parameters.pl);
|
|
6758
|
+
const pw_v = length46.parse(parameters.pw);
|
|
6759
|
+
const h_v = length46.parse(parameters.h);
|
|
6760
|
+
const w_v = length46.parse(parameters.w);
|
|
6761
|
+
const courtyardPadding = 0.25;
|
|
6762
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6763
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6764
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
6765
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
6766
|
+
const courtyard = {
|
|
6767
|
+
type: "pcb_courtyard_rect",
|
|
6768
|
+
pcb_courtyard_rect_id: "",
|
|
6769
|
+
pcb_component_id: "",
|
|
6770
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6771
|
+
width: crtMaxX - crtMinX,
|
|
6772
|
+
height: crtMaxY - crtMinY,
|
|
6773
|
+
layer: "top"
|
|
6774
|
+
};
|
|
6230
6775
|
return {
|
|
6231
6776
|
circuitJson: smbWithoutParsing(parameters).concat(
|
|
6232
6777
|
silkscreenLine,
|
|
6233
|
-
silkscreenRefText
|
|
6778
|
+
silkscreenRefText,
|
|
6779
|
+
courtyard
|
|
6234
6780
|
),
|
|
6235
6781
|
parameters
|
|
6236
6782
|
};
|
|
@@ -6303,10 +6849,30 @@ var smc = (raw_params) => {
|
|
|
6303
6849
|
stroke_width: 0.1,
|
|
6304
6850
|
pcb_silkscreen_path_id: ""
|
|
6305
6851
|
};
|
|
6852
|
+
const p_v = length47.parse(parameters.p);
|
|
6853
|
+
const pl_v = length47.parse(parameters.pl);
|
|
6854
|
+
const pw_v = length47.parse(parameters.pw);
|
|
6855
|
+
const h_v = length47.parse(parameters.h);
|
|
6856
|
+
const w_v = length47.parse(parameters.w);
|
|
6857
|
+
const courtyardPadding = 0.25;
|
|
6858
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.8, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
6859
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
6860
|
+
const crtMinY = -(Math.max(h_v / 2 - 0.8, pw_v / 2) + courtyardPadding);
|
|
6861
|
+
const crtMaxY = Math.max(h_v / 2 - 0.8, pw_v / 2) + courtyardPadding;
|
|
6862
|
+
const courtyard = {
|
|
6863
|
+
type: "pcb_courtyard_rect",
|
|
6864
|
+
pcb_courtyard_rect_id: "",
|
|
6865
|
+
pcb_component_id: "",
|
|
6866
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
6867
|
+
width: crtMaxX - crtMinX,
|
|
6868
|
+
height: crtMaxY - crtMinY,
|
|
6869
|
+
layer: "top"
|
|
6870
|
+
};
|
|
6306
6871
|
return {
|
|
6307
6872
|
circuitJson: smcWithoutParsing(parameters).concat(
|
|
6308
6873
|
silkscreenLine,
|
|
6309
|
-
silkscreenRefText
|
|
6874
|
+
silkscreenRefText,
|
|
6875
|
+
courtyard
|
|
6310
6876
|
),
|
|
6311
6877
|
parameters
|
|
6312
6878
|
};
|
|
@@ -6441,11 +7007,31 @@ var sot223_4 = (parameters) => {
|
|
|
6441
7007
|
type: "pcb_silkscreen_path",
|
|
6442
7008
|
stroke_width: 0.1
|
|
6443
7009
|
};
|
|
7010
|
+
const w = Number.parseFloat(parameters.w);
|
|
7011
|
+
const pl = Number.parseFloat(parameters.pl);
|
|
7012
|
+
const p = Number.parseFloat(parameters.p);
|
|
7013
|
+
const pw = Number.parseFloat(parameters.pw);
|
|
7014
|
+
const courtyardPadding = 0.25;
|
|
7015
|
+
const padCenterX = w / 2 - 1.1;
|
|
7016
|
+
const crtMinX = -(padCenterX + pl / 2 + courtyardPadding);
|
|
7017
|
+
const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
|
|
7018
|
+
const crtMinY = -(p + pw / 2 + courtyardPadding);
|
|
7019
|
+
const crtMaxY = p + pw / 2 + courtyardPadding;
|
|
7020
|
+
const courtyard = {
|
|
7021
|
+
type: "pcb_courtyard_rect",
|
|
7022
|
+
pcb_courtyard_rect_id: "",
|
|
7023
|
+
pcb_component_id: "",
|
|
7024
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7025
|
+
width: crtMaxX - crtMinX,
|
|
7026
|
+
height: crtMaxY - crtMinY,
|
|
7027
|
+
layer: "top"
|
|
7028
|
+
};
|
|
6444
7029
|
return [
|
|
6445
7030
|
...pads,
|
|
6446
7031
|
silkscreenPath1,
|
|
6447
7032
|
silkscreenPath2,
|
|
6448
|
-
silkscreenRefText
|
|
7033
|
+
silkscreenRefText,
|
|
7034
|
+
courtyard
|
|
6449
7035
|
];
|
|
6450
7036
|
};
|
|
6451
7037
|
var sot223_8_def = extendSoicDef({
|
|
@@ -6519,7 +7105,30 @@ var sot223_5 = (parameters) => {
|
|
|
6519
7105
|
stroke_width: 0.1
|
|
6520
7106
|
};
|
|
6521
7107
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
6522
|
-
|
|
7108
|
+
const w = Number.parseFloat(parameters.w);
|
|
7109
|
+
const courtyardPadding = 0.25;
|
|
7110
|
+
const padOuterX = w / 2 - 1.2 + 2.2 / 2;
|
|
7111
|
+
const crtMinX = -(padOuterX + courtyardPadding);
|
|
7112
|
+
const crtMaxX = padOuterX + courtyardPadding;
|
|
7113
|
+
const h5 = Number.parseFloat(parameters.h);
|
|
7114
|
+
const crtMinY = -(Math.max(h5 / 2, 2.25 + 0.5) + courtyardPadding);
|
|
7115
|
+
const crtMaxY = Math.max(h5 / 2, 2.25 + 0.5) + courtyardPadding;
|
|
7116
|
+
const courtyard = {
|
|
7117
|
+
type: "pcb_courtyard_rect",
|
|
7118
|
+
pcb_courtyard_rect_id: "",
|
|
7119
|
+
pcb_component_id: "",
|
|
7120
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7121
|
+
width: crtMaxX - crtMinX,
|
|
7122
|
+
height: crtMaxY - crtMinY,
|
|
7123
|
+
layer: "top"
|
|
7124
|
+
};
|
|
7125
|
+
return [
|
|
7126
|
+
...pads,
|
|
7127
|
+
silkscreenPath1,
|
|
7128
|
+
silkscreenPath2,
|
|
7129
|
+
silkscreenRefText,
|
|
7130
|
+
courtyard
|
|
7131
|
+
];
|
|
6523
7132
|
};
|
|
6524
7133
|
var get2CcwSot2236Coords = (parameters) => {
|
|
6525
7134
|
const { p, h, pn, w } = parameters;
|
|
@@ -6590,7 +7199,27 @@ var sot223_6 = (parameters) => {
|
|
|
6590
7199
|
stroke_width: 0.1
|
|
6591
7200
|
};
|
|
6592
7201
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
6593
|
-
|
|
7202
|
+
const courtyardPadding = 0.25;
|
|
7203
|
+
const crtMinX = -(4.25 + courtyardPadding);
|
|
7204
|
+
const crtMaxX = 4.25 + courtyardPadding;
|
|
7205
|
+
const crtMinY = -(2.9 + courtyardPadding);
|
|
7206
|
+
const crtMaxY = 2.9 + courtyardPadding;
|
|
7207
|
+
const courtyard = {
|
|
7208
|
+
type: "pcb_courtyard_rect",
|
|
7209
|
+
pcb_courtyard_rect_id: "",
|
|
7210
|
+
pcb_component_id: "",
|
|
7211
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7212
|
+
width: crtMaxX - crtMinX,
|
|
7213
|
+
height: crtMaxY - crtMinY,
|
|
7214
|
+
layer: "top"
|
|
7215
|
+
};
|
|
7216
|
+
return [
|
|
7217
|
+
...pads,
|
|
7218
|
+
silkscreenPath1,
|
|
7219
|
+
silkscreenPath2,
|
|
7220
|
+
silkscreenRefText,
|
|
7221
|
+
courtyard
|
|
7222
|
+
];
|
|
6594
7223
|
};
|
|
6595
7224
|
|
|
6596
7225
|
// src/fn/sot23w.ts
|
|
@@ -6682,11 +7311,30 @@ var sot23w_3 = (parameters) => {
|
|
|
6682
7311
|
type: "pcb_silkscreen_path",
|
|
6683
7312
|
stroke_width: 0.1
|
|
6684
7313
|
};
|
|
7314
|
+
const p = Number.parseFloat(parameters.p);
|
|
7315
|
+
const pl = Number.parseFloat(parameters.pl);
|
|
7316
|
+
const pw = Number.parseFloat(parameters.pw);
|
|
7317
|
+
const h = Number.parseFloat(parameters.h);
|
|
7318
|
+
const courtyardPadding = 0.25;
|
|
7319
|
+
const crtMinX = -(p + pl / 2 + courtyardPadding);
|
|
7320
|
+
const crtMaxX = p + pl / 2 + courtyardPadding;
|
|
7321
|
+
const crtMinY = -(Math.max(h / 2, 0.95 + pw / 2) + courtyardPadding);
|
|
7322
|
+
const crtMaxY = Math.max(h / 2, 0.95 + pw / 2) + courtyardPadding;
|
|
7323
|
+
const courtyard = {
|
|
7324
|
+
type: "pcb_courtyard_rect",
|
|
7325
|
+
pcb_courtyard_rect_id: "",
|
|
7326
|
+
pcb_component_id: "",
|
|
7327
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7328
|
+
width: crtMaxX - crtMinX,
|
|
7329
|
+
height: crtMaxY - crtMinY,
|
|
7330
|
+
layer: "top"
|
|
7331
|
+
};
|
|
6685
7332
|
return [
|
|
6686
7333
|
...pads,
|
|
6687
7334
|
silkscreenPath1,
|
|
6688
7335
|
silkscreenPath2,
|
|
6689
|
-
silkscreenRefText
|
|
7336
|
+
silkscreenRefText,
|
|
7337
|
+
courtyard
|
|
6690
7338
|
];
|
|
6691
7339
|
};
|
|
6692
7340
|
|
|
@@ -6755,11 +7403,26 @@ var to92s = (raw_params) => {
|
|
|
6755
7403
|
pcb_silkscreen_path_id: ""
|
|
6756
7404
|
};
|
|
6757
7405
|
const silkscreenRefText = silkscreenRef(0, holeY + 1, 0.5);
|
|
7406
|
+
const od_v = Number.parseFloat(parameters.od);
|
|
7407
|
+
const courtyardPadding = 0.25;
|
|
7408
|
+
const crtHalfX = Math.max(holeY, padSpacing7 + od_v / 2) + courtyardPadding;
|
|
7409
|
+
const crtMinY = -courtyardPadding;
|
|
7410
|
+
const crtMaxY = holeY + 0.5 + courtyardPadding;
|
|
7411
|
+
const courtyard = {
|
|
7412
|
+
type: "pcb_courtyard_rect",
|
|
7413
|
+
pcb_courtyard_rect_id: "",
|
|
7414
|
+
pcb_component_id: "",
|
|
7415
|
+
center: { x: 0, y: (crtMinY + crtMaxY) / 2 },
|
|
7416
|
+
width: 2 * crtHalfX,
|
|
7417
|
+
height: crtMaxY - crtMinY,
|
|
7418
|
+
layer: "top"
|
|
7419
|
+
};
|
|
6758
7420
|
return {
|
|
6759
7421
|
circuitJson: [
|
|
6760
7422
|
...platedHoles,
|
|
6761
7423
|
silkscreenBody,
|
|
6762
|
-
silkscreenRefText
|
|
7424
|
+
silkscreenRefText,
|
|
7425
|
+
courtyard
|
|
6763
7426
|
],
|
|
6764
7427
|
parameters
|
|
6765
7428
|
};
|
|
@@ -6954,8 +7617,47 @@ var jst = (raw_params) => {
|
|
|
6954
7617
|
const pads = generatePads(variant, numPins, p, id, pw, pl);
|
|
6955
7618
|
const silkscreenBody = generateSilkscreenBody(variant, w, h, numPins, p);
|
|
6956
7619
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 1, 0.5);
|
|
7620
|
+
const courtyardPadding = 0.25;
|
|
7621
|
+
let crtMinX;
|
|
7622
|
+
let crtMaxX;
|
|
7623
|
+
let crtMinY;
|
|
7624
|
+
let crtMaxY;
|
|
7625
|
+
if (variant === "ph") {
|
|
7626
|
+
const pinHalfSpan = (numPins - 1) / 2 * p + pw / 2;
|
|
7627
|
+
crtMinX = -Math.max(pinHalfSpan, 3) - courtyardPadding;
|
|
7628
|
+
crtMaxX = Math.max(pinHalfSpan, 3) + courtyardPadding;
|
|
7629
|
+
crtMinY = -2 - courtyardPadding;
|
|
7630
|
+
crtMaxY = 3 + courtyardPadding;
|
|
7631
|
+
} else if (variant === "sh") {
|
|
7632
|
+
const sideOffset = (numPins - 1) / 2 * p + 1.3;
|
|
7633
|
+
crtMinX = -(sideOffset + 0.6 + courtyardPadding);
|
|
7634
|
+
crtMaxX = sideOffset + 0.6 + courtyardPadding;
|
|
7635
|
+
crtMinY = -1.325 - pl / 2 - courtyardPadding;
|
|
7636
|
+
crtMaxY = 1.22 + 0.9 + courtyardPadding;
|
|
7637
|
+
} else {
|
|
7638
|
+
const pinSpan = (numPins - 1) * p;
|
|
7639
|
+
const bodyHalfW = pinSpan / 2 + 1.5;
|
|
7640
|
+
crtMinX = -(bodyHalfW + courtyardPadding);
|
|
7641
|
+
crtMaxX = bodyHalfW + courtyardPadding;
|
|
7642
|
+
crtMinY = -h / 2 - courtyardPadding;
|
|
7643
|
+
crtMaxY = h / 2 + courtyardPadding;
|
|
7644
|
+
}
|
|
7645
|
+
const courtyard = {
|
|
7646
|
+
type: "pcb_courtyard_rect",
|
|
7647
|
+
pcb_courtyard_rect_id: "",
|
|
7648
|
+
pcb_component_id: "",
|
|
7649
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7650
|
+
width: crtMaxX - crtMinX,
|
|
7651
|
+
height: crtMaxY - crtMinY,
|
|
7652
|
+
layer: "top"
|
|
7653
|
+
};
|
|
6957
7654
|
return {
|
|
6958
|
-
circuitJson: [
|
|
7655
|
+
circuitJson: [
|
|
7656
|
+
...pads,
|
|
7657
|
+
silkscreenBody,
|
|
7658
|
+
silkscreenRefText,
|
|
7659
|
+
courtyard
|
|
7660
|
+
],
|
|
6959
7661
|
parameters: {
|
|
6960
7662
|
...params,
|
|
6961
7663
|
p,
|
|
@@ -7016,10 +7718,30 @@ var sod110 = (raw_params) => {
|
|
|
7016
7718
|
stroke_width: 0.1,
|
|
7017
7719
|
pcb_silkscreen_path_id: ""
|
|
7018
7720
|
};
|
|
7721
|
+
const p_v = length49.parse(parameters.p);
|
|
7722
|
+
const pl_v = length49.parse(parameters.pl);
|
|
7723
|
+
const pw_v = length49.parse(parameters.pw);
|
|
7724
|
+
const h_v = length49.parse(parameters.h);
|
|
7725
|
+
const w_v = length49.parse(parameters.w);
|
|
7726
|
+
const courtyardPadding = 0.25;
|
|
7727
|
+
const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
7728
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
7729
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
7730
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
7731
|
+
const courtyard = {
|
|
7732
|
+
type: "pcb_courtyard_rect",
|
|
7733
|
+
pcb_courtyard_rect_id: "",
|
|
7734
|
+
pcb_component_id: "",
|
|
7735
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7736
|
+
width: crtMaxX - crtMinX,
|
|
7737
|
+
height: crtMaxY - crtMinY,
|
|
7738
|
+
layer: "top"
|
|
7739
|
+
};
|
|
7019
7740
|
return {
|
|
7020
7741
|
circuitJson: sodWithoutParsing13(parameters).concat(
|
|
7021
7742
|
silkscreenLine,
|
|
7022
|
-
silkscreenRefText
|
|
7743
|
+
silkscreenRefText,
|
|
7744
|
+
courtyard
|
|
7023
7745
|
),
|
|
7024
7746
|
parameters
|
|
7025
7747
|
};
|
|
@@ -7393,10 +8115,30 @@ var sod323w = (raw_params) => {
|
|
|
7393
8115
|
stroke_width: 0.1,
|
|
7394
8116
|
pcb_silkscreen_path_id: ""
|
|
7395
8117
|
};
|
|
8118
|
+
const pl_v = length52.parse(parameters.pl);
|
|
8119
|
+
const pw_v = length52.parse(parameters.pw);
|
|
8120
|
+
const h_v = length52.parse(parameters.h);
|
|
8121
|
+
const w_v = length52.parse(parameters.w);
|
|
8122
|
+
const ps_v = length52.parse(parameters.pad_spacing);
|
|
8123
|
+
const courtyardPadding = 0.25;
|
|
8124
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
|
|
8125
|
+
const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
|
|
8126
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
8127
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
8128
|
+
const courtyard = {
|
|
8129
|
+
type: "pcb_courtyard_rect",
|
|
8130
|
+
pcb_courtyard_rect_id: "",
|
|
8131
|
+
pcb_component_id: "",
|
|
8132
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
8133
|
+
width: crtMaxX - crtMinX,
|
|
8134
|
+
height: crtMaxY - crtMinY,
|
|
8135
|
+
layer: "top"
|
|
8136
|
+
};
|
|
7396
8137
|
return {
|
|
7397
8138
|
circuitJson: sodWithoutParsing14(parameters).concat(
|
|
7398
8139
|
silkscreenLine,
|
|
7399
|
-
silkscreenRefText
|
|
8140
|
+
silkscreenRefText,
|
|
8141
|
+
courtyard
|
|
7400
8142
|
),
|
|
7401
8143
|
parameters
|
|
7402
8144
|
};
|
|
@@ -7473,10 +8215,30 @@ var sod323fl = (raw_params) => {
|
|
|
7473
8215
|
stroke_width: 0.1,
|
|
7474
8216
|
pcb_silkscreen_path_id: ""
|
|
7475
8217
|
};
|
|
8218
|
+
const pl_v = length53.parse(parameters.pl);
|
|
8219
|
+
const pw_v = length53.parse(parameters.pw);
|
|
8220
|
+
const h_v = length53.parse(parameters.h);
|
|
8221
|
+
const w_v = length53.parse(parameters.w);
|
|
8222
|
+
const ps_v = length53.parse(parameters.pad_spacing);
|
|
8223
|
+
const courtyardPadding = 0.25;
|
|
8224
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
|
|
8225
|
+
const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
|
|
8226
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
8227
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
8228
|
+
const courtyard = {
|
|
8229
|
+
type: "pcb_courtyard_rect",
|
|
8230
|
+
pcb_courtyard_rect_id: "",
|
|
8231
|
+
pcb_component_id: "",
|
|
8232
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
8233
|
+
width: crtMaxX - crtMinX,
|
|
8234
|
+
height: crtMaxY - crtMinY,
|
|
8235
|
+
layer: "top"
|
|
8236
|
+
};
|
|
7476
8237
|
return {
|
|
7477
8238
|
circuitJson: sodWithoutParsing15(parameters).concat(
|
|
7478
8239
|
silkscreenLine,
|
|
7479
|
-
silkscreenRefText
|
|
8240
|
+
silkscreenRefText,
|
|
8241
|
+
courtyard
|
|
7480
8242
|
),
|
|
7481
8243
|
parameters
|
|
7482
8244
|
};
|
|
@@ -7679,8 +8441,23 @@ var vson = (raw_params) => {
|
|
|
7679
8441
|
grid.y / 2 + p,
|
|
7680
8442
|
grid.y / 6
|
|
7681
8443
|
);
|
|
8444
|
+
const courtyardPadding = 0.25;
|
|
8445
|
+
const centerY = (num_pins / 2 - 1) * p / 2;
|
|
8446
|
+
const crtMinX = -(w / 2 + pinw / 2 + courtyardPadding);
|
|
8447
|
+
const crtMaxX = w / 2 + pinw / 2 + courtyardPadding;
|
|
8448
|
+
const crtMinY = -(Math.max(grid.y / 2, centerY + pinh / 2) + courtyardPadding);
|
|
8449
|
+
const crtMaxY = Math.max(grid.y / 2, centerY + pinh / 2) + courtyardPadding;
|
|
8450
|
+
const courtyard = {
|
|
8451
|
+
type: "pcb_courtyard_rect",
|
|
8452
|
+
pcb_courtyard_rect_id: "",
|
|
8453
|
+
pcb_component_id: "",
|
|
8454
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
8455
|
+
width: crtMaxX - crtMinX,
|
|
8456
|
+
height: crtMaxY - crtMinY,
|
|
8457
|
+
layer: "top"
|
|
8458
|
+
};
|
|
7682
8459
|
return {
|
|
7683
|
-
circuitJson: [...pads, ...silkscreenPaths, silkscreenRefText],
|
|
8460
|
+
circuitJson: [...pads, ...silkscreenPaths, silkscreenRefText, courtyard],
|
|
7684
8461
|
parameters
|
|
7685
8462
|
};
|
|
7686
8463
|
};
|
|
@@ -7845,8 +8622,22 @@ var solderjumper = (params) => {
|
|
|
7845
8622
|
const refOffset = 0.6;
|
|
7846
8623
|
const refY = outlineCenterY + outlineHeight / 2 + refOffset;
|
|
7847
8624
|
const silk = silkscreenRef(outlineCenterX, refY, 0.4);
|
|
8625
|
+
const courtyardPadding = 0.25;
|
|
8626
|
+
const crtMinX = outlineCenterX - outlineWidth / 2 - courtyardPadding;
|
|
8627
|
+
const crtMaxX = outlineCenterX + outlineWidth / 2 + courtyardPadding;
|
|
8628
|
+
const crtMinY = -(outlineHeight / 2 + courtyardPadding);
|
|
8629
|
+
const crtMaxY = outlineHeight / 2 + courtyardPadding;
|
|
8630
|
+
const courtyard = {
|
|
8631
|
+
type: "pcb_courtyard_rect",
|
|
8632
|
+
pcb_courtyard_rect_id: "",
|
|
8633
|
+
pcb_component_id: "",
|
|
8634
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: 0 },
|
|
8635
|
+
width: crtMaxX - crtMinX,
|
|
8636
|
+
height: crtMaxY - crtMinY,
|
|
8637
|
+
layer: "top"
|
|
8638
|
+
};
|
|
7848
8639
|
return {
|
|
7849
|
-
circuitJson: [...pads, ...traces, silkscreenRect, silk],
|
|
8640
|
+
circuitJson: [...pads, ...traces, silkscreenRect, silk, courtyard],
|
|
7850
8641
|
parameters: params
|
|
7851
8642
|
};
|
|
7852
8643
|
};
|
|
@@ -7994,12 +8785,36 @@ var generateSot457Elements = (params) => {
|
|
|
7994
8785
|
],
|
|
7995
8786
|
stroke_width: 0.05
|
|
7996
8787
|
};
|
|
8788
|
+
const courtyardPadding = 0.25;
|
|
8789
|
+
let crtMinX, crtMaxX, crtMinY, crtMaxY;
|
|
8790
|
+
if (params.wave) {
|
|
8791
|
+
crtMinX = -(pitch + padWidth / 2 + courtyardPadding);
|
|
8792
|
+
crtMaxX = pitch + padWidth / 2 + courtyardPadding;
|
|
8793
|
+
crtMinY = -(pitch + padLength / 2 + courtyardPadding);
|
|
8794
|
+
crtMaxY = pitch + padLength / 2 + courtyardPadding;
|
|
8795
|
+
} else {
|
|
8796
|
+
const padCenterX = width / 2 + 0.1;
|
|
8797
|
+
crtMinX = -(padCenterX + padLength / 2 + courtyardPadding);
|
|
8798
|
+
crtMaxX = padCenterX + padLength / 2 + courtyardPadding;
|
|
8799
|
+
crtMinY = -(pitch + padWidth / 2 + courtyardPadding);
|
|
8800
|
+
crtMaxY = pitch + padWidth / 2 + courtyardPadding;
|
|
8801
|
+
}
|
|
8802
|
+
const courtyard = {
|
|
8803
|
+
type: "pcb_courtyard_rect",
|
|
8804
|
+
pcb_courtyard_rect_id: "",
|
|
8805
|
+
pcb_component_id: "",
|
|
8806
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
8807
|
+
width: crtMaxX - crtMinX,
|
|
8808
|
+
height: crtMaxY - crtMinY,
|
|
8809
|
+
layer: "top"
|
|
8810
|
+
};
|
|
7997
8811
|
return [
|
|
7998
8812
|
silkscreenRefText,
|
|
7999
8813
|
silkscreenPath1,
|
|
8000
8814
|
silkscreenPath2,
|
|
8001
8815
|
pin1Indicator,
|
|
8002
|
-
...pads
|
|
8816
|
+
...pads,
|
|
8817
|
+
courtyard
|
|
8003
8818
|
];
|
|
8004
8819
|
};
|
|
8005
8820
|
var sot457 = (rawParams) => {
|
|
@@ -8079,13 +8894,28 @@ var sot963 = (raw_params) => {
|
|
|
8079
8894
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
8080
8895
|
};
|
|
8081
8896
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
8897
|
+
const courtyardPadding = 0.25;
|
|
8898
|
+
const crtMinX = -(w / 2 + courtyardPadding);
|
|
8899
|
+
const crtMaxX = w / 2 + courtyardPadding;
|
|
8900
|
+
const crtMinY = -(Math.max(h / 2, p + pw / 2) + courtyardPadding);
|
|
8901
|
+
const crtMaxY = Math.max(h / 2, p + pw / 2) + courtyardPadding;
|
|
8902
|
+
const courtyard = {
|
|
8903
|
+
type: "pcb_courtyard_rect",
|
|
8904
|
+
pcb_courtyard_rect_id: "",
|
|
8905
|
+
pcb_component_id: "",
|
|
8906
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
8907
|
+
width: crtMaxX - crtMinX,
|
|
8908
|
+
height: crtMaxY - crtMinY,
|
|
8909
|
+
layer: "top"
|
|
8910
|
+
};
|
|
8082
8911
|
return {
|
|
8083
8912
|
circuitJson: [
|
|
8084
8913
|
...pads,
|
|
8085
8914
|
silkscreenTopLine,
|
|
8086
8915
|
silkscreenBottomLine,
|
|
8087
8916
|
silkscreenRefText,
|
|
8088
|
-
pin1Marking
|
|
8917
|
+
pin1Marking,
|
|
8918
|
+
courtyard
|
|
8089
8919
|
],
|
|
8090
8920
|
parameters
|
|
8091
8921
|
};
|
|
@@ -8165,12 +8995,29 @@ var potentiometer = (raw_params) => {
|
|
|
8165
8995
|
};
|
|
8166
8996
|
const W = Number.parseFloat(parameters.w) / 2;
|
|
8167
8997
|
const silkscreenRefText = silkscreenRef(W, y + 1, 0.5);
|
|
8998
|
+
const pad_radius = Number.parseFloat(parameters.od) / 2;
|
|
8999
|
+
const h_hole = Number.parseFloat(parameters.h);
|
|
9000
|
+
const courtyardPadding = 0.25;
|
|
9001
|
+
const crtMinX = -(pad_radius + courtyardPadding);
|
|
9002
|
+
const crtMaxX = Math.max(x, h_hole + pad_radius) + courtyardPadding;
|
|
9003
|
+
const crtMinY = -(y + courtyardPadding);
|
|
9004
|
+
const crtMaxY = y + courtyardPadding;
|
|
9005
|
+
const courtyard = {
|
|
9006
|
+
type: "pcb_courtyard_rect",
|
|
9007
|
+
pcb_courtyard_rect_id: "",
|
|
9008
|
+
pcb_component_id: "",
|
|
9009
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: 0 },
|
|
9010
|
+
width: crtMaxX - crtMinX,
|
|
9011
|
+
height: crtMaxY - crtMinY,
|
|
9012
|
+
layer: "top"
|
|
9013
|
+
};
|
|
8168
9014
|
return {
|
|
8169
9015
|
circuitJson: [
|
|
8170
9016
|
...platedHoles,
|
|
8171
9017
|
silkscreenBody,
|
|
8172
9018
|
silkscreenBody2,
|
|
8173
|
-
silkscreenRefText
|
|
9019
|
+
silkscreenRefText,
|
|
9020
|
+
courtyard
|
|
8174
9021
|
],
|
|
8175
9022
|
parameters
|
|
8176
9023
|
};
|
|
@@ -8278,6 +9125,22 @@ var electrolytic = (raw_params) => {
|
|
|
8278
9125
|
pcb_silkscreen_path_id: ""
|
|
8279
9126
|
};
|
|
8280
9127
|
const silkscreenRefText = silkscreenRef(0, d / 2 + 1, 0.5);
|
|
9128
|
+
const bodyR = d / 2 + 0.1;
|
|
9129
|
+
const plusLeftExtent = Math.abs(X) + Size;
|
|
9130
|
+
const courtyardPadding = 0.25;
|
|
9131
|
+
const crtMinX = -Math.max(bodyR, plusLeftExtent) - courtyardPadding;
|
|
9132
|
+
const crtMaxX = bodyR + courtyardPadding;
|
|
9133
|
+
const crtMinY = -(bodyR + courtyardPadding);
|
|
9134
|
+
const crtMaxY = bodyR + courtyardPadding;
|
|
9135
|
+
const courtyard = {
|
|
9136
|
+
type: "pcb_courtyard_rect",
|
|
9137
|
+
pcb_courtyard_rect_id: "",
|
|
9138
|
+
pcb_component_id: "",
|
|
9139
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: 0 },
|
|
9140
|
+
width: crtMaxX - crtMinX,
|
|
9141
|
+
height: crtMaxY - crtMinY,
|
|
9142
|
+
layer: "top"
|
|
9143
|
+
};
|
|
8281
9144
|
return {
|
|
8282
9145
|
circuitJson: [
|
|
8283
9146
|
...plated_holes,
|
|
@@ -8286,7 +9149,8 @@ var electrolytic = (raw_params) => {
|
|
|
8286
9149
|
silkscreenBody,
|
|
8287
9150
|
silkscreenpath2,
|
|
8288
9151
|
silkscreenline,
|
|
8289
|
-
silkscreenRefText
|
|
9152
|
+
silkscreenRefText,
|
|
9153
|
+
courtyard
|
|
8290
9154
|
],
|
|
8291
9155
|
parameters
|
|
8292
9156
|
};
|
|
@@ -8336,10 +9200,30 @@ var smbf = (raw_params) => {
|
|
|
8336
9200
|
stroke_width: 0.1,
|
|
8337
9201
|
pcb_silkscreen_path_id: ""
|
|
8338
9202
|
};
|
|
9203
|
+
const p_v = length59.parse(parameters.p);
|
|
9204
|
+
const pl_v = length59.parse(parameters.pl);
|
|
9205
|
+
const pw_v = length59.parse(parameters.pw);
|
|
9206
|
+
const h_v = length59.parse(parameters.h);
|
|
9207
|
+
const w_v = length59.parse(parameters.w);
|
|
9208
|
+
const courtyardPadding = 0.25;
|
|
9209
|
+
const crtMinX = -(Math.max(w_v / 2 + 0.3, p_v / 2 + pl_v / 2) + courtyardPadding);
|
|
9210
|
+
const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
|
|
9211
|
+
const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
|
|
9212
|
+
const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
|
|
9213
|
+
const courtyard = {
|
|
9214
|
+
type: "pcb_courtyard_rect",
|
|
9215
|
+
pcb_courtyard_rect_id: "",
|
|
9216
|
+
pcb_component_id: "",
|
|
9217
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
9218
|
+
width: crtMaxX - crtMinX,
|
|
9219
|
+
height: crtMaxY - crtMinY,
|
|
9220
|
+
layer: "top"
|
|
9221
|
+
};
|
|
8339
9222
|
return {
|
|
8340
9223
|
circuitJson: smbfWithoutParsing(parameters).concat(
|
|
8341
9224
|
silkscreenLine,
|
|
8342
|
-
silkscreenRefText
|
|
9225
|
+
silkscreenRefText,
|
|
9226
|
+
courtyard
|
|
8343
9227
|
),
|
|
8344
9228
|
parameters
|
|
8345
9229
|
};
|
|
@@ -8460,11 +9344,30 @@ var sot323_3 = (parameters) => {
|
|
|
8460
9344
|
type: "pcb_silkscreen_path",
|
|
8461
9345
|
stroke_width: 0.1
|
|
8462
9346
|
};
|
|
9347
|
+
const p = Number.parseFloat(parameters.p);
|
|
9348
|
+
const pl = Number.parseFloat(parameters.pl);
|
|
9349
|
+
const pw = Number.parseFloat(parameters.pw);
|
|
9350
|
+
const h = Number.parseFloat(parameters.h);
|
|
9351
|
+
const courtyardPadding = 0.25;
|
|
9352
|
+
const crtMinX = -(p + pl / 2 + courtyardPadding);
|
|
9353
|
+
const crtMaxX = p + pl / 2 + courtyardPadding;
|
|
9354
|
+
const crtMinY = -(Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding);
|
|
9355
|
+
const crtMaxY = Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding;
|
|
9356
|
+
const courtyard = {
|
|
9357
|
+
type: "pcb_courtyard_rect",
|
|
9358
|
+
pcb_courtyard_rect_id: "",
|
|
9359
|
+
pcb_component_id: "",
|
|
9360
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
9361
|
+
width: crtMaxX - crtMinX,
|
|
9362
|
+
height: crtMaxY - crtMinY,
|
|
9363
|
+
layer: "top"
|
|
9364
|
+
};
|
|
8463
9365
|
return [
|
|
8464
9366
|
...pads,
|
|
8465
9367
|
silkscreenPath1,
|
|
8466
9368
|
silkscreenPath2,
|
|
8467
|
-
silkscreenRefText
|
|
9369
|
+
silkscreenRefText,
|
|
9370
|
+
courtyard
|
|
8468
9371
|
];
|
|
8469
9372
|
};
|
|
8470
9373
|
|
|
@@ -8722,12 +9625,33 @@ var sotWithoutParsing = (parameters) => {
|
|
|
8722
9625
|
],
|
|
8723
9626
|
stroke_width: 0.05
|
|
8724
9627
|
};
|
|
9628
|
+
const h_val = Number.parseFloat(parameters.h);
|
|
9629
|
+
const p_val = Number.parseFloat(parameters.p);
|
|
9630
|
+
const pl_val = Number.parseFloat(parameters.pl);
|
|
9631
|
+
const pw_val = Number.parseFloat(parameters.pw);
|
|
9632
|
+
const courtyardPadding = 0.25;
|
|
9633
|
+
const padCenterX = h_val / 2 + 0.5;
|
|
9634
|
+
const silkscreenY = h_val / 2 + p_val / 1.3;
|
|
9635
|
+
const crtMinX = -(padCenterX + pl_val / 2 + courtyardPadding);
|
|
9636
|
+
const crtMaxX = padCenterX + pl_val / 2 + courtyardPadding;
|
|
9637
|
+
const crtMinY = -(Math.max(silkscreenY, p_val + pw_val / 2) + courtyardPadding);
|
|
9638
|
+
const crtMaxY = Math.max(silkscreenY, p_val + pw_val / 2) + courtyardPadding;
|
|
9639
|
+
const courtyard = {
|
|
9640
|
+
type: "pcb_courtyard_rect",
|
|
9641
|
+
pcb_courtyard_rect_id: "",
|
|
9642
|
+
pcb_component_id: "",
|
|
9643
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
9644
|
+
width: crtMaxX - crtMinX,
|
|
9645
|
+
height: crtMaxY - crtMinY,
|
|
9646
|
+
layer: "top"
|
|
9647
|
+
};
|
|
8725
9648
|
return [
|
|
8726
9649
|
...pads,
|
|
8727
9650
|
silkscreenRefText,
|
|
8728
9651
|
silkscreenPath1,
|
|
8729
9652
|
silkscreenPath2,
|
|
8730
|
-
pin1Indicator
|
|
9653
|
+
pin1Indicator,
|
|
9654
|
+
courtyard
|
|
8731
9655
|
];
|
|
8732
9656
|
};
|
|
8733
9657
|
|
|
@@ -8827,11 +9751,26 @@ var sot343_4 = (parameters) => {
|
|
|
8827
9751
|
type: "pcb_silkscreen_path",
|
|
8828
9752
|
stroke_width: 0.1
|
|
8829
9753
|
};
|
|
9754
|
+
const courtyardPadding = 0.25;
|
|
9755
|
+
const crtMinX = minX - pl / 2 - courtyardPadding;
|
|
9756
|
+
const crtMaxX = maxX + pl / 2 + courtyardPadding;
|
|
9757
|
+
const crtMinY = -(offsetY + courtyardPadding);
|
|
9758
|
+
const crtMaxY = offsetY + courtyardPadding;
|
|
9759
|
+
const courtyard = {
|
|
9760
|
+
type: "pcb_courtyard_rect",
|
|
9761
|
+
pcb_courtyard_rect_id: "",
|
|
9762
|
+
pcb_component_id: "",
|
|
9763
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
9764
|
+
width: crtMaxX - crtMinX,
|
|
9765
|
+
height: crtMaxY - crtMinY,
|
|
9766
|
+
layer: "top"
|
|
9767
|
+
};
|
|
8830
9768
|
return [
|
|
8831
9769
|
...pads,
|
|
8832
9770
|
silkscreenPathTop,
|
|
8833
9771
|
silkscreenPathBottom,
|
|
8834
|
-
silkscreenRefText
|
|
9772
|
+
silkscreenRefText,
|
|
9773
|
+
courtyard
|
|
8835
9774
|
];
|
|
8836
9775
|
};
|
|
8837
9776
|
|
|
@@ -9495,8 +10434,27 @@ var to92l = (raw_params) => {
|
|
|
9495
10434
|
cy + radius + 1,
|
|
9496
10435
|
0.5
|
|
9497
10436
|
);
|
|
10437
|
+
const courtyardPadding = 0.25;
|
|
10438
|
+
const crtMinX = cx - radius - courtyardPadding;
|
|
10439
|
+
const crtMaxX = cx + radius + courtyardPadding;
|
|
10440
|
+
const crtMaxY = cy + radius + courtyardPadding;
|
|
10441
|
+
const crtMinY = y_bottom - courtyardPadding;
|
|
10442
|
+
const courtyard = {
|
|
10443
|
+
type: "pcb_courtyard_rect",
|
|
10444
|
+
pcb_courtyard_rect_id: "",
|
|
10445
|
+
pcb_component_id: "",
|
|
10446
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
10447
|
+
width: crtMaxX - crtMinX,
|
|
10448
|
+
height: crtMaxY - crtMinY,
|
|
10449
|
+
layer: "top"
|
|
10450
|
+
};
|
|
9498
10451
|
return {
|
|
9499
|
-
circuitJson: [
|
|
10452
|
+
circuitJson: [
|
|
10453
|
+
...holes,
|
|
10454
|
+
silkBody,
|
|
10455
|
+
silkscreenRefText,
|
|
10456
|
+
courtyard
|
|
10457
|
+
],
|
|
9500
10458
|
parameters
|
|
9501
10459
|
};
|
|
9502
10460
|
};
|