Closed bug report

component_hero: single-row footprints get pin labels between the pads

Ray · ·closed by Colby Knox

pkg publish rebuilds a component page's <slug>-hero.glb with the CLI's own builder (src/core/component_hero). On a single-row footprint (1xN pin header, SIP, TO-92, TO-220, JST XH/PH/VH), that builder puts the interior pin labels in the gaps between the pads.

Cause. Every signal pad has the same x (the same y for a row), so the extent across the row is zero. label_plan divides by it, the normalised offset across the row is 0 for every pad, and each pad is sorted to the top or bottom side. In a column, pads 2 to N-1 get their labels drawn between themselves and their neighbours.

Fix: https://github.com/adom-inc/adom-wiki-cli/pull/11

  • Three or more pads whose copper lines up in one column label on the right; one row labels below; all on one line.
  • SOT-89 keeps the existing split: its custom pad 2 spans the tab.
  • Silk strokes become obstacles, one per segment.
  • Tests are included, and three of them fail on the current code.

The same fix is in the Python generator (adom/component-hero 0.1.3). Reported in adom/component-hero#2.

Until the PR lands, a publish of a single-row page brings the bad hero back. We push the corrected hero after each release in the meantime.

1 Reply

Colby Knox marked this in progress ·
Colby Knox ·

Merged (GitHub PR #11) and released in adom-wiki 1.8.17. Checked against 180 real footprints: the single-row ones (1xN headers, TO-220, TO-92 style) now label on one side; the silk-stroke obstacles move 77 labels on 17 other parts by 0.3 to 1.25 mm, all outward. Publishes from 1.8.17 on keep the corrected hero.

Colby Knox closed this ·

Log in to reply.