← Commit history
vendor/adom-step/vendor/adom-3d-viewer-babylon9/wiki/body.mdadded+122
@@ -0,0 +1,122 @@+# adom-3d-viewer-babylon9++A fork of Colby's `adom-3d-viewer` (Babylon 7.54) bumped to Babylon 9.5.0 with+the redesigned Inspector v9. Built as an ESM bundle for downstream Adom tools+to vendor — chiplinter consumes it today, and we expect it to back the next+~10 Adom 3D viewers.++## Why fork++Colby's `adom-3d-viewer` is the canonical viewer for InstaPCB previews and+chipfit, but it's pinned to Babylon 7.54 because chipfit-v2 + tscircuit ship+the same renderer. We needed Babylon 9's redesigned Inspector for chiplinter's+scene-graph debugging and didn't want to disturb Colby's surface area, so this+is a parallel fork.++## What's in the bundle++The build produces a single ESM entry plus code-split chunks:++```+adom-3d-viewer-babylon9.esm.js     ← entry, sets window.Adom3DViewerBabylon9+chunk-*.js                          ← code-split chunks (Babylon core, inspector, etc.)+VERSION+```++Loaded via:++```html+<script type="module">+  await import('/path/to/adom-3d-viewer-babylon9.esm.js');+  const v = window.Adom3DViewerBabylon9;+  v.init(host, { zUp: true, modelUrl: 'asset/foo.glb' });+</script>+```++## Why ESM (not IIFE)++Babylon 9's `@babylonjs/inspector` has circular imports that resolve to TDZ+when collapsed into a single IIFE scope (regardless of minifier). Vite's ESM+output preserves module boundaries so the inspector initializes cleanly.+Consumers load via `<script type="module">`, which all modern browsers+support.++## API++```js+window.Adom3DViewerBabylon9 = {+  init(host, options),         // mounts the viewer in `host`, returns ViewerInstance+  rotateYUpToZUp(scene),       // for kicad-cli GLBs (Y-up) → adom viewer (Z-up)+  addLaserEtch(scene, opts),   // bake a laser-etched chip-marking text overlay+  BABYLON: <full @babylonjs/core namespace>,  // re-exported for consumers+};+```++`ViewerInstance` exposes:+- `loadModel(url)` / `clearScene()` / `frameModel(fillFraction?)`+- `getScene()` / `getEngine()` / `getCamera()` / `getShadowGenerator()`+- `addContentRoot(node, opts?)` / `removeContentRoot(node)`+- `toggleDebugLayer()` / `showDebugLayer()` / `hideDebugLayer()`+- `setGroundVisible(visible)` / `goHome()`+- `setProjectionMode(ortho)` / `getProjectionMode()`+- `destroy()`++The full `@babylonjs/core` namespace is exposed at `Adom3DViewerBabylon9.BABYLON`+so consumers don't need their own `import` side — chiplinter uses+`V.BAB.MeshBuilder.CreateDisc`, `V.BAB.PBRMaterial`, `V.BAB.Quaternion`,+`V.BAB.Tools.CreateScreenshotUsingRenderTarget`, etc. directly.++## Install (drop into a tool's vendor/3d-viewer/)++The wiki ships the bundle as a tarball. Pull it into your tool's vendor+directory at install time:++```bash+# Install everything to a known shared location+sudo mkdir -p /usr/local/share/adom-3d-viewer-babylon9+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-3d-viewer-babylon9/adom-3d-viewer-babylon9.tar.gz \+  | sudo tar -xz -C /usr/local/share/adom-3d-viewer-babylon9++# Then symlink (or copy) into your tool's vendor/3d-viewer/+ln -sfn /usr/local/share/adom-3d-viewer-babylon9 /usr/local/bin/vendor/3d-viewer+```++Or just curl individual files if your tool only needs the entry (`adom-3d-viewer-babylon9.esm.js`):++```bash+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-3d-viewer-babylon9/adom-3d-viewer-babylon9.tar.gz | tar -xz -C ./vendor/3d-viewer+```++## Browser shims required++The inspector's React deps (Fluent UI) assume a Node environment. Add this+shim before loading the bundle:++```html+<script>+  window.process = window.process || { env: { NODE_ENV: 'production' } };+  window.global = window.global || window;+</script>+<script type="module">+  await import('/path/to/adom-3d-viewer-babylon9.esm.js');+</script>+```++## Defaults (3d-viewer-design skill compliance)++- §3b background gradient (`#5a6b7e` → `#2a3340`)+- §4b under-chip light toggle (HemisphericLight ground-color boost)+- §4d medium-gray ground plane+- §6 default-orbit camera with viewcube+- §8 world-origin axes++## Consumers++- `adom-chiplinter` — vendors `dist-standalone/` into `vendor/3d-viewer/`+- (future) `adom-chipfit-v3` — when v2 lands its own Babylon 9 upgrade+- (future) standalone scene-graph utility scripts++## Source++Source code lives at `adom-inc/adom-3d-viewer-babylon9` (private repo). The+canonical install artifact is the wiki tarball.
vendor/adom-step/vendor/adom-3d-viewer-babylon9/wiki/page.jsonadded+37
@@ -0,0 +1,37 @@+{+  "type": "app",+  "slug": "adom-3d-viewer-babylon9",+  "title": "adom-3d-viewer-babylon9 — Babylon 9.5 viewer + Inspector",+  "brief": "Fork of Colby's adom-3d-viewer (Babylon 7.54) bumped to Babylon 9.5 with the redesigned Inspector v9. Vendored ESM bundle for downstream Adom tools (chiplinter, chipfit-v2, future viewers). Distributed as a tarball — drop into your tool's vendor/3d-viewer/ at install time and load as `import('./vendor/3d-viewer/adom-3d-viewer-babylon9.esm.js')`.",+  "metadata": {+    "repo": "adom-inc/adom-3d-viewer-babylon9",+    "repo_visibility": "private",+    "releases": {+      "adom_docker": {+        "asset_name": "adom-3d-viewer-babylon9.tar.gz",+        "binary_url": "https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-3d-viewer-babylon9/adom-3d-viewer-babylon9.tar.gz",+        "install_hint": "sudo mkdir -p /usr/local/share/adom-3d-viewer-babylon9 && curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-3d-viewer-babylon9/adom-3d-viewer-babylon9.tar.gz | sudo tar -xz -C /usr/local/share/adom-3d-viewer-babylon9 && cat /usr/local/share/adom-3d-viewer-babylon9/VERSION && echo OK: adom-3d-viewer-babylon9 installed at /usr/local/share/adom-3d-viewer-babylon9",+        "version_command": "cat /usr/local/share/adom-3d-viewer-babylon9/VERSION"+      }+    },+    "discovery_triggers": [+      "adom-3d-viewer-babylon9",+      "babylon 9 viewer",+      "babylon 9.5 viewer",+      "babylon inspector v9",+      "3d viewer babylon 9",+      "vendor 3d viewer",+      "babylonjs upgrade",+      "upgrade babylon viewer",+      "newer babylon inspector",+      "fork adom-3d-viewer",+      "rotateYUpToZUp",+      "addLaserEtch",+      "Adom3DViewerBabylon9",+      "esm babylon bundle",+      "chip 3d viewer babylon 9"+    ],+    "discovery_pitch": "Fork of Colby's adom-3d-viewer bumped to Babylon 9.5 with the redesigned Inspector v9. Ships as an ESM bundle (vite build) you vendor into your tool — chiplinter and the next 10 Adom 3D apps build on this. Includes rotateYUpToZUp, addLaserEtch, and exposes the full @babylonjs/core namespace via window.Adom3DViewerBabylon9.BABYLON."+  },+  "version": "0.2.0"+}
vendor/adom-step/wiki/body.mdadded+92
@@ -0,0 +1,92 @@+# adom-step — STEP file viewer++A Fusion 360-style viewer for STEP (`.step` / `.stp`) files inside a+Hydrogen webview. Renders on the canonical Adom Babylon9 viewer.++## What it does++- **Components outline** — left-sidebar tree of every assembly node in+  the STEP. Per-row eye-toggle (tri-state across subtrees), isolate,+  zoom-to, search, right-click context menu.+- **Smart-pick measure** — Fusion-style snap to vertex / edge / face /+  body. Two clicks → distance in mm and mils, plus ΔX / ΔY / ΔZ and+  the angle between picks. Multi-stage Esc to back off one click at+  a time.+- **Hover-inspect HUD** — name, breadcrumb path, bbox W×D×H, material+  swatch, vertex/face count.+- **Pin / contact detection** — two-mode clusterer that walks the+  scene graph, groups meshes by inferred material role (body / pin /+  contact / marker), and surfaces detected pins as individual outline+  rows. Handles SOIC / QFP / QFN (per-side 1D), LGA / BGA / aQFN+  (2D bimodal-gap union-find), and through-hole connectors (geometry-+  based: tall-thin sub-meshes poking below the body's seating plane,+  regardless of material color).+- **Strobe** — flash each detected pin once at a configurable interval.+  Auto-disables with an explanatory tooltip on STEPs where no pins or+  contacts were found.+- **Right-click anywhere in the canvas** — Reveal in Components Outline,+  Isolate, Hide Others, Show, Hide, Zoom To, Copy Name, Properties.+  All visibility actions are Ctrl+Z / Ctrl+Y undoable; "Hide" auto-+  flashes the row in the outline so you can find the hidden item again.+- **Babylon Inspector** — bundled (not CDN), one click opens the full+  scene-graph debugger.+- **CLI mirrors every UI verb** — drive the running viewer from the+  shell or from Claude.++## Install++```bash+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-step/adom-step -o /tmp/adom-step \+  && chmod +x /tmp/adom-step \+  && sudo install -m 0755 /tmp/adom-step /usr/local/bin/adom-step \+  && adom-step install+```++`adom-step install` deploys SKILL.md + completions to `~/.claude/skills/`+and `~/.local/`.++## Quick start++```bash+# Open any STEP file:+adom-step view /path/to/design.step++# Open a KiCad library footprint by canonical name:+adom-step view-library Package_QFP/LQFP-64_10x10mm_P0.5mm++# Drive from the CLI / from Claude:+adom-step list-components               # tree dump+adom-step isolate U1                    # hide others + frame+adom-step show NAME / hide NAME / show-all+adom-step measure A B                   # mm + mils+adom-step pins list                     # detected clusters+adom-step pins isolate 3+adom-step pins strobe                   # flash each pin+adom-step view-cube iso                 # front | top | iso | home | ...+adom-step screenshot --out /tmp/x.png+adom-step eval "return Object.keys(window.adomStep)"+adom-step console -f                    # tail webview console+```++## Pipeline++```+.step  →  service-step2glb /convert  →  GLB (hierarchy + materials preserved)+       →  /tmp/adom-step-cache/<sha256>.glb+       →  Babylon SceneLoader.ImportMeshAsync+       →  scene.transformNodes  →  components outline+```++The conversion side uses OCCT XCAF + `RWGltf_CafWriter`, which preserves+the STEP product structure and per-face materials end-to-end. That's+why TI / Renesas / Nordic STEPs surface their named pin hierarchy+directly (no client-side STEP parsing).++## See also++- [`service-step2glb`](https://wiki-ufypy5dpx93o.adom.cloud/services/service-step2glb)+  — the OCCT-based converter that produces the GLBs.+- [`adom-3d-viewer-babylon9`](https://wiki-ufypy5dpx93o.adom.cloud/apps/adom-3d-viewer-babylon9)+  — the canonical Babylon9 viewer adom-step renders into.+- [`chip-fetcher`](https://wiki-ufypy5dpx93o.adom.cloud/apps/chip-fetcher)+  — source of the manufacturer STEPs adom-step is tuned for.
vendor/adom-step/wiki/hero.pngadded
⋯ 1 unchanged line ⋯
vendor/adom-step/wiki/page.jsonadded+40
@@ -0,0 +1,40 @@+{+  "type": "app",+  "slug": "adom-step",+  "title": "adom-step — STEP file viewer",+  "brief": "Fusion 360-style viewer for STEP / STP files in a Hydrogen webview. Components outline, smart-pick measure (mm + mils + angle), hover-inspect HUD, and geometry-based pin / contact detection that handles LGA, BGA, QFN, SOIC, and through-hole connectors — including chip-fetcher manufacturer STEPs. AI-drivable CLI for every UI verb.",+  "metadata": {+    "repo": "adom-inc/adom-step",+    "version": "0.1.1",+    "releases": {+      "adom_docker": {+        "asset_name": "adom-step",+        "binary_url": "https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-step/adom-step",+        "install_hint": "curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-step/adom-step -o /tmp/adom-step && chmod +x /tmp/adom-step && sudo install -m 0755 /tmp/adom-step /usr/local/bin/adom-step && adom-step install"+      }+    },+    "discovery_triggers": [+      "adom-step",+      "step viewer",+      "view step file",+      "open step file",+      "open .step",+      "open .stp",+      "step 3d viewer",+      "cad viewer",+      "fusion 360 viewer",+      "components browser cad",+      "step assembly tree",+      "isolate component cad",+      "measure step file",+      "lga pads viewer",+      "qfn pins viewer",+      "bga balls viewer",+      "through-hole pins viewer",+      "kicad library step",+      "view-library step"+    ],+    "discovery_pitch": "Drop a STEP file in and get a Fusion 360-feel viewer instantly: components outline (every assembly node), smart-pick measure tool with mm + mils + angle, hover-inspect, and per-pin / per-contact strobe that handles LGA, BGA, QFN, SOIC, and through-hole connectors — works on KiCad library STEPs and chip-fetcher manufacturer STEPs alike."+  },+  "version": "0.1.1"+}
wiki/body.mdadded+120
@@ -0,0 +1,120 @@+# adom-chipsmith — STEP-native chip validator++`adom-chipsmith` loads a chip's STEP file alongside its footprint, datasheet PDF, and a chipsmith-spec manifest, then runs detection on the **STEP B-rep** (not on triangulated GLB meshes), validates measurements, layers a 1.6 mm faux PCB, auto-generates heatsink-via grids under any exposed pad, lays out solder-jet domes per the [`solder-jetting`](/wiki/skill/solder-jetting) rules, and on user sign-off bakes a canonical `<mpn>.chipsmith.step` plus a sidecar JSON for downstream Adom tools.++It's the higher-level validator that sits on top of [`adom-step`](/wiki/apps/adom-step) — chipsmith inherits the canonical Babylon viewer + smart-pick measure tool + Outline pane via the Tier-3 importer pattern from [`3d-viewer-design`](/wiki/skill/3d-viewer-design) §2.++## What it does (in one screen)++| Tab | What it shows |+|---|---|+| **Source** | Manifest (MPN / mfr / package), declared spec (`pin_count` / `structural_type` / `body_dims_mm`), file paths with reveal-in-VSCode buttons, datasheet via [`adom-pdf-viewer`](/wiki/skill/adom-pdf-viewer). Inline editor saves into `info.json`. |+| **Measurements** | Auto-rescale negotiation across 6 candidates (×1, ÷25.4, ÷1000, ×25.4, ×1000, ÷10) — picks the scale within ±5% of declared `body_dims_mm`. mm + mils dual readout. |+| **Detection** | Mode 0 walks the named scene graph. Mode 1 falls back to surface-type clustering on `/api/step-meta`. Pin-reveal strobe flashes each detected feature with a numbered HTML badge floating at the screen-projected XY. |+| **Footprint** | Per-source breakdown across **KiCad / Fusion / Altium / datasheet-derived**. Cross-source agreement matrix (pad-by-pad position + size deltas). 3D toggle per source — translucent pads at z=0 in the scene. **ds2sf v0.5.1 authoritative SVG rendered as real vector polygons** via earcut (not a raster texture; sharp at any zoom). |+| **Pin-1** | Chip-side via Mode 0 detection; footprint-side via silkscreen marker scan. Place-synthetic-indicator UI (NW/NE/SW/SE/click) when chip-side is missing. Three shapes: dimple / raised dot / corner chamfer. |+| **Sign-off** | 4 hard + 3 soft gates. CTA POSTs to `/api/signoff` → writes `<mpn>.chipsmith.json` + bakes `<mpn>.chipsmith.step`. |+| **Heatsink** | EP detection + auto-generated 0.3 mm via grid (1.2 mm pitch, 0.4 mm margin). Hollow plated barrels with copper annular rings. CSG-drilled B.Cu copper pour underneath the EP — with via-clearance holes — for the heatsink path. |+| **Solder-jet** | 300 µm dome layout per [`solder-jetting`](/wiki/skill/solder-jetting) — intra-pad ≥100 µm, inter-pad ≥300 µm with no-bridging pruning. |++Every overlay layer is a **first-class Outline citizen** with eye-toggle, click-to-isolate, and a right-click menu.++## STEP-native, not GLB++Both `adom-chipfit` and `adom-chiplinter` operate on triangulated GLBs and both lose surface-type information (a BGA ball becomes a triangle list, indistinguishable from a QFN pad). chipsmith reads the STEP file's B-rep + assembly hierarchy directly via `service-step2glb`'s `/step-meta` endpoint, so:++- **CYLINDER + small radius + dome top** → BGA ball.+- **PLANE + horizontal + at z≈seat-plane** → SMD pad.+- **PLANE + vertical + tall (≥1.6 mm) + thin** → through-hole pin.+- **CONICAL or CYLINDER on top, small radius, elevated** → pin-1 indicator candidate.++Detection runs in three modes — Mode 0 named-scene-graph walk, Mode 1 surface-type cluster, Mode 2 face-merge fallback — stopping when ≥(declared pin count) features have been classified.++## Multi-source footprint cross-validation++chipsmith renders four parallel footprint sources from `chip-fetcher`'s library (datasheet-derived, KiCad, Fusion 360 .lbr, Altium .PcbLib) into the scene as separately-branched overlays in different tints (orange / green / blue / purple), then runs a per-pad cross-validation matrix. **All four sources agreeing pad-by-pad is the strongest possible "chipsmith nailed this chip"** signal — disagreements pop visually and gate sign-off.++The ds2sf authoritative SVG (when present in the chip-fetcher library — emitted by ds2sf v0.5.1+) renders as a fifth branch of pixel-trustworthy ground truth: **real vector polygons** parsed from the SVG and triangulated via earcut, not a texture-mapped raster.++## Quick start++```bash+# Install (paste into Claude Code):+curl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-chipsmith/adom-chipsmith \+  -o /usr/local/bin/adom-chipsmith && chmod +x /usr/local/bin/adom-chipsmith && \+  adom-chipsmith install++# Open a chip from a chip-fetcher library+adom-chipsmith view-library /home/adom/project/chip-fetcher/library/VL53L8CX++# Open an arbitrary STEP + footprint + datasheet+adom-chipsmith view path/to/chip.step \+  --footprint path/to/chip.kicad_mod \+  --spec      path/to/info.json++# Headless detection — JSON report+adom-chipsmith detect --json /path/to/chip-fetcher/library/<MPN>+```++## CLI surface++| Command | Purpose |+|---|---|+| `view <step> [--footprint] [--spec] [--datasheet] [--no-open]` | Open one chip |+| `view-library <chip-fetcher-dir>` | Open a chip from a chip-fetcher library |+| `start --port N` / `stop --port N` / `status` / `health` | Server lifecycle |+| `list-components` | Scene-graph component tree |+| `isolate <name>` / `show <name>` / `hide <name>` / `show-all` / `frame <name>` | Visibility + camera |+| `place-pin1 <corner>` / `set-overlay <kind> <on/off>` / `sign-off` | Verification flow drivers |+| `screenshot --out <png>` | PNG of current canvas |+| `eval <js>` | Run a JS expression inside the webview, print the result |+| `console -f` | Tail JS console output from the webview |+| `detect --json` | Headless detection report on a chip-fetcher dir |++## JS API surface (`window.adomChipsmith`)++The full UI is JS-shadowed for AI demo scripts + tests. From the CLI: `adom-chipsmith eval "window.adomChipsmith.<verb>(...)"`.++```+state()                         // full state snapshot+setActiveTab(id)                // 'source' | 'measurements' | … | 'solderjet'+runDetection()                  // re-fetch + re-run Mode 0 → Mode 1 fallback+runMeasurements()               // re-run rescale negotiation+recomputeStatuses()             // refresh every status pill from current state++placePin1(opts)                 // {mode:'corner'|'fpMarker'|'click', corner, xyMm, shape}+removePin1User()++setFootprintOverlay(src, on)    // 'kicad' | 'fusion' | 'altium' | 'datasheet' | 'stock'+setDs2sfVisible(on)+setFauxPcbVisible(on)+setHeatsinkVisible(on)+setSolderJetVisible(on)++replayReveal()                  // re-runs the strobe + numbered badges+hoverAt({x, y})                 // returns same payload as the visible HUD++signoff.gates()+signoff.canSignOff()+signoff.signOff()               // POST /api/signoff → writes JSON + bakes STEP+```++## Sign-off artifacts++| File | Content |+|---|---|+| `<mpn>.chipsmith.json` | Full state — applied scale, detected breakdown, heatsink grid, solder-jet layout, pin-1 user-placed corner, sign-off timestamp |+| `<mpn>.chipsmith.step` | Canonical role-tagged STEP via `service-step2glb`'s `/bake` endpoint. Future Adom tools should prefer this over the original input. |++## Source++`adom-inc/adom-chipsmith` (private). The wiki carries the binary + SKILL.md + this page; the public install path is fully self-service.++## Adjacent skills++- [`adom-step`](/wiki/apps/adom-step) — base viewer chipsmith inherits from+- [`3d-viewer-design`](/wiki/skill/3d-viewer-design) — esp. §14 (overlays first-class) and §2 (Tier-3 inheritance)+- [`solder-jetting`](/wiki/skill/solder-jetting) — 300 µm dome rules+- [`electrical-engineering`](/wiki/skill/electrical-engineering) — package families, pin-1 conventions, mm + mils+- [`pin1-indicator`](/wiki/skill/pin1-indicator) — per-package pin-1 marker conventions+- [`chip-fetcher`](/wiki/apps/chip-fetcher) — produces the chipsmith input bundle
wiki/hero.pngadded
⋯ 1 unchanged line ⋯