@tscircuit/footprinter 0.0.324 → 0.0.326
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 +168 -11
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1818,8 +1818,25 @@ var ssop = (raw_params) => {
|
|
|
1818
1818
|
{ x: -sw / 2, y: -sh / 2 }
|
|
1819
1819
|
]
|
|
1820
1820
|
};
|
|
1821
|
+
const courtyardPadding = 0.25;
|
|
1822
|
+
const silkXs = silkscreenBorder.route.map((pt) => pt.x);
|
|
1823
|
+
const silkYs = silkscreenBorder.route.map((pt) => pt.y);
|
|
1824
|
+
const padXExtent = parameters.legsoutside ? parameters.w / 2 + parameters.pl : (parameters.w + 0.2) / 2 + parameters.pl / 2;
|
|
1825
|
+
const crtMinX = Math.min(-padXExtent, ...silkXs) - courtyardPadding;
|
|
1826
|
+
const crtMaxX = Math.max(padXExtent, ...silkXs) + courtyardPadding;
|
|
1827
|
+
const crtMinY = Math.min(...silkYs) - courtyardPadding;
|
|
1828
|
+
const crtMaxY = Math.max(...silkYs) + courtyardPadding;
|
|
1829
|
+
const courtyard = {
|
|
1830
|
+
type: "pcb_courtyard_rect",
|
|
1831
|
+
pcb_courtyard_rect_id: "",
|
|
1832
|
+
pcb_component_id: "",
|
|
1833
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
1834
|
+
width: crtMaxX - crtMinX,
|
|
1835
|
+
height: crtMaxY - crtMinY,
|
|
1836
|
+
layer: "top"
|
|
1837
|
+
};
|
|
1821
1838
|
return {
|
|
1822
|
-
circuitJson: [...pads, silkscreenBorder, silkscreenRefText],
|
|
1839
|
+
circuitJson: [...pads, silkscreenBorder, silkscreenRefText, courtyard],
|
|
1823
1840
|
parameters
|
|
1824
1841
|
};
|
|
1825
1842
|
};
|
|
@@ -1894,8 +1911,25 @@ var tssop = (raw_params) => {
|
|
|
1894
1911
|
{ x: -sw / 2, y: -sh / 2 }
|
|
1895
1912
|
]
|
|
1896
1913
|
};
|
|
1914
|
+
const courtyardPadding = 0.25;
|
|
1915
|
+
const silkXs = silkscreenBorder.route.map((pt) => pt.x);
|
|
1916
|
+
const silkYs = silkscreenBorder.route.map((pt) => pt.y);
|
|
1917
|
+
const padXExtent = parameters.legsoutside ? parameters.w / 2 + parameters.pl : parameters.w / 2;
|
|
1918
|
+
const crtMinX = Math.min(-padXExtent, ...silkXs) - courtyardPadding;
|
|
1919
|
+
const crtMaxX = Math.max(padXExtent, ...silkXs) + courtyardPadding;
|
|
1920
|
+
const crtMinY = Math.min(...silkYs) - courtyardPadding;
|
|
1921
|
+
const crtMaxY = Math.max(...silkYs) + courtyardPadding;
|
|
1922
|
+
const courtyard = {
|
|
1923
|
+
type: "pcb_courtyard_rect",
|
|
1924
|
+
pcb_courtyard_rect_id: "",
|
|
1925
|
+
pcb_component_id: "",
|
|
1926
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
1927
|
+
width: crtMaxX - crtMinX,
|
|
1928
|
+
height: crtMaxY - crtMinY,
|
|
1929
|
+
layer: "top"
|
|
1930
|
+
};
|
|
1897
1931
|
return {
|
|
1898
|
-
circuitJson: [...pads, silkscreenBorder, silkscreenRefText],
|
|
1932
|
+
circuitJson: [...pads, silkscreenBorder, silkscreenRefText, courtyard],
|
|
1899
1933
|
parameters
|
|
1900
1934
|
};
|
|
1901
1935
|
};
|
|
@@ -1962,13 +1996,28 @@ var sot363 = (raw_params) => {
|
|
|
1962
1996
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
1963
1997
|
};
|
|
1964
1998
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
1999
|
+
const courtyardPadding = 0.25;
|
|
2000
|
+
const crtMinX = -(0.84 + pl / 2) - courtyardPadding;
|
|
2001
|
+
const crtMaxX = 0.84 + pl / 2 + courtyardPadding;
|
|
2002
|
+
const crtMinY = -(h / 2 + 0.1) - courtyardPadding;
|
|
2003
|
+
const crtMaxY = h / 2 + 0.1 + courtyardPadding;
|
|
2004
|
+
const courtyard = {
|
|
2005
|
+
type: "pcb_courtyard_rect",
|
|
2006
|
+
pcb_courtyard_rect_id: "",
|
|
2007
|
+
pcb_component_id: "",
|
|
2008
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
2009
|
+
width: crtMaxX - crtMinX,
|
|
2010
|
+
height: crtMaxY - crtMinY,
|
|
2011
|
+
layer: "top"
|
|
2012
|
+
};
|
|
1965
2013
|
return {
|
|
1966
2014
|
circuitJson: [
|
|
1967
2015
|
...pads,
|
|
1968
2016
|
silkscreenTopLine,
|
|
1969
2017
|
silkscreenBottomLine,
|
|
1970
2018
|
silkscreenRefText,
|
|
1971
|
-
pin1Marking
|
|
2019
|
+
pin1Marking,
|
|
2020
|
+
courtyard
|
|
1972
2021
|
],
|
|
1973
2022
|
parameters
|
|
1974
2023
|
};
|
|
@@ -2043,13 +2092,28 @@ var sot886 = (raw_params) => {
|
|
|
2043
2092
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
2044
2093
|
};
|
|
2045
2094
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
2095
|
+
const courtyardPadding = 0.25;
|
|
2096
|
+
const crtMinX = -w / 2 - courtyardPadding;
|
|
2097
|
+
const crtMaxX = w / 2 + courtyardPadding;
|
|
2098
|
+
const crtMinY = -h / 2 - courtyardPadding;
|
|
2099
|
+
const crtMaxY = h / 2 + courtyardPadding;
|
|
2100
|
+
const courtyard = {
|
|
2101
|
+
type: "pcb_courtyard_rect",
|
|
2102
|
+
pcb_courtyard_rect_id: "",
|
|
2103
|
+
pcb_component_id: "",
|
|
2104
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
2105
|
+
width: crtMaxX - crtMinX,
|
|
2106
|
+
height: crtMaxY - crtMinY,
|
|
2107
|
+
layer: "top"
|
|
2108
|
+
};
|
|
2046
2109
|
return {
|
|
2047
2110
|
circuitJson: [
|
|
2048
2111
|
...pads,
|
|
2049
2112
|
silkscreenTopLine,
|
|
2050
2113
|
silkscreenBottomLine,
|
|
2051
2114
|
silkscreenRefText,
|
|
2052
|
-
pin1Marking
|
|
2115
|
+
pin1Marking,
|
|
2116
|
+
courtyard
|
|
2053
2117
|
],
|
|
2054
2118
|
parameters
|
|
2055
2119
|
};
|
|
@@ -2388,11 +2452,26 @@ var dfn = (raw_params) => {
|
|
|
2388
2452
|
sh / 2 + 0.4,
|
|
2389
2453
|
sh / 12
|
|
2390
2454
|
);
|
|
2455
|
+
const courtyardPadding = 0.25;
|
|
2456
|
+
const crtMinX = -sw / 2 - courtyardPadding;
|
|
2457
|
+
const crtMaxX = sw / 2 + courtyardPadding;
|
|
2458
|
+
const crtMinY = -sh / 2 - courtyardPadding;
|
|
2459
|
+
const crtMaxY = sh / 2 + courtyardPadding;
|
|
2460
|
+
const courtyard = {
|
|
2461
|
+
type: "pcb_courtyard_rect",
|
|
2462
|
+
pcb_courtyard_rect_id: "",
|
|
2463
|
+
pcb_component_id: "",
|
|
2464
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
2465
|
+
width: crtMaxX - crtMinX,
|
|
2466
|
+
height: crtMaxY - crtMinY,
|
|
2467
|
+
layer: "top"
|
|
2468
|
+
};
|
|
2391
2469
|
return {
|
|
2392
2470
|
circuitJson: [
|
|
2393
2471
|
...pads,
|
|
2394
2472
|
silkscreenRefText,
|
|
2395
|
-
...silkscreenPaths
|
|
2473
|
+
...silkscreenPaths,
|
|
2474
|
+
courtyard
|
|
2396
2475
|
],
|
|
2397
2476
|
parameters
|
|
2398
2477
|
};
|
|
@@ -2823,13 +2902,28 @@ var sot563 = (raw_params) => {
|
|
|
2823
2902
|
pcb_silkscreen_path_id: "pin_marker_1"
|
|
2824
2903
|
};
|
|
2825
2904
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.4, 0.25);
|
|
2905
|
+
const courtyardPadding = 0.25;
|
|
2906
|
+
const crtMinX = -w / 2 - courtyardPadding;
|
|
2907
|
+
const crtMaxX = w / 2 + courtyardPadding;
|
|
2908
|
+
const crtMinY = -h / 2 - courtyardPadding;
|
|
2909
|
+
const crtMaxY = h / 2 + courtyardPadding;
|
|
2910
|
+
const courtyard = {
|
|
2911
|
+
type: "pcb_courtyard_rect",
|
|
2912
|
+
pcb_courtyard_rect_id: "",
|
|
2913
|
+
pcb_component_id: "",
|
|
2914
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
2915
|
+
width: crtMaxX - crtMinX,
|
|
2916
|
+
height: crtMaxY - crtMinY,
|
|
2917
|
+
layer: "top"
|
|
2918
|
+
};
|
|
2826
2919
|
return {
|
|
2827
2920
|
circuitJson: [
|
|
2828
2921
|
...pads,
|
|
2829
2922
|
silkscreenTopLine,
|
|
2830
2923
|
silkscreenBottomLine,
|
|
2831
2924
|
silkscreenRefText,
|
|
2832
|
-
pin1Marking
|
|
2925
|
+
pin1Marking,
|
|
2926
|
+
courtyard
|
|
2833
2927
|
],
|
|
2834
2928
|
parameters
|
|
2835
2929
|
};
|
|
@@ -4513,11 +4607,26 @@ var sop8 = (raw_params) => {
|
|
|
4513
4607
|
],
|
|
4514
4608
|
stroke_width: 0.1
|
|
4515
4609
|
};
|
|
4610
|
+
const courtyardPadding = 0.25;
|
|
4611
|
+
const crtMinX = -parameters.w / 2 - courtyardPadding;
|
|
4612
|
+
const crtMaxX = parameters.w / 2 + courtyardPadding;
|
|
4613
|
+
const crtMinY = -sh / 2 - courtyardPadding;
|
|
4614
|
+
const crtMaxY = sh / 2 + 0.4 + courtyardPadding;
|
|
4615
|
+
const courtyard = {
|
|
4616
|
+
type: "pcb_courtyard_rect",
|
|
4617
|
+
pcb_courtyard_rect_id: "",
|
|
4618
|
+
pcb_component_id: "",
|
|
4619
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
4620
|
+
width: crtMaxX - crtMinX,
|
|
4621
|
+
height: crtMaxY - crtMinY,
|
|
4622
|
+
layer: "top"
|
|
4623
|
+
};
|
|
4516
4624
|
return {
|
|
4517
4625
|
circuitJson: [
|
|
4518
4626
|
...pads,
|
|
4519
4627
|
silkscreenRefText,
|
|
4520
|
-
silkscreenLine
|
|
4628
|
+
silkscreenLine,
|
|
4629
|
+
courtyard
|
|
4521
4630
|
],
|
|
4522
4631
|
parameters
|
|
4523
4632
|
};
|
|
@@ -7050,13 +7159,29 @@ var vssop = (raw_params) => {
|
|
|
7050
7159
|
silkscreenBoxHeight / 2 + 0.5,
|
|
7051
7160
|
0.3
|
|
7052
7161
|
);
|
|
7162
|
+
const courtyardPadding = 0.25;
|
|
7163
|
+
const padCenterX = parameters.num_pins === 10 ? length50.parse("2.2mm") : length50.parse("1.8mm");
|
|
7164
|
+
const crtMinX = -(padCenterX + pl / 2) - courtyardPadding;
|
|
7165
|
+
const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
|
|
7166
|
+
const crtMinY = -silkscreenBoxHeight / 2 - courtyardPadding;
|
|
7167
|
+
const crtMaxY = silkscreenBoxHeight / 2 + courtyardPadding;
|
|
7168
|
+
const courtyard = {
|
|
7169
|
+
type: "pcb_courtyard_rect",
|
|
7170
|
+
pcb_courtyard_rect_id: "",
|
|
7171
|
+
pcb_component_id: "",
|
|
7172
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7173
|
+
width: crtMaxX - crtMinX,
|
|
7174
|
+
height: crtMaxY - crtMinY,
|
|
7175
|
+
layer: "top"
|
|
7176
|
+
};
|
|
7053
7177
|
return {
|
|
7054
7178
|
circuitJson: [
|
|
7055
7179
|
...pads,
|
|
7056
7180
|
silkscreenTopLine,
|
|
7057
7181
|
silkscreenBottomLine,
|
|
7058
7182
|
silkscreenRefText,
|
|
7059
|
-
pin1Marking
|
|
7183
|
+
pin1Marking,
|
|
7184
|
+
courtyard
|
|
7060
7185
|
],
|
|
7061
7186
|
parameters
|
|
7062
7187
|
};
|
|
@@ -7067,7 +7192,7 @@ var getVssopPadCoord = (pinCount, pn, w, p) => {
|
|
|
7067
7192
|
const col = pn <= half ? -1 : 1;
|
|
7068
7193
|
const row = (half - 1) / 2 - rowIndex;
|
|
7069
7194
|
return {
|
|
7070
|
-
x: col *
|
|
7195
|
+
x: col * 2.11,
|
|
7071
7196
|
y: row * p
|
|
7072
7197
|
};
|
|
7073
7198
|
};
|
|
@@ -7196,13 +7321,29 @@ var msop = (raw_params) => {
|
|
|
7196
7321
|
silkscreenBoxHeight / 2 + 0.5,
|
|
7197
7322
|
0.3
|
|
7198
7323
|
);
|
|
7324
|
+
const courtyardPadding = 0.25;
|
|
7325
|
+
const padCenterX = length51.parse("2mm");
|
|
7326
|
+
const crtMinX = -(padCenterX + pl / 2) - courtyardPadding;
|
|
7327
|
+
const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
|
|
7328
|
+
const crtMinY = -silkscreenBoxHeight / 2 - courtyardPadding;
|
|
7329
|
+
const crtMaxY = silkscreenBoxHeight / 2 + courtyardPadding;
|
|
7330
|
+
const courtyard = {
|
|
7331
|
+
type: "pcb_courtyard_rect",
|
|
7332
|
+
pcb_courtyard_rect_id: "",
|
|
7333
|
+
pcb_component_id: "",
|
|
7334
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7335
|
+
width: crtMaxX - crtMinX,
|
|
7336
|
+
height: crtMaxY - crtMinY,
|
|
7337
|
+
layer: "top"
|
|
7338
|
+
};
|
|
7199
7339
|
return {
|
|
7200
7340
|
circuitJson: [
|
|
7201
7341
|
...pads,
|
|
7202
7342
|
silkscreenTopLine,
|
|
7203
7343
|
silkscreenBottomLine,
|
|
7204
7344
|
silkscreenRefText,
|
|
7205
|
-
pin1Marking
|
|
7345
|
+
pin1Marking,
|
|
7346
|
+
courtyard
|
|
7206
7347
|
],
|
|
7207
7348
|
parameters
|
|
7208
7349
|
};
|
|
@@ -7461,13 +7602,29 @@ var son = (raw_params) => {
|
|
|
7461
7602
|
silkscreenBoxHeight / 2 + 0.5,
|
|
7462
7603
|
0.3
|
|
7463
7604
|
);
|
|
7605
|
+
const courtyardPadding = 0.25;
|
|
7606
|
+
const padCenterX = length54.parse("1.4mm");
|
|
7607
|
+
const crtMinX = -(padCenterX + pl / 2) - courtyardPadding;
|
|
7608
|
+
const crtMaxX = padCenterX + pl / 2 + courtyardPadding;
|
|
7609
|
+
const crtMinY = -silkscreenBoxHeight / 2 - courtyardPadding;
|
|
7610
|
+
const crtMaxY = silkscreenBoxHeight / 2 + courtyardPadding;
|
|
7611
|
+
const courtyard = {
|
|
7612
|
+
type: "pcb_courtyard_rect",
|
|
7613
|
+
pcb_courtyard_rect_id: "",
|
|
7614
|
+
pcb_component_id: "",
|
|
7615
|
+
center: { x: (crtMinX + crtMaxX) / 2, y: (crtMinY + crtMaxY) / 2 },
|
|
7616
|
+
width: crtMaxX - crtMinX,
|
|
7617
|
+
height: crtMaxY - crtMinY,
|
|
7618
|
+
layer: "top"
|
|
7619
|
+
};
|
|
7464
7620
|
return {
|
|
7465
7621
|
circuitJson: [
|
|
7466
7622
|
...pads,
|
|
7467
7623
|
silkscreenTopLine,
|
|
7468
7624
|
silkscreenBottomLine,
|
|
7469
7625
|
silkscreenRefText,
|
|
7470
|
-
pin1Marking
|
|
7626
|
+
pin1Marking,
|
|
7627
|
+
courtyard
|
|
7471
7628
|
],
|
|
7472
7629
|
parameters
|
|
7473
7630
|
};
|