← All Pull Requests

Four contact-only levels of detail (high, medium, low, super-low) #1

Open opened by John Lauer
Merges lod-levels → master · view live diff →

Adds four levels of detail (high, medium, low, super-low) of the contact alone, so the robot-arm and scaffold simulators can draw hundreds of these at super-low and promote close ones to high.

Why a new source: the page's main model is a demo scene with a board square around the part, not the part (adom/machinecontactmedium#2). These levels come from the contact-only Fusion export, added at lod/source/MpinContact_Medium.glb. Nothing at the repo root changes, so the canonical -part model that the issue proposes can still replace both.

What changes:

  • lod/source/: the Fusion contact-only GLB that the levels are made from.
  • lod/MpinContact_Medium/: four GLBs, four cached 400×300 previews and an adom/component-lod@1 manifest.
  • README.md: a "Levels of detail" section with the numbers and the widget.

Frame: metres, Z along the contact axis at the part's own Fusion datum. The millimetre data sits under a root node scaled 0.001.

High Medium Low Super-low
Triangles 884 720 308 44
Draw calls 1 1 1 1

Checks run:

  • High matches the Fusion export within 1 µm.
  • No board, pad, silkscreen or solder geometry in any level.
  • No inverted triangles in any level.
  • The manifest passes the widget's own checks (hashes, sizes, previews).
  • I inspected every preview by eye.
  • Not yet tested: a streaming LOD viewer.

Widget block, already in the README:

::adom-component-lod{src="/adom/machinecontactmedium/render/lod/MpinContact_Medium/manifest.json"}

From the LOD pages thread for John's robot-arm simulator.

🤖 Generated with Claude Code

Diff Skip to comments

README.md+17
@@ -94,3 +94,20 @@ The hero applies only a 180-degree Z display rotation; no geometry is scaled. Us ## Footprint-aware inspection hero  The current hero adds separate nonphysical reference layers: teal dashed copper boundaries at 50% opacity, silkscreen at 30% opacity and actual symbol pin names (unique pad numbers when unnamed) at 50% opacity. Orbit underneath to compare physical terminals, copper and pin1 marks. Copper outlines are not soldermask/paste. Existing MPN, materials, animations and lights are preserved. These helpers are excluded from board-use STEP/GLB files. [Geometry, mapping and source hashes](machinecontactmedium-hero-footprint.overlay.json); [pin-map input](hero-pin-map.json). Physical body can occlude seating-plane artwork; inspect the underside or isolate it. Generated display-font contours are not native fab artwork.++## Levels of detail++Four levels of detail of the contact **alone**, for robot-arm, scaffold and probing simulators. A viewer loads super-low first and switches to more detail as you zoom in. They are made from the Fusion export in [`lod/source/`](lod/source/) (`MpinContact_Medium.glb`), not from the demo-scene GLB at the repo root ([#2](https://wiki.adom.inc/adom/machinecontactmedium/issues/2)).++- **Frame:** metres, Z along the contact axis at the Fusion datum. The millimetre data sits under one root node scaled 0.001.+- **High:** the Fusion geometry, unchanged (within 1 µm).+- **Medium and low:** simplified with meshoptimizer.+- **Super-low:** stacked 12-gon prisms that follow the contact's radius along its axis.+- **Status:** candidate. Each level has been checked as a cached image. None has been tested yet in a viewer that streams levels.++| | High | Medium | Low | Super-low |+|---|---|---|---|---|+| Triangles | 884 | 720 | 308 | 44 |+| Draw calls | 1 | 1 | 1 | 1 |++::adom-component-lod{src="/adom/machinecontactmedium/render/lod/MpinContact_Medium/manifest.json"}
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-high.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-high.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-low.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-low.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-medium.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-medium.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-super-low.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-super-low.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Medium/manifest.jsonadded+204
@@ -0,0 +1,204 @@+{+ "schema": "adom/component-lod@1",+ "mpn": "Machine Contact Medium (contact-only) MpinContact_Medium",+ "units": "metres",+ "upAxis": "Z",+ "frame": "MpinContact_Medium source frame, Z-up; source vertices under root node 'machinecontactmedium-MpinContact_Medium-lod-root' scaled 0.001",+ "sourceToLevelScale": 0.001,+ "status": "candidate",+ "source": {+  "path": "lod/source/MpinContact_Medium.glb",+  "sha256": "76bedc5f87af65c98a0fcacd9890d4bc44191d7772093a6c283cec6c0db7b458",+  "sizeBytes": 40668,+  "triangles": 884+ },+ "generator": "lod-tools/build.mjs (@gltf-transform 4, meshoptimizer); previews lod-tools/render.py",+ "levels": [+  {+   "level": "high",+   "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-high.glb",+   "sha256": "4bb5ac33f13b77d4ed99fa45655f35727cc17bc697031b6fdbf99dea2d836a00",+   "sizeBytes": 26988,+   "decodedBufferBytes": 25752,+   "triangles": 884,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.000435,+     -0.0004336,+     -0.00165+    ],+    "max": [+     0.000435,+     0.0004336,+     0+    ]+   },+   "boundsMm": [+    -0.435,+    -0.434,+    -1.65,+    0.435,+    0.434,+    0+   ],+   "markingIncluded": false,+   "helperNodes": [],+   "extensions": [],+   "derivation": "source mesh, primitives joined per material (flatten, join, weld, dedup); geometry unchanged",+   "review": "candidate: cached preview inspected; not qualified in a streaming LOD viewer",+   "preview": {+    "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-high.png",+    "sha256": "671a2471013ae63385557a07fb3ef1c16abda08d8f43e4d622f5c70a89eba3e7",+    "sizeBytes": 14490,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "4bb5ac33f13b77d4ed99fa45655f35727cc17bc697031b6fdbf99dea2d836a00"+   }+  },+  {+   "level": "medium",+   "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-medium.glb",+   "sha256": "30da69c8105809c48d209fec8b73675f841b9a82ecf1ff1bab1051776603540a",+   "sizeBytes": 19836,+   "decodedBufferBytes": 18600,+   "triangles": 720,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.000435,+     -0.0004336,+     -0.00165+    ],+    "max": [+     0.000435,+     0.0004336,+     0+    ]+   },+   "boundsMm": [+    -0.435,+    -0.434,+    -1.65,+    0.435,+    0.434,+    0+   ],+   "markingIncluded": false,+   "helperNodes": [],+   "extensions": [],+   "derivation": "meshopt simplify of high, ratio target 0.35, error 0.0008 of mesh extent",+   "review": "candidate: cached preview inspected; not qualified in a streaming LOD viewer",+   "preview": {+    "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-medium.png",+    "sha256": "130e8160d8643bf7f59e360aeb73acb4e2fe86a783987793ab598c33a20f9895",+    "sizeBytes": 14656,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "30da69c8105809c48d209fec8b73675f841b9a82ecf1ff1bab1051776603540a"+   }+  },+  {+   "level": "low",+   "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-low.glb",+   "sha256": "0947d2ed5e6fd0638e2d09dcc0ca784eafc330a9510b01a1b91cd0f9d1a5d35e",+   "sizeBytes": 10568,+   "decodedBufferBytes": 9336,+   "triangles": 308,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.000435,+     -0.0004321,+     -0.00165+    ],+    "max": [+     0.000435,+     0.0004333,+     0+    ]+   },+   "boundsMm": [+    -0.435,+    -0.432,+    -1.65,+    0.435,+    0.433,+    0+   ],+   "markingIncluded": false,+   "helperNodes": [],+   "extensions": [],+   "derivation": "meshopt simplify of high, ratio target 0.10, error 0.006 of mesh extent",+   "review": "candidate: cached preview inspected; not qualified in a streaming LOD viewer",+   "preview": {+    "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-low.png",+    "sha256": "9c5ee8da60a872dc259a61a9110c838f3991aab52e0ef80bc82fdc113efd0382",+    "sizeBytes": 15223,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "0947d2ed5e6fd0638e2d09dcc0ca784eafc330a9510b01a1b91cd0f9d1a5d35e"+   }+  },+  {+   "level": "super-low",+   "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-super-low.glb",+   "sha256": "b5246fb000c6feb0fab1deeabc2782fd5b2841590e5fa43d534f43ed70fe25e0",+   "sizeBytes": 4680,+   "decodedBufferBytes": 3504,+   "triangles": 44,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.000435,+     -0.000435,+     -0.00165+    ],+    "max": [+     0.000435,+     0.000435,+     0+    ]+   },+   "boundsMm": [+    -0.435,+    -0.435,+    -1.65,+    0.435,+    0.435,+    0+   ],+   "markingIncluded": false,+   "helperNodes": [],+   "extensions": [],+   "derivation": "lathe profile: stacked 12-gon prisms following the radius along Z, one primitive, top-surface colour (1 stacked 12-gon prisms)",+   "review": "candidate: cached preview inspected; not qualified in a streaming LOD viewer",+   "preview": {+    "path": "lod/MpinContact_Medium/machinecontactmedium-MpinContact_Medium-super-low.png",+    "sha256": "bcbec10e8547af4fdd484a36496615ef3410324cff5a30c31306182575e40f7c",+    "sizeBytes": 4874,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "b5246fb000c6feb0fab1deeabc2782fd5b2841590e5fa43d534f43ed70fe25e0"+   }+  }+ ],+ "hints": [+  "All levels share the source frame; place them exactly as the source GLB.",+  "Drop node 'machinecontactmedium-MpinContact_Medium-lod-root' (scale 0.001) to get the source units back.",+  "Super-low is one primitive: load it first, promote on screen size.",+  "Pin-only: the Fusion export MpinContact_Medium_v8.glb (lod/source/, Adom hub, Main / Machine Pins), not the page's demo-board GLB. Z is the pin axis at the part's own Fusion datum; millimetre source under root scale 0.001."+ ]+}\ No newline at end of file
lod/source/MpinContact_Medium.glbadded
⋯ 1 unchanged line ⋯

Comments

No comments yet.

Log in to comment.