The3DG

Maker & printing · Test cube 41

Circuit

Traces and round pads on a grid, like a circuit board.

Presented by LyraLayer lines as a texture? Finally, someone gets it.
× 1.00
0.8 mm
135°
  • Too fine for a 0.4 mm nozzle: the narrowest part is about 1.0 mm (under 1.2 mm). Make it bigger.

25 mm, with your size and depth. Prints upright, no supports. About 4 MB.

Good for

Electronics enclosures and anything techy.

Print notes

The traces are about 1 mm wide, a little under three nozzle widths: they print, with soft ends. Size 1.2 or more makes them crisp.

  • Depth 0.4 to 1.5 mm for a 0.4 mm nozzle (as written: 0.8 mm).
  • Best on walls, printed upright. On a flat top, use thin layers (0.12 mm or less).
  • Fade it out over the bottom 3 mm so the first layers are flat and stick to the plate.
  • Not printed yet: these notes come from the geometry. The test cube will tell us more.

The formula

The real code this page runs: give it a point (U mm across, V mm up) and it returns the height there, in mm. Push the surface out by that much and the texture is real geometry.

function circuit(U: number, V: number, p = 4.0, amp = 0.8) {
  const i = Math.floor(U / p);
  const j = Math.floor(V / p);
  const s = frac(U / p) - 0.5;
  const t = frac(V / p) - 0.5;
  const across = rnd(i, j, 31) > 0.45;
  const down = rnd(i, j, 32) > 0.6;
  const pad = rnd(i, j, 33) > 0.85;
  const trace = (across && Math.abs(t) < 0.13) || (down && Math.abs(s) < 0.13) ? 1 : 0;
  return amp * Math.max(trace, pad && Math.hypot(s, t) < 0.32 ? 1 : 0);
}
The helpers it uses (frac, rnd)
/** The fractional part, 0..1. */
function frac(x: number) {
  return x - Math.floor(x);
}
/** A repeatable random number 0..1 for a cell (no Math.random: the same texture every time). */
function rnd(a: number, b: number, k = 0) {
  const x = Math.sin(a * 127.1 + b * 311.7 + k * 74.7) * 43758.5453;
  return x - Math.floor(x);
}

Printed

Test cube 41 is waiting for the printer. Its photo goes here.