← All Pull Requests

Build the CAD: laser-etched STEP/GLB as the primary 3D model (page.json keys + template) #3

Open opened by Ray

Section 4 (Build the CAD) gains the laser-etched 3D model, and the page.json template names the etched files as the primary model.

What changed on the factory side (2026-09-17): every component page now ships <stem>-etched.step / <stem>-etched.glb โ€” the MPN laser-etched on the die in a toggleable Adom.LaserEtch group โ€” beside the plain body, and page.json points model_3d / model_3d_step at the etched files with the bare body kept as model_3d_plain / model_3d_step_plain. The wiki's /viewer/3d renders whatever parts.model_3d names, so the key matters (confirmed on adom/bss138k). The 14k existing pages are being backfilled the same way.

The skill did not mention any of it, so a page built by hand would come out without the etch and with the viewer on the plain body. This adds: the /laser-etch call (Ray's service-occt container, ~6 s, no model tokens), the page.json keys, the iso-front hero pose note (service-occt 1.3.8), and the template change.

Companion to PR #150 (solder-paste dot export) โ€” separate concern, separate PR.

๐Ÿค– Generated with Claude Code

Diff Skip to comments (1)

--- a/SKILL.md+++ b/SKILL.md@@ -1,317 +1,345 @@⋯ 154 unchanged lines ⋯  > **`adom-footprint` 1.0.20 ships the fab, silk and courtyard layer groups EMPTY** (both `embed` and `render`), so the component outline is invisible and you get floating pads with no body. `scripts/inject_layers.py` parses the `.kicad_mod` graphics and fills them, and widens the viewBox (which is computed from copper only, so courtyards clip). Tracked as adom/adom-footprint#2. Drop the workaround once that lands. +**Laser-etch the MPN into the 3D model, and ship BOTH files.** The factory does this for every+component page since 2026-09-17 (John: the pages carried no chip-laseretch add-on STEP). It is one+service call on Ray's service-occt container, ~6 s, no model tokens:++```sh+# POST the plain STEP; answers 202 + job_id, poll /jobs/<id>, download /jobs/<id>/result+curl -s -X POST -H 'X-Client: <tool>/<you>' -H 'X-Job-Name: laser-etch-<mpn>' \+     --data-binary @part.step \+     "https://occt-fbnsqrdkehdj.adom.cloud/laser-etch?name=<MPN>&mode=flat" -o job.json+step2glb convert part-etched.step -o part-etched.glb+```++`mode=flat` puts the marking in a floating, toggleable `Adom.LaserEtch` group, so the etched STEP is+a superset of the plain body (Fusion users can hide it). The wiki's `/viewer/3d` renders whatever+`parts.model_3d` names, so the ETCHED files are the primary in `page.json` and the bare body stays+published as `*_plain`:++```json+"model_3d": "<stem>-etched.glb",       "model_3d_plain": "<stem>.glb",+"model_3d_step": "<stem>-etched.step", "model_3d_step_plain": "<stem>.step"+```++The fit picks 0 or 90 degrees so the text reads upright in the viewer's camera (+X,โˆ’Y,+Z). If you+render a hero from the STEP, use `pose=iso-front` (service-occt 1.3.8; the CLI's `iso`/`iso2` look+from behind and a 0-degree mark reads upside-down). A factory reference: `etch_step.py` and+`hero_chip.py` in Ray's factory.+ **Do NOT ship generated Fusion `.lbr` or Altium `.IntLib`/`.SchLib`/`.PcbLib`.** They are generated rather than hand-verified and the Altium symbol encoder has produced wrong geometry before. Ship the placeholder from ยง6 instead. Generated-but-unchecked CAD on a public page is worse than a gap, because a reader assumes it was verified.  ---⋯ 154 unchanged lines ⋯ | `scripts/inject_layers.py` | Fills the empty fab/silk/courtyard groups in an adom-footprint embed | | `scripts/build_switcher.py` | Wraps N footprint embeds into one package switcher | | `reference/worked-example.md` | The AMS1117 build end to end, every command in order |+--- a/templates/page.json+++ b/templates/page.json@@ -1,72 +1,76 @@⋯ 34 unchanged lines ⋯       "symbol": "{{SLUG_STEM}}.kicad_sym",       "footprint": "{{SLUG_STEM}}-{{PKG}}.kicad_mod",       "footprint_alt": "{{SLUG_STEM}}-{{PKG2}}.kicad_mod",-      "model_3d": "{{SLUG_STEM}}-{{PKG}}.glb",-      "model_3d_chip": "{{SLUG_STEM}}-{{PKG}}.glb",-      "step": "{{SLUG_STEM}}-{{PKG}}.step"+      "model_3d": "{{SLUG_STEM}}-{{PKG}}-etched.glb",+      "model_3d_plain": "{{SLUG_STEM}}-{{PKG}}.glb",+      "model_3d_chip": "{{SLUG_STEM}}-{{PKG}}-etched.glb",+      "model_3d_step": "{{SLUG_STEM}}-{{PKG}}-etched.step",+      "model_3d_step_plain": "{{SLUG_STEM}}-{{PKG}}.step",+      "step": "{{SLUG_STEM}}-{{PKG}}-etched.step"     },     "distributor_links": {       "lcsc": "{{LCSC_OR_DELETE}}"⋯ 26 unchanged lines ⋯    "dependencies": {} }+

Comments

Ray ·

Correction to the body: the companion solder-paste PR is #2 on this page (I wrote the wiki's global id, 150, by mistake). Separate concern, separate PR; both touch section 4 and merge cleanly in either order.

Log in to comment.