@tscircuit/footprinter 0.0.320 → 0.0.322
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 +23 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -502,19 +502,40 @@ var passive = (params) => {
|
|
|
502
502
|
};
|
|
503
503
|
const textY = textbottom ? -ph / 2 - 0.9 : ph / 2 + 0.9;
|
|
504
504
|
const silkscreenRefText = silkscreenRef(0, textY, 0.2);
|
|
505
|
+
const excess = 0.25;
|
|
506
|
+
const silkXs = silkscreenLine.route.map((pt) => pt.x);
|
|
507
|
+
const silkYs = silkscreenLine.route.map((pt) => pt.y);
|
|
508
|
+
const crtMinX = Math.min(-(w ?? 0) / 2, -(p / 2 + pw / 2), ...silkXs) - excess;
|
|
509
|
+
const crtMaxX = Math.max((w ?? 0) / 2, p / 2 + pw / 2, ...silkXs) + excess;
|
|
510
|
+
const crtMinY = Math.min(-(h ?? 0) / 2, -ph / 2, ...silkYs) - excess;
|
|
511
|
+
const crtMaxY = Math.max((h ?? 0) / 2, ph / 2, ...silkYs) + excess;
|
|
512
|
+
const courtyard = {
|
|
513
|
+
type: "pcb_courtyard_outline",
|
|
514
|
+
pcb_courtyard_outline_id: "",
|
|
515
|
+
pcb_component_id: "",
|
|
516
|
+
layer: "top",
|
|
517
|
+
outline: [
|
|
518
|
+
{ x: crtMinX, y: crtMinY },
|
|
519
|
+
{ x: crtMaxX, y: crtMinY },
|
|
520
|
+
{ x: crtMaxX, y: crtMaxY },
|
|
521
|
+
{ x: crtMinX, y: crtMaxY }
|
|
522
|
+
]
|
|
523
|
+
};
|
|
505
524
|
if (tht) {
|
|
506
525
|
return [
|
|
507
526
|
platedhole(1, -p / 2, 0, pw, pw * 1 / 0.8),
|
|
508
527
|
platedhole(2, p / 2, 0, pw, pw * 1 / 0.8),
|
|
509
528
|
silkscreenLine,
|
|
510
|
-
silkscreenRefText
|
|
529
|
+
silkscreenRefText,
|
|
530
|
+
courtyard
|
|
511
531
|
];
|
|
512
532
|
}
|
|
513
533
|
return [
|
|
514
534
|
rectpad(["1", "left"], -p / 2, 0, pw, ph),
|
|
515
535
|
rectpad(["2", "right"], p / 2, 0, pw, ph),
|
|
516
536
|
silkscreenLine,
|
|
517
|
-
silkscreenRefText
|
|
537
|
+
silkscreenRefText,
|
|
538
|
+
courtyard
|
|
518
539
|
];
|
|
519
540
|
};
|
|
520
541
|
|