← 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/machinecontactlarge#1). These levels come from the contact-only Fusion export, added at lod/source/MpinContact_Large.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_Large/: 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 1,196 898 374 88
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/machinecontactlarge/render/lod/MpinContact_Large/manifest.json"}

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

🤖 Generated with Claude Code

Diff Skip to comments

README.md+17
@@ -95,3 +95,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](machinecontactlarge-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_Large.glb`), not from the demo-scene GLB at the repo root ([#1](https://wiki.adom.inc/adom/machinecontactlarge/issues/1)).++- **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 | 1,196 | 898 | 374 | 88 |+| Draw calls | 1 | 1 | 1 | 1 |++::adom-component-lod{src="/adom/machinecontactlarge/render/lod/MpinContact_Large/manifest.json"}
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-high.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-high.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-low.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-low.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-medium.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-medium.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-super-low.glbadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-super-low.pngadded
⋯ 1 unchanged line ⋯
lod/MpinContact_Large/manifest.jsonadded+204
@@ -0,0 +1,204 @@+{+ "schema": "adom/component-lod@1",+ "mpn": "Machine Contact Large (contact-only) MpinContact_Large",+ "units": "metres",+ "upAxis": "Z",+ "frame": "MpinContact_Large source frame, Z-up; source vertices under root node 'machinecontactlarge-MpinContact_Large-lod-root' scaled 0.001",+ "sourceToLevelScale": 0.001,+ "status": "candidate",+ "source": {+  "path": "lod/source/MpinContact_Large.glb",+  "sha256": "d7c776d70e1991dca55ec1e6973e1d4b0c14d82e7b77f2ec44b188af92403b0d",+  "sizeBytes": 91740,+  "triangles": 1196+ },+ "generator": "lod-tools/build.mjs (@gltf-transform 4, meshoptimizer); previews lod-tools/render.py",+ "levels": [+  {+   "level": "high",+   "path": "lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-high.glb",+   "sha256": "1ccd3eccf08a580a00a907dc74400f3c4c81b04d7e38295d92bc8f2fae695e3f",+   "sizeBytes": 41404,+   "decodedBufferBytes": 40152,+   "triangles": 1196,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.001375,+     -0.001375,+     -0.00375+    ],+    "max": [+     0.001375,+     0.001375,+     0+    ]+   },+   "boundsMm": [+    -1.375,+    -1.375,+    -3.75,+    1.375,+    1.375,+    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_Large/machinecontactlarge-MpinContact_Large-high.png",+    "sha256": "168aa9bbfc5f1a36c74cc02c83a0d88ea3bb9e414886ba7b1ebb96452c89b335",+    "sizeBytes": 20822,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "1ccd3eccf08a580a00a907dc74400f3c4c81b04d7e38295d92bc8f2fae695e3f"+   }+  },+  {+   "level": "medium",+   "path": "lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-medium.glb",+   "sha256": "51e0d5ae735eec1c0e029cc79b6959f9cf65fe5b99fe1b427485ce965f78e9ac",+   "sizeBytes": 27616,+   "decodedBufferBytes": 26364,+   "triangles": 898,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.001375,+     -0.001375,+     -0.0037475+    ],+    "max": [+     0.001375,+     0.001375,+     0+    ]+   },+   "boundsMm": [+    -1.375,+    -1.375,+    -3.748,+    1.375,+    1.375,+    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_Large/machinecontactlarge-MpinContact_Large-medium.png",+    "sha256": "f3cd84a10504767be7e085a451692ab16a97f793d6bc2a393a977f077b18107d",+    "sizeBytes": 20976,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "51e0d5ae735eec1c0e029cc79b6959f9cf65fe5b99fe1b427485ce965f78e9ac"+   }+  },+  {+   "level": "low",+   "path": "lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-low.glb",+   "sha256": "b774e60805e535c1b0e24ff02ec900a0bfcf2213822be68b6bd3f7d8a6fb4689",+   "sizeBytes": 14820,+   "decodedBufferBytes": 13572,+   "triangles": 374,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.0013732,+     -0.001375,+     -0.0037475+    ],+    "max": [+     0.0013732,+     0.001375,+     0+    ]+   },+   "boundsMm": [+    -1.373,+    -1.375,+    -3.748,+    1.373,+    1.375,+    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_Large/machinecontactlarge-MpinContact_Large-low.png",+    "sha256": "239b2db729253da88a5ffcd66fe8110aa3e295906fa0abd11a1cc1a266661aca",+    "sizeBytes": 19969,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "b774e60805e535c1b0e24ff02ec900a0bfcf2213822be68b6bd3f7d8a6fb4689"+   }+  },+  {+   "level": "super-low",+   "path": "lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-super-low.glb",+   "sha256": "af07bce92de7665baf53f11ecd391e9ab7a291ee4ec65e6f0dbdfdbb92b589b1",+   "sizeBytes": 8188,+   "decodedBufferBytes": 7008,+   "triangles": 88,+   "primitives": 1,+   "drawCalls": 1,+   "materials": 1,+   "bounds": {+    "min": [+     -0.001375,+     -0.001375,+     -0.00375+    ],+    "max": [+     0.001375,+     0.001375,+     0+    ]+   },+   "boundsMm": [+    -1.375,+    -1.375,+    -3.75,+    1.375,+    1.375,+    0+   ],+   "markingIncluded": false,+   "helperNodes": [],+   "extensions": [],+   "derivation": "lathe profile: stacked 12-gon prisms following the radius along Z, one primitive, top-surface colour (2 stacked 12-gon prisms)",+   "review": "candidate: cached preview inspected; not qualified in a streaming LOD viewer",+   "preview": {+    "path": "lod/MpinContact_Large/machinecontactlarge-MpinContact_Large-super-low.png",+    "sha256": "8555a102b87b80bf5830f1ce7dbb87fca4dac3c765ef6fa6afe87427c2e17b14",+    "sizeBytes": 5877,+    "width": 400,+    "height": 300,+    "view": "iso front-left-up, framed on high (lod-tools/render.py)",+    "sourceLevelSha256": "af07bce92de7665baf53f11ecd391e9ab7a291ee4ec65e6f0dbdfdbb92b589b1"+   }+  }+ ],+ "hints": [+  "All levels share the source frame; place them exactly as the source GLB.",+  "Drop node 'machinecontactlarge-MpinContact_Large-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_Large_v4.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_Large.glbadded
⋯ 1 unchanged line ⋯

Comments

No comments yet.

Log in to comment.