@tscircuit/footprinter 0.0.268 → 0.0.269

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 CHANGED
@@ -106,7 +106,8 @@ import { z } from "zod";
106
106
  var base_def = z.object({
107
107
  norefdes: z.boolean().optional().describe("disable reference designator label"),
108
108
  invert: z.boolean().optional().describe("hint to invert the orientation of the 3D model"),
109
- faceup: z.boolean().optional().describe("The male pin header should face upwards, out of the top layer")
109
+ faceup: z.boolean().optional().describe("The male pin header should face upwards, out of the top layer"),
110
+ nosilkscreen: z.boolean().optional().describe("omit all silkscreen elements from the footprint")
110
111
  });
111
112
 
112
113
  // src/fn/dip.ts
@@ -7651,6 +7652,14 @@ var applyNoRefDes = (elements, parameters) => {
7651
7652
  return elements;
7652
7653
  };
7653
7654
 
7655
+ // src/helpers/apply-nosilkscreen.ts
7656
+ var applyNoSilkscreen = (elements, parameters) => {
7657
+ if (!parameters.nosilkscreen) return elements;
7658
+ return elements.filter((element) => {
7659
+ return element.type !== "pcb_silkscreen_path" && element.type !== "pcb_silkscreen_text";
7660
+ });
7661
+ };
7662
+
7654
7663
  // src/footprinter.ts
7655
7664
  var string2 = (def) => {
7656
7665
  let fp2 = footprinter();
@@ -7698,10 +7707,15 @@ var footprinter = () => {
7698
7707
  if ("fn" in target && fn_exports[target.fn]) {
7699
7708
  return () => {
7700
7709
  const { circuitJson } = fn_exports[target.fn](target);
7701
- return applyOrigin(
7702
- applyNoRefDes(circuitJson, target),
7703
- target.origin
7710
+ const circuitWithoutSilkscreen = applyNoSilkscreen(
7711
+ circuitJson,
7712
+ target
7713
+ );
7714
+ const circuitWithoutRefDes = applyNoRefDes(
7715
+ circuitWithoutSilkscreen,
7716
+ target
7704
7717
  );
7718
+ return applyOrigin(circuitWithoutRefDes, target.origin);
7705
7719
  };
7706
7720
  }
7707
7721
  if (!fn_exports[target.fn]) {