@tscircuit/footprinter 0.0.173 → 0.0.175
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.d.ts +8 -1
- package/dist/index.js +31 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -370,6 +370,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
370
370
|
pinlabelverticallyinverted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
371
371
|
pinlabelorthogonal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
372
372
|
nosquareplating: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
373
|
+
doublesidedpinlabel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
373
374
|
}, "strip", z.ZodTypeAny, {
|
|
374
375
|
fn: string;
|
|
375
376
|
num_pins: number;
|
|
@@ -383,6 +384,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
383
384
|
pinlabeltextaligncenter: boolean;
|
|
384
385
|
pinlabelverticallyinverted: boolean;
|
|
385
386
|
nosquareplating: boolean;
|
|
387
|
+
doublesidedpinlabel: boolean;
|
|
386
388
|
male?: boolean | undefined;
|
|
387
389
|
female?: boolean | undefined;
|
|
388
390
|
}, {
|
|
@@ -400,6 +402,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
400
402
|
pinlabeltextaligncenter?: boolean | undefined;
|
|
401
403
|
pinlabelverticallyinverted?: boolean | undefined;
|
|
402
404
|
nosquareplating?: boolean | undefined;
|
|
405
|
+
doublesidedpinlabel?: boolean | undefined;
|
|
403
406
|
}>, {
|
|
404
407
|
pinlabelAnchorSide: "top" | "bottom" | "left" | "right";
|
|
405
408
|
male: boolean;
|
|
@@ -416,6 +419,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
416
419
|
pinlabeltextaligncenter: boolean;
|
|
417
420
|
pinlabelverticallyinverted: boolean;
|
|
418
421
|
nosquareplating: boolean;
|
|
422
|
+
doublesidedpinlabel: boolean;
|
|
419
423
|
}, {
|
|
420
424
|
fn: string;
|
|
421
425
|
num_pins?: number | undefined;
|
|
@@ -431,6 +435,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
431
435
|
pinlabeltextaligncenter?: boolean | undefined;
|
|
432
436
|
pinlabelverticallyinverted?: boolean | undefined;
|
|
433
437
|
nosquareplating?: boolean | undefined;
|
|
438
|
+
doublesidedpinlabel?: boolean | undefined;
|
|
434
439
|
}>, {
|
|
435
440
|
pinlabelAnchorSide: "top" | "bottom" | "left" | "right";
|
|
436
441
|
male: boolean;
|
|
@@ -447,6 +452,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
447
452
|
pinlabeltextaligncenter: boolean;
|
|
448
453
|
pinlabelverticallyinverted: boolean;
|
|
449
454
|
nosquareplating: boolean;
|
|
455
|
+
doublesidedpinlabel: boolean;
|
|
450
456
|
}, {
|
|
451
457
|
fn: string;
|
|
452
458
|
num_pins?: number | undefined;
|
|
@@ -462,6 +468,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
|
|
|
462
468
|
pinlabeltextaligncenter?: boolean | undefined;
|
|
463
469
|
pinlabelverticallyinverted?: boolean | undefined;
|
|
464
470
|
nosquareplating?: boolean | undefined;
|
|
471
|
+
doublesidedpinlabel?: boolean | undefined;
|
|
465
472
|
}>, z.ZodEffects<z.ZodObject<z.objectUtil.extendShape<{
|
|
466
473
|
fn: z.ZodString;
|
|
467
474
|
cc: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
@@ -1051,7 +1058,7 @@ type Footprinter = {
|
|
|
1051
1058
|
ssop: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
|
|
1052
1059
|
tssop: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
|
|
1053
1060
|
dfn: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
|
|
1054
|
-
pinrow: (num_pins?: number) => FootprinterParamsBuilder<"p" | "id" | "od" | "male" | "female" | "rows" | "pinlabeltextalignleft" | "pinlabeltextaligncenter" | "pinlabeltextalignright" | "pinlabelverticallyinverted" | "pinlabelorthogonal" | "nosquareplating">;
|
|
1061
|
+
pinrow: (num_pins?: number) => FootprinterParamsBuilder<"p" | "id" | "od" | "male" | "female" | "rows" | "pinlabeltextalignleft" | "pinlabeltextaligncenter" | "pinlabeltextalignright" | "pinlabelverticallyinverted" | "pinlabelorthogonal" | "nosquareplating" | "doublesidedpinlabel">;
|
|
1055
1062
|
axial: () => FootprinterParamsBuilder<"p" | "id" | "od">;
|
|
1056
1063
|
hc49: () => FootprinterParamsBuilder<"p" | "id" | "od" | "w" | "h">;
|
|
1057
1064
|
to220: () => FootprinterParamsBuilder<"w" | "h" | "p" | "id" | "od">;
|
package/dist/index.js
CHANGED
|
@@ -1567,7 +1567,8 @@ var silkscreenPin = ({
|
|
|
1567
1567
|
anchor_y,
|
|
1568
1568
|
textalign = "center",
|
|
1569
1569
|
orthogonal = false,
|
|
1570
|
-
verticallyinverted = false
|
|
1570
|
+
verticallyinverted = false,
|
|
1571
|
+
layer = "top"
|
|
1571
1572
|
}) => {
|
|
1572
1573
|
let ccw_rotation = 0;
|
|
1573
1574
|
if (orthogonal && verticallyinverted) {
|
|
@@ -1592,6 +1593,13 @@ var silkscreenPin = ({
|
|
|
1592
1593
|
else
|
|
1593
1594
|
anchor_alignment = "center_right";
|
|
1594
1595
|
}
|
|
1596
|
+
if (layer === "bottom") {
|
|
1597
|
+
if (anchor_alignment === "center_left") {
|
|
1598
|
+
anchor_alignment = "center_right";
|
|
1599
|
+
} else if (anchor_alignment === "center_right") {
|
|
1600
|
+
anchor_alignment = "center_left";
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1595
1603
|
return {
|
|
1596
1604
|
type: "pcb_silkscreen_text",
|
|
1597
1605
|
pcb_silkscreen_text_id: "silkscreen_text_1",
|
|
@@ -1599,7 +1607,7 @@ var silkscreenPin = ({
|
|
|
1599
1607
|
font_size: fs,
|
|
1600
1608
|
pcb_component_id: "pcb_component_1",
|
|
1601
1609
|
text: `{PIN${pn}}`,
|
|
1602
|
-
layer
|
|
1610
|
+
layer,
|
|
1603
1611
|
anchor_position: { x: anchor_x, y: anchor_y },
|
|
1604
1612
|
anchor_alignment,
|
|
1605
1613
|
ccw_rotation
|
|
@@ -1653,7 +1661,8 @@ var pinrow_def = z11.object({
|
|
|
1653
1661
|
pinlabeltextalignright: z11.boolean().optional().default(false),
|
|
1654
1662
|
pinlabelverticallyinverted: z11.boolean().optional().default(false),
|
|
1655
1663
|
pinlabelorthogonal: z11.boolean().optional().default(false),
|
|
1656
|
-
nosquareplating: z11.boolean().optional().default(false).describe("do not use rectangular pad for pin 1")
|
|
1664
|
+
nosquareplating: z11.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
|
|
1665
|
+
doublesidedpinlabel: z11.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers")
|
|
1657
1666
|
}).transform((data) => {
|
|
1658
1667
|
const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
|
|
1659
1668
|
return {
|
|
@@ -1683,7 +1692,8 @@ var pinrow = (raw_params) => {
|
|
|
1683
1692
|
pinlabelverticallyinverted,
|
|
1684
1693
|
pinlabelorthogonal,
|
|
1685
1694
|
pinlabeltextalignleft,
|
|
1686
|
-
pinlabeltextalignright
|
|
1695
|
+
pinlabeltextalignright,
|
|
1696
|
+
doublesidedpinlabel
|
|
1687
1697
|
} = parameters;
|
|
1688
1698
|
let pinlabelTextAlign = "center";
|
|
1689
1699
|
if (pinlabeltextalignleft)
|
|
@@ -1738,9 +1748,25 @@ var pinrow = (raw_params) => {
|
|
|
1738
1748
|
anchorplacement: pinlabelAnchorSide,
|
|
1739
1749
|
textalign: pinlabelTextAlign,
|
|
1740
1750
|
orthogonal: pinlabelorthogonal,
|
|
1741
|
-
verticallyinverted: pinlabelverticallyinverted
|
|
1751
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
1752
|
+
layer: "top"
|
|
1742
1753
|
})
|
|
1743
1754
|
);
|
|
1755
|
+
if (doublesidedpinlabel) {
|
|
1756
|
+
holes.push(
|
|
1757
|
+
silkscreenPin({
|
|
1758
|
+
fs: od / 5,
|
|
1759
|
+
pn: pinNumber,
|
|
1760
|
+
anchor_x,
|
|
1761
|
+
anchor_y,
|
|
1762
|
+
anchorplacement: pinlabelAnchorSide,
|
|
1763
|
+
textalign: pinlabelTextAlign,
|
|
1764
|
+
orthogonal: pinlabelorthogonal,
|
|
1765
|
+
verticallyinverted: pinlabelverticallyinverted,
|
|
1766
|
+
layer: "bottom"
|
|
1767
|
+
})
|
|
1768
|
+
);
|
|
1769
|
+
}
|
|
1744
1770
|
};
|
|
1745
1771
|
const usedPositions = /* @__PURE__ */ new Set();
|
|
1746
1772
|
const useBGAStyle = rows > 2 && numPinsPerRow > 2;
|