@tscircuit/footprinter 0.0.329 → 0.0.331

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 CHANGED
@@ -2965,7 +2965,9 @@ var ms013 = (raw_params) => {
2965
2965
  };
2966
2966
 
2967
2967
  // src/fn/sot723.ts
2968
- import { length as length17 } from "circuit-json";
2968
+ import {
2969
+ length as length17
2970
+ } from "circuit-json";
2969
2971
  import { z as z25 } from "zod";
2970
2972
  var sot723_def = base_def.extend({
2971
2973
  fn: z25.string(),
@@ -2984,8 +2986,26 @@ var sot723 = (raw_params) => {
2984
2986
  length17.parse(parameters.h),
2985
2987
  0.2
2986
2988
  );
2989
+ const p_val = length17.parse(parameters.p);
2990
+ const pl_val = length17.parse(parameters.pl);
2991
+ const pw_val = length17.parse(parameters.pw);
2992
+ const h_val = length17.parse(parameters.h);
2993
+ const courtyardPadding = 0.25;
2994
+ const crtMinX = -(p_val + pl_val / 2 + courtyardPadding);
2995
+ const crtMaxX = p_val + pl_val / 2 + courtyardPadding;
2996
+ const crtMinY = -(Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding);
2997
+ const crtMaxY = Math.max(h_val / 2, 0.4 + pw_val / 2) + courtyardPadding;
2998
+ const courtyard = {
2999
+ type: "pcb_courtyard_rect",
3000
+ pcb_courtyard_rect_id: "",
3001
+ pcb_component_id: "",
3002
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
3003
+ width: crtMaxX - crtMinX,
3004
+ height: crtMaxY - crtMinY,
3005
+ layer: "top"
3006
+ };
2987
3007
  return {
2988
- circuitJson: [...pad2, silkscreenRefText],
3008
+ circuitJson: [...pad2, silkscreenRefText, courtyard],
2989
3009
  parameters
2990
3010
  };
2991
3011
  };
@@ -3042,9 +3062,27 @@ var sod123 = (raw_params) => {
3042
3062
  length18.parse(parameters.h) / 4 + 0.4,
3043
3063
  0.3
3044
3064
  );
3065
+ const p_val = length18.parse(parameters.p);
3066
+ const pl_val = length18.parse(parameters.pl);
3067
+ const pw_val = length18.parse(parameters.pw);
3068
+ const courtyardPadding = 0.25;
3069
+ const crtMinX = -(p_val / 2 + pl_val / 2 + courtyardPadding);
3070
+ const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
3071
+ const crtMinY = -(pw_val / 2 + courtyardPadding);
3072
+ const crtMaxY = pw_val / 2 + courtyardPadding;
3073
+ const courtyard = {
3074
+ type: "pcb_courtyard_rect",
3075
+ pcb_courtyard_rect_id: "",
3076
+ pcb_component_id: "",
3077
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
3078
+ width: crtMaxX - crtMinX,
3079
+ height: crtMaxY - crtMinY,
3080
+ layer: "top"
3081
+ };
3045
3082
  return {
3046
3083
  circuitJson: sodWithoutParsing(parameters).concat(
3047
- silkscreenRefText
3084
+ silkscreenRefText,
3085
+ courtyard
3048
3086
  ),
3049
3087
  parameters
3050
3088
  };
@@ -3107,11 +3145,26 @@ var axial = (raw_params) => {
3107
3145
  pcb_silkscreen_path_id: ""
3108
3146
  };
3109
3147
  const silkscreenRefText = silkscreenRef(0, 1.5, 0.5);
3148
+ const courtyardPadding = 0.25;
3149
+ const crtMinX = -(p / 2 + od / 2 + courtyardPadding);
3150
+ const crtMaxX = p / 2 + od / 2 + courtyardPadding;
3151
+ const crtMinY = -(od / 2 + courtyardPadding);
3152
+ const crtMaxY = od / 2 + courtyardPadding;
3153
+ const courtyard = {
3154
+ type: "pcb_courtyard_rect",
3155
+ pcb_courtyard_rect_id: "",
3156
+ pcb_component_id: "",
3157
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
3158
+ width: crtMaxX - crtMinX,
3159
+ height: crtMaxY - crtMinY,
3160
+ layer: "top"
3161
+ };
3110
3162
  return {
3111
3163
  circuitJson: [
3112
3164
  ...plated_holes,
3113
3165
  silkscreenLine,
3114
- silkscreenRefText
3166
+ silkscreenRefText,
3167
+ courtyard
3115
3168
  ],
3116
3169
  parameters
3117
3170
  };
@@ -4317,11 +4370,26 @@ var hc49 = (raw_params) => {
4317
4370
  pcb_silkscreen_path_id: ""
4318
4371
  };
4319
4372
  const silkscreenRefText = silkscreenRef(0, p / 4, 0.5);
4373
+ const courtyardPadding = 0.25;
4374
+ const crtMinX = -(w / 2 + radius + courtyardPadding);
4375
+ const crtMaxX = w / 2 + radius + courtyardPadding;
4376
+ const crtMinY = -(radius + courtyardPadding);
4377
+ const crtMaxY = radius + courtyardPadding;
4378
+ const courtyard = {
4379
+ type: "pcb_courtyard_rect",
4380
+ pcb_courtyard_rect_id: "",
4381
+ pcb_component_id: "",
4382
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4383
+ width: crtMaxX - crtMinX,
4384
+ height: crtMaxY - crtMinY,
4385
+ layer: "top"
4386
+ };
4320
4387
  return {
4321
4388
  circuitJson: [
4322
4389
  ...plated_holes,
4323
4390
  silkscreenBody,
4324
- silkscreenRefText
4391
+ silkscreenRefText,
4392
+ courtyard
4325
4393
  ],
4326
4394
  parameters
4327
4395
  };
@@ -4481,11 +4549,26 @@ var to92 = (raw_params) => {
4481
4549
  pcb_silkscreen_path_id: ""
4482
4550
  };
4483
4551
  const silkscreenRefText = silkscreenRef(0, holeY + 1, 0.5);
4552
+ const courtyardPadding = 0.25;
4553
+ const crtMinX = -(radius + courtyardPadding);
4554
+ const crtMaxX = radius + courtyardPadding;
4555
+ const crtMaxY = holeY + radius + courtyardPadding;
4556
+ const crtMinY = -courtyardPadding;
4557
+ const courtyard = {
4558
+ type: "pcb_courtyard_rect",
4559
+ pcb_courtyard_rect_id: "",
4560
+ pcb_component_id: "",
4561
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4562
+ width: crtMaxX - crtMinX,
4563
+ height: crtMaxY - crtMinY,
4564
+ layer: "top"
4565
+ };
4484
4566
  return {
4485
4567
  circuitJson: [
4486
4568
  ...platedHoles,
4487
4569
  silkscreenBody,
4488
- silkscreenRefText
4570
+ silkscreenRefText,
4571
+ courtyard
4489
4572
  ],
4490
4573
  parameters
4491
4574
  };
@@ -5478,11 +5561,27 @@ var sot89_3 = (parameters) => {
5478
5561
  type: "pcb_silkscreen_path",
5479
5562
  stroke_width: 0.1
5480
5563
  };
5564
+ const courtyardPadding = 0.25;
5565
+ const padOuterX = length63 / 2 + (padHeight + centerExtra) / 2;
5566
+ const crtMinX = -(padOuterX + courtyardPadding);
5567
+ const crtMaxX = length63 / 2 - 1 + courtyardPadding;
5568
+ const crtMinY = -(height + courtyardPadding);
5569
+ const crtMaxY = height + courtyardPadding;
5570
+ const courtyard = {
5571
+ type: "pcb_courtyard_rect",
5572
+ pcb_courtyard_rect_id: "",
5573
+ pcb_component_id: "",
5574
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5575
+ width: crtMaxX - crtMinX,
5576
+ height: crtMaxY - crtMinY,
5577
+ layer: "top"
5578
+ };
5481
5579
  return [
5482
5580
  ...pads,
5483
5581
  silkscreenPath1,
5484
5582
  silkscreenPath2,
5485
- silkscreenRefText
5583
+ silkscreenRefText,
5584
+ courtyard
5486
5585
  ];
5487
5586
  };
5488
5587
  var sot89_5 = (parameters) => {
@@ -5526,11 +5625,26 @@ var sot89_5 = (parameters) => {
5526
5625
  type: "pcb_silkscreen_path",
5527
5626
  stroke_width: 0.1
5528
5627
  };
5628
+ const courtyardPadding = 0.25;
5629
+ const crtMinX = -(2.6 + courtyardPadding);
5630
+ const crtMaxX = 2.6 + courtyardPadding;
5631
+ const crtMinY = -(height + courtyardPadding);
5632
+ const crtMaxY = height + courtyardPadding;
5633
+ const courtyard = {
5634
+ type: "pcb_courtyard_rect",
5635
+ pcb_courtyard_rect_id: "",
5636
+ pcb_component_id: "",
5637
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5638
+ width: crtMaxX - crtMinX,
5639
+ height: crtMaxY - crtMinY,
5640
+ layer: "top"
5641
+ };
5529
5642
  return [
5530
5643
  ...pads,
5531
5644
  silkscreenPath1,
5532
5645
  silkscreenPath2,
5533
- silkscreenRefText
5646
+ silkscreenRefText,
5647
+ courtyard
5534
5648
  ];
5535
5649
  };
5536
5650
  var sot89 = (raw_params) => {
@@ -5635,13 +5749,28 @@ var to220 = (raw_params) => {
5635
5749
  }
5636
5750
  ];
5637
5751
  const silkscreenRefText = silkscreenRef(0, h / 2 + 0.6, 0.5);
5752
+ const courtyardPadding = 0.25;
5753
+ const crtMinX = -(halfWidth + courtyardPadding);
5754
+ const crtMaxX = halfWidth + courtyardPadding;
5755
+ const crtMinY = -(halfHeight + courtyardPadding);
5756
+ const crtMaxY = halfHeight + courtyardPadding;
5757
+ const courtyard = {
5758
+ type: "pcb_courtyard_rect",
5759
+ pcb_courtyard_rect_id: "",
5760
+ pcb_component_id: "",
5761
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5762
+ width: crtMaxX - crtMinX,
5763
+ height: crtMaxY - crtMinY,
5764
+ layer: "top"
5765
+ };
5638
5766
  return {
5639
5767
  circuitJson: [
5640
5768
  ...plated_holes,
5641
5769
  silkscreenBody,
5642
5770
  horizontalLine,
5643
5771
  ...verticalLines,
5644
- silkscreenRefText
5772
+ silkscreenRefText,
5773
+ courtyard
5645
5774
  ],
5646
5775
  parameters: { ...parameters, p: computedPitch }
5647
5776
  };
@@ -6068,10 +6197,29 @@ var sma = (raw_params) => {
6068
6197
  stroke_width: 0.1,
6069
6198
  pcb_silkscreen_path_id: ""
6070
6199
  };
6200
+ const p_val = length44.parse(parameters.p);
6201
+ const pl_val = length44.parse(parameters.pl);
6202
+ const h_val = length44.parse(parameters.h);
6203
+ const w_val = length44.parse(parameters.w);
6204
+ const courtyardPadding = 0.25;
6205
+ const crtMinX = -(w_val / 2 + 0.5 + courtyardPadding);
6206
+ const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
6207
+ const crtMinY = -(h_val / 2 + courtyardPadding);
6208
+ const crtMaxY = h_val / 2 + courtyardPadding;
6209
+ const courtyard = {
6210
+ type: "pcb_courtyard_rect",
6211
+ pcb_courtyard_rect_id: "",
6212
+ pcb_component_id: "",
6213
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6214
+ width: crtMaxX - crtMinX,
6215
+ height: crtMaxY - crtMinY,
6216
+ layer: "top"
6217
+ };
6071
6218
  return {
6072
6219
  circuitJson: smaWithoutParsing(parameters).concat(
6073
6220
  silkscreenLine,
6074
- silkscreenRefText
6221
+ silkscreenRefText,
6222
+ courtyard
6075
6223
  ),
6076
6224
  parameters
6077
6225
  };
@@ -6271,8 +6419,8 @@ var smc_def = base_def.extend({
6271
6419
  num_pins: z57.literal(2).default(2),
6272
6420
  w: z57.string().default("10.70mm"),
6273
6421
  h: z57.string().default("6.60mm"),
6274
- pl: z57.string().default("3.30mm"),
6275
- pw: z57.string().default("2.50mm"),
6422
+ pl: z57.string().default("2.50mm"),
6423
+ pw: z57.string().default("3.30mm"),
6276
6424
  p: z57.string().default("6.80mm")
6277
6425
  });
6278
6426
  var smc = (raw_params) => {
@@ -6441,11 +6589,31 @@ var sot223_4 = (parameters) => {
6441
6589
  type: "pcb_silkscreen_path",
6442
6590
  stroke_width: 0.1
6443
6591
  };
6592
+ const w = Number.parseFloat(parameters.w);
6593
+ const pl = Number.parseFloat(parameters.pl);
6594
+ const p = Number.parseFloat(parameters.p);
6595
+ const pw = Number.parseFloat(parameters.pw);
6596
+ const courtyardPadding = 0.25;
6597
+ const padCenterX = w / 2 - 1.1;
6598
+ const crtMinX = -(padCenterX + pl / 2 + courtyardPadding);
6599
+ const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
6600
+ const crtMinY = -(p + pw / 2 + courtyardPadding);
6601
+ const crtMaxY = p + pw / 2 + courtyardPadding;
6602
+ const courtyard = {
6603
+ type: "pcb_courtyard_rect",
6604
+ pcb_courtyard_rect_id: "",
6605
+ pcb_component_id: "",
6606
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6607
+ width: crtMaxX - crtMinX,
6608
+ height: crtMaxY - crtMinY,
6609
+ layer: "top"
6610
+ };
6444
6611
  return [
6445
6612
  ...pads,
6446
6613
  silkscreenPath1,
6447
6614
  silkscreenPath2,
6448
- silkscreenRefText
6615
+ silkscreenRefText,
6616
+ courtyard
6449
6617
  ];
6450
6618
  };
6451
6619
  var sot223_8_def = extendSoicDef({
@@ -6519,7 +6687,30 @@ var sot223_5 = (parameters) => {
6519
6687
  stroke_width: 0.1
6520
6688
  };
6521
6689
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
6522
- return [...pads, silkscreenPath1, silkscreenPath2, silkscreenRefText];
6690
+ const w = Number.parseFloat(parameters.w);
6691
+ const courtyardPadding = 0.25;
6692
+ const padOuterX = w / 2 - 1.2 + 2.2 / 2;
6693
+ const crtMinX = -(padOuterX + courtyardPadding);
6694
+ const crtMaxX = padOuterX + courtyardPadding;
6695
+ const h5 = Number.parseFloat(parameters.h);
6696
+ const crtMinY = -(Math.max(h5 / 2, 2.25 + 0.5) + courtyardPadding);
6697
+ const crtMaxY = Math.max(h5 / 2, 2.25 + 0.5) + courtyardPadding;
6698
+ const courtyard = {
6699
+ type: "pcb_courtyard_rect",
6700
+ pcb_courtyard_rect_id: "",
6701
+ pcb_component_id: "",
6702
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6703
+ width: crtMaxX - crtMinX,
6704
+ height: crtMaxY - crtMinY,
6705
+ layer: "top"
6706
+ };
6707
+ return [
6708
+ ...pads,
6709
+ silkscreenPath1,
6710
+ silkscreenPath2,
6711
+ silkscreenRefText,
6712
+ courtyard
6713
+ ];
6523
6714
  };
6524
6715
  var get2CcwSot2236Coords = (parameters) => {
6525
6716
  const { p, h, pn, w } = parameters;
@@ -6590,7 +6781,27 @@ var sot223_6 = (parameters) => {
6590
6781
  stroke_width: 0.1
6591
6782
  };
6592
6783
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
6593
- return [...pads, silkscreenPath1, silkscreenPath2, silkscreenRefText];
6784
+ const courtyardPadding = 0.25;
6785
+ const crtMinX = -(4.25 + courtyardPadding);
6786
+ const crtMaxX = 4.25 + courtyardPadding;
6787
+ const crtMinY = -(2.9 + courtyardPadding);
6788
+ const crtMaxY = 2.9 + courtyardPadding;
6789
+ const courtyard = {
6790
+ type: "pcb_courtyard_rect",
6791
+ pcb_courtyard_rect_id: "",
6792
+ pcb_component_id: "",
6793
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6794
+ width: crtMaxX - crtMinX,
6795
+ height: crtMaxY - crtMinY,
6796
+ layer: "top"
6797
+ };
6798
+ return [
6799
+ ...pads,
6800
+ silkscreenPath1,
6801
+ silkscreenPath2,
6802
+ silkscreenRefText,
6803
+ courtyard
6804
+ ];
6594
6805
  };
6595
6806
 
6596
6807
  // src/fn/sot23w.ts
@@ -6682,11 +6893,30 @@ var sot23w_3 = (parameters) => {
6682
6893
  type: "pcb_silkscreen_path",
6683
6894
  stroke_width: 0.1
6684
6895
  };
6896
+ const p = Number.parseFloat(parameters.p);
6897
+ const pl = Number.parseFloat(parameters.pl);
6898
+ const pw = Number.parseFloat(parameters.pw);
6899
+ const h = Number.parseFloat(parameters.h);
6900
+ const courtyardPadding = 0.25;
6901
+ const crtMinX = -(p + pl / 2 + courtyardPadding);
6902
+ const crtMaxX = p + pl / 2 + courtyardPadding;
6903
+ const crtMinY = -(Math.max(h / 2, 0.95 + pw / 2) + courtyardPadding);
6904
+ const crtMaxY = Math.max(h / 2, 0.95 + pw / 2) + courtyardPadding;
6905
+ const courtyard = {
6906
+ type: "pcb_courtyard_rect",
6907
+ pcb_courtyard_rect_id: "",
6908
+ pcb_component_id: "",
6909
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6910
+ width: crtMaxX - crtMinX,
6911
+ height: crtMaxY - crtMinY,
6912
+ layer: "top"
6913
+ };
6685
6914
  return [
6686
6915
  ...pads,
6687
6916
  silkscreenPath1,
6688
6917
  silkscreenPath2,
6689
- silkscreenRefText
6918
+ silkscreenRefText,
6919
+ courtyard
6690
6920
  ];
6691
6921
  };
6692
6922
 
@@ -7679,8 +7909,23 @@ var vson = (raw_params) => {
7679
7909
  grid.y / 2 + p,
7680
7910
  grid.y / 6
7681
7911
  );
7912
+ const courtyardPadding = 0.25;
7913
+ const centerY = (num_pins / 2 - 1) * p / 2;
7914
+ const crtMinX = -(w / 2 + pinw / 2 + courtyardPadding);
7915
+ const crtMaxX = w / 2 + pinw / 2 + courtyardPadding;
7916
+ const crtMinY = -(Math.max(grid.y / 2, centerY + pinh / 2) + courtyardPadding);
7917
+ const crtMaxY = Math.max(grid.y / 2, centerY + pinh / 2) + courtyardPadding;
7918
+ const courtyard = {
7919
+ type: "pcb_courtyard_rect",
7920
+ pcb_courtyard_rect_id: "",
7921
+ pcb_component_id: "",
7922
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
7923
+ width: crtMaxX - crtMinX,
7924
+ height: crtMaxY - crtMinY,
7925
+ layer: "top"
7926
+ };
7682
7927
  return {
7683
- circuitJson: [...pads, ...silkscreenPaths, silkscreenRefText],
7928
+ circuitJson: [...pads, ...silkscreenPaths, silkscreenRefText, courtyard],
7684
7929
  parameters
7685
7930
  };
7686
7931
  };
@@ -7994,12 +8239,36 @@ var generateSot457Elements = (params) => {
7994
8239
  ],
7995
8240
  stroke_width: 0.05
7996
8241
  };
8242
+ const courtyardPadding = 0.25;
8243
+ let crtMinX, crtMaxX, crtMinY, crtMaxY;
8244
+ if (params.wave) {
8245
+ crtMinX = -(pitch + padWidth / 2 + courtyardPadding);
8246
+ crtMaxX = pitch + padWidth / 2 + courtyardPadding;
8247
+ crtMinY = -(pitch + padLength / 2 + courtyardPadding);
8248
+ crtMaxY = pitch + padLength / 2 + courtyardPadding;
8249
+ } else {
8250
+ const padCenterX = width / 2 + 0.1;
8251
+ crtMinX = -(padCenterX + padLength / 2 + courtyardPadding);
8252
+ crtMaxX = padCenterX + padLength / 2 + courtyardPadding;
8253
+ crtMinY = -(pitch + padWidth / 2 + courtyardPadding);
8254
+ crtMaxY = pitch + padWidth / 2 + courtyardPadding;
8255
+ }
8256
+ const courtyard = {
8257
+ type: "pcb_courtyard_rect",
8258
+ pcb_courtyard_rect_id: "",
8259
+ pcb_component_id: "",
8260
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
8261
+ width: crtMaxX - crtMinX,
8262
+ height: crtMaxY - crtMinY,
8263
+ layer: "top"
8264
+ };
7997
8265
  return [
7998
8266
  silkscreenRefText,
7999
8267
  silkscreenPath1,
8000
8268
  silkscreenPath2,
8001
8269
  pin1Indicator,
8002
- ...pads
8270
+ ...pads,
8271
+ courtyard
8003
8272
  ];
8004
8273
  };
8005
8274
  var sot457 = (rawParams) => {
@@ -8079,13 +8348,28 @@ var sot963 = (raw_params) => {
8079
8348
  pcb_silkscreen_path_id: "pin_marker_1"
8080
8349
  };
8081
8350
  const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
8351
+ const courtyardPadding = 0.25;
8352
+ const crtMinX = -(w / 2 + courtyardPadding);
8353
+ const crtMaxX = w / 2 + courtyardPadding;
8354
+ const crtMinY = -(Math.max(h / 2, p + pw / 2) + courtyardPadding);
8355
+ const crtMaxY = Math.max(h / 2, p + pw / 2) + courtyardPadding;
8356
+ const courtyard = {
8357
+ type: "pcb_courtyard_rect",
8358
+ pcb_courtyard_rect_id: "",
8359
+ pcb_component_id: "",
8360
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
8361
+ width: crtMaxX - crtMinX,
8362
+ height: crtMaxY - crtMinY,
8363
+ layer: "top"
8364
+ };
8082
8365
  return {
8083
8366
  circuitJson: [
8084
8367
  ...pads,
8085
8368
  silkscreenTopLine,
8086
8369
  silkscreenBottomLine,
8087
8370
  silkscreenRefText,
8088
- pin1Marking
8371
+ pin1Marking,
8372
+ courtyard
8089
8373
  ],
8090
8374
  parameters
8091
8375
  };
@@ -8460,11 +8744,30 @@ var sot323_3 = (parameters) => {
8460
8744
  type: "pcb_silkscreen_path",
8461
8745
  stroke_width: 0.1
8462
8746
  };
8747
+ const p = Number.parseFloat(parameters.p);
8748
+ const pl = Number.parseFloat(parameters.pl);
8749
+ const pw = Number.parseFloat(parameters.pw);
8750
+ const h = Number.parseFloat(parameters.h);
8751
+ const courtyardPadding = 0.25;
8752
+ const crtMinX = -(p + pl / 2 + courtyardPadding);
8753
+ const crtMaxX = p + pl / 2 + courtyardPadding;
8754
+ const crtMinY = -(Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding);
8755
+ const crtMaxY = Math.max(h / 2 + 0.3, 0.65 + pw / 2) + courtyardPadding;
8756
+ const courtyard = {
8757
+ type: "pcb_courtyard_rect",
8758
+ pcb_courtyard_rect_id: "",
8759
+ pcb_component_id: "",
8760
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
8761
+ width: crtMaxX - crtMinX,
8762
+ height: crtMaxY - crtMinY,
8763
+ layer: "top"
8764
+ };
8463
8765
  return [
8464
8766
  ...pads,
8465
8767
  silkscreenPath1,
8466
8768
  silkscreenPath2,
8467
- silkscreenRefText
8769
+ silkscreenRefText,
8770
+ courtyard
8468
8771
  ];
8469
8772
  };
8470
8773
 
@@ -8722,12 +9025,33 @@ var sotWithoutParsing = (parameters) => {
8722
9025
  ],
8723
9026
  stroke_width: 0.05
8724
9027
  };
9028
+ const h_val = Number.parseFloat(parameters.h);
9029
+ const p_val = Number.parseFloat(parameters.p);
9030
+ const pl_val = Number.parseFloat(parameters.pl);
9031
+ const pw_val = Number.parseFloat(parameters.pw);
9032
+ const courtyardPadding = 0.25;
9033
+ const padCenterX = h_val / 2 + 0.5;
9034
+ const silkscreenY = h_val / 2 + p_val / 1.3;
9035
+ const crtMinX = -(padCenterX + pl_val / 2 + courtyardPadding);
9036
+ const crtMaxX = padCenterX + pl_val / 2 + courtyardPadding;
9037
+ const crtMinY = -(Math.max(silkscreenY, p_val + pw_val / 2) + courtyardPadding);
9038
+ const crtMaxY = Math.max(silkscreenY, p_val + pw_val / 2) + courtyardPadding;
9039
+ const courtyard = {
9040
+ type: "pcb_courtyard_rect",
9041
+ pcb_courtyard_rect_id: "",
9042
+ pcb_component_id: "",
9043
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
9044
+ width: crtMaxX - crtMinX,
9045
+ height: crtMaxY - crtMinY,
9046
+ layer: "top"
9047
+ };
8725
9048
  return [
8726
9049
  ...pads,
8727
9050
  silkscreenRefText,
8728
9051
  silkscreenPath1,
8729
9052
  silkscreenPath2,
8730
- pin1Indicator
9053
+ pin1Indicator,
9054
+ courtyard
8731
9055
  ];
8732
9056
  };
8733
9057
 
@@ -8827,11 +9151,26 @@ var sot343_4 = (parameters) => {
8827
9151
  type: "pcb_silkscreen_path",
8828
9152
  stroke_width: 0.1
8829
9153
  };
9154
+ const courtyardPadding = 0.25;
9155
+ const crtMinX = minX - pl / 2 - courtyardPadding;
9156
+ const crtMaxX = maxX + pl / 2 + courtyardPadding;
9157
+ const crtMinY = -(offsetY + courtyardPadding);
9158
+ const crtMaxY = offsetY + courtyardPadding;
9159
+ const courtyard = {
9160
+ type: "pcb_courtyard_rect",
9161
+ pcb_courtyard_rect_id: "",
9162
+ pcb_component_id: "",
9163
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
9164
+ width: crtMaxX - crtMinX,
9165
+ height: crtMaxY - crtMinY,
9166
+ layer: "top"
9167
+ };
8830
9168
  return [
8831
9169
  ...pads,
8832
9170
  silkscreenPathTop,
8833
9171
  silkscreenPathBottom,
8834
- silkscreenRefText
9172
+ silkscreenRefText,
9173
+ courtyard
8835
9174
  ];
8836
9175
  };
8837
9176
 
@@ -9495,8 +9834,27 @@ var to92l = (raw_params) => {
9495
9834
  cy + radius + 1,
9496
9835
  0.5
9497
9836
  );
9837
+ const courtyardPadding = 0.25;
9838
+ const crtMinX = cx - radius - courtyardPadding;
9839
+ const crtMaxX = cx + radius + courtyardPadding;
9840
+ const crtMaxY = cy + radius + courtyardPadding;
9841
+ const crtMinY = y_bottom - courtyardPadding;
9842
+ const courtyard = {
9843
+ type: "pcb_courtyard_rect",
9844
+ pcb_courtyard_rect_id: "",
9845
+ pcb_component_id: "",
9846
+ center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
9847
+ width: crtMaxX - crtMinX,
9848
+ height: crtMaxY - crtMinY,
9849
+ layer: "top"
9850
+ };
9498
9851
  return {
9499
- circuitJson: [...holes, silkBody, silkscreenRefText],
9852
+ circuitJson: [
9853
+ ...holes,
9854
+ silkBody,
9855
+ silkscreenRefText,
9856
+ courtyard
9857
+ ],
9500
9858
  parameters
9501
9859
  };
9502
9860
  };