← Commit history

v1.4.21: provenance fix docs, versioned release-asset install (no latest alias), examples via adom-tsci-examples.tgz release asset, new export subcommand

John Lauer ·7d7bf759b0 ·3mo ago ·parent 936ce57
2 files changed +46−4
adom-usbc.md+42−1
@@ -120,10 +120,16 @@ const PADS: Array<{ port: string; x: number }> = [ ]  export const UsbCReceptacle = ({-  name, pcbX, pcbY, pcbRotation = 0,+  name, pcbX, pcbY, pcbRotation = 0, schX, schY, schRotation, }: {   name: string; pcbX: number; pcbY: number;   pcbRotation?: 0 | 90 | 180 | 270+  // SCHEMATIC placement — ALWAYS forward to the inner <chip>. Without these+  // the receptacle silently defaults to the schematic origin (0,0) and piles+  // on top of other parts (caught by `adom-tsci lint` Check 5). A wrapper+  // component MUST pass schX/schY/schRotation through, or it can't be placed+  // on the schematic.+  schX?: number; schY?: number; schRotation?: number }) => {   // Native CAD has mouth at local +Y. cad.rotation.z = pcbRotation   // + rotationOffset.z (tscircuit adds them, CCW). We set@@ -140,6 +146,7 @@ export const UsbCReceptacle = ({     <chip       name={name}       pcbX={pcbX} pcbY={pcbY} pcbRotation={pcbRotation}+      schX={schX} schY={schY} schRotation={schRotation}       supplierPartNumbers={{ jlcpcb: [USB_C_PN] }}       manufacturerPartNumber="TYPE-C-31-M-12"       pinLabels={pinLabels as any}@@ -333,6 +340,40 @@ in userland. Until then, the compensation above is load-bearing. | USB-C missing from Components HUD in adom-tsci | refdes doesn't match `/^J[\d_]/i` OR no cad_component emitted | Rename to `J1`/`J_1`; check `circuit.json` for `cad_component` row | | `pcb_autorouting_error: Failed to solve 1 nodes` after adding USB-C | USB-C pads near high-density chip pin row | Move USB-C further from adjacent chips, or grow board | +## USB-C on a MOLECULE edge (not a bare `<board>`)++When the board is an Adom `<Molecule>` (machine-pin corners for the probing+workcell), edge placement gets one extra wrinkle: **the molecule's wings+grow the real board outline beyond the nominal `size`.** A `size="128x48"`+molecule renders as a ~130.4×50.4 mm board (≈1.2 mm wing per side); large+pins grow it more. If you place the USB-C with `pcbX = nominal/2 − 4`, it+ends up several mm *inside* the real edge and the plug can't reach.++Rules that make it work:++1. **Use absolute sizing** — `size="138x58 absolute"` — so the real outer+   edge is exactly `W/2`. The size increments are coarse (…96, 128, 160…)+   and can't hit the width you need anyway; absolute gives you the precise+   edge to cantilever the mouth past.+2. **Place `pcbX ≈ W/2 − 3` and iterate ONCE** against `circuit.json`:+   - `pcb_component_outside_board_error: J1 extends outside by N mm` → pull+     J1 in by N (reduce `pcbX`).+   - confirm the rightmost USB-C pad's `gap-to-edge > 0` (no pad past edge).+   - target: body/mouth ~2–3 mm past the edge, pads ~5 mm inside.+3. **Large corner pins + `roundEdges={true}` conflict.** The rounded-corner+   arc carves out the corner where the machine pins sit, so large pins throw+   a *constant* `MP1..MP4 extends outside by ~0.48mm` (size-independent — the+   tell that it's the corners). Use **`roundEdges={false}`** with large pins.+4. Put the connector mid-edge (between the two corner pins) — it won't+   collide with the corner machine pins there.++Worked example: the OLIVER LED nameplate molecule — `size="178x58 absolute"`,+`type="4pin"`, `pinType="MachinePinLargeStandard"`, `roundEdges={false}`,+`<UsbCReceptacle mount="east" pcbX={W/2 − 4} pcbY={0}>` → SMT pads ~6.5 mm+inside, plated anchor holes ~0.8 mm clear of the edge, body/mouth cantilevers+~2.5 mm proud so a cable seats. (W/2 − 4 is the audited, canonical value;+earlier W/2 − 3.2 shoved the anchor holes ~0.03 mm from the edge — too close.)+ ## Upstream feature requests  See `adom-tsci/TSCIRCUIT_FEATURE_REQUESTS.md §6` for:
page.json+4−3
@@ -3,7 +3,7 @@   "type": "app",   "slug": "adom-tsci",   "title": "Adom TSCI - Tscircuit Board Viewer",-  "brief": "Interactive tscircuit preview in a Hydrogen webview — first-class 3D / PCB / Schematic tabs, Components & Nets HUDs, an auto-glow x-ray view, Inspect, Measure, a Walkthrough Demo, and a one-click `exp",+  "brief": "Interactive tscircuit preview in a Hydrogen webview \u2014 first-class 3D / PCB / Schematic tabs, Components & Nets HUDs, an auto-glow x-ray view, Inspect, Measure, a Walkthrough Demo, and a one-click `exp",   "version": "1.4.21",   "tags": [     "tscircuit",@@ -42,7 +42,7 @@   "install": {     "binary_name": "adom-tsci"   },-  "readme": "# adom-tsci — Tscircuit Board Viewer\n\nAn Adom-Docker CLI that gives you **first-class 3D / PCB / Schematic\ntabs** for a tscircuit project inside a Hydrogen webview, plus the\ncanonical \"ship this molecule to the wiki\" flow.\n\n## What it does\n\n- **3D tab** — full Babylon-based viewer (orbit, zoom, ortho/perspective)\n  with the tscircuit GLB loaded, ground shadow, IBL environment.\n- **Components HUD** — every chip / passive / testpoint / machine pin\n  the GLB ships, grouped by kind. Click a row to hide that component\n  and see the traces underneath.\n- **Nets HUD** — every routed pcb_trace lifts off the baked surface\n  as a live polygon mesh on top of an x-ray-transparent substrate. The\n  `✦` button auto-selects the biggest power/ground net the moment you\n  open the panel — that's the gorgeous GlowLayer x-ray shot the\n  walkthrough demos.\n- **Walkthrough Demo** — narrated tour of the board with cinematic\n  camera flyovers. Drives by `walkthrough.json` you can hand-edit per\n  project. Auto-plays in static-export mode (wiki embed).\n- **Inspect / Measure** — Fusion 360-style smart picking. Hover any\n  pad/hole/chip/silkscreen/board for an info card; pin two clicks for\n  a measurement.\n- **Re-run autorouter** — one-click hot reload, regenerates traces\n  + GLB without restarting tsci dev.\n- **export-wiki** — bundle the running viewer + source + plan.md and\n  publish to the Adom Wiki as a molecule page.\n\n## Install\n\nAuto-discover-friendly, single command:\n\n```bash\ncurl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-tsci/adom-tsci -o /tmp/adom-tsci \\\n  && chmod +x /tmp/adom-tsci \\\n  && sudo install -m 0755 /tmp/adom-tsci /usr/local/bin/adom-tsci \\\n  && adom-tsci install\n```\n\n`adom-tsci install` deploys SKILL.md + the `adom-usbc`,\n`demo-recording`, and `export-wiki` guides to `~/.claude/skills/`.\n\n## Quick start\n\n```bash\n# Boot the preview against any tscircuit project (lib/index.tsx convention):\ncd ~/project/adom-tsci-projects/My-Board\nadom-tsci start . --port 8861 --tsci-port 3061 --texture-resolution 4096\n\n# Drive the running viewer programmatically:\nadom-tsci view top\nadom-tsci net --on            # x-ray view, auto-glow on biggest net\nadom-tsci walkthrough start   # narrated tour\nadom-tsci toggle-component U1 --hide   # see traces under the chip\n\n# Publish to the wiki as a molecule:\nadom-tsci export-wiki . \\\n  --slug my-board \\\n  --page-type molecules \\\n  --label \"Live 3D viewer\"\n```\n\n`export-wiki` bundles the static viewer + a tarball of the project\nsource (lib/, package.json, walkthrough.json, **plan.md**) + uploads\nthe plan.md standalone so a future agent picking up your molecule\nsees both the brief and the source in one place.\n\n## See also\n\n- `adom-tsci/guides/adom-usbc.md` — USB-C placement / rotation / lint\n- `adom-tsci/guides/demo-recording.md` — making a 30-second narrated\n  demo video of a board\n- `adom-tsci/guides/export-wiki.md` — the molecule publish flow\n  (hero image, plan.md, body completeness rules)\n",+  "readme": "# adom-tsci \u2014 Tscircuit Board Viewer\n\nAn Adom-Docker CLI that gives you **first-class 3D / PCB / Schematic\ntabs** for a tscircuit project inside a Hydrogen webview, plus the\ncanonical \"ship this molecule to the wiki\" flow.\n\n## What it does\n\n- **3D tab** \u2014 full Babylon-based viewer (orbit, zoom, ortho/perspective)\n  with the tscircuit GLB loaded, ground shadow, IBL environment.\n- **Components HUD** \u2014 every chip / passive / testpoint / machine pin\n  the GLB ships, grouped by kind. Click a row to hide that component\n  and see the traces underneath.\n- **Nets HUD** \u2014 every routed pcb_trace lifts off the baked surface\n  as a live polygon mesh on top of an x-ray-transparent substrate. The\n  `\u2726` button auto-selects the biggest power/ground net the moment you\n  open the panel \u2014 that's the gorgeous GlowLayer x-ray shot the\n  walkthrough demos.\n- **Walkthrough Demo** \u2014 narrated tour of the board with cinematic\n  camera flyovers. Drives by `walkthrough.json` you can hand-edit per\n  project. Auto-plays in static-export mode (wiki embed).\n- **Inspect / Measure** \u2014 Fusion 360-style smart picking. Hover any\n  pad/hole/chip/silkscreen/board for an info card; pin two clicks for\n  a measurement.\n- **Re-run autorouter** \u2014 one-click hot reload, regenerates traces\n  + GLB without restarting tsci dev.\n- **export-wiki** \u2014 bundle the running viewer + source + plan.md and\n  publish to the Adom Wiki as a molecule page.\n\n## Install\n\nAuto-discover-friendly, single command:\n\n```bash\ncurl -fsSL https://wiki-ufypy5dpx93o.adom.cloud/static/apps/adom-tsci/adom-tsci -o /tmp/adom-tsci \\\n  && chmod +x /tmp/adom-tsci \\\n  && sudo install -m 0755 /tmp/adom-tsci /usr/local/bin/adom-tsci \\\n  && adom-tsci install\n```\n\n`adom-tsci install` deploys SKILL.md + the `adom-usbc`,\n`demo-recording`, and `export-wiki` guides to `~/.claude/skills/`.\n\n## Quick start\n\n```bash\n# Boot the preview against any tscircuit project (lib/index.tsx convention):\ncd ~/project/adom-tsci-projects/My-Board\nadom-tsci start . --port 8861 --tsci-port 3061 --texture-resolution 4096\n\n# Drive the running viewer programmatically:\nadom-tsci view top\nadom-tsci net --on            # x-ray view, auto-glow on biggest net\nadom-tsci walkthrough start   # narrated tour\nadom-tsci toggle-component U1 --hide   # see traces under the chip\n\n# Publish to the wiki as a molecule:\nadom-tsci export-wiki . \\\n  --slug my-board \\\n  --page-type molecules \\\n  --label \"Live 3D viewer\"\n```\n\n`export-wiki` bundles the static viewer + a tarball of the project\nsource (lib/, package.json, walkthrough.json, **plan.md**) + uploads\nthe plan.md standalone so a future agent picking up your molecule\nsees both the brief and the source in one place.\n\n## See also\n\n- `adom-tsci/guides/adom-usbc.md` \u2014 USB-C placement / rotation / lint\n- `adom-tsci/guides/demo-recording.md` \u2014 making a 30-second narrated\n  demo video of a board\n- `adom-tsci/guides/export-wiki.md` \u2014 the molecule publish flow\n  (hero image, plan.md, body completeness rules)\n",   "author": {     "name": "Kyle Bergstedt",     "email": "[email protected]"@@ -57,7 +57,7 @@   "created_at": "2026-05-28T05:29:11.948Z",   "updated_at": "2026-05-28T05:29:11.948Z",   "skills": [],-  "description": "Interactive tscircuit board viewer in a Hydrogen webview — first-class 3D / PCB / Schematic tabs, an Inspect tool, a Fusion-style Measure tool, net x-ray, guided Walkthrough demos, one-click autorouter re-run, and auto high-res board-surface texture. Fully AI-drivable (CLI + HTTP + JS eval). Also publishes molecules/boards to the Adom Wiki.",+  "description": "Interactive tscircuit board viewer in a Hydrogen webview \u2014 first-class 3D / PCB / Schematic tabs, an Inspect tool, a Fusion-style Measure tool, net x-ray, guided Walkthrough demos, one-click autorouter re-run, and auto high-res board-surface texture. Fully AI-drivable (CLI + HTTP + JS eval). Also publishes molecules/boards to the Adom Wiki.",   "dependencies": {},   "scripts": {     "install": "./install.sh",@@ -70,6 +70,7 @@     "README.md",     "package.json",     "VERSION",+    "adom-tsci-billboard.png",     "guides/adom-usbc.md",     "guides/demo-recording.md",     "guides/export-wiki.md"