@tscircuit/footprinter 0.0.331 → 0.0.333
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 +633 -33
- 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
|
};
|
|
@@ -3301,6 +3331,21 @@ var radial = (raw_params) => {
|
|
|
3301
3331
|
if (hasPolarity) {
|
|
3302
3332
|
circuitJson.push(plusHoriz, plusVert);
|
|
3303
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);
|
|
3304
3349
|
return {
|
|
3305
3350
|
circuitJson,
|
|
3306
3351
|
parameters
|
|
@@ -3308,7 +3353,9 @@ var radial = (raw_params) => {
|
|
|
3308
3353
|
};
|
|
3309
3354
|
|
|
3310
3355
|
// src/fn/pushbutton.ts
|
|
3311
|
-
import {
|
|
3356
|
+
import {
|
|
3357
|
+
length as length21
|
|
3358
|
+
} from "circuit-json";
|
|
3312
3359
|
import { z as z29 } from "zod";
|
|
3313
3360
|
|
|
3314
3361
|
// src/helpers/silkscreenpath.ts
|
|
@@ -3368,8 +3415,19 @@ var pushbutton = (raw_params) => {
|
|
|
3368
3415
|
height / 2 + 0.4,
|
|
3369
3416
|
0.5
|
|
3370
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
|
+
};
|
|
3371
3429
|
return {
|
|
3372
|
-
circuitJson: [...holes, ...silkscreenLines, silkscreenRefText],
|
|
3430
|
+
circuitJson: [...holes, ...silkscreenLines, silkscreenRefText, courtyard],
|
|
3373
3431
|
parameters
|
|
3374
3432
|
};
|
|
3375
3433
|
};
|
|
@@ -4618,10 +4676,30 @@ var sod523 = (raw_params) => {
|
|
|
4618
4676
|
stroke_width: 0.1,
|
|
4619
4677
|
pcb_silkscreen_path_id: ""
|
|
4620
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
|
+
};
|
|
4621
4698
|
return {
|
|
4622
4699
|
circuitJson: sodWithoutParsing2(parameters).concat(
|
|
4623
4700
|
silkscreenLine,
|
|
4624
|
-
silkscreenRefText
|
|
4701
|
+
silkscreenRefText,
|
|
4702
|
+
courtyard
|
|
4625
4703
|
),
|
|
4626
4704
|
parameters
|
|
4627
4705
|
};
|
|
@@ -4759,10 +4837,30 @@ var sod80 = (raw_params) => {
|
|
|
4759
4837
|
stroke_width: 0.1,
|
|
4760
4838
|
pcb_silkscreen_path_id: ""
|
|
4761
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
|
+
};
|
|
4762
4859
|
return {
|
|
4763
4860
|
circuitJson: sod80WithoutParsing(parameters).concat(
|
|
4764
4861
|
silkscreenLine,
|
|
4765
|
-
silkscreenRefText
|
|
4862
|
+
silkscreenRefText,
|
|
4863
|
+
courtyard
|
|
4766
4864
|
),
|
|
4767
4865
|
parameters
|
|
4768
4866
|
};
|
|
@@ -4835,10 +4933,30 @@ var sod123w = (raw_params) => {
|
|
|
4835
4933
|
stroke_width: 0.1,
|
|
4836
4934
|
pcb_silkscreen_path_id: ""
|
|
4837
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
|
+
};
|
|
4838
4955
|
return {
|
|
4839
4956
|
circuitJson: sodWithoutParsing3(parameters).concat(
|
|
4840
4957
|
silkscreenLine,
|
|
4841
|
-
silkscreenRefText
|
|
4958
|
+
silkscreenRefText,
|
|
4959
|
+
courtyard
|
|
4842
4960
|
),
|
|
4843
4961
|
parameters
|
|
4844
4962
|
};
|
|
@@ -4914,10 +5032,30 @@ var sod323 = (raw_params) => {
|
|
|
4914
5032
|
stroke_width: 0.1,
|
|
4915
5033
|
pcb_silkscreen_path_id: ""
|
|
4916
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
|
+
};
|
|
4917
5054
|
return {
|
|
4918
5055
|
circuitJson: sodWithoutParsing4(parameters).concat(
|
|
4919
5056
|
silkscreenLine,
|
|
4920
|
-
silkscreenRefText
|
|
5057
|
+
silkscreenRefText,
|
|
5058
|
+
courtyard
|
|
4921
5059
|
),
|
|
4922
5060
|
parameters
|
|
4923
5061
|
};
|
|
@@ -4993,10 +5131,30 @@ var sod923 = (raw_params) => {
|
|
|
4993
5131
|
stroke_width: 0.1,
|
|
4994
5132
|
pcb_silkscreen_path_id: ""
|
|
4995
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
|
+
};
|
|
4996
5153
|
return {
|
|
4997
5154
|
circuitJson: sodWithoutParsing5(parameters).concat(
|
|
4998
5155
|
silkscreenLine,
|
|
4999
|
-
silkscreenRefText
|
|
5156
|
+
silkscreenRefText,
|
|
5157
|
+
courtyard
|
|
5000
5158
|
),
|
|
5001
5159
|
parameters
|
|
5002
5160
|
};
|
|
@@ -5073,10 +5231,30 @@ var sod882 = (raw_params) => {
|
|
|
5073
5231
|
stroke_width: 0.1,
|
|
5074
5232
|
pcb_silkscreen_path_id: ""
|
|
5075
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
|
+
};
|
|
5076
5253
|
return {
|
|
5077
5254
|
circuitJson: sodWithoutParsing6(parameters).concat(
|
|
5078
5255
|
silkscreenLine,
|
|
5079
|
-
silkscreenRefText
|
|
5256
|
+
silkscreenRefText,
|
|
5257
|
+
courtyard
|
|
5080
5258
|
),
|
|
5081
5259
|
parameters
|
|
5082
5260
|
};
|
|
@@ -5153,10 +5331,30 @@ var sod323f = (raw_params) => {
|
|
|
5153
5331
|
stroke_width: 0.1,
|
|
5154
5332
|
pcb_silkscreen_path_id: ""
|
|
5155
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
|
+
};
|
|
5156
5353
|
return {
|
|
5157
5354
|
circuitJson: sodWithoutParsing7(parameters).concat(
|
|
5158
5355
|
silkscreenLine,
|
|
5159
|
-
silkscreenRefText
|
|
5356
|
+
silkscreenRefText,
|
|
5357
|
+
courtyard
|
|
5160
5358
|
),
|
|
5161
5359
|
parameters
|
|
5162
5360
|
};
|
|
@@ -5233,10 +5431,30 @@ var sod123f = (raw_params) => {
|
|
|
5233
5431
|
stroke_width: 0.1,
|
|
5234
5432
|
pcb_silkscreen_path_id: ""
|
|
5235
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
|
+
};
|
|
5236
5453
|
return {
|
|
5237
5454
|
circuitJson: sodWithoutParsing8(parameters).concat(
|
|
5238
5455
|
silkscreenLine,
|
|
5239
|
-
silkscreenRefText
|
|
5456
|
+
silkscreenRefText,
|
|
5457
|
+
courtyard
|
|
5240
5458
|
),
|
|
5241
5459
|
parameters
|
|
5242
5460
|
};
|
|
@@ -5313,10 +5531,30 @@ var sod123fl = (raw_params) => {
|
|
|
5313
5531
|
stroke_width: 0.1,
|
|
5314
5532
|
pcb_silkscreen_path_id: ""
|
|
5315
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
|
+
};
|
|
5316
5553
|
return {
|
|
5317
5554
|
circuitJson: sodWithoutParsing9(parameters).concat(
|
|
5318
5555
|
silkscreenLine,
|
|
5319
|
-
silkscreenRefText
|
|
5556
|
+
silkscreenRefText,
|
|
5557
|
+
courtyard
|
|
5320
5558
|
),
|
|
5321
5559
|
parameters
|
|
5322
5560
|
};
|
|
@@ -5393,10 +5631,30 @@ var sod723 = (raw_params) => {
|
|
|
5393
5631
|
stroke_width: 0.1,
|
|
5394
5632
|
pcb_silkscreen_path_id: ""
|
|
5395
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
|
+
};
|
|
5396
5653
|
return {
|
|
5397
5654
|
circuitJson: sodWithoutParsing10(parameters).concat(
|
|
5398
5655
|
silkscreenLine,
|
|
5399
|
-
silkscreenRefText
|
|
5656
|
+
silkscreenRefText,
|
|
5657
|
+
courtyard
|
|
5400
5658
|
),
|
|
5401
5659
|
parameters
|
|
5402
5660
|
};
|
|
@@ -5473,10 +5731,30 @@ var sod128 = (raw_params) => {
|
|
|
5473
5731
|
stroke_width: 0.1,
|
|
5474
5732
|
pcb_silkscreen_path_id: ""
|
|
5475
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
|
+
};
|
|
5476
5753
|
return {
|
|
5477
5754
|
circuitJson: sodWithoutParsing11(parameters).concat(
|
|
5478
5755
|
silkscreenLine,
|
|
5479
|
-
silkscreenRefText
|
|
5756
|
+
silkscreenRefText,
|
|
5757
|
+
courtyard
|
|
5480
5758
|
),
|
|
5481
5759
|
parameters
|
|
5482
5760
|
};
|
|
@@ -5881,10 +6159,30 @@ var minimelf = (raw_params) => {
|
|
|
5881
6159
|
stroke_width: 0.1,
|
|
5882
6160
|
pcb_silkscreen_path_id: ""
|
|
5883
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
|
+
};
|
|
5884
6181
|
return {
|
|
5885
6182
|
circuitJson: miniMelfWithoutParsing(parameters).concat(
|
|
5886
6183
|
silkscreenLine,
|
|
5887
|
-
silkscreenRefText
|
|
6184
|
+
silkscreenRefText,
|
|
6185
|
+
courtyard
|
|
5888
6186
|
),
|
|
5889
6187
|
parameters
|
|
5890
6188
|
};
|
|
@@ -5957,10 +6255,30 @@ var sod882d = (raw_params) => {
|
|
|
5957
6255
|
stroke_width: 0.1,
|
|
5958
6256
|
pcb_silkscreen_path_id: ""
|
|
5959
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
|
+
};
|
|
5960
6277
|
return {
|
|
5961
6278
|
circuitJson: sodWithoutParsing12(parameters).concat(
|
|
5962
6279
|
silkscreenLine,
|
|
5963
|
-
silkscreenRefText
|
|
6280
|
+
silkscreenRefText,
|
|
6281
|
+
courtyard
|
|
5964
6282
|
),
|
|
5965
6283
|
parameters
|
|
5966
6284
|
};
|
|
@@ -6037,10 +6355,30 @@ var melf = (raw_params) => {
|
|
|
6037
6355
|
stroke_width: 0.1,
|
|
6038
6356
|
pcb_silkscreen_path_id: ""
|
|
6039
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
|
+
};
|
|
6040
6377
|
return {
|
|
6041
6378
|
circuitJson: melfWithoutParsing(parameters).concat(
|
|
6042
6379
|
silkscreenLine,
|
|
6043
|
-
silkscreenRefText
|
|
6380
|
+
silkscreenRefText,
|
|
6381
|
+
courtyard
|
|
6044
6382
|
),
|
|
6045
6383
|
parameters
|
|
6046
6384
|
};
|
|
@@ -6117,10 +6455,30 @@ var micromelf = (raw_params) => {
|
|
|
6117
6455
|
stroke_width: 0.1,
|
|
6118
6456
|
pcb_silkscreen_path_id: ""
|
|
6119
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
|
+
};
|
|
6120
6477
|
return {
|
|
6121
6478
|
circuitJson: microMelfWithoutParsing(parameters).concat(
|
|
6122
6479
|
silkscreenLine,
|
|
6123
|
-
silkscreenRefText
|
|
6480
|
+
silkscreenRefText,
|
|
6481
|
+
courtyard
|
|
6124
6482
|
),
|
|
6125
6483
|
parameters
|
|
6126
6484
|
};
|
|
@@ -6295,10 +6653,30 @@ var smf = (raw_params) => {
|
|
|
6295
6653
|
stroke_width: 0.1,
|
|
6296
6654
|
pcb_silkscreen_path_id: ""
|
|
6297
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
|
+
};
|
|
6298
6675
|
return {
|
|
6299
6676
|
circuitJson: smfWithoutParsing(parameters).concat(
|
|
6300
6677
|
silkscreenLine,
|
|
6301
|
-
silkscreenRefText
|
|
6678
|
+
silkscreenRefText,
|
|
6679
|
+
courtyard
|
|
6302
6680
|
),
|
|
6303
6681
|
parameters
|
|
6304
6682
|
};
|
|
@@ -6375,10 +6753,30 @@ var smb = (raw_params) => {
|
|
|
6375
6753
|
stroke_width: 0.1,
|
|
6376
6754
|
pcb_silkscreen_path_id: ""
|
|
6377
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
|
+
};
|
|
6378
6775
|
return {
|
|
6379
6776
|
circuitJson: smbWithoutParsing(parameters).concat(
|
|
6380
6777
|
silkscreenLine,
|
|
6381
|
-
silkscreenRefText
|
|
6778
|
+
silkscreenRefText,
|
|
6779
|
+
courtyard
|
|
6382
6780
|
),
|
|
6383
6781
|
parameters
|
|
6384
6782
|
};
|
|
@@ -6451,10 +6849,30 @@ var smc = (raw_params) => {
|
|
|
6451
6849
|
stroke_width: 0.1,
|
|
6452
6850
|
pcb_silkscreen_path_id: ""
|
|
6453
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
|
+
};
|
|
6454
6871
|
return {
|
|
6455
6872
|
circuitJson: smcWithoutParsing(parameters).concat(
|
|
6456
6873
|
silkscreenLine,
|
|
6457
|
-
silkscreenRefText
|
|
6874
|
+
silkscreenRefText,
|
|
6875
|
+
courtyard
|
|
6458
6876
|
),
|
|
6459
6877
|
parameters
|
|
6460
6878
|
};
|
|
@@ -6985,11 +7403,26 @@ var to92s = (raw_params) => {
|
|
|
6985
7403
|
pcb_silkscreen_path_id: ""
|
|
6986
7404
|
};
|
|
6987
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
|
+
};
|
|
6988
7420
|
return {
|
|
6989
7421
|
circuitJson: [
|
|
6990
7422
|
...platedHoles,
|
|
6991
7423
|
silkscreenBody,
|
|
6992
|
-
silkscreenRefText
|
|
7424
|
+
silkscreenRefText,
|
|
7425
|
+
courtyard
|
|
6993
7426
|
],
|
|
6994
7427
|
parameters
|
|
6995
7428
|
};
|
|
@@ -7184,8 +7617,47 @@ var jst = (raw_params) => {
|
|
|
7184
7617
|
const pads = generatePads(variant, numPins, p, id, pw, pl);
|
|
7185
7618
|
const silkscreenBody = generateSilkscreenBody(variant, w, h, numPins, p);
|
|
7186
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
|
+
};
|
|
7187
7654
|
return {
|
|
7188
|
-
circuitJson: [
|
|
7655
|
+
circuitJson: [
|
|
7656
|
+
...pads,
|
|
7657
|
+
silkscreenBody,
|
|
7658
|
+
silkscreenRefText,
|
|
7659
|
+
courtyard
|
|
7660
|
+
],
|
|
7189
7661
|
parameters: {
|
|
7190
7662
|
...params,
|
|
7191
7663
|
p,
|
|
@@ -7246,10 +7718,30 @@ var sod110 = (raw_params) => {
|
|
|
7246
7718
|
stroke_width: 0.1,
|
|
7247
7719
|
pcb_silkscreen_path_id: ""
|
|
7248
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
|
+
};
|
|
7249
7740
|
return {
|
|
7250
7741
|
circuitJson: sodWithoutParsing13(parameters).concat(
|
|
7251
7742
|
silkscreenLine,
|
|
7252
|
-
silkscreenRefText
|
|
7743
|
+
silkscreenRefText,
|
|
7744
|
+
courtyard
|
|
7253
7745
|
),
|
|
7254
7746
|
parameters
|
|
7255
7747
|
};
|
|
@@ -7623,10 +8115,30 @@ var sod323w = (raw_params) => {
|
|
|
7623
8115
|
stroke_width: 0.1,
|
|
7624
8116
|
pcb_silkscreen_path_id: ""
|
|
7625
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
|
+
};
|
|
7626
8137
|
return {
|
|
7627
8138
|
circuitJson: sodWithoutParsing14(parameters).concat(
|
|
7628
8139
|
silkscreenLine,
|
|
7629
|
-
silkscreenRefText
|
|
8140
|
+
silkscreenRefText,
|
|
8141
|
+
courtyard
|
|
7630
8142
|
),
|
|
7631
8143
|
parameters
|
|
7632
8144
|
};
|
|
@@ -7703,10 +8215,30 @@ var sod323fl = (raw_params) => {
|
|
|
7703
8215
|
stroke_width: 0.1,
|
|
7704
8216
|
pcb_silkscreen_path_id: ""
|
|
7705
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
|
+
};
|
|
7706
8237
|
return {
|
|
7707
8238
|
circuitJson: sodWithoutParsing15(parameters).concat(
|
|
7708
8239
|
silkscreenLine,
|
|
7709
|
-
silkscreenRefText
|
|
8240
|
+
silkscreenRefText,
|
|
8241
|
+
courtyard
|
|
7710
8242
|
),
|
|
7711
8243
|
parameters
|
|
7712
8244
|
};
|
|
@@ -8090,8 +8622,22 @@ var solderjumper = (params) => {
|
|
|
8090
8622
|
const refOffset = 0.6;
|
|
8091
8623
|
const refY = outlineCenterY + outlineHeight / 2 + refOffset;
|
|
8092
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
|
+
};
|
|
8093
8639
|
return {
|
|
8094
|
-
circuitJson: [...pads, ...traces, silkscreenRect, silk],
|
|
8640
|
+
circuitJson: [...pads, ...traces, silkscreenRect, silk, courtyard],
|
|
8095
8641
|
parameters: params
|
|
8096
8642
|
};
|
|
8097
8643
|
};
|
|
@@ -8449,12 +8995,29 @@ var potentiometer = (raw_params) => {
|
|
|
8449
8995
|
};
|
|
8450
8996
|
const W = Number.parseFloat(parameters.w) / 2;
|
|
8451
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
|
+
};
|
|
8452
9014
|
return {
|
|
8453
9015
|
circuitJson: [
|
|
8454
9016
|
...platedHoles,
|
|
8455
9017
|
silkscreenBody,
|
|
8456
9018
|
silkscreenBody2,
|
|
8457
|
-
silkscreenRefText
|
|
9019
|
+
silkscreenRefText,
|
|
9020
|
+
courtyard
|
|
8458
9021
|
],
|
|
8459
9022
|
parameters
|
|
8460
9023
|
};
|
|
@@ -8562,6 +9125,22 @@ var electrolytic = (raw_params) => {
|
|
|
8562
9125
|
pcb_silkscreen_path_id: ""
|
|
8563
9126
|
};
|
|
8564
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
|
+
};
|
|
8565
9144
|
return {
|
|
8566
9145
|
circuitJson: [
|
|
8567
9146
|
...plated_holes,
|
|
@@ -8570,7 +9149,8 @@ var electrolytic = (raw_params) => {
|
|
|
8570
9149
|
silkscreenBody,
|
|
8571
9150
|
silkscreenpath2,
|
|
8572
9151
|
silkscreenline,
|
|
8573
|
-
silkscreenRefText
|
|
9152
|
+
silkscreenRefText,
|
|
9153
|
+
courtyard
|
|
8574
9154
|
],
|
|
8575
9155
|
parameters
|
|
8576
9156
|
};
|
|
@@ -8620,10 +9200,30 @@ var smbf = (raw_params) => {
|
|
|
8620
9200
|
stroke_width: 0.1,
|
|
8621
9201
|
pcb_silkscreen_path_id: ""
|
|
8622
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
|
+
};
|
|
8623
9222
|
return {
|
|
8624
9223
|
circuitJson: smbfWithoutParsing(parameters).concat(
|
|
8625
9224
|
silkscreenLine,
|
|
8626
|
-
silkscreenRefText
|
|
9225
|
+
silkscreenRefText,
|
|
9226
|
+
courtyard
|
|
8627
9227
|
),
|
|
8628
9228
|
parameters
|
|
8629
9229
|
};
|
|
@@ -9979,7 +10579,7 @@ function isNotNull(value) {
|
|
|
9979
10579
|
|
|
9980
10580
|
// src/footprinter.ts
|
|
9981
10581
|
var normalizeDefinition = (def) => {
|
|
9982
|
-
return def.trim().replace(/^sot-223-(\d+)(?=_|$)/i, "sot223_$1").replace(/^to-220f-(\d+)(?=_|$)/i, "to220f_$1");
|
|
10582
|
+
return def.trim().replace(/^sot-223-(\d+)(?=_|$)/i, "sot223_$1").replace(/^to-220f-(\d+)(?=_|$)/i, "to220f_$1").replace(/^jst_(ph|sh|zh)_(\d+)(?=_|$)/i, "jst$2_$1");
|
|
9983
10583
|
};
|
|
9984
10584
|
var string2 = (def) => {
|
|
9985
10585
|
let fp2 = footprinter();
|