@tscircuit/footprinter 0.0.191 → 0.0.192

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
@@ -51,13 +51,13 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
51
51
  p: number;
52
52
  missing: (string | number)[];
53
53
  w?: number | undefined;
54
+ pad?: number | undefined;
54
55
  h?: number | undefined;
55
56
  grid?: {
56
57
  x: number;
57
58
  y: number;
58
59
  } | undefined;
59
60
  ball?: number | undefined;
60
- pad?: number | undefined;
61
61
  circularpads?: boolean | undefined;
62
62
  tlorigin?: boolean | undefined;
63
63
  blorigin?: boolean | undefined;
@@ -68,10 +68,10 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
68
68
  num_pins?: number | undefined;
69
69
  w?: string | number | undefined;
70
70
  p?: string | number | undefined;
71
+ pad?: string | number | undefined;
71
72
  h?: string | number | undefined;
72
73
  grid?: string | undefined;
73
74
  ball?: string | number | undefined;
74
- pad?: string | number | undefined;
75
75
  circularpads?: boolean | undefined;
76
76
  tlorigin?: boolean | undefined;
77
77
  blorigin?: boolean | undefined;
@@ -85,13 +85,13 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
85
85
  p: number;
86
86
  missing: (string | number)[];
87
87
  w?: number | undefined;
88
+ pad?: number | undefined;
88
89
  h?: number | undefined;
89
90
  grid?: {
90
91
  x: number;
91
92
  y: number;
92
93
  } | undefined;
93
94
  ball?: number | undefined;
94
- pad?: number | undefined;
95
95
  circularpads?: boolean | undefined;
96
96
  tlorigin?: boolean | undefined;
97
97
  blorigin?: boolean | undefined;
@@ -102,10 +102,10 @@ declare const any_footprinter_def: z.ZodUnion<[z.ZodObject<{
102
102
  num_pins?: number | undefined;
103
103
  w?: string | number | undefined;
104
104
  p?: string | number | undefined;
105
+ pad?: string | number | undefined;
105
106
  h?: string | number | undefined;
106
107
  grid?: string | undefined;
107
108
  ball?: string | number | undefined;
108
- pad?: string | number | undefined;
109
109
  circularpads?: boolean | undefined;
110
110
  tlorigin?: boolean | undefined;
111
111
  blorigin?: boolean | undefined;
package/dist/index.js CHANGED
@@ -19,6 +19,7 @@ __export(fn_exports, {
19
19
  jst: () => jst,
20
20
  led: () => led,
21
21
  lqfp: () => lqfp,
22
+ m2host: () => m2host,
22
23
  melf: () => melf,
23
24
  micromelf: () => micromelf,
24
25
  minimelf: () => minimelf,
@@ -6874,6 +6875,73 @@ var sotWithoutParsing = (parameters) => {
6874
6875
  ];
6875
6876
  };
6876
6877
 
6878
+ // src/fn/m2host.ts
6879
+ import { z as z62 } from "zod";
6880
+ var m2host_def = z62.object({
6881
+ fn: z62.string()
6882
+ });
6883
+ var m2host = (raw_params) => {
6884
+ const parameters = m2host_def.parse(raw_params);
6885
+ const pads = [];
6886
+ const padWidth = 0.5 - 0.15;
6887
+ const padLength = 1.5;
6888
+ const pitch = 0.5;
6889
+ const halfPitch = pitch / 2;
6890
+ const rowOffset = 0.5;
6891
+ const numPads = 75;
6892
+ const startY = -((numPads - 1) * pitch) / 2;
6893
+ for (let i = 0; i < numPads; i++) {
6894
+ const pn = i + 1;
6895
+ if (pn >= 24 && pn <= 31) continue;
6896
+ const y = startY - i * halfPitch;
6897
+ const x = i % 2 === 0 ? 0 : -rowOffset / 2;
6898
+ const padLengthWithOffset = padLength + (i % 2 === 0 ? 0 : 0.25);
6899
+ const pad2 = rectpad(pn, x, y, padLengthWithOffset, padWidth);
6900
+ pad2.layer = pn % 2 === 0 ? "bottom" : "top";
6901
+ pads.push(pad2);
6902
+ }
6903
+ const cutoutWidth = 46 * 0.0254;
6904
+ const cutoutDepth = 137 * 0.0254;
6905
+ const cutoutOffsetFromPin1 = 261 * 0.0254;
6906
+ const cutout = {
6907
+ type: "pcb_cutout",
6908
+ pcb_cutout_id: "",
6909
+ shape: "rect",
6910
+ center: {
6911
+ x: -cutoutDepth / 2 + padLength / 2,
6912
+ y: startY - cutoutOffsetFromPin1
6913
+ },
6914
+ width: cutoutDepth,
6915
+ height: cutoutWidth
6916
+ };
6917
+ const pin1MarkerPosition = {
6918
+ x: -0.5,
6919
+ y: startY
6920
+ };
6921
+ const pin1Marker = {
6922
+ type: "pcb_silkscreen_path",
6923
+ layer: "top",
6924
+ pcb_component_id: "pin_marker_1",
6925
+ route: [
6926
+ { x: pin1MarkerPosition.x - 0.4, y: pin1MarkerPosition.y },
6927
+ { x: pin1MarkerPosition.x - 0.7, y: pin1MarkerPosition.y + 0.3 },
6928
+ { x: pin1MarkerPosition.x - 0.7, y: pin1MarkerPosition.y - 0.3 },
6929
+ { x: pin1MarkerPosition.x - 0.4, y: pin1MarkerPosition.y }
6930
+ ],
6931
+ stroke_width: 0.05,
6932
+ pcb_silkscreen_path_id: "pin_marker_1"
6933
+ };
6934
+ return {
6935
+ circuitJson: [
6936
+ ...pads,
6937
+ cutout,
6938
+ // silkscreenRefText,
6939
+ pin1Marker
6940
+ ],
6941
+ parameters
6942
+ };
6943
+ };
6944
+
6877
6945
  // src/helpers/is-not-null.ts
6878
6946
  function isNotNull(value) {
6879
6947
  return value !== null;