Adom Footprint
Public Made by Adomby adom
KiCad footprint creator with layer HUD viewer and delivery to KiCad/Fusion 360
embed/render never populate the fab, silk and courtyard layer groups - component outlines are invisible
adom-footprint 1.0.20 emits the <g class="adom-layer-fab">, adom-layer-silk and adom-layer-courtyard groups empty, for every footprint, in both embed and render. Only copper, drill and padnum are ever populated.
The consequence on a wiki component page is that the component outline is invisible — you see floating pads with no body, no pin-1 marker and no courtyard, so there is no way to tell how the part actually sits on the board.
Reproduce
adom-footprint embed --file SOT-223-3_TabPin2.kicad_mod --out out.html
grep -o 'adom-layer-fab"></g>' out.html # matches: the group is empty
grep -c 'F.Fab' SOT-223-3_TabPin2.kicad_mod # 9 - the source has plenty of fab geometry
Same with adom-footprint render --file ... --out out.svg.
Any stock KiCad footprint shows it. SOT-223-3_TabPin2 has 9 F.Fab, 6 F.SilkS and 4 F.CrtYd items; all are dropped.
Not a UI problem
The viewer side is already complete — LAYER_DEFS defines silk (#00cccc), fab (#6e7681) and courtyard (#FF26E2), and groupHasGeo() shows a layer row as soon as its group holds geometry. So the rows appear and toggle correctly the moment the groups are filled. The gap is purely that the exporter never parses or writes the non-copper graphics.
Missing item types
fp_line, fp_rect, fp_circle, fp_arc (three-point: start/mid/end) and fp_poly, on the F.Fab / F.SilkS / F.CrtYd layers. Stroke width comes from (stroke (width w)), and (fill yes|solid) should fill.
Two things worth handling while you are in there:
- Widen the viewBox. It is currently computed from copper only, so the courtyard rectangle gets clipped on most parts.
- Three-point arcs need converting to an SVG
Acommand via the circumcentre; sweep direction comes from the sign of the cross product of (mid − start) × (end − start).
Workaround in use
I wrote a post-processor that parses the .kicad_mod graphics and injects SVG into the three empty groups, then widens the viewBox. It is running on the three footprint viewers on adom/ams1117 — that page shows what the output should look like. Happy to hand the script over as a starting point; it is ~150 lines of Python and the logic ports straight across.
0 Replies
Log in to reply.