skill
Component Hero
Public Made by Adomby adom
The Adom standard for a component page's 3D hero: teal dashed pad outlines, silkscreen with pin 1, signal names. Spec + deterministic generator.
← Commit history
component-hero: adom-hero 1.1 (bolder pad outlines)
7 files changed
+56−30
README.md+23−11@@ -1,11 +1,11 @@-# Component hero standard (adom-hero 1.0)+# Component hero standard (adom-hero 1.1) Every component page on the wiki shows its part in 3D with the footprint drawn under it: the pads as teal dashed outlines, the silkscreen with pin 1, and each pad's signal name. This document defines that artwork exactly, so any person or AI builds the same thing, a linter can check it, and our factory can generate it for every page. -Status: 1.0, 2026-09-30. Applied to 7 factory pages as a test (linked at the end). The generator is part+Status: 1.1, 2026-09-30 (1.1 makes the pad outlines bolder; see the change log at the end). Applied to 7 factory pages as a test (linked at the end). The generator is part of this page's skill (`skills/component-hero/`), so any AI that installs it can build a conforming hero. @@ -93,14 +93,17 @@ uses this teal, and the `wiki-component` skill specifies it. - Pad rotation is applied, including its sign. - **Dashes:** the outline is dashed as a closed path, and a dash may turn a corner. - Let **span** be the largest dimension of the pad field, in mm, and at least 1.- - **dash** = clamp(0.012 × span, 0.07, 0.35) mm.- - **gap** = 0.65 × dash.- - **stroke** = clamp(0.004 × span, 0.015, 0.06) mm.- - **Per-pad cap**, so small pads still read as their shape: dash ≤ max(perimeter / 10, 0.03), and- stroke ≤ max(perimeter / 60, 0.012).+ - **dash** = clamp(0.035 × span, 0.18, 0.6) mm.+ - **gap** = 0.6 × dash.+ - **stroke** = clamp(0.012 × span, 0.05, 0.15) mm.+ - **Per-pad cap**, so small pads still read as their shape: dash ≤ max(perimeter / 6, 0.05), and+ stroke ≤ max(perimeter / 25, 0.02). - **Geometry:** each dash piece is a flat quad strip of the stroke width, centred on the path.-- **Worked example:** a 1206 capacitor gives 0.07 mm dashes with a 0.016 mm stroke, the same as the- hand-built heroes. A 12 mm connector gives about 0.14 mm dashes with a 0.048 mm stroke.+- **Worked example:** a SOT-23-6 gives 0.18 mm dashes with a 0.05 mm stroke; an LQFP-48 gives about+ 0.32 mm dashes with a 0.11 mm stroke. On 0.3 mm BGA balls the per-pad cap keeps them as dashed circles.+- **Why this size:** the outlines must read before the silkscreen at the wiki viewer's default zoom.+ 1.0 used the hand-built heroes' 0.015 mm stroke, which vanished in the viewer, so the 30% silkscreen was+ taken for the footprint. ## Layer 2: silkscreen and pin 1 @@ -153,7 +156,7 @@ The hero's glTF `asset.extras` carries one object. Here is the real block from a ```json {- "spec": "adom-hero 1.0",+ "spec": "adom-hero 1.1", "mpn": "OPA2325IDGKT", "kind": "component + footprint reference art", "board_use": false,@@ -161,7 +164,7 @@ The hero's glTF `asset.extras` carries one object. Here is the real block from a "layers": { "pad_outlines": { "material": "Footprint pads - teal dashed outlines - 50 percent opacity", "rgba": [0, 0.902, 0.863, 0.5], "pads": 8,- "span_mm": 4.05, "dash_mm": 0.07, "gap_mm": 0.0455, "pad_stroke_mm": 0.0162 },+ "span_mm": 4.05, "dash_mm": 0.18, "gap_mm": 0.108, "pad_stroke_mm": 0.0500 }, "silkscreen": { "material": "Silkscreen reference lines - 30 percent opacity", "rgba": [0.92, 0.96, 1.0, 0.3], "footprint_items": 3, "pin1": { "source": "footprint silkscreen", "pad": "1" } },@@ -251,6 +254,8 @@ To publish, add `<slug>-hero.glb` and `<slug>-hero.overlay.json` to the page, se `-0.02 mm` plane and the unlit materials. - **Now exact:** dash, gap and stroke sizes, label height and placement, the pin-1 rules, and the exposed-pad and ball-grid rules.+- **Changed:** the pad outlines are about 3× bolder than on the hand-built heroes (1.1), so the footprint+ reads first in the viewer. - **Added:** - the pin-1 dot on the silkscreen layer. John asked for it, and the one earlier attempt was a 3D block stuck on the chip;@@ -292,3 +297,10 @@ Hand-built style A, for comparison: need the union of all primitives. - **Hero freshness.** When a page's footprint or pinout changes, its hero must be rebuilt. The sidecar's source hashes let a lint rule detect a stale hero.++## Change log++- **1.1 (2026-09-30):** pad outlines bolder: stroke 0.015 to 0.05-0.15 mm, dash 0.07 to 0.18-0.6 mm. Colby+ asked whether the gray lines were the footprint: at 1.0 sizes the teal outlines vanished at the viewer's+ default zoom and only the silkscreen showed.+- **1.0 (2026-09-30):** first version, unified from the 45 hand-built style A heroes.
SKILL.md+1−1@@ -1,6 +1,6 @@ --- name: component-hero-description: Build a component page's annotated 3D hero to the Adom standard (adom-hero 1.0) - the physical chip plus teal dashed pad outlines (50% opacity), silkscreen with pin 1 (70% transparent), and each pad's signal name - as a separate <slug>-hero.glb, with the board-use GLB left clean. Deterministic generator included (hero_glb.py, no model calls). Use when publishing or updating any component page's 3D model, when a page shows the bare chip without its footprint, or when asked for footprint outlines, pad labels, pin 1 or silkscreen in the 3D view. Trigger words - component hero, hero glb, footprint outline in 3d, teal dashed pads, pad outlines, silkscreen in the glb, pin 1 on silk, signal names on pads, pad labels 3d, model_3d, model_3d_plain, adomHero, adom-hero 1.0.+description: Build a component page's annotated 3D hero to the Adom standard (adom-hero 1.1) - the physical chip plus teal dashed pad outlines (50% opacity), silkscreen with pin 1 (70% transparent), and each pad's signal name - as a separate <slug>-hero.glb, with the board-use GLB left clean. Deterministic generator included (hero_glb.py, no model calls). Use when publishing or updating any component page's 3D model, when a page shows the bare chip without its footprint, or when asked for footprint outlines, pad labels, pin 1 or silkscreen in the 3D view. Trigger words - component hero, hero glb, footprint outline in 3d, teal dashed pads, pad outlines, silkscreen in the glb, pin 1 on silk, signal names on pads, pad labels 3d, model_3d, model_3d_plain, adomHero, adom-hero 1.1. --- # component-hero
docs/example-qfn36.png⋯ 1 unchanged line ⋯
docs/example-sot23-6.png⋯ 1 unchanged line ⋯
skills/component-hero/SKILL.md+1−1@@ -1,6 +1,6 @@ --- name: component-hero-description: Build a component page's annotated 3D hero to the Adom standard (adom-hero 1.0) - the physical chip plus teal dashed pad outlines (50% opacity), silkscreen with pin 1 (70% transparent), and each pad's signal name - as a separate <slug>-hero.glb, with the board-use GLB left clean. Deterministic generator included (hero_glb.py, no model calls). Use when publishing or updating any component page's 3D model, when a page shows the bare chip without its footprint, or when asked for footprint outlines, pad labels, pin 1 or silkscreen in the 3D view. Trigger words - component hero, hero glb, footprint outline in 3d, teal dashed pads, pad outlines, silkscreen in the glb, pin 1 on silk, signal names on pads, pad labels 3d, model_3d, model_3d_plain, adomHero, adom-hero 1.0.+description: Build a component page's annotated 3D hero to the Adom standard (adom-hero 1.1) - the physical chip plus teal dashed pad outlines (50% opacity), silkscreen with pin 1 (70% transparent), and each pad's signal name - as a separate <slug>-hero.glb, with the board-use GLB left clean. Deterministic generator included (hero_glb.py, no model calls). Use when publishing or updating any component page's 3D model, when a page shows the bare chip without its footprint, or when asked for footprint outlines, pad labels, pin 1 or silkscreen in the 3D view. Trigger words - component hero, hero glb, footprint outline in 3d, teal dashed pads, pad outlines, silkscreen in the glb, pin 1 on silk, signal names on pads, pad labels 3d, model_3d, model_3d_plain, adomHero, adom-hero 1.1. --- # component-hero
skills/component-hero/reference/standard.md+23−11@@ -1,11 +1,11 @@-# Component hero standard (adom-hero 1.0)+# Component hero standard (adom-hero 1.1) Every component page on the wiki shows its part in 3D with the footprint drawn under it: the pads as teal dashed outlines, the silkscreen with pin 1, and each pad's signal name. This document defines that artwork exactly, so any person or AI builds the same thing, a linter can check it, and our factory can generate it for every page. -Status: 1.0, 2026-09-30. Applied to 7 factory pages as a test (linked at the end). The generator is part+Status: 1.1, 2026-09-30 (1.1 makes the pad outlines bolder; see the change log at the end). Applied to 7 factory pages as a test (linked at the end). The generator is part of this page's skill (`skills/component-hero/`), so any AI that installs it can build a conforming hero. @@ -93,14 +93,17 @@ uses this teal, and the `wiki-component` skill specifies it. - Pad rotation is applied, including its sign. - **Dashes:** the outline is dashed as a closed path, and a dash may turn a corner. - Let **span** be the largest dimension of the pad field, in mm, and at least 1.- - **dash** = clamp(0.012 × span, 0.07, 0.35) mm.- - **gap** = 0.65 × dash.- - **stroke** = clamp(0.004 × span, 0.015, 0.06) mm.- - **Per-pad cap**, so small pads still read as their shape: dash ≤ max(perimeter / 10, 0.03), and- stroke ≤ max(perimeter / 60, 0.012).+ - **dash** = clamp(0.035 × span, 0.18, 0.6) mm.+ - **gap** = 0.6 × dash.+ - **stroke** = clamp(0.012 × span, 0.05, 0.15) mm.+ - **Per-pad cap**, so small pads still read as their shape: dash ≤ max(perimeter / 6, 0.05), and+ stroke ≤ max(perimeter / 25, 0.02). - **Geometry:** each dash piece is a flat quad strip of the stroke width, centred on the path.-- **Worked example:** a 1206 capacitor gives 0.07 mm dashes with a 0.016 mm stroke, the same as the- hand-built heroes. A 12 mm connector gives about 0.14 mm dashes with a 0.048 mm stroke.+- **Worked example:** a SOT-23-6 gives 0.18 mm dashes with a 0.05 mm stroke; an LQFP-48 gives about+ 0.32 mm dashes with a 0.11 mm stroke. On 0.3 mm BGA balls the per-pad cap keeps them as dashed circles.+- **Why this size:** the outlines must read before the silkscreen at the wiki viewer's default zoom.+ 1.0 used the hand-built heroes' 0.015 mm stroke, which vanished in the viewer, so the 30% silkscreen was+ taken for the footprint. ## Layer 2: silkscreen and pin 1 @@ -153,7 +156,7 @@ The hero's glTF `asset.extras` carries one object. Here is the real block from a ```json {- "spec": "adom-hero 1.0",+ "spec": "adom-hero 1.1", "mpn": "OPA2325IDGKT", "kind": "component + footprint reference art", "board_use": false,@@ -161,7 +164,7 @@ The hero's glTF `asset.extras` carries one object. Here is the real block from a "layers": { "pad_outlines": { "material": "Footprint pads - teal dashed outlines - 50 percent opacity", "rgba": [0, 0.902, 0.863, 0.5], "pads": 8,- "span_mm": 4.05, "dash_mm": 0.07, "gap_mm": 0.0455, "pad_stroke_mm": 0.0162 },+ "span_mm": 4.05, "dash_mm": 0.18, "gap_mm": 0.108, "pad_stroke_mm": 0.0500 }, "silkscreen": { "material": "Silkscreen reference lines - 30 percent opacity", "rgba": [0.92, 0.96, 1.0, 0.3], "footprint_items": 3, "pin1": { "source": "footprint silkscreen", "pad": "1" } },@@ -251,6 +254,8 @@ To publish, add `<slug>-hero.glb` and `<slug>-hero.overlay.json` to the page, se `-0.02 mm` plane and the unlit materials. - **Now exact:** dash, gap and stroke sizes, label height and placement, the pin-1 rules, and the exposed-pad and ball-grid rules.+- **Changed:** the pad outlines are about 3× bolder than on the hand-built heroes (1.1), so the footprint+ reads first in the viewer. - **Added:** - the pin-1 dot on the silkscreen layer. John asked for it, and the one earlier attempt was a 3D block stuck on the chip;@@ -292,3 +297,10 @@ Hand-built style A, for comparison: need the union of all primitives. - **Hero freshness.** When a page's footprint or pinout changes, its hero must be rebuilt. The sidecar's source hashes let a lint rule detect a stale hero.++## Change log++- **1.1 (2026-09-30):** pad outlines bolder: stroke 0.015 to 0.05-0.15 mm, dash 0.07 to 0.18-0.6 mm. Colby+ asked whether the gray lines were the footprint: at 1.0 sizes the teal outlines vanished at the viewer's+ default zoom and only the silkscreen showed.+- **1.0 (2026-09-30):** first version, unified from the 45 hand-built style A heroes.
skills/component-hero/scripts/hero_glb.py+8−6@@ -27,7 +27,7 @@ import argparse, hashlib, json, math, os, re, struct, sys import numpy as np from pygltflib import GLTF2, Accessor, BufferView, Material, Mesh, Node, Primitive, Attributes, PbrMetallicRoughness -SPEC = 'adom-hero 1.0'+SPEC = 'adom-hero 1.1' Z = -0.02 # mm, artwork plane PAD_MAT = ('Footprint pads - teal dashed outlines - 50 percent opacity', [0.0, 0.902, 0.863, 0.5]) SILK_MAT = ('Silkscreen reference lines - 30 percent opacity', [0.92, 0.96, 1.0, 0.3])@@ -256,9 +256,11 @@ def text_tris(txt, height, x, y, align='left', vertical=False): def scale_params(pads): xs = [p['x'] for p in pads]; ys = [p['y'] for p in pads] span = max(max(xs) - min(xs) + max(p['w'] for p in pads), max(ys) - min(ys) + max(p['h'] for p in pads), 1.0)- dash = min(max(0.012 * span, 0.07), 0.35)- return dict(span_mm=round(span, 3), dash_mm=round(dash, 4), gap_mm=round(0.65 * dash, 4),- pad_stroke_mm=round(min(max(0.004 * span, 0.015), 0.06), 4))+ # 1.1 (2026-09-30): bolder. At 0.015 mm the outlines vanished at the wiki viewer's default zoom and the+ # 30% silkscreen read as "the footprint" (Colby). The footprint must read first.+ dash = min(max(0.035 * span, 0.18), 0.6)+ return dict(span_mm=round(span, 3), dash_mm=round(dash, 4), gap_mm=round(0.6 * dash, 4),+ pad_stroke_mm=round(min(max(0.012 * span, 0.05), 0.15), 4)) def is_grid(pads):@@ -458,8 +460,8 @@ def build(src_glb, kmod, page_json, out, mpn=None, png=None): pad_tris = [] for p in pads: o = pad_outline(p); per = sum(math.hypot(b[0] - a[0], b[1] - a[1]) for a, b in zip(o, o[1:]))- dsh = min(prm['dash_mm'], max(per / 10, 0.03)); w = min(prm['pad_stroke_mm'], max(per / 60, 0.012))- for d in dashes(o, dsh, 0.65 * dsh): pad_tris += stroke_quads(d, w)+ dsh = min(prm['dash_mm'], max(per / 6, 0.05)); w = min(prm['pad_stroke_mm'], max(per / 25, 0.02))+ for d in dashes(o, dsh, 0.6 * dsh): pad_tris += stroke_quads(d, w) silk_tris = [] for kind, pts, w in silk: if 'REF' in str(pts): continue