@tscircuit/footprinter 0.0.140 → 0.0.141

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
@@ -1038,6 +1038,7 @@ type Footprinter = {
1038
1038
  sod123f: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1039
1039
  sod123: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1040
1040
  sod123w: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1041
+ sod110: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1041
1042
  to92: () => FootprinterParamsBuilder<"w" | "h" | "p" | "id" | "od" | "inline">;
1042
1043
  sot223: () => FootprinterParamsBuilder<"w" | "h" | "p" | "pl" | "pw">;
1043
1044
  pushbutton: () => FootprinterParamsBuilder<"tllabel" | "trlabel" | "bllabel" | "brlabel">;
package/dist/index.js CHANGED
@@ -34,6 +34,7 @@ __export(fn_exports, {
34
34
  smb: () => smb,
35
35
  smc: () => smc,
36
36
  smf: () => smf,
37
+ sod110: () => sod110,
37
38
  sod123: () => sod123,
38
39
  sod123f: () => sod123f,
39
40
  sod123w: () => sod123w,
@@ -3533,12 +3534,12 @@ var sot89_3 = (parameters) => {
3533
3534
  const pads = [];
3534
3535
  const padGap = Number.parseFloat(parameters.p);
3535
3536
  const padWidth = Number.parseFloat(parameters.pw);
3536
- const length35 = Number.parseFloat(parameters.w);
3537
+ const length36 = Number.parseFloat(parameters.w);
3537
3538
  const padHeight = Number.parseFloat(parameters.pl);
3538
3539
  pads.push(
3539
- rectpad(1, -length35 / 2, padGap, padHeight, padWidth),
3540
- rectpad(2, -length35 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3541
- rectpad(3, -length35 / 2, -padGap, padHeight, padWidth)
3540
+ rectpad(1, -length36 / 2, padGap, padHeight, padWidth),
3541
+ rectpad(2, -length36 / 2 + (1.5 - 1.3) / 2, 0, 1.5, padWidth),
3542
+ rectpad(3, -length36 / 2, -padGap, padHeight, padWidth)
3542
3543
  );
3543
3544
  const silkscreenRefText = silkscreenRef(0, 0, 0.3);
3544
3545
  const width = Number.parseFloat(parameters.w) / 2 - 1;
@@ -3578,7 +3579,7 @@ var sot89_5 = (parameters) => {
3578
3579
  const pads = [];
3579
3580
  const padGap = Number.parseFloat(parameters.p);
3580
3581
  const padWidth = Number.parseFloat(parameters.pw);
3581
- const length35 = Number.parseFloat(parameters.w);
3582
+ const length36 = Number.parseFloat(parameters.w);
3582
3583
  pads.push(
3583
3584
  rectpad(1, -1.85, -1.5, 1.5, 0.7),
3584
3585
  rectpad(2, -1.85, 1.5, 1.5, 0.7),
@@ -4722,6 +4723,85 @@ var sot223_6 = (parameters) => {
4722
4723
  return [...pads, silkscreenPath1, silkscreenPath2, silkscreenRefText];
4723
4724
  };
4724
4725
 
4726
+ // src/fn/sod110.ts
4727
+ import { z as z43 } from "zod";
4728
+ import { length as length35 } from "circuit-json";
4729
+ var sod_def12 = z43.object({
4730
+ fn: z43.string(),
4731
+ num_pins: z43.literal(2).default(2),
4732
+ w: z43.string().default("3.30mm"),
4733
+ h: z43.string().default("1.70mm"),
4734
+ pl: z43.string().default("0.80mm"),
4735
+ pw: z43.string().default("1mm"),
4736
+ p: z43.string().default("1.90mm")
4737
+ });
4738
+ var sod110 = (raw_params) => {
4739
+ const parameters = sod_def12.parse(raw_params);
4740
+ const silkscreenRefText = silkscreenRef(
4741
+ 0,
4742
+ length35.parse(parameters.h) / 2 + 0.5,
4743
+ 0.3
4744
+ );
4745
+ const silkscreenLine = {
4746
+ type: "pcb_silkscreen_path",
4747
+ layer: "top",
4748
+ pcb_component_id: "",
4749
+ route: [
4750
+ {
4751
+ x: length35.parse(parameters.p) / 2,
4752
+ y: length35.parse(parameters.h) / 2
4753
+ },
4754
+ {
4755
+ x: -length35.parse(parameters.w) / 2,
4756
+ y: length35.parse(parameters.h) / 2
4757
+ },
4758
+ {
4759
+ x: -length35.parse(parameters.w) / 2,
4760
+ y: -length35.parse(parameters.h) / 2
4761
+ },
4762
+ {
4763
+ x: length35.parse(parameters.p) / 2,
4764
+ y: -length35.parse(parameters.h) / 2
4765
+ }
4766
+ ],
4767
+ stroke_width: 0.1,
4768
+ pcb_silkscreen_path_id: ""
4769
+ };
4770
+ return {
4771
+ circuitJson: sodWithoutParsing12(parameters).concat(
4772
+ silkscreenLine,
4773
+ silkscreenRefText
4774
+ ),
4775
+ parameters
4776
+ };
4777
+ };
4778
+ var getSodCoords12 = (parameters) => {
4779
+ const { pn, p } = parameters;
4780
+ if (pn === 1) {
4781
+ return { x: -p / 2, y: 0 };
4782
+ }
4783
+ return { x: p / 2, y: 0 };
4784
+ };
4785
+ var sodWithoutParsing12 = (parameters) => {
4786
+ const pads = [];
4787
+ for (let i = 1; i <= parameters.num_pins; i++) {
4788
+ const { x, y } = getSodCoords12({
4789
+ pn: i,
4790
+ p: Number.parseFloat(parameters.p)
4791
+ });
4792
+ pads.push(
4793
+ rectpad(
4794
+ i,
4795
+ x,
4796
+ y,
4797
+ Number.parseFloat(parameters.pl),
4798
+ Number.parseFloat(parameters.pw)
4799
+ )
4800
+ );
4801
+ }
4802
+ return pads;
4803
+ };
4804
+
4725
4805
  // src/helpers/is-not-null.ts
4726
4806
  function isNotNull(value) {
4727
4807
  return value !== null;