@tscircuit/footprinter 0.0.185 → 0.0.187

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 CHANGED
@@ -375,6 +375,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
375
375
  pinlabelverticallyinverted: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
376
376
  pinlabelorthogonal: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
377
377
  nosquareplating: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
378
+ nopinlabels: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
378
379
  doublesidedpinlabel: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
379
380
  }, "strip", z.ZodTypeAny, {
380
381
  fn: string;
@@ -389,6 +390,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
389
390
  pinlabeltextaligncenter: boolean;
390
391
  pinlabelverticallyinverted: boolean;
391
392
  nosquareplating: boolean;
393
+ nopinlabels: boolean;
392
394
  doublesidedpinlabel: boolean;
393
395
  male?: boolean | undefined;
394
396
  female?: boolean | undefined;
@@ -407,6 +409,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
407
409
  pinlabeltextaligncenter?: boolean | undefined;
408
410
  pinlabelverticallyinverted?: boolean | undefined;
409
411
  nosquareplating?: boolean | undefined;
412
+ nopinlabels?: boolean | undefined;
410
413
  doublesidedpinlabel?: boolean | undefined;
411
414
  }>, {
412
415
  pinlabelAnchorSide: "top" | "bottom" | "left" | "right";
@@ -424,6 +427,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
424
427
  pinlabeltextaligncenter: boolean;
425
428
  pinlabelverticallyinverted: boolean;
426
429
  nosquareplating: boolean;
430
+ nopinlabels: boolean;
427
431
  doublesidedpinlabel: boolean;
428
432
  }, {
429
433
  fn: string;
@@ -440,6 +444,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
440
444
  pinlabeltextaligncenter?: boolean | undefined;
441
445
  pinlabelverticallyinverted?: boolean | undefined;
442
446
  nosquareplating?: boolean | undefined;
447
+ nopinlabels?: boolean | undefined;
443
448
  doublesidedpinlabel?: boolean | undefined;
444
449
  }>, {
445
450
  pinlabelAnchorSide: "top" | "bottom" | "left" | "right";
@@ -457,6 +462,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
457
462
  pinlabeltextaligncenter: boolean;
458
463
  pinlabelverticallyinverted: boolean;
459
464
  nosquareplating: boolean;
465
+ nopinlabels: boolean;
460
466
  doublesidedpinlabel: boolean;
461
467
  }, {
462
468
  fn: string;
@@ -473,6 +479,7 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
473
479
  pinlabeltextaligncenter?: boolean | undefined;
474
480
  pinlabelverticallyinverted?: boolean | undefined;
475
481
  nosquareplating?: boolean | undefined;
482
+ nopinlabels?: boolean | undefined;
476
483
  doublesidedpinlabel?: boolean | undefined;
477
484
  }>, z.ZodEffects<z.ZodObject<{
478
485
  fn: z.ZodString;
@@ -1151,7 +1158,7 @@ type Footprinter = {
1151
1158
  ssop: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
1152
1159
  tssop: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
1153
1160
  dfn: (num_pins?: number) => FootprinterParamsBuilder<"w" | "p">;
1154
- pinrow: (num_pins?: number) => FootprinterParamsBuilder<"p" | "id" | "od" | "male" | "female" | "rows" | "pinlabeltextalignleft" | "pinlabeltextaligncenter" | "pinlabeltextalignright" | "pinlabelverticallyinverted" | "pinlabelorthogonal" | "nosquareplating" | "doublesidedpinlabel">;
1161
+ pinrow: (num_pins?: number) => FootprinterParamsBuilder<"p" | "id" | "od" | "male" | "female" | "rows" | "pinlabeltextalignleft" | "pinlabeltextaligncenter" | "pinlabeltextalignright" | "pinlabelverticallyinverted" | "pinlabelorthogonal" | "nosquareplating" | "nopinlabels" | "doublesidedpinlabel">;
1155
1162
  axial: () => FootprinterParamsBuilder<"p" | "id" | "od">;
1156
1163
  hc49: () => FootprinterParamsBuilder<"p" | "id" | "od" | "w" | "h">;
1157
1164
  to220: () => FootprinterParamsBuilder<"w" | "h" | "p" | "id" | "od">;
package/dist/index.js CHANGED
@@ -1624,6 +1624,7 @@ var pinrow_def = z11.object({
1624
1624
  pinlabelverticallyinverted: z11.boolean().optional().default(false),
1625
1625
  pinlabelorthogonal: z11.boolean().optional().default(false),
1626
1626
  nosquareplating: z11.boolean().optional().default(false).describe("do not use rectangular pad for pin 1"),
1627
+ nopinlabels: z11.boolean().optional().default(false).describe("omit silkscreen pin labels"),
1627
1628
  doublesidedpinlabel: z11.boolean().optional().default(false).describe("add silkscreen pins in top and bottom layers")
1628
1629
  }).transform((data) => {
1629
1630
  const pinlabelAnchorSide = determinePinlabelAnchorSide(data);
@@ -1655,6 +1656,7 @@ var pinrow = (raw_params) => {
1655
1656
  pinlabelorthogonal,
1656
1657
  pinlabeltextalignleft,
1657
1658
  pinlabeltextalignright,
1659
+ nopinlabels,
1658
1660
  doublesidedpinlabel
1659
1661
  } = parameters;
1660
1662
  let pinlabelTextAlign = "center";
@@ -1699,20 +1701,7 @@ var pinrow = (raw_params) => {
1699
1701
  od,
1700
1702
  anchorSide: pinlabelAnchorSide
1701
1703
  });
1702
- holes.push(
1703
- silkscreenPin({
1704
- fs: od / 5,
1705
- pn: pinNumber,
1706
- anchor_x,
1707
- anchor_y,
1708
- anchorplacement: pinlabelAnchorSide,
1709
- textalign: pinlabelTextAlign,
1710
- orthogonal: pinlabelorthogonal,
1711
- verticallyinverted: pinlabelverticallyinverted,
1712
- layer: "top"
1713
- })
1714
- );
1715
- if (doublesidedpinlabel) {
1704
+ if (!nopinlabels) {
1716
1705
  holes.push(
1717
1706
  silkscreenPin({
1718
1707
  fs: od / 5,
@@ -1723,9 +1712,24 @@ var pinrow = (raw_params) => {
1723
1712
  textalign: pinlabelTextAlign,
1724
1713
  orthogonal: pinlabelorthogonal,
1725
1714
  verticallyinverted: pinlabelverticallyinverted,
1726
- layer: "bottom"
1715
+ layer: "top"
1727
1716
  })
1728
1717
  );
1718
+ if (doublesidedpinlabel) {
1719
+ holes.push(
1720
+ silkscreenPin({
1721
+ fs: od / 5,
1722
+ pn: pinNumber,
1723
+ anchor_x,
1724
+ anchor_y,
1725
+ anchorplacement: pinlabelAnchorSide,
1726
+ textalign: pinlabelTextAlign,
1727
+ orthogonal: pinlabelorthogonal,
1728
+ verticallyinverted: pinlabelverticallyinverted,
1729
+ layer: "bottom"
1730
+ })
1731
+ );
1732
+ }
1729
1733
  }
1730
1734
  };
1731
1735
  const usedPositions = /* @__PURE__ */ new Set();
@@ -5474,9 +5478,11 @@ var vssop = (raw_params) => {
5474
5478
  const pl = length37.parse(parameters.pl || defaults.pl);
5475
5479
  const pw = length37.parse(parameters.pw || defaults.pw);
5476
5480
  const pads = [];
5481
+ const half = parameters.num_pins / 2;
5477
5482
  for (let i = 0; i < parameters.num_pins; i++) {
5478
5483
  const { x, y } = getVssopPadCoord(parameters.num_pins, i + 1, w, p);
5479
- pads.push(rectpad(i + 1, x, y, pl, pw));
5484
+ const logical_pn = i < half ? i + 1 : parameters.num_pins - (i - half);
5485
+ pads.push(rectpad(logical_pn, x, y, pl, pw));
5480
5486
  }
5481
5487
  const silkscreenBoxWidth = w;
5482
5488
  const silkscreenBoxHeight = h;