@tscircuit/footprinter 0.0.344 → 0.0.345
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 +356 -273
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -411,29 +411,28 @@ var dip = (raw_params) => {
|
|
|
411
411
|
});
|
|
412
412
|
}
|
|
413
413
|
const silkscreenRefText = silkscreenRef(0, sh / 2 + 0.5, 0.4);
|
|
414
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
415
414
|
const pinRowSpanX = parameters.w + parameters.od;
|
|
416
415
|
const pinRowSpanY = padEdgeHeight;
|
|
417
|
-
const
|
|
418
|
-
const
|
|
419
|
-
const
|
|
420
|
-
const
|
|
416
|
+
const courtyardStepOuterHalfWidth = pinRowSpanX / 2 + 0.25;
|
|
417
|
+
const courtyardStepInnerHalfWidth = courtyardStepOuterHalfWidth;
|
|
418
|
+
const courtyardStepOuterHalfHeight = pinRowSpanY / 2 + 0.72;
|
|
419
|
+
const courtyardStepInnerHalfHeight = courtyardStepOuterHalfHeight;
|
|
421
420
|
const courtyard = {
|
|
422
421
|
type: "pcb_courtyard_outline",
|
|
423
422
|
pcb_courtyard_outline_id: "",
|
|
424
423
|
pcb_component_id: "",
|
|
425
424
|
outline: createRectUnionOutline([
|
|
426
425
|
{
|
|
427
|
-
minX: -
|
|
428
|
-
maxX:
|
|
429
|
-
minY: -
|
|
430
|
-
maxY:
|
|
426
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
427
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
428
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
429
|
+
maxY: courtyardStepInnerHalfHeight
|
|
431
430
|
},
|
|
432
431
|
{
|
|
433
|
-
minX: -
|
|
434
|
-
maxX:
|
|
435
|
-
minY: -
|
|
436
|
-
maxY:
|
|
432
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
433
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
434
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
435
|
+
maxY: courtyardStepOuterHalfHeight
|
|
437
436
|
}
|
|
438
437
|
]),
|
|
439
438
|
layer: "top"
|
|
@@ -1290,39 +1289,34 @@ var bga = (raw_params) => {
|
|
|
1290
1289
|
route: markerRoute,
|
|
1291
1290
|
stroke_width: 0.05
|
|
1292
1291
|
};
|
|
1293
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
1294
1292
|
const padSpanX = (grid.x - 1) * p + pad2;
|
|
1295
1293
|
const padSpanY = (grid.y - 1) * p + pad2;
|
|
1296
1294
|
const bodySpanX = w ?? padSpanX;
|
|
1297
1295
|
const bodySpanY = h ?? padSpanY;
|
|
1298
|
-
const
|
|
1299
|
-
const
|
|
1296
|
+
const courtyardEnvelopeHalfWidth = Math.max(padSpanX / 2, bodySpanX / 2);
|
|
1297
|
+
const courtyardEnvelopeHalfHeight = Math.max(padSpanY / 2, bodySpanY / 2);
|
|
1300
1298
|
const courtyardClearanceX = 1.715;
|
|
1301
1299
|
const courtyardClearanceY = 1.765;
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1304
|
-
|
|
1305
|
-
const
|
|
1306
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(
|
|
1307
|
-
courtyardEnvelopeHalfY + courtyardClearanceY
|
|
1308
|
-
);
|
|
1309
|
-
const courtyardStepInnerHalfY = courtyardStepOuterHalfY;
|
|
1300
|
+
const courtyardStepOuterHalfWidth = courtyardEnvelopeHalfWidth + courtyardClearanceX;
|
|
1301
|
+
const courtyardStepInnerHalfWidth = courtyardStepOuterHalfWidth;
|
|
1302
|
+
const courtyardStepOuterHalfHeight = courtyardEnvelopeHalfHeight + courtyardClearanceY;
|
|
1303
|
+
const courtyardStepInnerHalfHeight = courtyardStepOuterHalfHeight;
|
|
1310
1304
|
const courtyard = {
|
|
1311
1305
|
type: "pcb_courtyard_outline",
|
|
1312
1306
|
pcb_courtyard_outline_id: "",
|
|
1313
1307
|
pcb_component_id: "",
|
|
1314
1308
|
outline: createRectUnionOutline([
|
|
1315
1309
|
{
|
|
1316
|
-
minX: -
|
|
1317
|
-
maxX:
|
|
1318
|
-
minY: -
|
|
1319
|
-
maxY:
|
|
1310
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
1311
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
1312
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
1313
|
+
maxY: courtyardStepInnerHalfHeight
|
|
1320
1314
|
},
|
|
1321
1315
|
{
|
|
1322
|
-
minX: -
|
|
1323
|
-
maxX:
|
|
1324
|
-
minY: -
|
|
1325
|
-
maxY:
|
|
1316
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
1317
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
1318
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
1319
|
+
maxY: courtyardStepOuterHalfHeight
|
|
1326
1320
|
}
|
|
1327
1321
|
]),
|
|
1328
1322
|
layer: "top"
|
|
@@ -1448,14 +1442,11 @@ var soicWithoutParsing = (parameters) => {
|
|
|
1448
1442
|
{ x: -sw / 2, y: -sh / 2 }
|
|
1449
1443
|
]
|
|
1450
1444
|
};
|
|
1451
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
1452
1445
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
1453
|
-
const
|
|
1454
|
-
const
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.27);
|
|
1458
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.63);
|
|
1446
|
+
const courtyardStepInnerHalfWidth = parameters.w / 2 + 0.25;
|
|
1447
|
+
const courtyardStepOuterHalfWidth = courtyardStepInnerHalfWidth + 1.93;
|
|
1448
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.275;
|
|
1449
|
+
const courtyardStepOuterHalfHeight = pinRowSpanY / 2 + 0.635;
|
|
1459
1450
|
const courtyard = {
|
|
1460
1451
|
type: "pcb_courtyard_outline",
|
|
1461
1452
|
pcb_courtyard_outline_id: "",
|
|
@@ -1463,16 +1454,16 @@ var soicWithoutParsing = (parameters) => {
|
|
|
1463
1454
|
layer: "top",
|
|
1464
1455
|
outline: createRectUnionOutline([
|
|
1465
1456
|
{
|
|
1466
|
-
minX: -
|
|
1467
|
-
maxX:
|
|
1468
|
-
minY: -
|
|
1469
|
-
maxY:
|
|
1457
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
1458
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
1459
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
1460
|
+
maxY: courtyardStepInnerHalfHeight
|
|
1470
1461
|
},
|
|
1471
1462
|
{
|
|
1472
|
-
minX: -
|
|
1473
|
-
maxX:
|
|
1474
|
-
minY: -
|
|
1475
|
-
maxY:
|
|
1463
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
1464
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
1465
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
1466
|
+
maxY: courtyardStepOuterHalfHeight
|
|
1476
1467
|
}
|
|
1477
1468
|
])
|
|
1478
1469
|
};
|
|
@@ -1814,20 +1805,19 @@ var quad = (raw_params) => {
|
|
|
1814
1805
|
parameters.h / 2 + (parameters.legsoutside ? parameters.pl * 1.2 : 0.5),
|
|
1815
1806
|
0.3
|
|
1816
1807
|
);
|
|
1817
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
1818
1808
|
const roundUpToCourtyardOuterGrid = (value) => Math.ceil(value / 0.05) * 0.05;
|
|
1819
1809
|
const pinRowSpanX = (spc - 1) * parameters.p + parameters.pw;
|
|
1820
1810
|
const pinRowSpanY = (spc - 1) * parameters.p + parameters.pw;
|
|
1821
|
-
const
|
|
1822
|
-
const
|
|
1823
|
-
const
|
|
1824
|
-
const
|
|
1825
|
-
const
|
|
1826
|
-
|
|
1811
|
+
const courtyardStepInnerHalfWidth = pinRowSpanX / 2 + 0.25;
|
|
1812
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.25;
|
|
1813
|
+
const courtyardStepOuterHalfWidth = parameters.w / 2 + 0.25;
|
|
1814
|
+
const courtyardStepOuterHalfHeight = parameters.h / 2 + 0.25;
|
|
1815
|
+
const courtyardOuterHalfWidth = Math.max(
|
|
1816
|
+
courtyardStepOuterHalfWidth,
|
|
1827
1817
|
roundUpToCourtyardOuterGrid(padOuterHalfX + 0.25)
|
|
1828
1818
|
);
|
|
1829
|
-
const
|
|
1830
|
-
|
|
1819
|
+
const courtyardOuterHalfHeight = Math.max(
|
|
1820
|
+
courtyardStepOuterHalfHeight,
|
|
1831
1821
|
roundUpToCourtyardOuterGrid(padOuterHalfY + 0.25)
|
|
1832
1822
|
);
|
|
1833
1823
|
const courtyard = {
|
|
@@ -1837,22 +1827,22 @@ var quad = (raw_params) => {
|
|
|
1837
1827
|
layer: "top",
|
|
1838
1828
|
outline: createRectUnionOutline([
|
|
1839
1829
|
{
|
|
1840
|
-
minX: -
|
|
1841
|
-
maxX:
|
|
1842
|
-
minY: -
|
|
1843
|
-
maxY:
|
|
1830
|
+
minX: -courtyardOuterHalfWidth,
|
|
1831
|
+
maxX: courtyardOuterHalfWidth,
|
|
1832
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
1833
|
+
maxY: courtyardStepInnerHalfHeight
|
|
1844
1834
|
},
|
|
1845
1835
|
{
|
|
1846
|
-
minX: -
|
|
1847
|
-
maxX:
|
|
1848
|
-
minY: -
|
|
1849
|
-
maxY:
|
|
1836
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
1837
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
1838
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
1839
|
+
maxY: courtyardStepOuterHalfHeight
|
|
1850
1840
|
},
|
|
1851
1841
|
{
|
|
1852
|
-
minX: -
|
|
1853
|
-
maxX:
|
|
1854
|
-
minY: -
|
|
1855
|
-
maxY:
|
|
1842
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
1843
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
1844
|
+
minY: -courtyardOuterHalfHeight,
|
|
1845
|
+
maxY: courtyardOuterHalfHeight
|
|
1856
1846
|
}
|
|
1857
1847
|
])
|
|
1858
1848
|
};
|
|
@@ -2079,30 +2069,29 @@ var ssop = (raw_params) => {
|
|
|
2079
2069
|
{ x: -sw / 2, y: -sh / 2 }
|
|
2080
2070
|
]
|
|
2081
2071
|
};
|
|
2082
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
2083
2072
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
2084
2073
|
const padToeHalfX = parameters.legsoutside ? parameters.w / 2 + parameters.pl : (parameters.w + 0.2) / 2 + parameters.pl / 2;
|
|
2085
2074
|
const pinRowHalfY = pinRowSpanY / 2;
|
|
2086
|
-
const
|
|
2087
|
-
const
|
|
2088
|
-
const
|
|
2089
|
-
const
|
|
2075
|
+
const courtyardStepOuterHalfWidth = padToeHalfX + 0.25;
|
|
2076
|
+
const courtyardStepInnerHalfWidth = courtyardStepOuterHalfWidth;
|
|
2077
|
+
const courtyardStepOuterHalfHeight = pinRowHalfY + 0.445;
|
|
2078
|
+
const courtyardStepInnerHalfHeight = courtyardStepOuterHalfHeight;
|
|
2090
2079
|
const courtyard = {
|
|
2091
2080
|
type: "pcb_courtyard_outline",
|
|
2092
2081
|
pcb_courtyard_outline_id: "",
|
|
2093
2082
|
pcb_component_id: "",
|
|
2094
2083
|
outline: createRectUnionOutline([
|
|
2095
2084
|
{
|
|
2096
|
-
minX: -
|
|
2097
|
-
maxX:
|
|
2098
|
-
minY: -
|
|
2099
|
-
maxY:
|
|
2085
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
2086
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
2087
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
2088
|
+
maxY: courtyardStepInnerHalfHeight
|
|
2100
2089
|
},
|
|
2101
2090
|
{
|
|
2102
|
-
minX: -
|
|
2103
|
-
maxX:
|
|
2104
|
-
minY: -
|
|
2105
|
-
maxY:
|
|
2091
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
2092
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
2093
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
2094
|
+
maxY: courtyardStepOuterHalfHeight
|
|
2106
2095
|
}
|
|
2107
2096
|
]),
|
|
2108
2097
|
layer: "top"
|
|
@@ -2183,15 +2172,12 @@ var tssop = (raw_params) => {
|
|
|
2183
2172
|
{ x: -sw / 2, y: -sh / 2 }
|
|
2184
2173
|
]
|
|
2185
2174
|
};
|
|
2186
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
2187
2175
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
2188
2176
|
const pinToeHalfSpanX = parameters.w / 2 + (parameters.legsoutside ? parameters.pl : 0);
|
|
2189
|
-
const
|
|
2190
|
-
const
|
|
2191
|
-
const
|
|
2192
|
-
const
|
|
2193
|
-
courtyardStepInnerHalfY + 0.35
|
|
2194
|
-
);
|
|
2177
|
+
const courtyardStepInnerHalfWidth = parameters.w / 2 + 0.25;
|
|
2178
|
+
const courtyardStepOuterHalfWidth = pinToeHalfSpanX + 0.18;
|
|
2179
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.25;
|
|
2180
|
+
const courtyardStepOuterHalfHeight = courtyardStepInnerHalfHeight + 0.35;
|
|
2195
2181
|
const courtyard = {
|
|
2196
2182
|
type: "pcb_courtyard_outline",
|
|
2197
2183
|
pcb_courtyard_outline_id: "",
|
|
@@ -2199,16 +2185,16 @@ var tssop = (raw_params) => {
|
|
|
2199
2185
|
layer: "top",
|
|
2200
2186
|
outline: createRectUnionOutline([
|
|
2201
2187
|
{
|
|
2202
|
-
minX: -
|
|
2203
|
-
maxX:
|
|
2204
|
-
minY: -
|
|
2205
|
-
maxY:
|
|
2188
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
2189
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
2190
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
2191
|
+
maxY: courtyardStepInnerHalfHeight
|
|
2206
2192
|
},
|
|
2207
2193
|
{
|
|
2208
|
-
minX: -
|
|
2209
|
-
maxX:
|
|
2210
|
-
minY: -
|
|
2211
|
-
maxY:
|
|
2194
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
2195
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
2196
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
2197
|
+
maxY: courtyardStepOuterHalfHeight
|
|
2212
2198
|
}
|
|
2213
2199
|
])
|
|
2214
2200
|
};
|
|
@@ -3460,21 +3446,16 @@ var axial = (raw_params) => {
|
|
|
3460
3446
|
pcb_silkscreen_path_id: ""
|
|
3461
3447
|
};
|
|
3462
3448
|
const silkscreenRefText = silkscreenRef(0, 1.5, 0.5);
|
|
3463
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
3464
3449
|
const pin1CenterX = -p / 2;
|
|
3465
3450
|
const pin2CenterX = p / 2;
|
|
3466
3451
|
const pinPadHalfX = od / 2;
|
|
3467
3452
|
const pinPadHalfY = od / 2;
|
|
3468
|
-
const courtyardStepOuterMinX =
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
const courtyardStepOuterMaxX = roundToCourtyardGrid(
|
|
3472
|
-
pin2CenterX + pinPadHalfX + 0.26
|
|
3473
|
-
);
|
|
3474
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(pinPadHalfY + 0.35);
|
|
3453
|
+
const courtyardStepOuterMinX = pin1CenterX - pinPadHalfX - 0.35;
|
|
3454
|
+
const courtyardStepOuterMaxX = pin2CenterX + pinPadHalfX + 0.26;
|
|
3455
|
+
const courtyardStepOuterHalfHeight = pinPadHalfY + 0.35;
|
|
3475
3456
|
const courtyardStepInnerMinX = courtyardStepOuterMinX;
|
|
3476
3457
|
const courtyardStepInnerMaxX = courtyardStepOuterMaxX;
|
|
3477
|
-
const
|
|
3458
|
+
const courtyardStepInnerHalfHeight = courtyardStepOuterHalfHeight;
|
|
3478
3459
|
const courtyard = {
|
|
3479
3460
|
type: "pcb_courtyard_outline",
|
|
3480
3461
|
pcb_courtyard_outline_id: "",
|
|
@@ -3483,14 +3464,14 @@ var axial = (raw_params) => {
|
|
|
3483
3464
|
{
|
|
3484
3465
|
minX: courtyardStepOuterMinX,
|
|
3485
3466
|
maxX: courtyardStepOuterMaxX,
|
|
3486
|
-
minY: -
|
|
3487
|
-
maxY:
|
|
3467
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
3468
|
+
maxY: courtyardStepInnerHalfHeight
|
|
3488
3469
|
},
|
|
3489
3470
|
{
|
|
3490
3471
|
minX: courtyardStepInnerMinX,
|
|
3491
3472
|
maxX: courtyardStepInnerMaxX,
|
|
3492
|
-
minY: -
|
|
3493
|
-
maxY:
|
|
3473
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
3474
|
+
maxY: courtyardStepOuterHalfHeight
|
|
3494
3475
|
}
|
|
3495
3476
|
]),
|
|
3496
3477
|
layer: "top"
|
|
@@ -5060,12 +5041,11 @@ var sop8 = (raw_params) => {
|
|
|
5060
5041
|
],
|
|
5061
5042
|
stroke_width: 0.1
|
|
5062
5043
|
};
|
|
5063
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
5064
5044
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * parameters.p + parameters.pw;
|
|
5065
|
-
const
|
|
5066
|
-
const
|
|
5067
|
-
const
|
|
5068
|
-
const
|
|
5045
|
+
const courtyardStepInnerHalfWidth = parameters.w / 2 - 1.395;
|
|
5046
|
+
const courtyardStepOuterHalfWidth = parameters.w / 2 + 0.255;
|
|
5047
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.25;
|
|
5048
|
+
const courtyardStepOuterHalfHeight = pinRowSpanY / 2 + 0.5;
|
|
5069
5049
|
const courtyard = {
|
|
5070
5050
|
type: "pcb_courtyard_outline",
|
|
5071
5051
|
pcb_courtyard_outline_id: "",
|
|
@@ -5073,16 +5053,16 @@ var sop8 = (raw_params) => {
|
|
|
5073
5053
|
layer: "top",
|
|
5074
5054
|
outline: createRectUnionOutline([
|
|
5075
5055
|
{
|
|
5076
|
-
minX: -
|
|
5077
|
-
maxX:
|
|
5078
|
-
minY: -
|
|
5079
|
-
maxY:
|
|
5056
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
5057
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
5058
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
5059
|
+
maxY: courtyardStepInnerHalfHeight
|
|
5080
5060
|
},
|
|
5081
5061
|
{
|
|
5082
|
-
minX: -
|
|
5083
|
-
maxX:
|
|
5084
|
-
minY: -
|
|
5085
|
-
maxY:
|
|
5062
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
5063
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
5064
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
5065
|
+
maxY: courtyardStepOuterHalfHeight
|
|
5086
5066
|
}
|
|
5087
5067
|
])
|
|
5088
5068
|
};
|
|
@@ -5412,43 +5392,36 @@ var sod923 = (raw_params) => {
|
|
|
5412
5392
|
stroke_width: 0.1,
|
|
5413
5393
|
pcb_silkscreen_path_id: ""
|
|
5414
5394
|
};
|
|
5415
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
5416
5395
|
const pinRowSpanX = p + pl;
|
|
5417
5396
|
const pinRowSpanY = pw;
|
|
5418
5397
|
const bodyHalfX = w / 2;
|
|
5419
5398
|
const bodyHalfY = h / 2;
|
|
5420
5399
|
const pinToeHalfX = pinRowSpanX / 2;
|
|
5421
5400
|
const pinRowHalfY = pinRowSpanY / 2;
|
|
5422
|
-
const
|
|
5423
|
-
const
|
|
5424
|
-
const
|
|
5425
|
-
const
|
|
5426
|
-
const
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
const
|
|
5430
|
-
courtyardNarrowHalfX - 0.055
|
|
5431
|
-
);
|
|
5432
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(courtyardEnvelopeHalfY);
|
|
5433
|
-
const courtyardStepInnerHalfY = roundToCourtyardGrid(
|
|
5434
|
-
courtyardNarrowHalfY + 0.155
|
|
5435
|
-
);
|
|
5401
|
+
const courtyardEnvelopeHalfWidth = Math.max(bodyHalfX, pinToeHalfX);
|
|
5402
|
+
const courtyardEnvelopeHalfHeight = Math.max(bodyHalfY, pinRowHalfY);
|
|
5403
|
+
const courtyardNarrowHalfWidth = Math.min(bodyHalfX, pinToeHalfX);
|
|
5404
|
+
const courtyardNarrowHalfHeight = Math.min(bodyHalfY, pinRowHalfY);
|
|
5405
|
+
const courtyardStepOuterHalfWidth = courtyardEnvelopeHalfWidth + 0.05;
|
|
5406
|
+
const courtyardStepInnerHalfWidth = courtyardNarrowHalfWidth - 0.055;
|
|
5407
|
+
const courtyardStepOuterHalfHeight = courtyardEnvelopeHalfHeight;
|
|
5408
|
+
const courtyardStepInnerHalfHeight = courtyardNarrowHalfHeight + 0.155;
|
|
5436
5409
|
const courtyard = {
|
|
5437
5410
|
type: "pcb_courtyard_outline",
|
|
5438
5411
|
pcb_courtyard_outline_id: "",
|
|
5439
5412
|
pcb_component_id: "",
|
|
5440
5413
|
outline: createRectUnionOutline([
|
|
5441
5414
|
{
|
|
5442
|
-
minX: -
|
|
5443
|
-
maxX:
|
|
5444
|
-
minY: -
|
|
5445
|
-
maxY:
|
|
5415
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
5416
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
5417
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
5418
|
+
maxY: courtyardStepInnerHalfHeight
|
|
5446
5419
|
},
|
|
5447
5420
|
{
|
|
5448
|
-
minX: -
|
|
5449
|
-
maxX:
|
|
5450
|
-
minY: -
|
|
5451
|
-
maxY:
|
|
5421
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
5422
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
5423
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
5424
|
+
maxY: courtyardStepOuterHalfHeight
|
|
5452
5425
|
}
|
|
5453
5426
|
]),
|
|
5454
5427
|
layer: "top"
|
|
@@ -6279,11 +6252,19 @@ var to220 = (raw_params) => {
|
|
|
6279
6252
|
}
|
|
6280
6253
|
];
|
|
6281
6254
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 0.6, 0.5);
|
|
6282
|
-
const
|
|
6283
|
-
const
|
|
6284
|
-
const
|
|
6285
|
-
const
|
|
6286
|
-
|
|
6255
|
+
const pinToeHalfSpanX = Math.max(...plated_holes.map((hole) => Math.abs(hole.x))) + od / 2;
|
|
6256
|
+
const pinToeTopY = holeY + od / 2;
|
|
6257
|
+
const pinToeBottomY = holeY - od / 2;
|
|
6258
|
+
const courtyardHalfWidth = Math.max(
|
|
6259
|
+
pinToeHalfSpanX + 0.25,
|
|
6260
|
+
halfWidth - od * 0.59
|
|
6261
|
+
);
|
|
6262
|
+
const courtyardTopY = halfHeight - od * 0.63;
|
|
6263
|
+
const courtyardBottomY = pinToeBottomY - (od / 2 + 0.01);
|
|
6264
|
+
const crtMinX = -courtyardHalfWidth;
|
|
6265
|
+
const crtMaxX = courtyardHalfWidth;
|
|
6266
|
+
const crtMinY = Math.min(courtyardBottomY, pinToeBottomY - 0.25);
|
|
6267
|
+
const crtMaxY = Math.max(courtyardTopY, pinToeTopY + 0.25);
|
|
6287
6268
|
const courtyard = {
|
|
6288
6269
|
type: "pcb_courtyard_rect",
|
|
6289
6270
|
pcb_courtyard_rect_id: "",
|
|
@@ -7298,27 +7279,26 @@ var sot223_5 = (parameters) => {
|
|
|
7298
7279
|
stroke_width: 0.1
|
|
7299
7280
|
};
|
|
7300
7281
|
const silkscreenRefText = silkscreenRef(0, 0, 0.3);
|
|
7301
|
-
const
|
|
7302
|
-
const
|
|
7303
|
-
const
|
|
7304
|
-
const
|
|
7305
|
-
const courtyardStepInnerHalfY = courtyardStepOuterHalfY;
|
|
7282
|
+
const courtyardStepOuterHalfWidth = padOuterHalfX + 0.25;
|
|
7283
|
+
const courtyardStepInnerHalfWidth = courtyardStepOuterHalfWidth;
|
|
7284
|
+
const courtyardStepOuterHalfHeight = padOuterHalfY + 0.85;
|
|
7285
|
+
const courtyardStepInnerHalfHeight = courtyardStepOuterHalfHeight;
|
|
7306
7286
|
const courtyard = {
|
|
7307
7287
|
type: "pcb_courtyard_outline",
|
|
7308
7288
|
pcb_courtyard_outline_id: "",
|
|
7309
7289
|
pcb_component_id: "",
|
|
7310
7290
|
outline: createRectUnionOutline([
|
|
7311
7291
|
{
|
|
7312
|
-
minX: -
|
|
7313
|
-
maxX:
|
|
7314
|
-
minY: -
|
|
7315
|
-
maxY:
|
|
7292
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
7293
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
7294
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
7295
|
+
maxY: courtyardStepInnerHalfHeight
|
|
7316
7296
|
},
|
|
7317
7297
|
{
|
|
7318
|
-
minX: -
|
|
7319
|
-
maxX:
|
|
7320
|
-
minY: -
|
|
7321
|
-
maxY:
|
|
7298
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
7299
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
7300
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
7301
|
+
maxY: courtyardStepOuterHalfHeight
|
|
7322
7302
|
}
|
|
7323
7303
|
]),
|
|
7324
7304
|
layer: "top"
|
|
@@ -7653,6 +7633,26 @@ var jst_def = base_def.extend({
|
|
|
7653
7633
|
),
|
|
7654
7634
|
string: z61.string().optional()
|
|
7655
7635
|
});
|
|
7636
|
+
var createEmptyBounds = () => ({
|
|
7637
|
+
minX: Number.POSITIVE_INFINITY,
|
|
7638
|
+
maxX: Number.NEGATIVE_INFINITY,
|
|
7639
|
+
minY: Number.POSITIVE_INFINITY,
|
|
7640
|
+
maxY: Number.NEGATIVE_INFINITY
|
|
7641
|
+
});
|
|
7642
|
+
var modifyBoundsToIncludeRect = ({
|
|
7643
|
+
bounds,
|
|
7644
|
+
centerX,
|
|
7645
|
+
centerY,
|
|
7646
|
+
width,
|
|
7647
|
+
height
|
|
7648
|
+
}) => {
|
|
7649
|
+
const halfWidth = width / 2;
|
|
7650
|
+
const halfHeight = height / 2;
|
|
7651
|
+
bounds.minX = Math.min(bounds.minX, centerX - halfWidth);
|
|
7652
|
+
bounds.maxX = Math.max(bounds.maxX, centerX + halfWidth);
|
|
7653
|
+
bounds.minY = Math.min(bounds.minY, centerY - halfHeight);
|
|
7654
|
+
bounds.maxY = Math.max(bounds.maxY, centerY + halfHeight);
|
|
7655
|
+
};
|
|
7656
7656
|
var variantDefaults = {
|
|
7657
7657
|
ph: {
|
|
7658
7658
|
p: length48.parse("2.2mm"),
|
|
@@ -7684,8 +7684,17 @@ function getVariant(params) {
|
|
|
7684
7684
|
if (params.zh) return "zh";
|
|
7685
7685
|
return "ph";
|
|
7686
7686
|
}
|
|
7687
|
-
function generatePads(
|
|
7687
|
+
function generatePads({
|
|
7688
|
+
variant,
|
|
7689
|
+
numPins,
|
|
7690
|
+
p,
|
|
7691
|
+
id,
|
|
7692
|
+
pw,
|
|
7693
|
+
pl
|
|
7694
|
+
}) {
|
|
7688
7695
|
const pads = [];
|
|
7696
|
+
const padBounds = createEmptyBounds();
|
|
7697
|
+
let maxPadHalfY = 0;
|
|
7689
7698
|
if (variant === "ph") {
|
|
7690
7699
|
const startX = -((numPins - 1) / 2) * p;
|
|
7691
7700
|
for (let i = 0; i < numPins; i++) {
|
|
@@ -7700,6 +7709,14 @@ function generatePads(variant, numPins, p, id, pw, pl) {
|
|
|
7700
7709
|
rectPadHeight: pl
|
|
7701
7710
|
})
|
|
7702
7711
|
);
|
|
7712
|
+
modifyBoundsToIncludeRect({
|
|
7713
|
+
bounds: padBounds,
|
|
7714
|
+
centerX: x,
|
|
7715
|
+
centerY: 2,
|
|
7716
|
+
width: pw,
|
|
7717
|
+
height: pl
|
|
7718
|
+
});
|
|
7719
|
+
maxPadHalfY = Math.max(maxPadHalfY, pl / 2);
|
|
7703
7720
|
}
|
|
7704
7721
|
} else if (variant === "zh") {
|
|
7705
7722
|
const startX = -((numPins - 1) / 2) * p;
|
|
@@ -7720,20 +7737,57 @@ function generatePads(variant, numPins, p, id, pw, pl) {
|
|
|
7720
7737
|
} else {
|
|
7721
7738
|
pads.push(platedHolePill(i + 1, x, 0, id, pw, pl));
|
|
7722
7739
|
}
|
|
7740
|
+
modifyBoundsToIncludeRect({
|
|
7741
|
+
bounds: padBounds,
|
|
7742
|
+
centerX: x,
|
|
7743
|
+
centerY: 0,
|
|
7744
|
+
width: pw,
|
|
7745
|
+
height: pl
|
|
7746
|
+
});
|
|
7747
|
+
maxPadHalfY = Math.max(maxPadHalfY, pl / 2);
|
|
7723
7748
|
}
|
|
7724
7749
|
} else {
|
|
7725
7750
|
const startX = -((numPins - 1) / 2) * p;
|
|
7726
7751
|
for (let i = 0; i < numPins; i++) {
|
|
7727
7752
|
const x = startX + i * p;
|
|
7728
7753
|
pads.push(rectpad(i + 1, x, -1.325, pw, pl));
|
|
7754
|
+
modifyBoundsToIncludeRect({
|
|
7755
|
+
bounds: padBounds,
|
|
7756
|
+
centerX: x,
|
|
7757
|
+
centerY: -1.325,
|
|
7758
|
+
width: pw,
|
|
7759
|
+
height: pl
|
|
7760
|
+
});
|
|
7761
|
+
maxPadHalfY = Math.max(maxPadHalfY, pl / 2);
|
|
7729
7762
|
}
|
|
7730
7763
|
const sideOffset = (numPins - 1) / 2 * p + 1.3;
|
|
7731
7764
|
pads.push(rectpad(numPins + 1, -sideOffset, 1.22, 1.2, 1.8));
|
|
7732
7765
|
pads.push(rectpad(numPins + 2, sideOffset, 1.22, 1.2, 1.8));
|
|
7766
|
+
modifyBoundsToIncludeRect({
|
|
7767
|
+
bounds: padBounds,
|
|
7768
|
+
centerX: -sideOffset,
|
|
7769
|
+
centerY: 1.22,
|
|
7770
|
+
width: 1.2,
|
|
7771
|
+
height: 1.8
|
|
7772
|
+
});
|
|
7773
|
+
modifyBoundsToIncludeRect({
|
|
7774
|
+
bounds: padBounds,
|
|
7775
|
+
centerX: sideOffset,
|
|
7776
|
+
centerY: 1.22,
|
|
7777
|
+
width: 1.2,
|
|
7778
|
+
height: 1.8
|
|
7779
|
+
});
|
|
7780
|
+
maxPadHalfY = Math.max(maxPadHalfY, 0.9);
|
|
7733
7781
|
}
|
|
7734
|
-
return pads;
|
|
7782
|
+
return { pads, padBounds, maxPadHalfY };
|
|
7735
7783
|
}
|
|
7736
|
-
function generateSilkscreenBody(
|
|
7784
|
+
function generateSilkscreenBody({
|
|
7785
|
+
variant,
|
|
7786
|
+
w,
|
|
7787
|
+
h,
|
|
7788
|
+
numPins,
|
|
7789
|
+
p
|
|
7790
|
+
}) {
|
|
7737
7791
|
if (variant === "ph") {
|
|
7738
7792
|
return {
|
|
7739
7793
|
type: "pcb_silkscreen_path",
|
|
@@ -7815,34 +7869,37 @@ var jst = (raw_params) => {
|
|
|
7815
7869
|
`JST requires an explicit pin count (e.g. jst6_sh or .jst(6))${params.string ? `, from string "${params.string}"` : ""}`
|
|
7816
7870
|
);
|
|
7817
7871
|
}
|
|
7818
|
-
const
|
|
7819
|
-
|
|
7872
|
+
const padGeometry = generatePads({
|
|
7873
|
+
variant,
|
|
7874
|
+
numPins,
|
|
7875
|
+
p,
|
|
7876
|
+
id,
|
|
7877
|
+
pw,
|
|
7878
|
+
pl
|
|
7879
|
+
});
|
|
7880
|
+
const { pads, padBounds, maxPadHalfY } = padGeometry;
|
|
7881
|
+
const silkscreenBody = generateSilkscreenBody({
|
|
7882
|
+
variant,
|
|
7883
|
+
w,
|
|
7884
|
+
h,
|
|
7885
|
+
numPins,
|
|
7886
|
+
p
|
|
7887
|
+
});
|
|
7820
7888
|
const silkscreenRefText = silkscreenRef(0, h / 2 + 1, 0.5);
|
|
7821
|
-
const
|
|
7822
|
-
|
|
7823
|
-
|
|
7824
|
-
|
|
7825
|
-
|
|
7826
|
-
|
|
7827
|
-
|
|
7828
|
-
|
|
7829
|
-
|
|
7830
|
-
|
|
7831
|
-
|
|
7832
|
-
|
|
7833
|
-
|
|
7834
|
-
|
|
7835
|
-
crtMaxX = sideOffset + 0.6 + courtyardPadding;
|
|
7836
|
-
crtMinY = -1.325 - pl / 2 - courtyardPadding;
|
|
7837
|
-
crtMaxY = 1.22 + 0.9 + courtyardPadding;
|
|
7838
|
-
} else {
|
|
7839
|
-
const pinSpan = (numPins - 1) * p;
|
|
7840
|
-
const bodyHalfW = pinSpan / 2 + 1.5;
|
|
7841
|
-
crtMinX = -(bodyHalfW + courtyardPadding);
|
|
7842
|
-
crtMaxX = bodyHalfW + courtyardPadding;
|
|
7843
|
-
crtMinY = -h / 2 - courtyardPadding;
|
|
7844
|
-
crtMaxY = h / 2 + courtyardPadding;
|
|
7845
|
-
}
|
|
7889
|
+
const silkscreenXs = silkscreenBody.route.map((point) => point.x);
|
|
7890
|
+
const silkscreenYs = silkscreenBody.route.map((point) => point.y);
|
|
7891
|
+
const hasSilkscreenGeometry = silkscreenXs.length > 0 && silkscreenYs.length > 0;
|
|
7892
|
+
const featureMinX = hasSilkscreenGeometry ? Math.min(padBounds.minX, Math.min(...silkscreenXs)) : padBounds.minX;
|
|
7893
|
+
const featureMaxX = hasSilkscreenGeometry ? Math.max(padBounds.maxX, Math.max(...silkscreenXs)) : padBounds.maxX;
|
|
7894
|
+
const featureMinY = hasSilkscreenGeometry ? Math.min(padBounds.minY, Math.min(...silkscreenYs)) : padBounds.minY;
|
|
7895
|
+
const featureMaxY = hasSilkscreenGeometry ? Math.max(padBounds.maxY, Math.max(...silkscreenYs)) : padBounds.maxY;
|
|
7896
|
+
const courtyardSideClearanceX = 0.5;
|
|
7897
|
+
const courtyardFrontClearanceY = 0.05;
|
|
7898
|
+
const courtyardRearClearanceY = maxPadHalfY + 0.085;
|
|
7899
|
+
const crtMinX = featureMinX - courtyardSideClearanceX;
|
|
7900
|
+
const crtMaxX = featureMaxX + courtyardSideClearanceX;
|
|
7901
|
+
const crtMinY = featureMinY - courtyardRearClearanceY;
|
|
7902
|
+
const crtMaxY = featureMaxY + courtyardFrontClearanceY;
|
|
7846
7903
|
const courtyard = {
|
|
7847
7904
|
type: "pcb_courtyard_rect",
|
|
7848
7905
|
pcb_courtyard_rect_id: "",
|
|
@@ -8074,14 +8131,11 @@ var vssop = (raw_params) => {
|
|
|
8074
8131
|
silkscreenBoxHeight / 2 + 0.5,
|
|
8075
8132
|
0.3
|
|
8076
8133
|
);
|
|
8077
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
8078
8134
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * p + pw;
|
|
8079
|
-
const
|
|
8080
|
-
const
|
|
8081
|
-
|
|
8082
|
-
|
|
8083
|
-
const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.255);
|
|
8084
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(h / 2 + 0.25);
|
|
8135
|
+
const courtyardStepInnerHalfWidth = w / 2 + 0.25;
|
|
8136
|
+
const courtyardStepOuterHalfWidth = courtyardStepInnerHalfWidth + 1.43;
|
|
8137
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.255;
|
|
8138
|
+
const courtyardStepOuterHalfHeight = h / 2 + 0.25;
|
|
8085
8139
|
const courtyard = {
|
|
8086
8140
|
type: "pcb_courtyard_outline",
|
|
8087
8141
|
pcb_courtyard_outline_id: "",
|
|
@@ -8089,16 +8143,16 @@ var vssop = (raw_params) => {
|
|
|
8089
8143
|
layer: "top",
|
|
8090
8144
|
outline: createRectUnionOutline([
|
|
8091
8145
|
{
|
|
8092
|
-
minX: -
|
|
8093
|
-
maxX:
|
|
8094
|
-
minY: -
|
|
8095
|
-
maxY:
|
|
8146
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
8147
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
8148
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
8149
|
+
maxY: courtyardStepInnerHalfHeight
|
|
8096
8150
|
},
|
|
8097
8151
|
{
|
|
8098
|
-
minX: -
|
|
8099
|
-
maxX:
|
|
8100
|
-
minY: -
|
|
8101
|
-
maxY:
|
|
8152
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
8153
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
8154
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
8155
|
+
maxY: courtyardStepOuterHalfHeight
|
|
8102
8156
|
}
|
|
8103
8157
|
])
|
|
8104
8158
|
};
|
|
@@ -8249,14 +8303,11 @@ var msop = (raw_params) => {
|
|
|
8249
8303
|
silkscreenBoxHeight / 2 + 0.5,
|
|
8250
8304
|
0.3
|
|
8251
8305
|
);
|
|
8252
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
8253
8306
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * p + pw;
|
|
8254
|
-
const
|
|
8255
|
-
const
|
|
8256
|
-
|
|
8257
|
-
|
|
8258
|
-
const courtyardStepInnerHalfY = roundToCourtyardGrid(pinRowSpanY / 2 + 0.255);
|
|
8259
|
-
const courtyardStepOuterHalfY = roundToCourtyardGrid(h / 2 + 0.25);
|
|
8307
|
+
const courtyardStepInnerHalfWidth = w / 2 + 0.25;
|
|
8308
|
+
const courtyardStepOuterHalfWidth = courtyardStepInnerHalfWidth + 1.43;
|
|
8309
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.255;
|
|
8310
|
+
const courtyardStepOuterHalfHeight = h / 2 + 0.25;
|
|
8260
8311
|
const courtyard = {
|
|
8261
8312
|
type: "pcb_courtyard_outline",
|
|
8262
8313
|
pcb_courtyard_outline_id: "",
|
|
@@ -8264,16 +8315,16 @@ var msop = (raw_params) => {
|
|
|
8264
8315
|
layer: "top",
|
|
8265
8316
|
outline: createRectUnionOutline([
|
|
8266
8317
|
{
|
|
8267
|
-
minX: -
|
|
8268
|
-
maxX:
|
|
8269
|
-
minY: -
|
|
8270
|
-
maxY:
|
|
8318
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
8319
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
8320
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
8321
|
+
maxY: courtyardStepInnerHalfHeight
|
|
8271
8322
|
},
|
|
8272
8323
|
{
|
|
8273
|
-
minX: -
|
|
8274
|
-
maxX:
|
|
8275
|
-
minY: -
|
|
8276
|
-
maxY:
|
|
8324
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
8325
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
8326
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
8327
|
+
maxY: courtyardStepOuterHalfHeight
|
|
8277
8328
|
}
|
|
8278
8329
|
])
|
|
8279
8330
|
};
|
|
@@ -8567,16 +8618,15 @@ var son = (raw_params) => {
|
|
|
8567
8618
|
silkscreenBoxHeight / 2 + 0.5,
|
|
8568
8619
|
0.3
|
|
8569
8620
|
);
|
|
8570
|
-
const roundToCourtyardGrid = (value) => Math.round(value / 0.01) * 0.01;
|
|
8571
8621
|
const pinColumnCenterX = Math.abs(
|
|
8572
8622
|
getSonPadCoord(parameters.num_pins, 1, w, p).x
|
|
8573
8623
|
);
|
|
8574
8624
|
const pinRowSpanY = (parameters.num_pins / 2 - 1) * p + pw;
|
|
8575
8625
|
const pinRowSpanX = pinColumnCenterX * 2 + pl;
|
|
8576
|
-
const
|
|
8577
|
-
const
|
|
8578
|
-
const
|
|
8579
|
-
const
|
|
8626
|
+
const courtyardStepInnerHalfWidth = w / 2 + 0.25;
|
|
8627
|
+
const courtyardStepOuterHalfWidth = pinRowSpanX / 2 + 0.25;
|
|
8628
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.25;
|
|
8629
|
+
const courtyardStepOuterHalfHeight = h / 2 + 0.25;
|
|
8580
8630
|
const courtyard = {
|
|
8581
8631
|
type: "pcb_courtyard_outline",
|
|
8582
8632
|
pcb_courtyard_outline_id: "",
|
|
@@ -8584,16 +8634,16 @@ var son = (raw_params) => {
|
|
|
8584
8634
|
layer: "top",
|
|
8585
8635
|
outline: createRectUnionOutline([
|
|
8586
8636
|
{
|
|
8587
|
-
minX: -
|
|
8588
|
-
maxX:
|
|
8589
|
-
minY: -
|
|
8590
|
-
maxY:
|
|
8637
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
8638
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
8639
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
8640
|
+
maxY: courtyardStepInnerHalfHeight
|
|
8591
8641
|
},
|
|
8592
8642
|
{
|
|
8593
|
-
minX: -
|
|
8594
|
-
maxX:
|
|
8595
|
-
minY: -
|
|
8596
|
-
maxY:
|
|
8643
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
8644
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
8645
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
8646
|
+
maxY: courtyardStepOuterHalfHeight
|
|
8597
8647
|
}
|
|
8598
8648
|
])
|
|
8599
8649
|
};
|
|
@@ -8659,20 +8709,46 @@ var vson = (raw_params) => {
|
|
|
8659
8709
|
grid.y / 2 + p,
|
|
8660
8710
|
grid.y / 6
|
|
8661
8711
|
);
|
|
8662
|
-
const
|
|
8663
|
-
const
|
|
8664
|
-
const
|
|
8665
|
-
const
|
|
8666
|
-
const
|
|
8667
|
-
const
|
|
8712
|
+
const pinRowSpanY = (num_pins / 2 - 1) * p + pinh;
|
|
8713
|
+
const pinRowSpanX = w + pinw;
|
|
8714
|
+
const courtyardStepInnerHalfWidth = grid.x / 2 + 0.25;
|
|
8715
|
+
const courtyardStepOuterHalfWidth = pinRowSpanX / 2 + 0.25;
|
|
8716
|
+
const pinRowCourtyardHalfY = pinRowSpanY / 2 + 0.25;
|
|
8717
|
+
const pinRowExtendedCourtyardHalfY = pinRowSpanY / 2 + 0.45 + Math.max(0, 0.8 - p);
|
|
8718
|
+
const courtyardStepOuterHalfHeight = Math.min(
|
|
8719
|
+
grid.y / 2 + 0.25,
|
|
8720
|
+
pinRowExtendedCourtyardHalfY
|
|
8721
|
+
);
|
|
8722
|
+
const courtyardStepNotchDepthY = Math.max(
|
|
8723
|
+
0,
|
|
8724
|
+
0.37 - Math.max(
|
|
8725
|
+
0,
|
|
8726
|
+
courtyardStepOuterHalfWidth - courtyardStepInnerHalfWidth - 0.38
|
|
8727
|
+
) * 1.4
|
|
8728
|
+
);
|
|
8729
|
+
const courtyardStepInnerHalfHeight = Math.max(
|
|
8730
|
+
pinRowCourtyardHalfY,
|
|
8731
|
+
courtyardStepOuterHalfHeight - courtyardStepNotchDepthY
|
|
8732
|
+
);
|
|
8668
8733
|
const courtyard = {
|
|
8669
|
-
type: "
|
|
8670
|
-
|
|
8734
|
+
type: "pcb_courtyard_outline",
|
|
8735
|
+
pcb_courtyard_outline_id: "",
|
|
8671
8736
|
pcb_component_id: "",
|
|
8672
|
-
|
|
8673
|
-
|
|
8674
|
-
|
|
8675
|
-
|
|
8737
|
+
layer: "top",
|
|
8738
|
+
outline: createRectUnionOutline([
|
|
8739
|
+
{
|
|
8740
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
8741
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
8742
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
8743
|
+
maxY: courtyardStepInnerHalfHeight
|
|
8744
|
+
},
|
|
8745
|
+
{
|
|
8746
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
8747
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
8748
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
8749
|
+
maxY: courtyardStepOuterHalfHeight
|
|
8750
|
+
}
|
|
8751
|
+
])
|
|
8676
8752
|
};
|
|
8677
8753
|
return {
|
|
8678
8754
|
circuitJson: [...pads, ...silkscreenPaths, silkscreenRefText, courtyard],
|
|
@@ -9342,20 +9418,16 @@ var electrolytic = (raw_params) => {
|
|
|
9342
9418
|
pcb_silkscreen_path_id: ""
|
|
9343
9419
|
};
|
|
9344
9420
|
const silkscreenRefText = silkscreenRef(0, d / 2 + 1, 0.5);
|
|
9345
|
-
const
|
|
9346
|
-
const
|
|
9347
|
-
const
|
|
9348
|
-
const
|
|
9349
|
-
const crtMaxX = bodyR + courtyardPadding;
|
|
9350
|
-
const crtMinY = -(bodyR + courtyardPadding);
|
|
9351
|
-
const crtMaxY = bodyR + courtyardPadding;
|
|
9421
|
+
const bodyOuterRadius = d / 2;
|
|
9422
|
+
const pinOuterRadius = p / 2 + od / 2;
|
|
9423
|
+
const courtyardClearance = 0.25;
|
|
9424
|
+
const courtyardRadius = Math.max(bodyOuterRadius, pinOuterRadius) + courtyardClearance;
|
|
9352
9425
|
const courtyard = {
|
|
9353
|
-
type: "
|
|
9354
|
-
|
|
9426
|
+
type: "pcb_courtyard_circle",
|
|
9427
|
+
pcb_courtyard_circle_id: "",
|
|
9355
9428
|
pcb_component_id: "",
|
|
9356
|
-
center: { x:
|
|
9357
|
-
|
|
9358
|
-
height: crtMaxY - crtMinY,
|
|
9429
|
+
center: { x: 0, y: 0 },
|
|
9430
|
+
radius: courtyardRadius,
|
|
9359
9431
|
layer: "top"
|
|
9360
9432
|
};
|
|
9361
9433
|
return {
|
|
@@ -9845,21 +9917,32 @@ var sotWithoutParsing = (parameters) => {
|
|
|
9845
9917
|
const p_val = Number.parseFloat(parameters.p);
|
|
9846
9918
|
const pl_val = Number.parseFloat(parameters.pl);
|
|
9847
9919
|
const pw_val = Number.parseFloat(parameters.pw);
|
|
9848
|
-
const
|
|
9849
|
-
const
|
|
9850
|
-
const
|
|
9851
|
-
const
|
|
9852
|
-
const
|
|
9853
|
-
const
|
|
9854
|
-
const
|
|
9920
|
+
const pinColumnCenterX = h_val / 2 + 0.5;
|
|
9921
|
+
const pinRowSpanY = p_val * 2 + pw_val;
|
|
9922
|
+
const pinToeHalfSpanX = pinColumnCenterX + pl_val / 2;
|
|
9923
|
+
const courtyardStepInnerHalfWidth = h_val / 2 + 0.25;
|
|
9924
|
+
const courtyardStepOuterHalfWidth = pinToeHalfSpanX + 0.25;
|
|
9925
|
+
const courtyardStepInnerHalfHeight = pinRowSpanY / 2 + 0.2;
|
|
9926
|
+
const courtyardStepOuterHalfHeight = courtyardStepInnerHalfHeight + 0.2;
|
|
9855
9927
|
const courtyard = {
|
|
9856
|
-
type: "
|
|
9857
|
-
|
|
9928
|
+
type: "pcb_courtyard_outline",
|
|
9929
|
+
pcb_courtyard_outline_id: "",
|
|
9858
9930
|
pcb_component_id: "",
|
|
9859
|
-
|
|
9860
|
-
|
|
9861
|
-
|
|
9862
|
-
|
|
9931
|
+
layer: "top",
|
|
9932
|
+
outline: createRectUnionOutline([
|
|
9933
|
+
{
|
|
9934
|
+
minX: -courtyardStepOuterHalfWidth,
|
|
9935
|
+
maxX: courtyardStepOuterHalfWidth,
|
|
9936
|
+
minY: -courtyardStepInnerHalfHeight,
|
|
9937
|
+
maxY: courtyardStepInnerHalfHeight
|
|
9938
|
+
},
|
|
9939
|
+
{
|
|
9940
|
+
minX: -courtyardStepInnerHalfWidth,
|
|
9941
|
+
maxX: courtyardStepInnerHalfWidth,
|
|
9942
|
+
minY: -courtyardStepOuterHalfHeight,
|
|
9943
|
+
maxY: courtyardStepOuterHalfHeight
|
|
9944
|
+
}
|
|
9945
|
+
])
|
|
9863
9946
|
};
|
|
9864
9947
|
return [
|
|
9865
9948
|
...pads,
|