forgecad 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/README.md +7 -6
  2. package/dist/assets/{AdminPage-CHY6ZN-p.js → AdminPage-B3L3W1Uo.js} +1 -1
  3. package/dist/assets/{BenchmarkPage-BcRT5iGN.js → BenchmarkPage-DXKVXMrJ.js} +2 -2
  4. package/dist/assets/{BlogPage-BssBbnb-.js → BlogPage-B7BWxOCg.js} +1 -1
  5. package/dist/assets/{DocsPage-DsvdiRNK.js → DocsPage-BPGGwht1.js} +28 -48
  6. package/dist/assets/{EditorApp-Bfd3jbtC.js → EditorApp-BWUGCdD5.js} +183 -21
  7. package/dist/assets/{EditorApp-BpjZgzk0.css → EditorApp-C5f24ZN9.css} +8 -0
  8. package/dist/assets/{EmbedViewer-D5t8WamV.js → EmbedViewer-DygByZS2.js} +2 -2
  9. package/dist/assets/{LandingPageProofDriven-DbN7o-Be.js → LandingPageProofDriven-BoVE7JGY.js} +54 -36
  10. package/dist/assets/{LegalPage-DNGrrY0p.js → LegalPage-Din8wv8d.js} +2 -2
  11. package/dist/assets/{PricingPage-Nczr3pRz.js → PricingPage-C2PMzmDc.js} +2 -2
  12. package/dist/assets/{SettingsPage-DZlyu4d4.js → SettingsPage-BlJDCRe8.js} +1 -1
  13. package/dist/assets/{app-C9ct2hRD.js → app-BsRYSfxY.js} +2264 -6259
  14. package/dist/assets/{backendInit-ymjonyQp.js → backendInit-6C0DLgH0.js} +8290 -2136
  15. package/dist/assets/cli/{render-B_0lQwKU.js → render-XXol_ET7.js} +822 -105
  16. package/dist/assets/{constructionHistoryWorker-CZ42Dksy.js → constructionHistoryWorker-cTHWRJEi.js} +699 -284
  17. package/dist/assets/{evalWorker-C2pm8LHP.js → evalWorker-BssDYW9u.js} +2559 -1330
  18. package/dist/assets/{forgecad_geometry-BlMtqluF.js → forgecad_geometry-CZ_IfuvA.js} +1 -9
  19. package/dist/assets/{forgecad_geometry_bg-BllP_WiL.wasm → forgecad_geometry_bg-C3rQHfwg.wasm} +0 -0
  20. package/dist/assets/{inspectWorker-D5T5VbfK.js → inspectWorker-ymhBV4Ll.js} +6254 -671
  21. package/dist/assets/{jointPose-4r8ed8_5.js → jointPose-B0blBj9A.js} +1 -1
  22. package/dist/assets/{landing-proof-driven-ORyigZ6p.css → landing-proof-driven-Cpf-MIbI.css} +73 -13
  23. package/dist/assets/{manifold-5PP1eGLN.js → manifold-B_7QXpGB.js} +1 -1
  24. package/dist/assets/{manifold-DjBkyIc8.js → manifold-CNShmpEJ.js} +1 -1
  25. package/dist/assets/{manifold-C4r6B-XY.js → manifold-CYlIm-M6.js} +2 -2
  26. package/dist/assets/{reportWorker-CwenM7wB.js → reportWorker-Cb5eyM7D.js} +2485 -1275
  27. package/dist/cli/render.html +1 -1
  28. package/dist/docs/index.html +2 -2
  29. package/dist/docs-raw/AI/usage.md +17 -17
  30. package/dist/docs-raw/CLI.md +9 -7
  31. package/dist/docs-raw/README.md +1 -1
  32. package/dist/docs-raw/component-model.md +2 -2
  33. package/dist/docs-raw/generated/assembly.md +1 -1
  34. package/dist/docs-raw/generated/concepts.md +10 -4
  35. package/dist/docs-raw/generated/core.md +96 -1
  36. package/dist/docs-raw/generated/curves.md +8 -1
  37. package/dist/docs-raw/generated/output.md +0 -64
  38. package/dist/docs-raw/generated/runtime-names.md +6 -6
  39. package/dist/docs-raw/generated/viewport.md +3 -12
  40. package/dist/docs-raw/guides/inspection-bundles.md +1 -1
  41. package/dist/docs-raw/simulation-workflow.md +58 -0
  42. package/{dist-skill/website/skills/forgecad-make-a-model.md → dist/docs-raw/skills/forgecad-build-model.md} +18 -8
  43. package/dist/docs-raw/skills/forgecad-design-spec.md +145 -0
  44. package/dist/docs-raw/skills/{forgecad-model-grader.md → forgecad-grade-model.md} +8 -6
  45. package/{dist-skill/website/skills/forgecad-visual-spec.md → dist/docs-raw/skills/forgecad-image-prompt.md} +7 -7
  46. package/dist/docs-raw/skills/{forgecad-render-inspect.md → forgecad-inspect-model.md} +6 -6
  47. package/{dist-skill/website/skills/forgecad-project.md → dist/docs-raw/skills/forgecad-project-sync.md} +5 -5
  48. package/{dist-skill/website/skills/forgecad-3d-reconstruction.md → dist/docs-raw/skills/forgecad-reconstruct-cad-file.md} +7 -7
  49. package/dist/docs-raw/skills/{forgecad-image-replicator.md → forgecad-reconstruct-from-images.md} +12 -12
  50. package/dist/docs-raw/skills/forgecad-verify-mujoco.md +78 -0
  51. package/dist/docs-raw/skills/forgecad.md +24 -24
  52. package/dist/docs-raw/skills/index.md +9 -13
  53. package/dist/index.html +9 -9
  54. package/dist/llms.txt +7 -7
  55. package/dist/sitemap.xml +16 -16
  56. package/dist-cli/{check-compiler-SP7FAL7R.js → check-compiler-4RPB6SB5.js} +1 -1
  57. package/dist-cli/{check-query-propagation-BRLSHP22.js → check-query-propagation-KN3DFQTX.js} +1 -1
  58. package/dist-cli/{chunk-RQQ42YCP.js → chunk-UHBRMYA6.js} +30770 -29253
  59. package/dist-cli/forgecad.js +3277 -237
  60. package/dist-cli/{forgecad_geometry-7TVSNVUB.js → forgecad_geometry-2IMYCUWW.js} +0 -8
  61. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  62. package/dist-skill/CONTEXT.md +111 -73
  63. package/dist-skill/SKILL.md +1 -1
  64. package/dist-skill/docs/CLI.md +9 -7
  65. package/dist-skill/docs/generated/assembly.md +1 -1
  66. package/dist-skill/docs/generated/core.md +96 -1
  67. package/dist-skill/docs/generated/curves.md +8 -1
  68. package/dist-skill/docs/generated/output.md +0 -64
  69. package/dist-skill/docs/generated/runtime-names.md +6 -6
  70. package/dist-skill/docs/generated/viewport.md +3 -12
  71. package/dist-skill/docs/guides/inspection-bundles.md +1 -1
  72. package/dist-skill/library/README.md +9 -13
  73. package/dist-skill/library/{forgecad-make-a-model → forgecad-build-model}/SKILL.md +16 -6
  74. package/dist-skill/library/forgecad-design-spec/SKILL.md +132 -0
  75. package/dist-skill/library/{forgecad-prepare-prompt → forgecad-design-spec}/references/master-prompt.md +1 -1
  76. package/dist-skill/library/{forgecad-model-grader → forgecad-grade-model}/SKILL.md +6 -4
  77. package/dist-skill/library/forgecad-grade-model/agents/openai.yaml +4 -0
  78. package/dist-skill/library/{forgecad-visual-spec → forgecad-image-prompt}/SKILL.md +5 -5
  79. package/dist-skill/library/forgecad-image-prompt/agents/openai.yaml +4 -0
  80. package/dist-skill/library/{forgecad-render-inspect → forgecad-inspect-model}/SKILL.md +4 -4
  81. package/dist-skill/library/{forgecad-project → forgecad-project-sync}/SKILL.md +3 -3
  82. package/dist-skill/library/{forgecad-3d-reconstruction → forgecad-reconstruct-cad-file}/SKILL.md +5 -5
  83. package/dist-skill/library/forgecad-reconstruct-cad-file/agents/openai.yaml +4 -0
  84. package/dist-skill/library/{forgecad-image-replicator → forgecad-reconstruct-from-images}/SKILL.md +10 -10
  85. package/dist-skill/library/forgecad-reconstruct-from-images/agents/openai.yaml +4 -0
  86. package/dist-skill/library/forgecad-verify-mujoco/SKILL.md +66 -0
  87. package/dist-skill/library/forgecad-verify-mujoco/scripts/mujoco_verify.py +385 -0
  88. package/{dist/docs-raw/skills/forgecad-make-a-model.md → dist-skill/website/skills/forgecad-build-model.md} +18 -8
  89. package/dist-skill/website/skills/forgecad-design-spec.md +145 -0
  90. package/dist-skill/website/skills/{forgecad-model-grader.md → forgecad-grade-model.md} +8 -6
  91. package/{dist/docs-raw/skills/forgecad-visual-spec.md → dist-skill/website/skills/forgecad-image-prompt.md} +7 -7
  92. package/dist-skill/website/skills/{forgecad-render-inspect.md → forgecad-inspect-model.md} +6 -6
  93. package/{dist/docs-raw/skills/forgecad-project.md → dist-skill/website/skills/forgecad-project-sync.md} +5 -5
  94. package/{dist/docs-raw/skills/forgecad-3d-reconstruction.md → dist-skill/website/skills/forgecad-reconstruct-cad-file.md} +7 -7
  95. package/dist-skill/website/skills/{forgecad-image-replicator.md → forgecad-reconstruct-from-images.md} +12 -12
  96. package/dist-skill/website/skills/forgecad-verify-mujoco.md +78 -0
  97. package/dist-skill/website/skills/forgecad.md +24 -24
  98. package/dist-skill/website/skills/index.md +9 -13
  99. package/examples/analysis/clearance-fit.forge.js +31 -0
  100. package/examples/analysis/lever-arm-actuator.forge.js +43 -0
  101. package/examples/analysis/tipping-tripod.forge.js +35 -0
  102. package/examples/api/texture-projection.forge.js +75 -0
  103. package/examples/assets/uv-grid.png +0 -0
  104. package/examples/products/sportscar.forge.js +77 -0
  105. package/package.json +1 -3
  106. package/dist/docs-raw/skills/forgecad-blockout-model.md +0 -49
  107. package/dist/docs-raw/skills/forgecad-component-model.md +0 -53
  108. package/dist/docs-raw/skills/forgecad-high-level-spec.md +0 -101
  109. package/dist/docs-raw/skills/forgecad-lld.md +0 -41
  110. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +0 -63
  111. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +0 -60
  112. package/dist-skill/library/forgecad-3d-reconstruction/agents/openai.yaml +0 -4
  113. package/dist-skill/library/forgecad-blockout-model/SKILL.md +0 -42
  114. package/dist-skill/library/forgecad-component-model/SKILL.md +0 -46
  115. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +0 -94
  116. package/dist-skill/library/forgecad-image-replicator/agents/openai.yaml +0 -4
  117. package/dist-skill/library/forgecad-lld/SKILL.md +0 -34
  118. package/dist-skill/library/forgecad-model-grader/agents/openai.yaml +0 -4
  119. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +0 -50
  120. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +0 -48
  121. package/dist-skill/library/forgecad-reconstruction-benchmark/agents/openai.yaml +0 -4
  122. package/dist-skill/library/forgecad-visual-spec/agents/openai.yaml +0 -4
  123. package/dist-skill/website/skills/forgecad-blockout-model.md +0 -49
  124. package/dist-skill/website/skills/forgecad-component-model.md +0 -53
  125. package/dist-skill/website/skills/forgecad-high-level-spec.md +0 -101
  126. package/dist-skill/website/skills/forgecad-lld.md +0 -41
  127. package/dist-skill/website/skills/forgecad-prepare-prompt.md +0 -63
  128. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +0 -60
  129. /package/dist/assets/{landing-proof-driven-DiGqdtWa.js → landing-proof-driven-BxZZh5r5.js} +0 -0
  130. /package/dist-skill/library/{forgecad-prepare-prompt → forgecad-design-spec}/references/default-profiles.md +0 -0
  131. /package/dist-skill/library/{forgecad-render-inspect → forgecad-inspect-model}/summarize_manifest.py +0 -0
  132. /package/dist-skill/library/{forgecad-image-replicator → forgecad-reconstruct-from-images}/scripts/compare_images.py +0 -0
@@ -1,25 +1,25 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-visual-spec/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-image-prompt/SKILL.md instead. -->
2
2
 
3
- # forgecad-visual-spec
3
+ # forgecad-image-prompt
4
4
 
5
- Turn a concrete ForgeCAD artifact, build brief, HLD, or existing model into builder-honest image prompts for AI image models. Use when the user wants visual-spec renders that show the final product while keeping mechanisms, seams, hardware, and build cues visible instead of drifting into concept art.
5
+ Write builder-honest AI image prompts from a concrete ForgeCAD model, build brief, HLD, or LLD without hiding how the artifact is built.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-visual-spec/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-image-prompt/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Visual Spec
14
+ ## Image Prompt
15
15
 
16
16
  ### Scope
17
17
 
18
- Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD); route vague briefs to `forgecad-prepare-prompt` first. Read minimum context — entry `.forge.js`, one key helper if it delegates geometry, brief/HLD — and capture what must survive the image model: artifact type and scale, major subassemblies, actuation style, visible mechanisms, material and color cues.
18
+ Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD); route vague briefs to `forgecad-design-spec` first. Read minimum context — entry `.forge.js`, one key helper if it delegates geometry, brief/HLD — and capture what must survive the image model: artifact type and scale, major subassemblies, actuation style, visible mechanisms, material and color cues.
19
19
 
20
20
  ### Core Rule
21
21
 
22
- Visual-spec prompts, not concept art: show the final artifact clearly, preserve build and subsystem truth, and keep visible the seams, modules, hardware, and mechanical hierarchy that matter.
22
+ Image prompts, not concept art: show the final artifact clearly, preserve build and subsystem truth, and keep visible the seams, modules, hardware, and mechanical hierarchy that matter.
23
23
 
24
24
  Negatives (the only negatives list — reuse it, never restate variants):
25
25
 
@@ -1,21 +1,21 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-render-inspect/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-inspect-model/SKILL.md instead. -->
2
2
 
3
- # forgecad-render-inspect
3
+ # forgecad-inspect-model
4
4
 
5
- Run and interpret ForgeCAD inspection bundles for model verification. Use when asked to inspect a ForgeCAD model, analyze an inspection bundle, validate collisions, wall thickness, connectivity, floating bodies, sections, masks, depth, normals, or Zebra stripes.
5
+ Select, run, and interpret ForgeCAD inspection evidence for collisions, sections, wall thickness, components, masks, depth, normals, surface continuity, and fit.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-render-inspect/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-inspect-model/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Render Inspect
14
+ ## Inspect Model
15
15
 
16
16
  Use `forgecad inspect ...` when a shaded render is too ambiguous and you need structured evidence: a bundle directory with evidence PNGs plus a root `manifest.json` (or, for `inspect section`, a probe directory with `result.json`, `section.svg`, `section.png`). Inspection is not a substitute artifact: look inside with sections, masks, `--focus`/`--hide`, and transparency — never edit the model into a cutaway or exploded default to make inspecting easier. Output dirs: let `inspect` allocate its timestamped directory by default (repeated probes never collide); use `/tmp/<model>-inspect` for throwaway bundles, a project directory only for persistent artifacts.
17
17
 
18
- Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-make-a-model`.
18
+ Routing: authoring/API questions → `forgecad` skill; creating a new model → `forgecad-build-model`.
19
19
 
20
20
  ### Workflow
21
21
 
@@ -1,17 +1,17 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-project/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-project-sync/SKILL.md instead. -->
2
2
 
3
- # forgecad-project
3
+ # forgecad-project-sync
4
4
 
5
- ForgeCAD project CLI workflow creating, managing, syncing projects and files on forgecad.io. Covers init, push, pull, file operations, member management, publishing, and sharing.
5
+ Manage hosted ForgeCAD project sync from the CLI: init, clone, pull, push, file operations, members, publishing, and shares.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-project/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-project-sync/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Project Operating Rules
14
+ ## Project Sync
15
15
 
16
16
  forgecad.io is the hosted ForgeCAD platform; a project is a local folder linked to the server by `forgecad.json`. The full command inventory (project, file, member, share, token commands and flags) lives in `forgecad project --help` and the forgecad skill's `docs/CLI.md` — do not relearn it here.
17
17
 
@@ -1,21 +1,21 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-3d-reconstruction/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-reconstruct-cad-file/SKILL.md instead. -->
2
2
 
3
- # forgecad-3d-reconstruction
3
+ # forgecad-reconstruct-cad-file
4
4
 
5
- Reconstruct a parametric ForgeCAD model from an existing 3D CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP; inspect the source asset directly, author real ForgeCAD geometry, and iteratively compare the candidate with `forgecad compare 3d`.
5
+ Reconstruct a readable parametric ForgeCAD model from an existing CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-3d-reconstruction/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-reconstruct-cad-file/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD 3D Reconstruction
14
+ ## Reconstruct CAD File
15
15
 
16
16
  The reference asset is evidence, not the deliverable. The deliverable is a readable, parametric `.forge.js` model that runs, renders, and scores well against the source. Never return `Import.mesh()`/`Import.step()` of the source as the final model unless the user explicitly asks for an import wrapper — imports are for measurement, rendering, and scoring only.
17
17
 
18
- Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-make-a-model` (Imported Parts section), not this skill; benchmark/RL episodes → `forgecad-reconstruction-benchmark`; inspection-bundle interpretation → `forgecad-render-inspect`; independent grading after reconstruction → `forgecad-model-grader`; API and command reference → `forgecad` skill + CLI.md.
18
+ Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-build-model` (Imported Parts section), not this skill; prepared benchmark/RL episodes → use the task-local benchmark instructions, not the public skill library; inspection-bundle interpretation → `forgecad-inspect-model`; independent grading after reconstruction → `forgecad-grade-model`; API and command reference → `forgecad` skill + CLI.md.
19
19
 
20
20
  ### Workflow
21
21
 
@@ -50,7 +50,7 @@ Faceted sources: decide whether tessellation itself is evidence. Matching low-po
50
50
 
51
51
  ### Done Criteria
52
52
 
53
- The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects (`forgecad-render-inspect`) when the object is multi-part, hollow, thin-walled, or surface-sensitive. Report: source and candidate paths, score JSON path, final metrics, and every known mismatch classified as intentional simplification or remaining work.
53
+ The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects (`forgecad-inspect-model`) when the object is multi-part, hollow, thin-walled, or surface-sensitive. Report: source and candidate paths, score JSON path, final metrics, and every known mismatch classified as intentional simplification or remaining work.
54
54
 
55
55
 
56
56
  ## Bundled Files
@@ -1,26 +1,26 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-image-replicator/SKILL.md instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-reconstruct-from-images/SKILL.md instead. -->
2
2
 
3
- # forgecad-image-replicator
3
+ # forgecad-reconstruct-from-images
4
4
 
5
- Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views.
5
+ Reconstruct a real parametric ForgeCAD object from reference images by using images as evidence, not as a one-view facade.
6
6
 
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | `agent-skill-library/forgecad-image-replicator/SKILL.md` |
10
+ | Source | `agent-skill-library/forgecad-reconstruct-from-images/SKILL.md` |
11
11
 
12
12
  ---
13
13
 
14
- ## ForgeCAD Image Replicator
14
+ ## Reconstruct From Images
15
15
 
16
16
  The reference image is evidence, not the deliverable. The deliverable is a real parametric object that holds up from front, back, side, top, bottom, and reference camera views — a model that matches one image but falls apart from other angles has failed, even if the comparison board looks close. Cutaway, sectioned, exploded, or transparent references are evidence about the complete object: build the closed artifact and recreate explanatory views with viewer/inspection tools (the main `forgecad` skill's closed-artifact rule applies).
17
17
 
18
18
  ### Companion Skills
19
19
 
20
20
  - `forgecad` — API docs, model authoring, renderer behavior.
21
- - `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
22
- - `forgecad-make-a-model` — file placement, project structure, decomposition, definition of done.
23
- - `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
21
+ - `forgecad-design-spec` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
22
+ - `forgecad-build-model` — file placement, project structure, decomposition, definition of done.
23
+ - `forgecad-inspect-model` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
24
24
 
25
25
  ### Core Rule
26
26
 
@@ -30,19 +30,19 @@ Infer the real object before matching any camera — identity, manufacture, scal
30
30
 
31
31
  1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
32
32
  2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
33
- 3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-prepare-prompt` when these are underdetermined.
34
- 4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-make-a-model` for project structure.
33
+ 3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-design-spec` when these are underdetermined.
34
+ 4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-build-model` for project structure.
35
35
  5. Calibrate one camera per usable reference, only after the blockout makes sense from canonical views. Use the object center as `target`; estimate azimuth/elevation/distance/FOV from visible faces and perspective cues; use orthographic when parallel edges stay parallel with no perspective convergence.
36
36
  6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
37
37
  7. Iterate one class of change at a time, in order: object hypothesis → major proportions → canonical geometry → camera → details → presentation. If improving one reference view makes another view or a canonical render worse, the object hypothesis is wrong — fix the model, not the camera illusion.
38
38
  8. Use every image as a constraint. Never pick one target image and ignore the rest: assign each image a camera, evidence list, and confidence; optimize one shared geometry against the whole set; state how distorted or decorative images were weighted.
39
- 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
39
+ 9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-inspect-model`.
40
40
 
41
41
  ### Comparison Boards
42
42
 
43
43
  Render with exact `--camera` specs (see the forgecad CLI doc for supported forms). If exact full camera specs do not render, fix the renderer before continuing — never substitute guesses from default `iso` renders.
44
44
 
45
- Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-image-replicator` skill directory:
45
+ Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-reconstruct-from-images` skill directory:
46
46
 
47
47
  ```bash
48
48
  uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
@@ -0,0 +1,78 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-verify-mujoco/SKILL.md instead. -->
2
+
3
+ # forgecad-verify-mujoco
4
+
5
+ Verify a ForgeCAD MJCF export in MuJoCo with dynamics, contacts, controls, joint travel, and rendered evidence before calling it simulation-ready.
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | Installed by | `forgecad skill install` |
10
+ | Source | `agent-skill-library/forgecad-verify-mujoco/SKILL.md` |
11
+
12
+ ---
13
+
14
+ ## Verify MuJoCo
15
+
16
+ Use this when `forgecad export mjcf ...` is part of the deliverable. A model is not sim-ready just because `forgecad check simready` passes or the MJCF file loads: it must be loaded in MuJoCo, stepped under gravity, driven with the intended controls, contact pairs inspected, and rendered from useful views.
17
+
18
+ Routing: geometry-only visual inspection -> `forgecad-inspect-model`; model authoring/API questions -> `forgecad`; building a new model -> `forgecad-build-model`.
19
+
20
+ ### Definition Of Done
21
+
22
+ 1. **Export from the exact source file.**
23
+ ```bash
24
+ rm -rf /tmp/forgecad-mjcf && mkdir -p /tmp/forgecad-mjcf
25
+ forgecad export mjcf path/to/model.forge.js --output /tmp/forgecad-mjcf
26
+ ```
27
+ 2. **Load the generated scene in MuJoCo.** Use `scene.xml`, not only the model XML, so the floor/camera/package context is included.
28
+ 3. **Check the root behavior.** If the model has a free root, it needs real support/contact geometry or an explicit fixed-root export path. Do not hide a floor failure by turning the whole shell into a giant bounding box that blocks moving internals.
29
+ 4. **Check initial poses numerically.** For mechanisms, compute the expected body/link axes from the design source and compare them to MuJoCo `xmat`/`xpos`. Joint `ref`/default and connector frames can disagree with visual intuition.
30
+ 5. **Keep meaningful collisions.** Do not mark moving functional parts `Sim.collider.none(...)` just to make motion pass. If full visual mesh contact is unstable, use a physically defensible simplified collider or proxy and state what physical surface it represents.
31
+ 6. **Run the intended control with numeric acceptance criteria.** Define the expected signed post-settle joint travel before running the test: e.g. "this drive should rotate the drum -0.04 to -0.06 cycles, then stop near zero velocity" or "this wheel should move at least +1 cycle and keep spinning". Use cycles for revolute/indexing mechanisms when that is easier to reason about, and radians for direct MuJoCo qpos checks. A controller that only jitters, moves the wrong direction, overshoots through a stop, or eventually jams after skipping the intended state is a failure even when the process exits 0.
32
+ 7. **Inspect contact pairs.** Contact names should match the physical story: floor/support, card/card, wheel/ground, stop/follower, etc. Contacts against a filled-in AABB, hidden fixture, or unrelated side plate usually indicate bad collider selection.
33
+ 8. **Render evidence.** Save initial, settled, and driven frames from views that actually show the moving parts. If the model orientation is not obvious, generate a labeled camera preview grid first, inspect it, then rerun with the azimuth/elevation that shows the functional face. Do not report GIFs/frames before visually confirming they are not from the back, underside, or an occluded side.
34
+
35
+ ### Helper Script
36
+
37
+ This skill ships a MuJoCo smoke verifier:
38
+
39
+ ```bash
40
+ uv run --python 3.11 --with mujoco --with pillow \
41
+ python <this-skill-dir>/scripts/mujoco_verify.py /tmp/forgecad-mjcf \
42
+ --settle-seconds 2 \
43
+ --seconds 8 \
44
+ --actuator drum_velocity=-0.75 \
45
+ --watch-joint drum_joint \
46
+ --expect-drive-cycles drum_joint=-0.06:-0.03 \
47
+ --expect-final-qvel drum_joint=-0.02:0.02 \
48
+ --render-dir /tmp/forgecad-mjcf/verify \
49
+ --camera-preview-grid
50
+ ```
51
+
52
+ Use `--actuator name=value` more than once for multi-actuator models. Use `--expect-drive-cycles joint=min:max` to assert signed final-minus-settled revolute travel in cycles/turns. Use `--expect-drive-delta joint=min:max` when you want raw MuJoCo qpos units instead. Use `--expect-final-qvel joint=min:max` to assert terminal velocity when the mechanism should stop or continue at a bounded speed. The script prints JSON with root drift, initial-to-final joint delta, post-settle drive delta, derived cycle counts, final velocities, expectation ranges, and top contact pairs, then writes PNG frames if `--render-dir` is supplied.
53
+
54
+ Prefer explicit travel envelopes over loose "it moved" checks:
55
+
56
+ - Stops/latches: assert a signed drive cycle or delta range and a near-zero final velocity range.
57
+ - Continuous drives: assert the signed drive cycle/delta is large enough over the run and final velocity remains in the expected direction/range.
58
+ - Indexing mechanisms: assert the expected cycle step size, not just eventual stall. If the mechanism reaches a stop only after skipping several indices, treat that as failure.
59
+ - Gravity-settling mechanisms: evaluate functional travel with post-settle drive delta, not initial-to-final delta.
60
+
61
+ When rendered orientation matters, start with `--camera-preview-grid`, open `camera_preview_grid.png`, pick the azimuth that shows the mechanism face or contact interface, then rerun with `--camera-azimuth <deg>` and any needed `--camera-lookat`, `--camera-distance`, or `--camera-elevation` adjustment. For mechanism evidence, prefer front/front-quarter views for user-facing GIFs and add a side/contact view only when it explains a collision better.
62
+
63
+ ### Contact Debugging Rules
64
+
65
+ - In MuJoCo UI, enable contact visualization with `Rendering` -> `Contact points` and `Contact forces`; use the right-side perturb/visualization panels if available in your build.
66
+ - If rotation is blocked, list contacts during the stall and sort by repeated pairs. The blocker is usually the pair that appears every step while the driven joint velocity trends to zero.
67
+ - If a body falls through the floor, inspect the exported geoms. Visual geoms have `contype="0" conaffinity="0"` and cannot support anything; collision geoms are usually group 3.
68
+ - Bounding boxes are fast but dangerous for hollow frames, windows, handles, and side plates. They collide as the filled AABB, not the visible object.
69
+ - Mesh collision on complex moving parts can be too exact or solver-hostile. Prefer simple physical proxies for contact-critical moving bodies, such as a slab for a flap card or cylinders for rolling contact, but keep them colliding.
70
+
71
+ ### Reporting
72
+
73
+ Report the exact export command, the MuJoCo command/script, key numeric results, the most important contact pairs, and the rendered image paths. Say what was not verified. Never say "sim-ready" when only `forgecad run`, `forgecad check simready`, or a successful export was executed.
74
+
75
+
76
+ ## Bundled Files
77
+
78
+ - `scripts/mujoco_verify.py`
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit docs/permanent/ instead. -->
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit docs/skill/ instead. -->
2
2
 
3
3
  # forgecad
4
4
 
@@ -7,7 +7,7 @@ ForgeCAD model authoring, editing, debugging, and execution guidance for .forge.
7
7
  | Field | Value |
8
8
  | --- | --- |
9
9
  | Installed by | `forgecad skill install` |
10
- | Source | Generated from `docs/permanent/` by `scripts/build-forgecad-skill.mjs` |
10
+ | Source | Generated from `docs/skill/` by `scripts/build-forgecad-skill.mjs` |
11
11
 
12
12
  ---
13
13
 
@@ -18,9 +18,9 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
18
18
  ### Workflow
19
19
 
20
20
  1. Identify the artifact: `.forge.js`, SVG asset, or CLI/export task.
21
- 2. **If the model has any moving parts, load the `assembly` group and `docs/permanent/guides/joint-design.md` upfront** — do not defer the kinematic structure to a refactor pass.
21
+ 2. **If the model has any moving parts, load the `assembly` group and `docs/skill/guides/joint-design.md` upfront** — do not defer the kinematic structure to a refactor pass.
22
22
  3. Load only the docs the task needs (see Source Map below). Start from the top group, add others as needed, and prefer these docs and recipes over ad-hoc repo examples.
23
- 4. If any two parts are intended to touch or mate in the final model, load `docs/permanent/guides/positioning.md` immediately and default to connectors + `matchTo()`.
23
+ 4. If any two parts are intended to touch or mate in the final model, load `docs/skill/guides/positioning.md` immediately and default to connectors + `matchTo()`.
24
24
  5. Default to a concrete first pass — easy iteration beats speculative design review.
25
25
  6. If an existing model is broken, replace the weak structure rather than preserving bad architecture.
26
26
  7. Validate with `forgecad run <file>` (add `--debug-imports` for import chain issues; pass `--backend manifold|occt|truck` when the backend matters).
@@ -46,77 +46,77 @@ Load groups top-to-bottom, stopping when you have what the task needs.
46
46
 
47
47
  Execution model, colors, coordinate system, primitives, booleans, patterns, imports, parameters, topology, edge queries.
48
48
 
49
- - `docs/permanent/API/core/concepts.md`
50
- - `docs/permanent/generated/runtime-names.md`
51
- - `docs/permanent/generated/core.md`
49
+ - `docs/skill/API/core/concepts.md`
50
+ - `docs/skill/generated/runtime-names.md`
51
+ - `docs/skill/generated/core.md`
52
52
 
53
53
  #### 2. Static Assembly and Positioning (for any multi-part model)
54
54
 
55
55
  Axis conventions, winding rules, and placement strategy. If parts should touch in the final model, read this group before writing placement code. Connectors + `matchTo()` are the default for mating interfaces; raw `translate()` and `rotate()` are for free offsets, not assembly contracts.
56
56
 
57
- - `docs/permanent/guides/coordinate-system.md`
58
- - `docs/permanent/guides/positioning.md`
57
+ - `docs/skill/guides/coordinate-system.md`
58
+ - `docs/skill/guides/positioning.md`
59
59
 
60
60
  #### 3. Sketch APIs
61
61
 
62
62
  2D construction, transforms, booleans, paths, on-face sketching, extrusion, anchors, text, regions.
63
63
 
64
- - `docs/permanent/generated/sketch.md`
64
+ - `docs/skill/generated/sketch.md`
65
65
 
66
66
  #### 4. Curves and Surfacing (for lofts, sweeps, splines)
67
67
 
68
68
  Smooth curves, Hermite splines, lofted and swept solids. For straps, inlays, guards, brace members, vents, or physical bands that live on a carrier surface, use `Carrier` + `SurfaceBody` surface-member primitives before reaching for `variableSweep`, SDF sculpting, or manual boolean overlap recipes.
69
69
 
70
- - `docs/permanent/guides/surface-members.md`
71
- - `docs/permanent/generated/curves.md`
70
+ - `docs/skill/guides/surface-members.md`
71
+ - `docs/skill/generated/curves.md`
72
72
 
73
73
  #### 5. Assemblies and Mechanisms (for joints or kinematics)
74
74
 
75
- Assembly graph, joint types, couplings, validation, robot export.
75
+ Assembly graph, joint types, couplings, validation, and simulation export.
76
76
 
77
- - `docs/permanent/generated/assembly.md`
77
+ - `docs/skill/generated/assembly.md`
78
78
 
79
79
  #### 6. Sheet Metal (for bent parts, K-factor, flat patterns)
80
80
 
81
81
  Bend operations, flat pattern unfolding, K-factor configuration.
82
82
 
83
- - `docs/permanent/generated/sheet-metal.md`
83
+ - `docs/skill/generated/sheet-metal.md`
84
84
 
85
85
  #### 7. Output and Export (for STL/3MF/STEP, BOM, dimensions)
86
86
 
87
87
  Mesh export, exact geometry export, bill of materials, dimension annotations.
88
88
 
89
- - `docs/permanent/generated/output.md`
89
+ - `docs/skill/generated/output.md`
90
90
 
91
91
  #### 8. Toolbox (fasteners and standard parts)
92
92
 
93
93
  Parametric bolts, nuts, washers, standard hardware, gears, pipes, and structural profiles.
94
94
 
95
- - `docs/permanent/generated/lib.md`
96
- - `docs/permanent/generated/wood.md`
95
+ - `docs/skill/generated/lib.md`
96
+ - `docs/skill/generated/wood.md`
97
97
 
98
98
  #### 9. Runtime Viewport APIs (for cut planes, exploded views, hiding, and animation playback)
99
99
 
100
100
  Viewer-only APIs such as cutPlane, explodeView, render labels, comparison references, and runtime display behavior.
101
101
 
102
- - `docs/permanent/generated/viewport.md`
102
+ - `docs/skill/generated/viewport.md`
103
103
 
104
104
  #### 10. Recipes and Debugging (for patterns and troubleshooting)
105
105
 
106
106
  Modeling patterns, debugging tactics, copyable snippets.
107
107
 
108
- - `docs/permanent/guides/scene-presentation.md`
109
- - `docs/permanent/guides/joint-design.md`
108
+ - `docs/skill/guides/scene-presentation.md`
109
+ - `docs/skill/guides/joint-design.md`
110
110
 
111
111
  #### 11. CLI (for validation/render/export tasks)
112
112
 
113
113
  Test-run, export pipelines, debug flags.
114
114
 
115
- - `docs/permanent/CLI.md`
116
- - `docs/permanent/guides/inspection-bundles.md`
115
+ - `docs/skill/CLI.md`
116
+ - `docs/skill/guides/inspection-bundles.md`
117
117
 
118
118
  #### SDF Modeling (smooth booleans, TPMS, deformations, fromFunction)
119
119
 
120
120
  Primitives, smooth booleans, TPMS lattices, twist/bend/displace, morph, custom functions, gotchas. The doc preamble's precision caution applies to every SDF workflow.
121
121
 
122
- - `docs/permanent/generated/sdf.md`
122
+ - `docs/skill/generated/sdf.md`
@@ -11,16 +11,12 @@ forgecad skill install
11
11
  | Skill | Installed by | Purpose |
12
12
  | --- | --- | --- |
13
13
  | [forgecad](/docs/skills/forgecad) | `forgecad skill install` | ForgeCAD model authoring, editing, debugging, and execution guidance for .forge.js, SVG-import, assembly, and CLI workflows. Use when building or modifying ForgeCAD geometry, structuring multi-file projects, validating scripts, or using ForgeCAD export/render tooling. |
14
- | [forgecad-3d-reconstruction](/docs/skills/forgecad-3d-reconstruction) | `forgecad skill install` | Reconstruct a parametric ForgeCAD model from an existing 3D CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP; inspect the source asset directly, author real ForgeCAD geometry, and iteratively compare the candidate with `forgecad compare 3d`. |
15
- | [forgecad-blockout-model](/docs/skills/forgecad-blockout-model) | `forgecad skill install` | Create rough high-level ForgeCAD concept models from simple primitives to explore layout, proportions, motion, and part relationships without production detail. Use when asked for a quick model sketch, blockout, spatial mockup, or intuitive low-detail 3D concept. |
16
- | [forgecad-component-model](/docs/skills/forgecad-component-model) | `forgecad skill install` | Enforce the ForgeCAD Component Model when building multi-part assemblies. Parts build at origin, connectors position them, data flows down from parent. Use when building or reviewing any multi-file ForgeCAD project. |
17
- | [forgecad-high-level-spec](/docs/skills/forgecad-high-level-spec) | `forgecad skill install` | Write a high-level design document (HLD) for a model, mechanism, or assembly before detailed specification or coding. Use when starting a new design, rethinking an existing one, or when the user asks to spec out, plan, or think through a model at a high level. Works backwards from requirements — defines the problem, explores alternatives, records decisions. Produces a right-sized design document for review and iteration. |
18
- | [forgecad-image-replicator](/docs/skills/forgecad-image-replicator) | `forgecad skill install` | Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views. |
19
- | [forgecad-lld](/docs/skills/forgecad-lld) | `forgecad skill install` | Write a Low-Level Design (LLD) for a CAD model — exact dimensions, constraints, parameters, and verification criteria. Use after a High-Level Design (HLD) exists and decisions are locked, or for simple parts that don't need an HLD. The detailed design document that code implements. |
20
- | [forgecad-make-a-model](/docs/skills/forgecad-make-a-model) | `forgecad skill install` | Create manufacture-realistic prototype ForgeCAD (.forge.js) models in the active CAD project. Handles file placement, invokes the forgecad skill for API guidance, and validates the result. |
21
- | [forgecad-model-grader](/docs/skills/forgecad-model-grader) | `forgecad skill install` | Analyze, verify, and grade ForgeCAD or CAD-as-code models against a user requirement, design brief, prompt, reference, or acceptance criteria. Use when asked to evaluate, judge, QA, benchmark, score, rate, or compare a CAD model; render it from multiple angles, run targeted inspections when needed, visually verify the evidence, and produce a 0-10 score with concise justification. |
22
- | [forgecad-prepare-prompt](/docs/skills/forgecad-prepare-prompt) | `forgecad skill install` | Turn a fuzzy physical product, mechanism, or CAD artifact request into a concrete manufacture-realistic prototype ForgeCAD build brief and a single master prompt for the modeling pass. Use when the engineering brief is incomplete, manufacturing/process choice is underspecified, or the work needs a specific operating story to avoid generic toy solutions. |
23
- | [forgecad-project](/docs/skills/forgecad-project) | `forgecad skill install` | ForgeCAD project CLI workflow — creating, managing, syncing projects and files on forgecad.io. Covers init, push, pull, file operations, member management, publishing, and sharing. |
24
- | [forgecad-reconstruction-benchmark](/docs/skills/forgecad-reconstruction-benchmark) | `forgecad skill install` | Solve ForgeCAD CAD reconstruction benchmark or RL episodes in a prepared workspace by rebuilding a visible reference asset as readable parametric ForgeCAD in the fixed submission path, using visual and geometric self-checks while respecting sandbox limits. |
25
- | [forgecad-render-inspect](/docs/skills/forgecad-render-inspect) | `forgecad skill install` | Run and interpret ForgeCAD inspection bundles for model verification. Use when asked to inspect a ForgeCAD model, analyze an inspection bundle, validate collisions, wall thickness, connectivity, floating bodies, sections, masks, depth, normals, or Zebra stripes. |
26
- | [forgecad-visual-spec](/docs/skills/forgecad-visual-spec) | `forgecad skill install` | Turn a concrete ForgeCAD artifact, build brief, HLD, or existing model into builder-honest image prompts for AI image models. Use when the user wants visual-spec renders that show the final product while keeping mechanisms, seams, hardware, and build cues visible instead of drifting into concept art. |
14
+ | [forgecad-build-model](/docs/skills/forgecad-build-model) | `forgecad skill install` | Build or edit a manufacture-realistic `.forge.js` model in a project, then validate it with run, render, inspect, and export evidence. |
15
+ | [forgecad-design-spec](/docs/skills/forgecad-design-spec) | `forgecad skill install` | Create a ForgeCAD design brief, HLD, or LLD before coding by walking through use, assembly, interfaces, decisions, and verification. |
16
+ | [forgecad-grade-model](/docs/skills/forgecad-grade-model) | `forgecad skill install` | Grade a ForgeCAD or CAD-as-code model against a requirement, brief, prompt, reference, or acceptance criteria with evidence and a 0-10 score. |
17
+ | [forgecad-image-prompt](/docs/skills/forgecad-image-prompt) | `forgecad skill install` | Write builder-honest AI image prompts from a concrete ForgeCAD model, build brief, HLD, or LLD without hiding how the artifact is built. |
18
+ | [forgecad-inspect-model](/docs/skills/forgecad-inspect-model) | `forgecad skill install` | Select, run, and interpret ForgeCAD inspection evidence for collisions, sections, wall thickness, components, masks, depth, normals, surface continuity, and fit. |
19
+ | [forgecad-project-sync](/docs/skills/forgecad-project-sync) | `forgecad skill install` | Manage hosted ForgeCAD project sync from the CLI: init, clone, pull, push, file operations, members, publishing, and shares. |
20
+ | [forgecad-reconstruct-cad-file](/docs/skills/forgecad-reconstruct-cad-file) | `forgecad skill install` | Reconstruct a readable parametric ForgeCAD model from an existing CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP. |
21
+ | [forgecad-reconstruct-from-images](/docs/skills/forgecad-reconstruct-from-images) | `forgecad skill install` | Reconstruct a real parametric ForgeCAD object from reference images by using images as evidence, not as a one-view facade. |
22
+ | [forgecad-verify-mujoco](/docs/skills/forgecad-verify-mujoco) | `forgecad skill install` | Verify a ForgeCAD MJCF export in MuJoCo with dynamics, contacts, controls, joint travel, and rendered evidence before calling it simulation-ready. |
@@ -0,0 +1,31 @@
1
+ /**
2
+ * Shaft-in-bushing clearance fit — a tolerance stack-up closed-loop demo.
3
+ *
4
+ * The diametral clearance must land in [0.10, 0.50] mm. With the default
5
+ * (loose) manufacturing ranges the clearance varies too much to hold that spec,
6
+ * so the stack-up reports a low Cpk and names the dominant dimension:
7
+ *
8
+ * 1. forgecad sim tolerance examples/analysis/clearance-fit.forge.js --json
9
+ * → Cpk(Clearance) well below 1.33, yield ~84%, contributions split
10
+ * between BoreDia and ShaftDia.
11
+ * 2. Act on the feedback — tighten both bores:
12
+ * forgecad sim tolerance examples/analysis/clearance-fit.forge.js \
13
+ * --tol BoreDia=±0.05 --tol ShaftDia=±0.05 --json
14
+ * → Cpk comfortably above 1.33, exit 0.
15
+ *
16
+ * The response is an ordinary verify.inRange call and the inputs are ordinary
17
+ * params — no special tolerance API is needed.
18
+ */
19
+
20
+ const BoreDia = Param.number('BoreDia', 10.0, { min: 9.7, max: 10.3, unit: 'mm' });
21
+ const ShaftDia = Param.number('ShaftDia', 9.7, { min: 9.4, max: 10.0, unit: 'mm' });
22
+
23
+ // Diametral clearance is the measured response; its spec limits come from this call.
24
+ const clearance = BoreDia - ShaftDia;
25
+ verify.inRange('Clearance', clearance, 0.1, 0.5);
26
+
27
+ const length = 20;
28
+ const bushing = difference(cylinder(length, BoreDia / 2 + 3), cylinder(length, BoreDia / 2));
29
+ const shaft = cylinder(length + 5, ShaftDia / 2).translate(0, 0, -2.5);
30
+
31
+ return union(bushing, shaft);
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Lever-arm actuator — a mechanism torque-budget closed-loop demo.
3
+ *
4
+ * A 1 kg arm extends horizontally from a revolute shoulder driven by a motor
5
+ * rated at 4 N·m. The gravity-hold torque is m·g·r, so a longer arm needs more
6
+ * torque to simply hold position:
7
+ *
8
+ * 1. forgecad sim mechanism examples/analysis/lever-arm-actuator.forge.js --json
9
+ * → holdTorqueNm.shoulder ≈ 1.47 N·m (1 kg · g · 0.15 m), ~63% budget margin.
10
+ * 2. Stretch the arm past the motor's reach:
11
+ * forgecad sim mechanism examples/analysis/lever-arm-actuator.forge.js \
12
+ * --param ArmLength=900 --json
13
+ * → ≈ 4.41 N·m needed, MECHANISM.HOLD.OVER_BUDGET — the 4 N·m motor can't hold it.
14
+ */
15
+
16
+ const ArmLength = Param.number('ArmLength', 300, { min: 100, max: 1000, unit: 'mm' });
17
+
18
+ const base = box(40, 40, 30)
19
+ .translate(0, 0, 15)
20
+ .withConnectors({
21
+ pivot: connector({ origin: [0, 0, 30], axis: [0, 1, 0], up: [1, 0, 0], kind: 'revolute' }),
22
+ });
23
+
24
+ // A horizontal bar from the pivot (x=0) out to +X; its center of mass sits at ArmLength/2.
25
+ const arm = box(ArmLength, 20, 20)
26
+ .translate(ArmLength / 2, 0, 0)
27
+ .withConnectors({
28
+ pivot: connector({ origin: [0, 0, 0], axis: [0, 1, 0], up: [1, 0, 0], kind: 'revolute' }),
29
+ });
30
+
31
+ const mechanism = assembly('Lever Arm Actuator')
32
+ .addPart('Base', base, { sim: Sim.body({ massKg: 2.0, collider: Sim.collider.boundingBox() }) })
33
+ .addPart('Arm', arm, { sim: Sim.body({ massKg: 1.0, collider: Sim.collider.boundingBox() }) })
34
+ .connect('Base.pivot', 'Arm.pivot', {
35
+ as: 'shoulder',
36
+ type: 'revolute',
37
+ min: -90,
38
+ max: 90,
39
+ drive: Sim.drive.velocity({ maxTorqueNm: 4, maxSpeedRpm: 30 }),
40
+ })
41
+ .withSimulation({ rootPart: 'Base', profile: Sim.profile.robotBodyRunnable() });
42
+
43
+ return mechanism;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Tipping tripod head — a closed-loop stability demo.
3
+ *
4
+ * A heavy camera head sits on a mast, offset in +X over a square base. With the
5
+ * default base the center of mass projects just outside the support footprint,
6
+ * so the rig tips over. This is the model→simulate→feedback→optimize loop:
7
+ *
8
+ * 1. forgecad check stability examples/analysis/tipping-tripod.forge.js --json
9
+ * → STABILITY.TIPS_OVER, tipOverMarginMm ≈ -3, and a comShiftToTargetMm
10
+ * hint pointing in −X (move mass inboard / widen the base).
11
+ * 2. Act on the feedback — widen the base:
12
+ * forgecad check stability examples/analysis/tipping-tripod.forge.js \
13
+ * --param BaseSpreadMm=90 --json
14
+ * → stable, positive margin.
15
+ *
16
+ * forgecad sim mass on the same model reports volume, mass, center of mass, and
17
+ * the inertia tensor (pass --density for a real material).
18
+ */
19
+
20
+ const BaseSpreadMm = Param.number('BaseSpreadMm', 50, { min: 20, max: 200, unit: 'mm' });
21
+ const HeadOffsetMm = Param.number('HeadOffsetMm', 70, { min: 0, max: 150, unit: 'mm' });
22
+
23
+ const baseThickness = 10;
24
+ const mastHeight = 140;
25
+
26
+ // Square base, footprint ±BaseSpreadMm in X and Y, resting on Z=0.
27
+ const base = box(BaseSpreadMm * 2, BaseSpreadMm * 2, baseThickness);
28
+
29
+ // Slim mast carrying the head, offset in +X.
30
+ const mast = cylinder(mastHeight, 8).translate(HeadOffsetMm, 0, baseThickness);
31
+
32
+ // Heavy camera head high up and offset — this dominates the center of mass.
33
+ const head = box(80, 60, 60).translate(HeadOffsetMm, 0, baseThickness + mastHeight);
34
+
35
+ return union(base, mast, head);