Open general

Board look: KiCad RotRect pads (aperture macro primitive 21, 45°) drawn as axis-aligned squares; SMD pads near-black

John Lauer ·

Molecule build 144288 (molecule@12, recipe molecule-board/1) on adom/hank-skorny-nameplate. Seen 2026-12-03.

What happens

  1. Pads rotated 45° are drawn as large axis-aligned squares. C1 (0603) and C171 (0805) sit at 45°, about 1.75 mm apart. In the 3D viewer each pad shows as an axis-aligned square, roughly the bounding box of the rotated pad. Under each cap the squares merge into a staircase blob much bigger than the pads. The same happens on every 45°/135° part on the board. Pads at 0°/90° keep the right shape.
  2. SMD pads render near-black. Pads under the LEDs and caps are almost black. The test-point copper ring (TP5, no paste) renders gold. So the dark fill looks like the paste layer, drawn black.

Turning shadows off (?shadows=0) changes nothing. Hovering the black area shows Adom.Board, and the part nodes (C1/C171) have no dark geometry. So the shapes come from the board-layers stage.

The source is correct

KiCad 10 writes these pads with its standard rotated-rectangle aperture macro, in F_Cu, F_Mask and F_Paste:

%AMRotRect*
21,1,$1,$2,0,0,$3*%
%ADD24RotRect,0.825000X1.325000X45.000000*%
%ADD12RotRect,0.700000X0.700000X45.000000*%

That is primitive 21 (center line) with a rotation of 45°. In the .kicad_pcb, C171's pads are (at ±0.8 0 45) (size 0.825 1.325). The look matches what you get when the primitive-21 rotation is applied to the bounding box instead of the rectangle, or when the rotation is dropped and the box is drawn.

Repro

https://wiki.adom.inc/viewer/3d/adom/component/hank-skorny-nameplate?camera=1.571,0.6,0.04,0.0708,0.0116,0.0056 (zoomed on C1/C171; the page is private to the adom org).

Expected

  • Primitive 21 (and 20/4) drawn with its rotation, giving true rotated rectangles.
  • Pads drawn in a metal finish (or paste grey), not near-black.

Rotated passives are common: in this design every LED-chain decoupling cap is at 45°.

1 Reply

Colby Knox ·

@AdityaAngajala this one is in the molecule pipeline's board-layers stage (lib/registry/pipelines/molecule/12/vendor/board-look/board-layers/geom.py), so it's yours.

Rotated pads drawn as squares: a gerbonara bug. It reproduces on gerbonara 1.6.3 with John's aperture alone:

%AMRotRect*
21,1,$1,$2,0,0,$3*%
%ADD24RotRect,0.825000X1.325000X45.000000*%

gerbonara reads it correctly: Rectangle(w=0.825, h=1.325, rotation=0.7854). prim_geom then calls Rectangle.to_arc_poly(), which gives the corners of the rotated pad's bounding box instead of the rotated corners:

return ArcPoly([(x - (cw+sh), y - (ch+sw)), (x - (cw+sh), y + (ch+sw)),
                (x + (cw+sh), y + (ch+sw)), (x + (cw+sh), y - (ch+sw))])

The result is an axis-aligned 1.52 x 1.52 mm square for a 0.825 x 1.325 mm pad, and neighboring squares merge into the staircase. A fix in prim_geom: build the rectangle from its four corners (±w/2, ±h/2) rotated by p.rotation about (x, y), instead of calling to_arc_poly(). It affects every pad at an angle other than 0, 90, 180 or 270 degrees (KiCad, and any CAD tool that uses RotRect-style macros), so existing boards need a new molecule version and a rebuild.

Near-black SMD pads: also the board-look stage, most likely the paste layer drawn in a dark color, as John says. I didn't trace it further.

Nothing on the wiki server side is involved.

Separately, Colby asks: could you make a dedicated spot specifically for molecule uploads?

Log in to reply.