@tscircuit/footprinter 0.0.335 → 0.0.337

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
@@ -369,7 +369,9 @@ var footprintSizes = [
369
369
  pw_mm_min: 0.4,
370
370
  ph_mm_min: 0.3,
371
371
  w_mm_min: 0.58,
372
- h_mm_min: 0.21
372
+ h_mm_min: 0.21,
373
+ courtyard_width_mm: 1.2,
374
+ courtyard_height_mm: 0.6
373
375
  },
374
376
  {
375
377
  imperial: "0504",
@@ -387,7 +389,9 @@ var footprintSizes = [
387
389
  pw_mm_min: 1.125,
388
390
  ph_mm_min: 3.4,
389
391
  w_mm_min: 5.4,
390
- h_mm_min: 3.4
392
+ h_mm_min: 3.4,
393
+ courtyard_width_mm: 5.9,
394
+ courtyard_height_mm: 3.9
391
395
  },
392
396
  {
393
397
  imperial: "0201",
@@ -396,7 +400,9 @@ var footprintSizes = [
396
400
  pw_mm_min: 0.46,
397
401
  ph_mm_min: 0.4,
398
402
  w_mm_min: 0.9,
399
- h_mm_min: 0.3
403
+ h_mm_min: 0.3,
404
+ courtyard_width_mm: 1.4,
405
+ courtyard_height_mm: 0.7
400
406
  },
401
407
  {
402
408
  imperial: "0402",
@@ -405,7 +411,9 @@ var footprintSizes = [
405
411
  pw_mm_min: 0.54,
406
412
  ph_mm_min: 0.64,
407
413
  w_mm_min: 1.56,
408
- h_mm_min: 0.64
414
+ h_mm_min: 0.64,
415
+ courtyard_width_mm: 1.86,
416
+ courtyard_height_mm: 0.94
409
417
  },
410
418
  {
411
419
  imperial: "0603",
@@ -414,7 +422,9 @@ var footprintSizes = [
414
422
  pw_mm_min: 0.8,
415
423
  ph_mm_min: 0.95,
416
424
  w_mm_min: 2.45,
417
- h_mm_min: 0.95
425
+ h_mm_min: 0.95,
426
+ courtyard_width_mm: 2.96,
427
+ courtyard_height_mm: 1.46
418
428
  },
419
429
  {
420
430
  imperial: "0805",
@@ -423,7 +433,9 @@ var footprintSizes = [
423
433
  pw_mm_min: 1.025,
424
434
  ph_mm_min: 1.4,
425
435
  w_mm_min: 2.8499999999999996,
426
- h_mm_min: 1.4
436
+ h_mm_min: 1.4,
437
+ courtyard_width_mm: 3.36,
438
+ courtyard_height_mm: 1.9
427
439
  },
428
440
  {
429
441
  imperial: "1206",
@@ -432,7 +444,9 @@ var footprintSizes = [
432
444
  pw_mm_min: 1.125,
433
445
  ph_mm_min: 1.75,
434
446
  w_mm_min: 4.05,
435
- h_mm_min: 1.75
447
+ h_mm_min: 1.75,
448
+ courtyard_width_mm: 4.56,
449
+ courtyard_height_mm: 2.26
436
450
  },
437
451
  {
438
452
  imperial: "1210",
@@ -441,7 +455,9 @@ var footprintSizes = [
441
455
  pw_mm_min: 1.125,
442
456
  ph_mm_min: 2.65,
443
457
  w_mm_min: 4.05,
444
- h_mm_min: 2.65
458
+ h_mm_min: 2.65,
459
+ courtyard_width_mm: 4.56,
460
+ courtyard_height_mm: 3.16
445
461
  },
446
462
  {
447
463
  imperial: "2010",
@@ -450,7 +466,9 @@ var footprintSizes = [
450
466
  pw_mm_min: 1.225,
451
467
  ph_mm_min: 2.65,
452
468
  w_mm_min: 5.85,
453
- h_mm_min: 2.65
469
+ h_mm_min: 2.65,
470
+ courtyard_width_mm: 6.36,
471
+ courtyard_height_mm: 3.16
454
472
  },
455
473
  {
456
474
  imperial: "2512",
@@ -459,13 +477,24 @@ var footprintSizes = [
459
477
  pw_mm_min: 1.225,
460
478
  ph_mm_min: 3.35,
461
479
  w_mm_min: 7.15,
462
- h_mm_min: 3.35
480
+ h_mm_min: 3.35,
481
+ courtyard_width_mm: 7.66,
482
+ courtyard_height_mm: 3.86
463
483
  }
464
484
  ];
465
485
  var metricMap = Object.fromEntries(footprintSizes.map((s) => [s.metric, s]));
466
486
  var imperialMap = Object.fromEntries(
467
487
  footprintSizes.map((s) => [s.imperial, s])
468
488
  );
489
+ var createCourtyardRect = (width, height) => ({
490
+ type: "pcb_courtyard_rect",
491
+ pcb_courtyard_rect_id: "",
492
+ pcb_component_id: "",
493
+ center: { x: 0, y: 0 },
494
+ width,
495
+ height,
496
+ layer: "top"
497
+ });
469
498
  var passive_def = base_def.extend({
470
499
  tht: z3.boolean(),
471
500
  p: length.optional(),
@@ -517,29 +546,14 @@ var passive = (params) => {
517
546
  };
518
547
  const textY = textbottom ? -ph / 2 - 0.9 : ph / 2 + 0.9;
519
548
  const silkscreenRefText = silkscreenRef(0, textY, 0.2);
520
- const excess = 0.25;
521
- const silkXs = silkscreenLine.route.map((pt) => pt.x);
522
- const silkYs = silkscreenLine.route.map((pt) => pt.y);
523
- const crtMinX = Math.min(-(w ?? 0) / 2, -(p / 2 + pw / 2), ...silkXs) - excess;
524
- const crtMaxX = Math.max((w ?? 0) / 2, p / 2 + pw / 2, ...silkXs) + excess;
525
- const crtMinY = Math.min(-(h ?? 0) / 2, -ph / 2, ...silkYs) - excess;
526
- const crtMaxY = Math.max((h ?? 0) / 2, ph / 2, ...silkYs) + excess;
527
- const courtyard = {
528
- type: "pcb_courtyard_rect",
529
- pcb_courtyard_rect_id: "",
530
- pcb_component_id: "",
531
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
532
- width: crtMaxX - crtMinX,
533
- height: crtMaxY - crtMinY,
534
- layer: "top"
535
- };
549
+ const courtyard = sz?.courtyard_width_mm && sz.courtyard_height_mm ? createCourtyardRect(sz.courtyard_width_mm, sz.courtyard_height_mm) : null;
536
550
  if (tht) {
537
551
  return [
538
552
  platedhole(1, -p / 2, 0, pw, pw * 1 / 0.8),
539
553
  platedhole(2, p / 2, 0, pw, pw * 1 / 0.8),
540
554
  silkscreenLine,
541
555
  silkscreenRefText,
542
- courtyard
556
+ ...courtyard ? [courtyard] : []
543
557
  ];
544
558
  }
545
559
  return [
@@ -547,7 +561,7 @@ var passive = (params) => {
547
561
  rectpad(["2", "right"], p / 2, 0, pw, ph),
548
562
  silkscreenLine,
549
563
  silkscreenRefText,
550
- courtyard
564
+ ...courtyard ? [courtyard] : []
551
565
  ];
552
566
  };
553
567
 
@@ -571,7 +585,15 @@ import { length as length2 } from "circuit-json";
571
585
 
572
586
  // src/helpers/chipArray.ts
573
587
  var chipArray = (params) => {
574
- const { padSpacing: padSpacing7, padWidth, padHeight, padPitch, numRows, textbottom } = params;
588
+ const {
589
+ padSpacing: padSpacing7,
590
+ padWidth,
591
+ padHeight,
592
+ padPitch,
593
+ numRows,
594
+ textbottom,
595
+ courtyardOutline
596
+ } = params;
575
597
  const yPositions = [];
576
598
  const halfRange = (numRows - 1) * (padPitch / 2);
577
599
  for (let i = 0; i < numRows; i++) {
@@ -632,12 +654,20 @@ var chipArray = (params) => {
632
654
  };
633
655
  const textY = textbottom ? bottom - 0.9 : top + 0.9;
634
656
  const silkscreenRefText = silkscreenRef(0, textY, 0.2);
657
+ const courtyard = courtyardOutline ? {
658
+ type: "pcb_courtyard_outline",
659
+ pcb_courtyard_outline_id: "",
660
+ pcb_component_id: "",
661
+ layer: "top",
662
+ outline: courtyardOutline
663
+ } : null;
635
664
  return [
636
665
  ...pads,
637
666
  silkscreenTop,
638
667
  silkscreenBottom,
639
668
  pin1Marker,
640
- silkscreenRefText
669
+ silkscreenRefText,
670
+ ...courtyard ? [courtyard] : []
641
671
  ];
642
672
  };
643
673
 
@@ -669,7 +699,13 @@ var res0402Array2 = (rawParams) => {
669
699
  numRows: 2,
670
700
  textbottom: params.textbottom,
671
701
  convex: params.convex,
672
- concave: params.concave
702
+ concave: params.concave,
703
+ courtyardOutline: [
704
+ { x: -1, y: 0.95 },
705
+ { x: -1, y: -0.95 },
706
+ { x: 1, y: -0.95 },
707
+ { x: 1, y: 0.95 }
708
+ ]
673
709
  });
674
710
  };
675
711
 
@@ -699,7 +735,13 @@ var res0402Array4 = (rawParams) => {
699
735
  numRows: 4,
700
736
  textbottom: params.textbottom,
701
737
  convex: params.convex,
702
- concave: params.concave
738
+ concave: params.concave,
739
+ courtyardOutline: [
740
+ { x: -1, y: 1.25 },
741
+ { x: -1, y: -1.25 },
742
+ { x: 1, y: -1.25 },
743
+ { x: 1, y: 1.25 }
744
+ ]
703
745
  });
704
746
  };
705
747
 
@@ -729,7 +771,13 @@ var res0603Array2 = (rawParams) => {
729
771
  numRows: 2,
730
772
  textbottom: params.textbottom,
731
773
  convex: params.convex,
732
- concave: params.concave
774
+ concave: params.concave,
775
+ courtyardOutline: [
776
+ { x: -1.55, y: 1.05 },
777
+ { x: -1.55, y: -1.05 },
778
+ { x: 1.55, y: -1.05 },
779
+ { x: 1.55, y: 1.05 }
780
+ ]
733
781
  });
734
782
  };
735
783
 
@@ -759,7 +807,13 @@ var res0603Array4 = (rawParams) => {
759
807
  numRows: 4,
760
808
  textbottom: params.textbottom,
761
809
  convex: params.convex,
762
- concave: params.concave
810
+ concave: params.concave,
811
+ courtyardOutline: [
812
+ { x: -1.55, y: 1.88 },
813
+ { x: -1.55, y: -1.87 },
814
+ { x: 1.55, y: -1.87 },
815
+ { x: 1.55, y: 1.88 }
816
+ ]
763
817
  });
764
818
  };
765
819
 
@@ -789,7 +843,13 @@ var res0606Array2 = (rawParams) => {
789
843
  numRows: 2,
790
844
  textbottom: params.textbottom,
791
845
  convex: params.convex,
792
- concave: params.concave
846
+ concave: params.concave,
847
+ courtyardOutline: [
848
+ { x: -1.3, y: 1.05 },
849
+ { x: -1.3, y: -1.05 },
850
+ { x: 1.3, y: -1.05 },
851
+ { x: 1.3, y: 1.05 }
852
+ ]
793
853
  });
794
854
  };
795
855
 
@@ -819,7 +879,13 @@ var res1206Array4 = (rawParams) => {
819
879
  numRows: 4,
820
880
  textbottom: params.textbottom,
821
881
  convex: params.convex,
822
- concave: params.concave
882
+ concave: params.concave,
883
+ courtyardOutline: [
884
+ { x: -2.21, y: 2.85 },
885
+ { x: -2.21, y: -2.85 },
886
+ { x: 2.2, y: -2.85 },
887
+ { x: 2.2, y: 2.85 }
888
+ ]
823
889
  });
824
890
  };
825
891
 
@@ -3093,21 +3159,15 @@ var sod123 = (raw_params) => {
3093
3159
  length18.parse(parameters.h) / 4 + 0.4,
3094
3160
  0.3
3095
3161
  );
3096
- const p_val = length18.parse(parameters.p);
3097
- const pl_val = length18.parse(parameters.pl);
3098
- const pw_val = length18.parse(parameters.pw);
3099
- const courtyardPadding = 0.25;
3100
- const crtMinX = -(p_val / 2 + pl_val / 2 + courtyardPadding);
3101
- const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
3102
- const crtMinY = -(pw_val / 2 + courtyardPadding);
3103
- const crtMaxY = pw_val / 2 + courtyardPadding;
3162
+ const courtyardWidthMm = 4.7;
3163
+ const courtyardHeightMm = 2.3;
3104
3164
  const courtyard = {
3105
3165
  type: "pcb_courtyard_rect",
3106
3166
  pcb_courtyard_rect_id: "",
3107
3167
  pcb_component_id: "",
3108
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
3109
- width: crtMaxX - crtMinX,
3110
- height: crtMaxY - crtMinY,
3168
+ center: { x: 0, y: 0 },
3169
+ width: courtyardWidthMm,
3170
+ height: courtyardHeightMm,
3111
3171
  layer: "top"
3112
3172
  };
3113
3173
  return {
@@ -4677,23 +4737,15 @@ var sod523 = (raw_params) => {
4677
4737
  stroke_width: 0.1,
4678
4738
  pcb_silkscreen_path_id: ""
4679
4739
  };
4680
- const p_v = length27.parse(parameters.p);
4681
- const pl_v = length27.parse(parameters.pl);
4682
- const pw_v = length27.parse(parameters.pw);
4683
- const h_v = length27.parse(parameters.h);
4684
- const w_v = length27.parse(parameters.w);
4685
- const courtyardPadding = 0.25;
4686
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
4687
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
4688
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
4689
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
4740
+ const courtyardWidthMm = 2.5;
4741
+ const courtyardHeightMm = 1.4;
4690
4742
  const courtyard = {
4691
4743
  type: "pcb_courtyard_rect",
4692
4744
  pcb_courtyard_rect_id: "",
4693
4745
  pcb_component_id: "",
4694
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4695
- width: crtMaxX - crtMinX,
4696
- height: crtMaxY - crtMinY,
4746
+ center: { x: 0, y: 0 },
4747
+ width: courtyardWidthMm,
4748
+ height: courtyardHeightMm,
4697
4749
  layer: "top"
4698
4750
  };
4699
4751
  return {
@@ -4838,23 +4890,15 @@ var sod80 = (raw_params) => {
4838
4890
  stroke_width: 0.1,
4839
4891
  pcb_silkscreen_path_id: ""
4840
4892
  };
4841
- const p_v = length28.parse(parameters.p);
4842
- const pl_v = length28.parse(parameters.pl);
4843
- const pw_v = length28.parse(parameters.pw);
4844
- const h_v = length28.parse(parameters.h);
4845
- const w_v = length28.parse(parameters.w);
4846
- const courtyardPadding = 0.25;
4847
- const crtMinX = -(Math.max(w_v / 2 + 0.5, p_v / 2 + pl_v / 2) + courtyardPadding);
4848
- const crtMaxX = Math.max(p_v / 2 + 0.5, p_v / 2 + pl_v / 2) + courtyardPadding;
4849
- const crtMinY = -(Math.max(h_v / 2 + 0.5, pw_v / 2) + courtyardPadding);
4850
- const crtMaxY = Math.max(h_v / 2 + 0.5, pw_v / 2) + courtyardPadding;
4893
+ const courtyardWidthMm = 5.1;
4894
+ const courtyardHeightMm = 2.8;
4851
4895
  const courtyard = {
4852
4896
  type: "pcb_courtyard_rect",
4853
4897
  pcb_courtyard_rect_id: "",
4854
4898
  pcb_component_id: "",
4855
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4856
- width: crtMaxX - crtMinX,
4857
- height: crtMaxY - crtMinY,
4899
+ center: { x: 0, y: 0 },
4900
+ width: courtyardWidthMm,
4901
+ height: courtyardHeightMm,
4858
4902
  layer: "top"
4859
4903
  };
4860
4904
  return {
@@ -4934,23 +4978,15 @@ var sod123w = (raw_params) => {
4934
4978
  stroke_width: 0.1,
4935
4979
  pcb_silkscreen_path_id: ""
4936
4980
  };
4937
- const p_v = length29.parse(parameters.p);
4938
- const pl_v = length29.parse(parameters.pl);
4939
- const pw_v = length29.parse(parameters.pw);
4940
- const h_v = length29.parse(parameters.h);
4941
- const w_v = length29.parse(parameters.w);
4942
- const courtyardPadding = 0.25;
4943
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
4944
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
4945
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
4946
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
4981
+ const courtyardWidthMm = 4.5;
4982
+ const courtyardHeightMm = 2.2;
4947
4983
  const courtyard = {
4948
4984
  type: "pcb_courtyard_rect",
4949
4985
  pcb_courtyard_rect_id: "",
4950
4986
  pcb_component_id: "",
4951
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
4952
- width: crtMaxX - crtMinX,
4953
- height: crtMaxY - crtMinY,
4987
+ center: { x: 0, y: 0 },
4988
+ width: courtyardWidthMm,
4989
+ height: courtyardHeightMm,
4954
4990
  layer: "top"
4955
4991
  };
4956
4992
  return {
@@ -5033,23 +5069,15 @@ var sod323 = (raw_params) => {
5033
5069
  stroke_width: 0.1,
5034
5070
  pcb_silkscreen_path_id: ""
5035
5071
  };
5036
- const p_v = length30.parse(parameters.p);
5037
- const pl_v = length30.parse(parameters.pl);
5038
- const pw_v = length30.parse(parameters.pw);
5039
- const h_v = length30.parse(parameters.h);
5040
- const w_v = length30.parse(parameters.w);
5041
- const courtyardPadding = 0.25;
5042
- const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
5043
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
5044
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5045
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5072
+ const courtyardWidthMm = 3.2;
5073
+ const courtyardHeightMm = 1.9;
5046
5074
  const courtyard = {
5047
5075
  type: "pcb_courtyard_rect",
5048
5076
  pcb_courtyard_rect_id: "",
5049
5077
  pcb_component_id: "",
5050
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5051
- width: crtMaxX - crtMinX,
5052
- height: crtMaxY - crtMinY,
5078
+ center: { x: 0, y: 0 },
5079
+ width: courtyardWidthMm,
5080
+ height: courtyardHeightMm,
5053
5081
  layer: "top"
5054
5082
  };
5055
5083
  return {
@@ -5132,23 +5160,15 @@ var sod923 = (raw_params) => {
5132
5160
  stroke_width: 0.1,
5133
5161
  pcb_silkscreen_path_id: ""
5134
5162
  };
5135
- const p_v = length31.parse(parameters.p);
5136
- const pl_v = length31.parse(parameters.pl);
5137
- const pw_v = length31.parse(parameters.pw);
5138
- const h_v = length31.parse(parameters.h);
5139
- const w_v = length31.parse(parameters.w);
5140
- const courtyardPadding = 0.25;
5141
- const crtMinX = -(Math.max(w_v / 2 + 0.15, p_v / 2 + pl_v / 2) + courtyardPadding);
5142
- const crtMaxX = Math.max(p_v / 2 + 0.15, p_v / 2 + pl_v / 2) + courtyardPadding;
5143
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5144
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5163
+ const courtyardWidthMm = 1.5;
5164
+ const courtyardHeightMm = 0.9;
5145
5165
  const courtyard = {
5146
5166
  type: "pcb_courtyard_rect",
5147
5167
  pcb_courtyard_rect_id: "",
5148
5168
  pcb_component_id: "",
5149
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5150
- width: crtMaxX - crtMinX,
5151
- height: crtMaxY - crtMinY,
5169
+ center: { x: 0, y: 0 },
5170
+ width: courtyardWidthMm,
5171
+ height: courtyardHeightMm,
5152
5172
  layer: "top"
5153
5173
  };
5154
5174
  return {
@@ -5232,23 +5252,15 @@ var sod882 = (raw_params) => {
5232
5252
  stroke_width: 0.1,
5233
5253
  pcb_silkscreen_path_id: ""
5234
5254
  };
5235
- const p_v = length32.parse(parameters.p);
5236
- const pl_v = length32.parse(parameters.pl);
5237
- const pw_v = length32.parse(parameters.pw);
5238
- const h_v = length32.parse(parameters.h);
5239
- const w_v = length32.parse(parameters.w);
5240
- const courtyardPadding = 0.25;
5241
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
5242
- const crtMaxX = Math.max(p_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding;
5243
- const crtMinY = -(Math.max(h_v / 2 + 0.2, pw_v / 2) + courtyardPadding);
5244
- const crtMaxY = Math.max(h_v / 2 + 0.2, pw_v / 2) + courtyardPadding;
5255
+ const courtyardWidthMm = 1.6;
5256
+ const courtyardHeightMm = 1.2;
5245
5257
  const courtyard = {
5246
5258
  type: "pcb_courtyard_rect",
5247
5259
  pcb_courtyard_rect_id: "",
5248
5260
  pcb_component_id: "",
5249
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5250
- width: crtMaxX - crtMinX,
5251
- height: crtMaxY - crtMinY,
5261
+ center: { x: 0, y: 0 },
5262
+ width: courtyardWidthMm,
5263
+ height: courtyardHeightMm,
5252
5264
  layer: "top"
5253
5265
  };
5254
5266
  return {
@@ -5332,23 +5344,15 @@ var sod323f = (raw_params) => {
5332
5344
  stroke_width: 0.1,
5333
5345
  pcb_silkscreen_path_id: ""
5334
5346
  };
5335
- const pl_v = length33.parse(parameters.pl);
5336
- const pw_v = length33.parse(parameters.pw);
5337
- const h_v = length33.parse(parameters.h);
5338
- const w_v = length33.parse(parameters.w);
5339
- const ps_v = length33.parse(parameters.pad_spacing);
5340
- const courtyardPadding = 0.25;
5341
- const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
5342
- const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
5343
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5344
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5347
+ const courtyardWidthMm = 3.2;
5348
+ const courtyardHeightMm = 1.9;
5345
5349
  const courtyard = {
5346
5350
  type: "pcb_courtyard_rect",
5347
5351
  pcb_courtyard_rect_id: "",
5348
5352
  pcb_component_id: "",
5349
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5350
- width: crtMaxX - crtMinX,
5351
- height: crtMaxY - crtMinY,
5353
+ center: { x: 0, y: 0 },
5354
+ width: courtyardWidthMm,
5355
+ height: courtyardHeightMm,
5352
5356
  layer: "top"
5353
5357
  };
5354
5358
  return {
@@ -5432,23 +5436,15 @@ var sod123f = (raw_params) => {
5432
5436
  stroke_width: 0.1,
5433
5437
  pcb_silkscreen_path_id: ""
5434
5438
  };
5435
- const p_v = length34.parse(parameters.p);
5436
- const pl_v = length34.parse(parameters.pl);
5437
- const pw_v = length34.parse(parameters.pw);
5438
- const h_v = length34.parse(parameters.h);
5439
- const w_v = length34.parse(parameters.w);
5440
- const courtyardPadding = 0.25;
5441
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
5442
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
5443
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5444
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5439
+ const courtyardWidthMm = 4.4;
5440
+ const courtyardHeightMm = 2.3;
5445
5441
  const courtyard = {
5446
5442
  type: "pcb_courtyard_rect",
5447
5443
  pcb_courtyard_rect_id: "",
5448
5444
  pcb_component_id: "",
5449
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5450
- width: crtMaxX - crtMinX,
5451
- height: crtMaxY - crtMinY,
5445
+ center: { x: 0, y: 0 },
5446
+ width: courtyardWidthMm,
5447
+ height: courtyardHeightMm,
5452
5448
  layer: "top"
5453
5449
  };
5454
5450
  return {
@@ -5532,23 +5528,15 @@ var sod123fl = (raw_params) => {
5532
5528
  stroke_width: 0.1,
5533
5529
  pcb_silkscreen_path_id: ""
5534
5530
  };
5535
- const p_v = length35.parse(parameters.p);
5536
- const pl_v = length35.parse(parameters.pl);
5537
- const pw_v = length35.parse(parameters.pw);
5538
- const h_v = length35.parse(parameters.h);
5539
- const w_v = length35.parse(parameters.w);
5540
- const courtyardPadding = 0.25;
5541
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
5542
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
5543
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5544
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5531
+ const courtyardWidthMm = 4.9;
5532
+ const courtyardHeightMm = 2.7;
5545
5533
  const courtyard = {
5546
5534
  type: "pcb_courtyard_rect",
5547
5535
  pcb_courtyard_rect_id: "",
5548
5536
  pcb_component_id: "",
5549
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5550
- width: crtMaxX - crtMinX,
5551
- height: crtMaxY - crtMinY,
5537
+ center: { x: 0, y: 0 },
5538
+ width: courtyardWidthMm,
5539
+ height: courtyardHeightMm,
5552
5540
  layer: "top"
5553
5541
  };
5554
5542
  return {
@@ -5632,23 +5620,15 @@ var sod723 = (raw_params) => {
5632
5620
  stroke_width: 0.1,
5633
5621
  pcb_silkscreen_path_id: ""
5634
5622
  };
5635
- const p_v = length36.parse(parameters.p);
5636
- const pl_v = length36.parse(parameters.pl);
5637
- const pw_v = length36.parse(parameters.pw);
5638
- const h_v = length36.parse(parameters.h);
5639
- const w_v = length36.parse(parameters.w);
5640
- const courtyardPadding = 0.25;
5641
- const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
5642
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
5643
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5644
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5623
+ const courtyardWidthMm = 2.3;
5624
+ const courtyardHeightMm = 1.5;
5645
5625
  const courtyard = {
5646
5626
  type: "pcb_courtyard_rect",
5647
5627
  pcb_courtyard_rect_id: "",
5648
5628
  pcb_component_id: "",
5649
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5650
- width: crtMaxX - crtMinX,
5651
- height: crtMaxY - crtMinY,
5629
+ center: { x: 0, y: 0 },
5630
+ width: courtyardWidthMm,
5631
+ height: courtyardHeightMm,
5652
5632
  layer: "top"
5653
5633
  };
5654
5634
  return {
@@ -5732,23 +5712,15 @@ var sod128 = (raw_params) => {
5732
5712
  stroke_width: 0.1,
5733
5713
  pcb_silkscreen_path_id: ""
5734
5714
  };
5735
- const p_v = length37.parse(parameters.p);
5736
- const pl_v = length37.parse(parameters.pl);
5737
- const pw_v = length37.parse(parameters.pw);
5738
- const h_v = length37.parse(parameters.h);
5739
- const w_v = length37.parse(parameters.w);
5740
- const courtyardPadding = 0.25;
5741
- const crtMinX = -(Math.max(w_v / 2 + 0.2, p_v / 2 + pl_v / 2) + courtyardPadding);
5742
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
5743
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
5744
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
5715
+ const courtyardWidthMm = 6.3;
5716
+ const courtyardHeightMm = 3;
5745
5717
  const courtyard = {
5746
5718
  type: "pcb_courtyard_rect",
5747
5719
  pcb_courtyard_rect_id: "",
5748
5720
  pcb_component_id: "",
5749
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
5750
- width: crtMaxX - crtMinX,
5751
- height: crtMaxY - crtMinY,
5721
+ center: { x: 0, y: 0 },
5722
+ width: courtyardWidthMm,
5723
+ height: courtyardHeightMm,
5752
5724
  layer: "top"
5753
5725
  };
5754
5726
  return {
@@ -6256,23 +6228,15 @@ var sod882d = (raw_params) => {
6256
6228
  stroke_width: 0.1,
6257
6229
  pcb_silkscreen_path_id: ""
6258
6230
  };
6259
- const p_v = length41.parse(parameters.p);
6260
- const pl_v = length41.parse(parameters.pl);
6261
- const pw_v = length41.parse(parameters.pw);
6262
- const h_v = length41.parse(parameters.h);
6263
- const w_v = length41.parse(parameters.w);
6264
- const courtyardPadding = 0.25;
6265
- const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
6266
- const crtMaxX = Math.max(p_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding;
6267
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
6268
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
6231
+ const courtyardWidthMm = 1.8;
6232
+ const courtyardHeightMm = 1.2;
6269
6233
  const courtyard = {
6270
6234
  type: "pcb_courtyard_rect",
6271
6235
  pcb_courtyard_rect_id: "",
6272
6236
  pcb_component_id: "",
6273
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6274
- width: crtMaxX - crtMinX,
6275
- height: crtMaxY - crtMinY,
6237
+ center: { x: 0, y: 0 },
6238
+ width: courtyardWidthMm,
6239
+ height: courtyardHeightMm,
6276
6240
  layer: "top"
6277
6241
  };
6278
6242
  return {
@@ -6556,22 +6520,15 @@ var sma = (raw_params) => {
6556
6520
  stroke_width: 0.1,
6557
6521
  pcb_silkscreen_path_id: ""
6558
6522
  };
6559
- const p_val = length44.parse(parameters.p);
6560
- const pl_val = length44.parse(parameters.pl);
6561
- const h_val = length44.parse(parameters.h);
6562
- const w_val = length44.parse(parameters.w);
6563
- const courtyardPadding = 0.25;
6564
- const crtMinX = -(w_val / 2 + 0.5 + courtyardPadding);
6565
- const crtMaxX = p_val / 2 + pl_val / 2 + courtyardPadding;
6566
- const crtMinY = -(h_val / 2 + courtyardPadding);
6567
- const crtMaxY = h_val / 2 + courtyardPadding;
6523
+ const courtyardWidthMm = 7;
6524
+ const courtyardHeightMm = 3.5;
6568
6525
  const courtyard = {
6569
6526
  type: "pcb_courtyard_rect",
6570
6527
  pcb_courtyard_rect_id: "",
6571
6528
  pcb_component_id: "",
6572
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6573
- width: crtMaxX - crtMinX,
6574
- height: crtMaxY - crtMinY,
6529
+ center: { x: 0, y: 0 },
6530
+ width: courtyardWidthMm,
6531
+ height: courtyardHeightMm,
6575
6532
  layer: "top"
6576
6533
  };
6577
6534
  return {
@@ -6654,23 +6611,15 @@ var smf = (raw_params) => {
6654
6611
  stroke_width: 0.1,
6655
6612
  pcb_silkscreen_path_id: ""
6656
6613
  };
6657
- const p_v = length45.parse(parameters.p);
6658
- const pl_v = length45.parse(parameters.pl);
6659
- const pw_v = length45.parse(parameters.pw);
6660
- const h_v = length45.parse(parameters.h);
6661
- const w_v = length45.parse(parameters.w);
6662
- const courtyardPadding = 0.25;
6663
- const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
6664
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
6665
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
6666
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
6614
+ const courtyardWidthMm = 4.7;
6615
+ const courtyardHeightMm = 2.3;
6667
6616
  const courtyard = {
6668
6617
  type: "pcb_courtyard_rect",
6669
6618
  pcb_courtyard_rect_id: "",
6670
6619
  pcb_component_id: "",
6671
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6672
- width: crtMaxX - crtMinX,
6673
- height: crtMaxY - crtMinY,
6620
+ center: { x: 0, y: 0 },
6621
+ width: courtyardWidthMm,
6622
+ height: courtyardHeightMm,
6674
6623
  layer: "top"
6675
6624
  };
6676
6625
  return {
@@ -6754,23 +6703,15 @@ var smb = (raw_params) => {
6754
6703
  stroke_width: 0.1,
6755
6704
  pcb_silkscreen_path_id: ""
6756
6705
  };
6757
- const p_v = length46.parse(parameters.p);
6758
- const pl_v = length46.parse(parameters.pl);
6759
- const pw_v = length46.parse(parameters.pw);
6760
- const h_v = length46.parse(parameters.h);
6761
- const w_v = length46.parse(parameters.w);
6762
- const courtyardPadding = 0.25;
6763
- const crtMinX = -(Math.max(w_v / 2 + 0.1, p_v / 2 + pl_v / 2) + courtyardPadding);
6764
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
6765
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
6766
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
6706
+ const courtyardWidthMm = 7.3;
6707
+ const courtyardHeightMm = 4.5;
6767
6708
  const courtyard = {
6768
6709
  type: "pcb_courtyard_rect",
6769
6710
  pcb_courtyard_rect_id: "",
6770
6711
  pcb_component_id: "",
6771
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6772
- width: crtMaxX - crtMinX,
6773
- height: crtMaxY - crtMinY,
6712
+ center: { x: 0, y: 0 },
6713
+ width: courtyardWidthMm,
6714
+ height: courtyardHeightMm,
6774
6715
  layer: "top"
6775
6716
  };
6776
6717
  return {
@@ -6850,23 +6791,15 @@ var smc = (raw_params) => {
6850
6791
  stroke_width: 0.1,
6851
6792
  pcb_silkscreen_path_id: ""
6852
6793
  };
6853
- const p_v = length47.parse(parameters.p);
6854
- const pl_v = length47.parse(parameters.pl);
6855
- const pw_v = length47.parse(parameters.pw);
6856
- const h_v = length47.parse(parameters.h);
6857
- const w_v = length47.parse(parameters.w);
6858
- const courtyardPadding = 0.25;
6859
- const crtMinX = -(Math.max(w_v / 2 + 0.8, p_v / 2 + pl_v / 2) + courtyardPadding);
6860
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
6861
- const crtMinY = -(Math.max(h_v / 2 - 0.8, pw_v / 2) + courtyardPadding);
6862
- const crtMaxY = Math.max(h_v / 2 - 0.8, pw_v / 2) + courtyardPadding;
6794
+ const courtyardWidthMm = 9.8;
6795
+ const courtyardHeightMm = 6.7;
6863
6796
  const courtyard = {
6864
6797
  type: "pcb_courtyard_rect",
6865
6798
  pcb_courtyard_rect_id: "",
6866
6799
  pcb_component_id: "",
6867
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
6868
- width: crtMaxX - crtMinX,
6869
- height: crtMaxY - crtMinY,
6800
+ center: { x: 0, y: 0 },
6801
+ width: courtyardWidthMm,
6802
+ height: courtyardHeightMm,
6870
6803
  layer: "top"
6871
6804
  };
6872
6805
  return {
@@ -7719,23 +7652,15 @@ var sod110 = (raw_params) => {
7719
7652
  stroke_width: 0.1,
7720
7653
  pcb_silkscreen_path_id: ""
7721
7654
  };
7722
- const p_v = length49.parse(parameters.p);
7723
- const pl_v = length49.parse(parameters.pl);
7724
- const pw_v = length49.parse(parameters.pw);
7725
- const h_v = length49.parse(parameters.h);
7726
- const w_v = length49.parse(parameters.w);
7727
- const courtyardPadding = 0.25;
7728
- const crtMinX = -(Math.max(w_v / 2, p_v / 2 + pl_v / 2) + courtyardPadding);
7729
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
7730
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
7731
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
7655
+ const courtyardWidthMm = 3.2;
7656
+ const courtyardHeightMm = 2;
7732
7657
  const courtyard = {
7733
7658
  type: "pcb_courtyard_rect",
7734
7659
  pcb_courtyard_rect_id: "",
7735
7660
  pcb_component_id: "",
7736
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
7737
- width: crtMaxX - crtMinX,
7738
- height: crtMaxY - crtMinY,
7661
+ center: { x: 0, y: 0 },
7662
+ width: courtyardWidthMm,
7663
+ height: courtyardHeightMm,
7739
7664
  layer: "top"
7740
7665
  };
7741
7666
  return {
@@ -8116,23 +8041,15 @@ var sod323w = (raw_params) => {
8116
8041
  stroke_width: 0.1,
8117
8042
  pcb_silkscreen_path_id: ""
8118
8043
  };
8119
- const pl_v = length52.parse(parameters.pl);
8120
- const pw_v = length52.parse(parameters.pw);
8121
- const h_v = length52.parse(parameters.h);
8122
- const w_v = length52.parse(parameters.w);
8123
- const ps_v = length52.parse(parameters.pad_spacing);
8124
- const courtyardPadding = 0.25;
8125
- const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
8126
- const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
8127
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
8128
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
8044
+ const courtyardWidthMm = 4.3;
8045
+ const courtyardHeightMm = 2.15;
8129
8046
  const courtyard = {
8130
8047
  type: "pcb_courtyard_rect",
8131
8048
  pcb_courtyard_rect_id: "",
8132
8049
  pcb_component_id: "",
8133
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
8134
- width: crtMaxX - crtMinX,
8135
- height: crtMaxY - crtMinY,
8050
+ center: { x: 0, y: 0 },
8051
+ width: courtyardWidthMm,
8052
+ height: courtyardHeightMm,
8136
8053
  layer: "top"
8137
8054
  };
8138
8055
  return {
@@ -8216,23 +8133,15 @@ var sod323fl = (raw_params) => {
8216
8133
  stroke_width: 0.1,
8217
8134
  pcb_silkscreen_path_id: ""
8218
8135
  };
8219
- const pl_v = length53.parse(parameters.pl);
8220
- const pw_v = length53.parse(parameters.pw);
8221
- const h_v = length53.parse(parameters.h);
8222
- const w_v = length53.parse(parameters.w);
8223
- const ps_v = length53.parse(parameters.pad_spacing);
8224
- const courtyardPadding = 0.25;
8225
- const crtMinX = -(Math.max(w_v / 2 + 0.2, ps_v / 2 + pl_v / 2) + courtyardPadding);
8226
- const crtMaxX = ps_v / 2 + pl_v / 2 + courtyardPadding;
8227
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
8228
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
8136
+ const courtyardWidthMm = 3.7;
8137
+ const courtyardHeightMm = 2.15;
8229
8138
  const courtyard = {
8230
8139
  type: "pcb_courtyard_rect",
8231
8140
  pcb_courtyard_rect_id: "",
8232
8141
  pcb_component_id: "",
8233
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
8234
- width: crtMaxX - crtMinX,
8235
- height: crtMaxY - crtMinY,
8142
+ center: { x: 0, y: 0 },
8143
+ width: courtyardWidthMm,
8144
+ height: courtyardHeightMm,
8236
8145
  layer: "top"
8237
8146
  };
8238
8147
  return {
@@ -9201,23 +9110,15 @@ var smbf = (raw_params) => {
9201
9110
  stroke_width: 0.1,
9202
9111
  pcb_silkscreen_path_id: ""
9203
9112
  };
9204
- const p_v = length59.parse(parameters.p);
9205
- const pl_v = length59.parse(parameters.pl);
9206
- const pw_v = length59.parse(parameters.pw);
9207
- const h_v = length59.parse(parameters.h);
9208
- const w_v = length59.parse(parameters.w);
9209
- const courtyardPadding = 0.25;
9210
- const crtMinX = -(Math.max(w_v / 2 + 0.3, p_v / 2 + pl_v / 2) + courtyardPadding);
9211
- const crtMaxX = p_v / 2 + pl_v / 2 + courtyardPadding;
9212
- const crtMinY = -(Math.max(h_v / 2, pw_v / 2) + courtyardPadding);
9213
- const crtMaxY = Math.max(h_v / 2, pw_v / 2) + courtyardPadding;
9113
+ const courtyardWidthMm = 7;
9114
+ const courtyardHeightMm = 3.5;
9214
9115
  const courtyard = {
9215
9116
  type: "pcb_courtyard_rect",
9216
9117
  pcb_courtyard_rect_id: "",
9217
9118
  pcb_component_id: "",
9218
- center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
9219
- width: crtMaxX - crtMinX,
9220
- height: crtMaxY - crtMinY,
9119
+ center: { x: 0, y: 0 },
9120
+ width: courtyardWidthMm,
9121
+ height: courtyardHeightMm,
9221
9122
  layer: "top"
9222
9123
  };
9223
9124
  return {