forgecad 0.10.4 → 0.11.0
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.
- package/dist/assets/{AdminPage-B3L3W1Uo.js → AdminPage-B1nIvqLS.js} +1 -1
- package/dist/assets/{BenchmarkPage-DXKVXMrJ.js → BenchmarkPage-YZJbw5nd.js} +2 -2
- package/dist/assets/{BlogPage-B7BWxOCg.js → BlogPage-DIWRApKS.js} +1 -1
- package/dist/assets/{DocsPage-BPGGwht1.js → DocsPage-ClL6X1hR.js} +8 -22
- package/dist/assets/EditorApp-CYBDvSyT.js +17067 -0
- package/dist/assets/{EmbedViewer-DygByZS2.js → EmbedViewer-Dmfu_LIw.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-BoVE7JGY.js → LandingPageProofDriven-XYTiYxfM.js} +2 -2
- package/dist/assets/{LegalPage-Din8wv8d.js → LegalPage-D5Z3CscF.js} +2 -2
- package/dist/assets/{PricingPage-C2PMzmDc.js → PricingPage-BP4lIGio.js} +2 -2
- package/dist/assets/{SettingsPage-BlJDCRe8.js → SettingsPage-D3bcPBsC.js} +1 -1
- package/dist/assets/{app-BsRYSfxY.js → app-BKjogwIZ.js} +3288 -512
- package/dist/assets/{backendInit-6C0DLgH0.js → backendInit-6a9-ilom.js} +80498 -74979
- package/dist/assets/cli/{render-XXol_ET7.js → render-CMNudGb0.js} +1264 -113
- package/dist/assets/{constructionHistoryWorker-cTHWRJEi.js → constructionHistoryWorker-BuZgc606.js} +8369 -6839
- package/dist/assets/{evalWorker-BssDYW9u.js → evalWorker-DQ82ueGu.js} +45438 -39996
- package/dist/assets/{forgecad_geometry-CZ_IfuvA.js → forgecad_geometry-D8rWX7nQ.js} +1 -1
- package/dist/assets/{forgecad_geometry_bg-C3rQHfwg.wasm → forgecad_geometry_bg-ObqfqjJT.wasm} +0 -0
- package/dist/assets/{inspectWorker-ymhBV4Ll.js → inspectWorker-Cuby2qfT.js} +4899 -1303
- package/dist/assets/{jointPose-B0blBj9A.js → jointPose-CFql5I-u.js} +1 -1
- package/dist/assets/{landing-proof-driven-Cpf-MIbI.css → landing-proof-driven-_u4v_xQb.css} +2 -2
- package/dist/assets/{manifold-CYlIm-M6.js → manifold-02pmr7O7.js} +2 -2
- package/dist/assets/{manifold-B_7QXpGB.js → manifold-C6KU0oII.js} +1 -1
- package/dist/assets/{manifold-CNShmpEJ.js → manifold-P1yF3GKn.js} +1 -1
- package/dist/assets/{reportWorker-Cb5eyM7D.js → reportWorker-kg065BVL.js} +76583 -65731
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/AI/usage.md +6 -8
- package/dist/docs-raw/CLI.md +14 -12
- package/dist/docs-raw/component-model.md +28 -9
- package/dist/docs-raw/generated/assembly.md +76 -3
- package/dist/docs-raw/generated/concepts.md +43 -7
- package/dist/docs-raw/generated/core.md +399 -73
- package/dist/docs-raw/generated/curves.md +357 -6
- package/dist/docs-raw/generated/runtime-names.md +12 -12
- package/dist/docs-raw/generated/sketch.md +16 -3
- package/dist/docs-raw/guides/inspection-bundles.md +5 -3
- package/dist/docs-raw/guides/structural-fea.md +235 -0
- package/dist/docs-raw/skills/forgecad-build-model.md +70 -147
- package/dist/docs-raw/skills/forgecad-image-prompt.md +1 -1
- package/dist/docs-raw/skills/forgecad-project-sync.md +3 -3
- package/dist/docs-raw/skills/forgecad-reconstruct-cad-file.md +2 -2
- package/dist/docs-raw/skills/forgecad-reconstruct-from-images.md +4 -5
- package/dist/docs-raw/skills/forgecad.md +4 -1
- package/dist/docs-raw/skills/index.md +1 -5
- package/dist/docs-raw/welcome.md +3 -4
- package/dist/index.html +1 -1
- package/dist/llms.txt +1 -2
- package/dist/sitemap.xml +15 -15
- package/dist-cli/{check-compiler-4RPB6SB5.js → check-compiler-UJWUEIDC.js} +1 -1
- package/dist-cli/{check-query-propagation-KN3DFQTX.js → check-query-propagation-O2EPDJSY.js} +1 -1
- package/dist-cli/{chunk-UHBRMYA6.js → chunk-MNDROM7T.js} +78926 -73392
- package/dist-cli/forgecad.js +6306 -1061
- package/dist-cli/forgecad_geometry_bg.wasm +0 -0
- package/dist-skill/CONTEXT.md +1257 -110
- package/dist-skill/SKILL.md +4 -1
- package/dist-skill/docs/API/core/concepts.md +31 -4
- package/dist-skill/docs/CLI.md +14 -12
- package/dist-skill/docs/generated/assembly.md +73 -3
- package/dist-skill/docs/generated/core.md +395 -74
- package/dist-skill/docs/generated/curves.md +356 -6
- package/dist-skill/docs/generated/runtime-names.md +12 -12
- package/dist-skill/docs/generated/sketch.md +16 -3
- package/dist-skill/docs/guides/inspection-bundles.md +5 -3
- package/dist-skill/docs/guides/manual-parameters.md +130 -0
- package/dist-skill/docs/guides/structural-fea.md +235 -0
- package/dist-skill/library/README.md +0 -4
- package/dist-skill/library/forgecad-build-model/SKILL.md +57 -150
- package/dist-skill/library/forgecad-build-model/references/inspection-feedback.md +58 -0
- package/dist-skill/library/forgecad-build-model/references/module-contracts.md +53 -0
- package/dist-skill/library/forgecad-build-model/references/parameter-controls.md +22 -0
- package/dist-skill/library/forgecad-build-model/references/readiness-review.md +43 -0
- package/dist-skill/library/forgecad-build-model/references/simulation-feedback.md +49 -0
- package/dist-skill/library/forgecad-build-model/references/stage-1-design-intent.md +21 -0
- package/dist-skill/library/forgecad-build-model/references/stage-2-architecture-plan.md +23 -0
- package/dist-skill/library/forgecad-build-model/references/stage-3-build-slices.md +39 -0
- package/dist-skill/library/forgecad-build-model/references/stage-4-feedback-iteration.md +24 -0
- package/dist-skill/library/forgecad-build-model/references/stage-5-readiness-package.md +34 -0
- package/dist-skill/library/forgecad-image-prompt/SKILL.md +1 -1
- package/dist-skill/library/forgecad-project-sync/SKILL.md +3 -3
- package/dist-skill/library/forgecad-reconstruct-cad-file/SKILL.md +2 -2
- package/dist-skill/library/forgecad-reconstruct-from-images/SKILL.md +4 -5
- package/dist-skill/website/skills/forgecad-build-model.md +70 -147
- package/dist-skill/website/skills/forgecad-image-prompt.md +1 -1
- package/dist-skill/website/skills/forgecad-project-sync.md +3 -3
- package/dist-skill/website/skills/forgecad-reconstruct-cad-file.md +2 -2
- package/dist-skill/website/skills/forgecad-reconstruct-from-images.md +4 -5
- package/dist-skill/website/skills/forgecad.md +4 -1
- package/dist-skill/website/skills/index.md +1 -5
- package/examples/analysis/structural-stress-fea.forge.js +19 -0
- package/examples/api/blend-full-round.forge.js +37 -0
- package/examples/api/blend-variable-radius.forge.js +51 -0
- package/examples/api/curve-project-and-intersect.forge.js +59 -0
- package/examples/api/extrude-up-to-face.forge.js +47 -0
- package/examples/api/param-path2d.forge.js +65 -0
- package/examples/api/param-placement2d.forge.js +80 -0
- package/examples/api/param-spline2d-g-continuity.forge.js +57 -0
- package/examples/api/spoon-full-tang-handle.forge.js +188 -0
- package/examples/api/surface-boundarynet-dished-bowl.forge.js +63 -0
- package/examples/api/surface-fill-interior-constraints.forge.js +59 -0
- package/examples/api/surface-variable-thickness-panel.forge.js +62 -0
- package/examples/mechanical/airplane-propeller.forge.js +81 -28
- package/package.json +5 -2
- package/dist/assets/EditorApp-BWUGCdD5.js +0 -16610
- package/dist/docs-raw/skills/forgecad-design-spec.md +0 -145
- package/dist/docs-raw/skills/forgecad-grade-model.md +0 -84
- package/dist/docs-raw/skills/forgecad-inspect-model.md +0 -80
- package/dist/docs-raw/skills/forgecad-verify-mujoco.md +0 -78
- package/dist-skill/library/forgecad-design-spec/SKILL.md +0 -132
- package/dist-skill/library/forgecad-design-spec/references/default-profiles.md +0 -99
- package/dist-skill/library/forgecad-design-spec/references/master-prompt.md +0 -73
- package/dist-skill/library/forgecad-grade-model/SKILL.md +0 -72
- package/dist-skill/library/forgecad-grade-model/agents/openai.yaml +0 -4
- package/dist-skill/library/forgecad-inspect-model/SKILL.md +0 -68
- package/dist-skill/library/forgecad-verify-mujoco/SKILL.md +0 -66
- package/dist-skill/website/skills/forgecad-design-spec.md +0 -145
- package/dist-skill/website/skills/forgecad-grade-model.md +0 -84
- package/dist-skill/website/skills/forgecad-inspect-model.md +0 -80
- package/dist-skill/website/skills/forgecad-verify-mujoco.md +0 -78
- /package/dist/assets/{landing-proof-driven-BxZZh5r5.js → landing-proof-driven-DNPRKL_p.js} +0 -0
- /package/dist-skill/library/{forgecad-verify-mujoco → forgecad-build-model}/scripts/mujoco_verify.py +0 -0
- /package/dist-skill/library/{forgecad-inspect-model → forgecad-build-model/scripts}/summarize_manifest.py +0 -0
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Stage 4: Feedback And Iteration
|
|
2
|
+
|
|
3
|
+
Goal: make evidence gathering the middle of the build, not the final checkbox.
|
|
4
|
+
|
|
5
|
+
## Sub-Workflow
|
|
6
|
+
|
|
7
|
+
1. Integrate proven leaf modules upward into composed modules and then `main.forge.js`.
|
|
8
|
+
2. Gather automatic evidence at the smallest useful level: run, render, inspect, simulation, FEA, requested or process-dependent export smoke tests, and scripted checks.
|
|
9
|
+
3. Gather manual feedback where automation cannot judge the design: read every render, inspect product intent, compare against PR/FAQ, and check whether operation feels like the user's expected workflow.
|
|
10
|
+
4. For mechanisms, prove rest, mid-travel, limits, coupled states, mirrored states, contacts, stops, clearances, and controls before polishing geometry.
|
|
11
|
+
5. For simulation-ready work, read `simulation-feedback.md`, export MJCF or FEA packages, run the verifier or FEA workflow, inspect numeric/visual evidence, and iterate.
|
|
12
|
+
6. Convert every finding into exactly one of: model edit, design-doc revision, new evidence command, explicit residual risk, or user question.
|
|
13
|
+
7. Record iteration learnings in `NOTES.md`, especially API surprises, repeated workarounds, and places where a ForgeCAD primitive or doc would have prevented parameter hacking.
|
|
14
|
+
8. Repeat the same evidence after each fix. Do not call the model ready because a different, easier check passed.
|
|
15
|
+
|
|
16
|
+
## Acceptance Criteria
|
|
17
|
+
|
|
18
|
+
- `main.forge.js` runs and composes high-level modules through real interfaces.
|
|
19
|
+
- Targeted inspection evidence has been run and read for fit, hidden internals, components, collisions, walls, or surface risks.
|
|
20
|
+
- Required simulation and FEA behavior has been tested at module or system level before final packaging; export behavior has been tested only when the user requested export deliverables or the process depends on external files.
|
|
21
|
+
- Findings have been converted into edits or documented residual risks, then rechecked.
|
|
22
|
+
- The project docs show the design -> feedback -> iteration history clearly enough for the next agent to continue.
|
|
23
|
+
- `NOTES.md` captures learnings, API friction, non-obvious choices, and follow-up ideas clearly enough for a future product/API pass.
|
|
24
|
+
- The model behaves the way the user expects under the relevant poses, loads, contacts, or usage scenarios, or the gap is explicitly named.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Stage 5: Readiness Package
|
|
2
|
+
|
|
3
|
+
Goal: package only after the feedback loop says the model is ready or the remaining validation loop is explicit.
|
|
4
|
+
|
|
5
|
+
## Sub-Workflow
|
|
6
|
+
|
|
7
|
+
1. Run the final entry point after the last edit.
|
|
8
|
+
2. State the intended physical component graph: one connected component, intentionally separate purchased parts, selected assembly plus ghosts, or another exact structure.
|
|
9
|
+
3. Rerun the decisive evidence from Stage 4: inspection bundles, simulation/FEA checks, motion poses, manual render views, and requested or process-dependent exports.
|
|
10
|
+
4. Read `readiness-review.md` and fill the requirement checklist with pass/partial/fail/unknown evidence.
|
|
11
|
+
5. Verify BOM entries and builder-critical `dim()` annotations are present.
|
|
12
|
+
6. Run exports only when the user requested deliverable files or the chosen output standard depends on external process files. Otherwise, record that exports were not requested and do not create them just to finish the build. When exports are in scope, run the process-appropriate commands or name license/tool-gated commands that complete the package:
|
|
13
|
+
- printed parts: STL or 3MF
|
|
14
|
+
- machined/CAD interchange: STEP
|
|
15
|
+
- sheet goods: flat pattern or cutting layout
|
|
16
|
+
- simulation: MJCF plus MuJoCo evidence
|
|
17
|
+
- structural study: FEA export plus solver/report evidence
|
|
18
|
+
7. Read every generated PNG, manifest, report, simulation result, or in-scope export failure. Treat failures as iteration inputs unless time or tooling blocks them.
|
|
19
|
+
8. Clean up transient inspection/render/simulation output directories created inside the model folder, especially default `outputs/` bundles. Keep only user-requested deliverables, in-scope process exports, or curated evidence intentionally referenced by the docs.
|
|
20
|
+
9. Review `NOTES.md` and make sure it captures the useful learnings, API frustrations, non-obvious modeling decisions, cleanup notes, and follow-up ideas from the build.
|
|
21
|
+
10. Deliver an evidence-backed readiness summary: what passed, what remains unverified, and what validation loop comes next.
|
|
22
|
+
|
|
23
|
+
## Acceptance Criteria
|
|
24
|
+
|
|
25
|
+
- The final file or `main.forge.js` runs.
|
|
26
|
+
- Component count matches the intended physical component graph.
|
|
27
|
+
- Collision evidence reports zero unexpected findings.
|
|
28
|
+
- Critical mechanical interfaces are proven with `verify.*` and inspection evidence.
|
|
29
|
+
- Moving assemblies have pose and behavior evidence across their operating range.
|
|
30
|
+
- Required simulation/FEA evidence is present or explicitly blocked; export evidence is present only when requested or process-critical.
|
|
31
|
+
- Requirement checklist is evidence-backed and unknowns are named.
|
|
32
|
+
- Transient `outputs/` clutter has been removed or explicitly kept for a reason.
|
|
33
|
+
- `NOTES.md` is present for non-trivial work and captures useful build learnings or says there were none.
|
|
34
|
+
- The final response names commands run, retained evidence paths if any, views checked, component count, collision count, simulation/FEA results, requested export results if any, residual warnings, cleanup performed, notes captured, and intentional exceptions.
|
|
@@ -8,7 +8,7 @@ forgecad-public: true
|
|
|
8
8
|
|
|
9
9
|
## Scope
|
|
10
10
|
|
|
11
|
-
Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD)
|
|
11
|
+
Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD). If the user wants a model after the prompt, route vague physical briefs to `forgecad-build-model` so its design stages own the build. 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.
|
|
12
12
|
|
|
13
13
|
## Core Rule
|
|
14
14
|
|
|
@@ -6,12 +6,12 @@ forgecad-public: true
|
|
|
6
6
|
|
|
7
7
|
# Project Sync
|
|
8
8
|
|
|
9
|
-
forgecad.io is the hosted ForgeCAD platform; a project is a local folder linked to the server
|
|
9
|
+
forgecad.io is the hosted ForgeCAD platform; a project is a local folder marked by `forgecad.json`, and linked to the server after its first push. 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.
|
|
10
10
|
|
|
11
11
|
- **One studio process.** Run a single long-running `forgecad studio <folder> [<folder> ...]` naming every active project folder. The user opens the one printed localhost port once; create and edit files only under those folders so the browser live-updates. Never spawn extra servers per project.
|
|
12
12
|
- **studio vs dev.** `forgecad studio` is for users and agents; `forgecad dev` is only for developing ForgeCAD itself.
|
|
13
|
-
- **Login only for hosted commands.** `
|
|
14
|
-
- **init
|
|
13
|
+
- **Login only for hosted commands.** `project init` plus local work (run, render, studio) need no auth. Run `forgecad login` before hosted sync/admin commands such as `project push`, `project pull`, `project file *`, members, shares, and `publish`.
|
|
14
|
+
- **init is local, push creates remote.** `project init "Name"` writes local project metadata to `forgecad.json` without contacting the server. The first `project push` creates the hosted project if `forgecad.json` has no project ID yet, uploads existing local files, and records server file IDs. Later pushes sync the already-linked project. `clone <slug>` is the inverse: remote → new local folder.
|
|
15
15
|
- **Sync is content-hash based.** `status`/`push`/`pull` compare file content hashes — no timestamps, no git; a file is "modified" purely by content difference. Loop: edit → `project status` → `project push`.
|
|
16
16
|
- **Sync vs single-file ops.** Use `status`/`pull`/`push` for normal sync; use `project file <read|save|delete|...>` only for one hosted-file operation without a full push/pull cycle.
|
|
17
17
|
- **Project context required.** All `project file *` and `publish` commands must run inside a folder containing `forgecad.json`.
|
|
@@ -8,7 +8,7 @@ forgecad-public: true
|
|
|
8
8
|
|
|
9
9
|
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.
|
|
10
10
|
|
|
11
|
-
Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-build-model
|
|
11
|
+
Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-build-model`, not this skill; prepared benchmark/RL episodes → use the task-local benchmark instructions, not the public skill library; inspection-bundle interpretation → `forgecad-build-model/references/inspection-feedback.md`; readiness review → `forgecad-build-model/references/readiness-review.md`; API and command reference → `forgecad` skill + CLI.md.
|
|
12
12
|
|
|
13
13
|
## Workflow
|
|
14
14
|
|
|
@@ -43,4 +43,4 @@ Faceted sources: decide whether tessellation itself is evidence. Matching low-po
|
|
|
43
43
|
|
|
44
44
|
## Done Criteria
|
|
45
45
|
|
|
46
|
-
The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects
|
|
46
|
+
The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects using `forgecad-build-model`'s inspection feedback reference 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.
|
|
@@ -11,9 +11,8 @@ The reference image is evidence, not the deliverable. The deliverable is a real
|
|
|
11
11
|
## Companion Skills
|
|
12
12
|
|
|
13
13
|
- `forgecad` — API docs, model authoring, renderer behavior.
|
|
14
|
-
- `forgecad-
|
|
15
|
-
- `forgecad-build-model` —
|
|
16
|
-
- `forgecad-inspect-model` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
14
|
+
- `forgecad-build-model` — design stages, file placement, project structure, decomposition, definition of done.
|
|
15
|
+
- `forgecad-build-model/references/inspection-feedback.md` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
17
16
|
|
|
18
17
|
## Core Rule
|
|
19
18
|
|
|
@@ -23,13 +22,13 @@ Infer the real object before matching any camera — identity, manufacture, scal
|
|
|
23
22
|
|
|
24
23
|
1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
|
|
25
24
|
2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
|
|
26
|
-
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.
|
|
25
|
+
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. Follow `forgecad-build-model` design stages when these are underdetermined.
|
|
27
26
|
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.
|
|
28
27
|
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.
|
|
29
28
|
6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
|
|
30
29
|
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.
|
|
31
30
|
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.
|
|
32
|
-
9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-
|
|
31
|
+
9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-build-model`'s inspection feedback reference.
|
|
33
32
|
|
|
34
33
|
## Comparison Boards
|
|
35
34
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
# forgecad-build-model
|
|
4
4
|
|
|
5
|
-
Build or edit
|
|
5
|
+
Build or edit `.forge.js` real product models through design, automatic/manual feedback gathering, inspection/simulation/FEA evidence, and iteration until ready.
|
|
6
6
|
|
|
7
7
|
| Field | Value |
|
|
8
8
|
| --- | --- |
|
|
@@ -13,184 +13,107 @@ Build or edit a manufacture-realistic `.forge.js` model in a project, then valid
|
|
|
13
13
|
|
|
14
14
|
## Build Model
|
|
15
15
|
|
|
16
|
-
Create
|
|
16
|
+
Create or edit ForgeCAD models through the loop that matters: design intent -> automatic or manual feedback gathering -> interpretation -> iteration -> readiness. Use the core `forgecad` skill as the source of truth for ForgeCAD API docs, generated API pages, CLI syntax, scene setup, assembly contracts, inspection bundles, FEA, simulation metadata, and examples. This skill defines the product-modeling workflow.
|
|
17
17
|
|
|
18
18
|
### Default Output Standard
|
|
19
19
|
|
|
20
|
-
Unless the user asks otherwise,
|
|
20
|
+
Unless the user asks otherwise, build a **real product model**: an editable parametric CAD model of the actual physical product, machine, robot, fixture, part, assembly, or simulation asset the user asked for. The model should be closed, assembled, sourced, dimensioned, inspected, tested, and ready for the next real engineering loop.
|
|
21
21
|
|
|
22
|
-
|
|
23
|
-
- Modifiers shift the standard: `blockout` → rough massing; `production-realistic` → DFM and production-intent materials; `printable` → make the selected printed parts honest; `visual-CAD` → clearly visual, not pretending build-ready.
|
|
24
|
-
- Zero unexpected final collisions is part of the definition of done (see Collision Policy).
|
|
22
|
+
Real product features are not optional polish. For every physical function the artifact needs, model the corresponding product evidence: wall thickness, fastener stacks, bosses, ribs, flanges, seats, gaskets, cable exits, service access, toleranced clearances, purchased parts, BOM entries, critical dimensions, simulation artifacts when behavior evidence matters, export artifacts when requested or process-dependent, and process-appropriate materials. If evidence is still missing, keep building or name the exact missing validation loop and residual risk; do not quietly lower the target quality.
|
|
25
23
|
|
|
26
24
|
### File Placement
|
|
27
25
|
|
|
28
|
-
New `.forge.js` files go under date-based directories
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
YYYY/MM/DD/file.forge.js
|
|
32
|
-
YYYY/MM/DD/folder/main.forge.js
|
|
33
|
-
YYYY/MM/DD/folder/
|
|
34
|
-
YYYY/MM/DD/folder/
|
|
26
|
+
New `.forge.js` files go under date-based directories in the user's current ForgeCAD project or a clearly named local folder:
|
|
27
|
+
|
|
28
|
+
```text
|
|
29
|
+
YYYY/MM/DD/file.forge.js # tiny single-file model only
|
|
30
|
+
YYYY/MM/DD/folder/main.forge.js # central entry point for every multi-file build
|
|
31
|
+
YYYY/MM/DD/folder/NOTES.md # live build notes: learnings, API friction, surprises, follow-ups
|
|
32
|
+
YYYY/MM/DD/folder/docs/PRFAQ.md # product/user story and decision FAQ
|
|
33
|
+
YYYY/MM/DD/folder/docs/HLD.md # high-level design
|
|
34
|
+
YYYY/MM/DD/folder/docs/LLD-*.md # lower-level design docs as needed
|
|
35
|
+
YYYY/MM/DD/folder/docs/modules/*.md # submodule or complex-part design notes
|
|
36
|
+
YYYY/MM/DD/folder/modules/<domain>/*.forge.js # unified nested module tree: leaf modules to system modules
|
|
37
|
+
YYYY/MM/DD/folder/lib/*.js # pure helpers/constants, no geometry
|
|
35
38
|
```
|
|
36
39
|
|
|
37
|
-
-
|
|
38
|
-
-
|
|
39
|
-
-
|
|
40
|
+
- Use kebab-case descriptive names.
|
|
41
|
+
- Use `main.forge.js` as the central entry point. It should import high-level modules, not every leaf file in a huge build.
|
|
42
|
+
- Prefer one nested `modules/` tree, like software. Compose upward from leaf modules to larger modules to the system. Keep files small enough to understand and verify.
|
|
43
|
+
- Reusable `.forge.js` modules should return builder functions or module interfaces. Direct-run previews belong inside `if (require.main === module)`, like Python's `if __name__ == "__main__"`.
|
|
44
|
+
- Each module file must run standalone where practical and import via `require('./path/file.forge.js')`.
|
|
45
|
+
- Use plain `.js` only for constants, tables, and pure helpers. Do not put geometry in helper-only files.
|
|
46
|
+
- Keep `NOTES.md` current for non-trivial builds. Capture learnings, API frustrations, non-obvious modeling choices, inspection surprises, cleanup notes, and follow-up product/API ideas. Do not hide requirements or formal design decisions there; those belong in PRFAQ/HLD/LLD docs.
|
|
47
|
+
- Write as many markdown design files as the project needs. Complex parts and submodules deserve their own design notes; small edits may need only a short local note.
|
|
40
48
|
|
|
41
49
|
### Workflow
|
|
42
50
|
|
|
43
|
-
|
|
44
|
-
2. `mkdir -p YYYY/MM/DD/[folder]`.
|
|
45
|
-
3. Moving parts: prove the rig first (Kinematics-First below).
|
|
46
|
-
4. Write the model — `param()`/`Param.bool()` for tunable dimensions; pick the manufacturing process before styling; build real internals; follow the contracts below.
|
|
47
|
-
5. Validate — `forgecad run <file>` (`main.forge.js` for multi-file).
|
|
48
|
-
6. Run the Final Acceptance Gate and Manufacturing Outputs checks below on `main.forge.js`.
|
|
49
|
-
7. Iterate — convert every render/inspect finding into a model edit and rerun the same targeted evidence until reality matches the intended component graph.
|
|
50
|
-
|
|
51
|
-
### Process, Style, and Variants
|
|
52
|
-
|
|
53
|
-
**Manufacturing process is a choice, not an assumption.** Never treat every model as printable. Pick process cues from the load path and operating story: machined, bent sheet, tube-and-plate, wood/composite, molded-look, printed, or hybrid purchased-hardware construction (rideables: metal/composite structure + purchased wheels/bearings; furniture: real joinery). Print-specific features (slicer clearances, heat-set inserts, layer-oriented ribs) only when the process includes printed parts.
|
|
54
|
-
|
|
55
|
-
**Visual style: expensive and credible, not generically colorful.** Restrained material-driven palette (ivory, charcoal, satin black, brushed aluminum, brass, muted burgundy/green/navy, smoked polymer, natural wood); match color to material/process so metal, polymer, rubber, PCB, and wood read differently. Bright color only as small accents (controls, seals, indicators). Keep seams, fasteners, gaskets, and purchased parts legible.
|
|
56
|
-
|
|
57
|
-
**Form is part of credibility.** Real products carry deliberate edge treatment — chamfered or rounded profiles where hands, seals, or tooling meet the part, draft on molded faces, consistent proportions and design language across parts. A knife-sharp box reads as a blockout, not a product. Get the rounding from profile-level geometry (rounded sketch corners, chamfered profiles) per the fillet caveat below.
|
|
58
|
-
|
|
59
|
-
**Variants are parameter-selected.** Sizes/styles/revisions go behind one choice parameter (`Variant`, `Preset`); return only the selected variant. Comparison lineups only behind an explicit debug parameter so they can never pollute collision findings.
|
|
60
|
-
|
|
61
|
-
### Physical Artifact, Not Teaching Diagram
|
|
62
|
-
|
|
63
|
-
Deliver the real closed artifact — covers installed, parts in assembled positions. The `forgecad` skill carries the no-labels/no-cutaway rule (no explanatory labels, arrows, or legends in production geometry; never a cutaway, sectioned, or exploded default); it binds here. Markings only when the real artifact has them (serial plates, gauge ticks, molded icons) — sparse, process-appropriate. Explain roles via named return objects and `verify.*`; review annotations go in `Viewport.label()` or a debug mode, never exported geometry.
|
|
64
|
-
|
|
65
|
-
**Internal geometry is part of the model.** If the real artifact has internals, model them as real geometry even when hidden: cavities, ribs, bosses, screw holes, bearing seats, electronics/battery volumes, wire channels, mechanism clearances and stops. Verify hidden structure with exploration tools — alternate views, `inspect sections`, `--hide`, transparent shells, named ghosts — never by mutilating the returned model.
|
|
66
|
-
|
|
67
|
-
### Kinematics-First for Moving Parts
|
|
68
|
-
|
|
69
|
-
For any mechanism (linkage, hinge, slider, suspension, gripper, drawer), the rig is the source of truth: build and prove the motion structure first, then attach geometry — never retrofit motion onto finished shells.
|
|
70
|
-
|
|
71
|
-
- Pick the rig shape before geometry: point-link graphs for closed-loop skeletons with distance/angle constraints; frames and connector joints when part orientation matters (API roster in the assembly docs).
|
|
72
|
-
- Name every degree of freedom; encode limits/defaults at rig level. Mirrored revolute axes need an explicit sign mapping — equal joint values do not automatically mirror poses.
|
|
73
|
-
- Attach proxy geometry only (pivot markers, bars, slider blocks, wheel discs). Run the rig at rest, mid-travel, both limits, and mirrored/coupled poses until the solver, controls, connector alignment, and `verify.*` checks all pass:
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
forgecad run model.forge.js --joint "theta=45"
|
|
77
|
-
forgecad render 3d model.forge.js /tmp/theta-45.png --joint "theta=45" --camera iso
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
Use real joint names; repeat `--joint` per control. A pose that fails to solve, clamps unexpectedly, breaks a connector check, or adds a collision means the rig is not ready for final geometry.
|
|
81
|
-
- Only then attach manufacture-real geometry to the solved links, frames, and connectors — never via a final `rotate()` that makes one pose look assembled.
|
|
82
|
-
- Return the unsolved `Assembly` so Motion controls re-run the real solve. Never bake a posed `SolvedAssembly` to make one pose look right.
|
|
83
|
-
- Encode pose checks in-script with `verify.*`: convergence, connector origins coinciding, link lengths holding, end effectors reaching targets, running clearances positive.
|
|
84
|
-
|
|
85
|
-
### Mechanical Assembly Contract
|
|
86
|
-
|
|
87
|
-
A mechanical script is not done when it merely looks assembled. Every visible piece needs a physical reason to be where it is: fused material, contact faces, a screw stack, a pin in a bore, a tab in a slot, a gasket on a land, a bearing in a seat, a cable in a channel, or a named intentional ghost.
|
|
88
|
-
|
|
89
|
-
For multi-part assemblies, the component model is mandatory:
|
|
90
|
-
|
|
91
|
-
- Parts build at origin in their own local coordinates. They do not know final assembly-space offsets, sibling dimensions, or world placement.
|
|
92
|
-
- A part's public interface is `shape` plus connectors and metadata, e.g. `return { shape, boltPattern, pinionZ }`. Declare mating faces with `.withConnectors({})`; axes point outward, with prismatic slide axes as the explicit exception.
|
|
93
|
-
- The parent assembly chooses the root and positions every structural part through connectors, `connect()`, `match()`, or `matchTo()`. Final `translate()` calls are not assembly contracts.
|
|
94
|
-
- Data flows down through `require('./part.forge.js', params)` overrides and up through returned metadata. Siblings never import each other; the parent routes shared decisions and measured outputs.
|
|
95
|
-
- Default to one file for a project-specific assembly. Split only for cross-project reuse, independent subassemblies, or when a file grows past roughly 300 lines. Never create `shared-dims.js` just to coordinate siblings.
|
|
96
|
-
|
|
97
|
-
Reject these shortcuts on sight: sibling `require()`, assembly-space coordinates inside a part, `translate()` used to position a structural assembly member, `console.log` + `if` validation instead of `verify.*`, and bare `connector.neutral()` outside a reusable component library with compatibility checks.
|
|
98
|
-
|
|
99
|
-
- Bespoke fixed assemblies: build each part in local coordinates, pick one root, place every touching part with `matchTo()`, verify each mate with `verify.connectorDistance`.
|
|
100
|
-
- Manual joint frames (`addFixed`/`addRevolute`/`addPrismatic` with a hand-built `frame:`) are scaffolding, not contracts. Before delivery, convert mating interfaces to connectors with `connect()`/`match()`, or prove the manual joint with `forgecad debug assembly --fail-on warning` and documented geometry.
|
|
101
|
-
- A named part must not contain unintentional disconnected bodies: boolean-join manufactured features, model fasteners/seals as separate named parts, or add the receiving holes/lands that explain the separation.
|
|
102
|
-
- Screws are not decoration: clearance/counterbore in the cover, receiving boss or through stack in the parent, material around both, axes aligned from one shared bolt pattern.
|
|
103
|
-
- Handles and levers need a load path: hub-to-arm neck, pivot pin/bore, thrust shoulders, stops/detents, and the connected follower. A handle tangent to a hub is a failed mechanism.
|
|
104
|
-
- Covers, doors, cartridges, service panels need seats: ledges, gasket grooves, bosses, snap hooks, tabs, or hinge barrels — plus a visible retention story.
|
|
105
|
-
- Cables, wires, tubes need receiving geometry: gland, grommet, clamp, socket, ferrule, routed channel, or hose barb. Never let a cylinder end in open space.
|
|
106
|
-
- Purchased loose parts may stay separate bodies — name them as purchased hardware/consumables and seat them in believable sockets, bores, races, or fastener stacks.
|
|
107
|
-
- Encode interface intent with `verify.*`, not comments: `verify.clearanceBetween` for seated fits and clearance bands, `verify.minClearance`/`verify.notColliding` for keep-out and running gaps, `verify.connectorDistance` for connector mates. Part counts and generic dimensions never prove an interface.
|
|
108
|
-
- No canned finished-object helpers for project-specific assemblies. Reusable vocabulary is primitives, cutters, patterns, and mechanical contracts (`lib.fastenerSet()`, `lib.boltPattern()`, real bores and pockets, connectors + `matchTo()`) — not finished backplates, brackets, or hinge leaves.
|
|
109
|
-
|
|
110
|
-
Treat `fillet()`/`chamfer()` as experimental (Manifold can be incorrect, OCCT slow); prefer profile-level rounding and inspect before relying on the result.
|
|
111
|
-
|
|
112
|
-
### Imported Parts (User-Supplied 3D Files)
|
|
113
|
-
|
|
114
|
-
When the user supplies mesh or CAD files to design around (a motor, an off-the-shelf housing, a scanned part), the import IS a component of the assembly — keep it, don't rebuild it parametrically (rebuilding is `forgecad-reconstruct-cad-file`, a different request).
|
|
51
|
+
Keep the workflow current in the project docs. Do not advance a stage until its acceptance criteria pass, and expect to revisit earlier stages when feedback changes the design.
|
|
115
52
|
|
|
116
|
-
|
|
117
|
-
- Never trust units. Verify against a known dimension before mating anything: bbox via `forgecad run --details`, or `inspect section --ray` across a bore or face pair. For 3MF, account for every build item printed by `forgecad run` before flattening.
|
|
118
|
-
- Derive mating geometry by measurement, not eyeball: pull bore positions, diameters, and face offsets from sections, then hold them with `verify.clearanceBetween`/`verify.connectorDistance` against the import like any other body. Collision Policy applies to imports too.
|
|
119
|
-
- The import is a purchased/fixed line item; the manufactured deliverables are the ForgeCAD-authored parts around it. Remodel an imported feature only where a boolean against the mesh is unreliable — and say so.
|
|
53
|
+
#### Stage 1: Design Intent
|
|
120
54
|
|
|
121
|
-
|
|
55
|
+
Read `references/stage-1-design-intent.md`.
|
|
122
56
|
|
|
123
|
-
|
|
57
|
+
Accepted when the project has a product/user story, PR/FAQ or equivalent design-intent doc, output standard, process assumptions, explicit success criteria, and a first feedback plan.
|
|
124
58
|
|
|
125
|
-
|
|
126
|
-
- Never use interpenetration as a placement shortcut. Model contact honestly: pins in holes, shafts in seats, tabs in slots, hinges with knuckle clearance, nested parts with wall offsets, moving parts with travel envelopes.
|
|
127
|
-
- Temporary construction overlaps (oversized cutters before `difference()`, primitives before `union()`, exploratory layouts) must be consumed, hidden, named as ghosts, or isolated with `--focus`/`--hide` so final findings stay meaningful.
|
|
128
|
-
- Collision removal is part of the modeling pass, not optional polish.
|
|
59
|
+
#### Stage 2: Architecture Plan
|
|
129
60
|
|
|
130
|
-
|
|
61
|
+
Read `references/stage-2-architecture-plan.md`.
|
|
131
62
|
|
|
132
|
-
|
|
63
|
+
Accepted when the HLD and needed LLD/module docs define the component graph, nested file structure, interfaces, parameters, build order, and evidence gates.
|
|
133
64
|
|
|
134
|
-
|
|
135
|
-
- Scripts using `assembly()`: `forgecad debug assembly model.forge.js --fail-on warning`. Fix warnings (multiple roots, manual joint contracts, disconnected bodies, unused connectors, collisions); a truly intentional one gets a visible reason in code.
|
|
136
|
-
- Generated mechanical work: `forgecad inspect mechanical-integrity . --collisions` is the shareability gate — it fails on missing `verify.*` interface checks, fragmented named groups, uncontracted manual assemblies, positive-volume collisions, timeouts, runtime failures. Do not share while red unless the user asked for a blockout.
|
|
137
|
-
- Include at least one verification that proves a mechanical interface (clearance band, keep-out, connector mate), not just object counts.
|
|
138
|
-
- Moving assemblies: incomplete until poses cover rest, mid-travel, both limits, coupled and mirrored states via `--joint` and/or in-script `solve(state)` checks, with convergence, attachment, and clearances holding at every pose.
|
|
139
|
-
2. **Collision evidence**: run `forgecad inspect fit interference`; read the manifest collision count AND the evidence PNGs. Zero unexpected findings per Collision Policy; visually confirm where any findings appear.
|
|
140
|
-
3. **Risk-specific views, not just a hero shot.** Delivery renders use the model's `scene()` rig (Scene Presentation below) — default flat lighting in a final render is a finding. One whole-model context view plus views chosen from this object's failure modes — opposing, underside, interior-facing, or grazing angles that catch internals showing through openings, covers that don't close, bad boolean cuts. Per meaningful interface: one contextual and one focused/isolated view. Risk prompts:
|
|
141
|
-
- long products, rails, handles, tools: views along and across the dominant length (bends, sag, end attachments)
|
|
142
|
-
- enclosures/shells with internals: exterior plus hidden-cover views (fit, concealment, service access)
|
|
143
|
-
- sockets, underside joins, stands, brackets: look directly into the mating face or underside; `inspect sections` for hidden geometry
|
|
144
|
-
- cables, strings, belts, tubes: both endpoints, route clearance, sag, termination hardware
|
|
145
|
-
- surface details on curved ProductSkin bodies: grazing and contextual views proving details conform or embed
|
|
146
|
-
4. **Visual attachment audit.** For every detail that should be connected, ask "where does this physically enter, seat, wrap, terminate, or fasten?" and check that view directly. Known failures to fix before delivery:
|
|
147
|
-
- a flat rail or bed sitting on a curved shell instead of being recessed, saddled, socketed, or blended in
|
|
148
|
-
- strings/cables passing through space without knots, hooks, holes, posts, ferrules, pulleys, or anchors
|
|
149
|
-
- trim lines floating above the body instead of following the surface or being inset/raised strips with real thickness
|
|
150
|
-
- handles/grips touching only by a tangent instead of having a neck, bridge, socket, screws, or overmolded landing
|
|
151
|
-
- small hardware/gems that are bbox-connected but visually levitate; give them flush/inset seats or explicit brackets
|
|
152
|
-
5. **ProductSkin honesty.** Boolean-test warnings from sampled-loft boundary edges are not real collisions. Deliver only if the collision count is clean, connectivity is correct, and the attachment audit passes; mention the residual warning in the final response.
|
|
153
|
-
6. **Name the evidence** in the final response: commands run, views checked, joint values tested, focus/hide filters, component count, collision count, residual warnings or intentional exceptions. Never just say "validated."
|
|
65
|
+
#### Stage 3: Build Slices
|
|
154
66
|
|
|
155
|
-
|
|
67
|
+
Read `references/stage-3-build-slices.md`.
|
|
156
68
|
|
|
157
|
-
|
|
69
|
+
Accepted when each slice or module runs in isolation, exposes clean connectors/metadata, has targeted render/inspect evidence, and updates the design docs with findings.
|
|
158
70
|
|
|
159
|
-
|
|
160
|
-
- Put `dim()` annotations on the dimensions a builder must hit: overall envelope, critical interfaces, mating bores and bolt patterns.
|
|
161
|
-
- Prove the process-appropriate export runs cleanly and name the output path in the final response: `export stl`/`export 3mf` for printed parts; `export step` for machined parts and CAD interchange; sheet-metal parts must unfold to a valid flat pattern (`export cutting-layout` for sheet goods). `step`, `report`, and `cutting-layout` need a Production license — if unavailable, run the free exports and name the gated commands that complete the package instead of failing.
|
|
162
|
-
- An export failure (non-manifold body, open shell, fused multi-part blob where one fabricated part was expected) is a model bug, not an export problem.
|
|
71
|
+
#### Stage 4: Feedback And Iteration
|
|
163
72
|
|
|
164
|
-
|
|
73
|
+
Read `references/stage-4-feedback-iteration.md`. Also read `references/inspection-feedback.md` for inspection bundles and `references/simulation-feedback.md` for MuJoCo, FEA, or other behavior checks.
|
|
165
74
|
|
|
166
|
-
|
|
75
|
+
Accepted only after automatic and manual evidence has been gathered, interpreted, and converted into model/design edits until the model behaves the way the user expects at the relevant module and system levels.
|
|
167
76
|
|
|
168
|
-
|
|
77
|
+
#### Stage 5: Readiness Package
|
|
169
78
|
|
|
170
|
-
|
|
79
|
+
Read `references/stage-5-readiness-package.md`.
|
|
171
80
|
|
|
172
|
-
|
|
81
|
+
Accepted when the final post-iteration model passes run/render/inspect evidence, plus simulation or export evidence only when requested or process-critical, carries BOM and critical dimensions, and can be reported with evidence reviewed, residual risks, and the next validation loop if anything remains unproven.
|
|
173
82
|
|
|
174
|
-
|
|
83
|
+
### Reference Routing
|
|
175
84
|
|
|
176
|
-
|
|
85
|
+
Read only what the current stage needs:
|
|
177
86
|
|
|
178
|
-
|
|
87
|
+
- Stage references — the workflow acceptance gates.
|
|
88
|
+
- `references/parameter-controls.md` — deciding which user-facing `param()` controls to expose, where they live, and how to validate ranges.
|
|
89
|
+
- `references/module-contracts.md` — builder-first returns, preview guards, connector/data-flow rules, and assembly anti-patterns.
|
|
90
|
+
- `references/inspection-feedback.md` — choosing, running, and interpreting `forgecad inspect` evidence.
|
|
91
|
+
- `references/simulation-feedback.md` — MJCF/MuJoCo verification, FEA readiness, dynamic/contact checks, and behavior evidence.
|
|
92
|
+
- `references/readiness-review.md` — requirement checklist, evidence caps, and final readiness reporting.
|
|
93
|
+
- Core `forgecad` skill docs — API calls, CLI command syntax, generated assembly/viewport/scene/export docs, inspection bundle contracts, structural FEA, and examples.
|
|
179
94
|
|
|
180
|
-
|
|
181
|
-
2. **Solve one piece** in isolation: own variables, own return, no connection logic yet.
|
|
182
|
-
3. **Verify it**: `forgecad run`, then render and read the PNG. Fix while the scope is tiny.
|
|
183
|
-
4. **Compose one layer at a time**, verifying at each level so a break is always at the newest seam.
|
|
95
|
+
### Non-Negotiable Gates
|
|
184
96
|
|
|
185
|
-
|
|
97
|
+
- Build the physical artifact, not a teaching diagram: no labels, callouts, cutaways, or explanatory slabs unless explicitly requested.
|
|
98
|
+
- Do not treat every model as printable; choose the process stack from load path, use, scale, and operating story.
|
|
99
|
+
- Use the component model for assemblies: parts build at origin, connectors position them, and data flows through the parent.
|
|
100
|
+
- Prove mechanisms with motion skeletons and pose checks before attaching final geometry.
|
|
101
|
+
- Use `verify.*` for dimensions, clearances, connector mates, collisions, and acceptance checks.
|
|
102
|
+
- Expected final collision count is zero unless an exact intentional overlap is declared and verified.
|
|
103
|
+
- Treat every failed run, render, inspect, required simulation, requested/process-critical export, or manual review finding as an iteration input. Fix the model or revise the design, then gather the same evidence again.
|
|
186
104
|
|
|
187
|
-
### Scene Presentation
|
|
188
105
|
|
|
189
|
-
|
|
106
|
+
## Bundled Files
|
|
190
107
|
|
|
191
|
-
-
|
|
192
|
-
-
|
|
193
|
-
-
|
|
194
|
-
-
|
|
195
|
-
-
|
|
196
|
-
-
|
|
108
|
+
- `references/inspection-feedback.md`
|
|
109
|
+
- `references/module-contracts.md`
|
|
110
|
+
- `references/parameter-controls.md`
|
|
111
|
+
- `references/readiness-review.md`
|
|
112
|
+
- `references/simulation-feedback.md`
|
|
113
|
+
- `references/stage-1-design-intent.md`
|
|
114
|
+
- `references/stage-2-architecture-plan.md`
|
|
115
|
+
- `references/stage-3-build-slices.md`
|
|
116
|
+
- `references/stage-4-feedback-iteration.md`
|
|
117
|
+
- `references/stage-5-readiness-package.md`
|
|
118
|
+
- `scripts/mujoco_verify.py`
|
|
119
|
+
- `scripts/summarize_manifest.py`
|
|
@@ -15,7 +15,7 @@ Write builder-honest AI image prompts from a concrete ForgeCAD model, build brie
|
|
|
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)
|
|
18
|
+
Only for artifacts already concrete enough to visualize (a specific `.forge.js` model, build brief, or HLD). If the user wants a model after the prompt, route vague physical briefs to `forgecad-build-model` so its design stages own the build. 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
|
|
|
@@ -13,12 +13,12 @@ Manage hosted ForgeCAD project sync from the CLI: init, clone, pull, push, file
|
|
|
13
13
|
|
|
14
14
|
## Project Sync
|
|
15
15
|
|
|
16
|
-
forgecad.io is the hosted ForgeCAD platform; a project is a local folder linked to the server
|
|
16
|
+
forgecad.io is the hosted ForgeCAD platform; a project is a local folder marked by `forgecad.json`, and linked to the server after its first push. 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
|
|
|
18
18
|
- **One studio process.** Run a single long-running `forgecad studio <folder> [<folder> ...]` naming every active project folder. The user opens the one printed localhost port once; create and edit files only under those folders so the browser live-updates. Never spawn extra servers per project.
|
|
19
19
|
- **studio vs dev.** `forgecad studio` is for users and agents; `forgecad dev` is only for developing ForgeCAD itself.
|
|
20
|
-
- **Login only for hosted commands.** `
|
|
21
|
-
- **init
|
|
20
|
+
- **Login only for hosted commands.** `project init` plus local work (run, render, studio) need no auth. Run `forgecad login` before hosted sync/admin commands such as `project push`, `project pull`, `project file *`, members, shares, and `publish`.
|
|
21
|
+
- **init is local, push creates remote.** `project init "Name"` writes local project metadata to `forgecad.json` without contacting the server. The first `project push` creates the hosted project if `forgecad.json` has no project ID yet, uploads existing local files, and records server file IDs. Later pushes sync the already-linked project. `clone <slug>` is the inverse: remote → new local folder.
|
|
22
22
|
- **Sync is content-hash based.** `status`/`push`/`pull` compare file content hashes — no timestamps, no git; a file is "modified" purely by content difference. Loop: edit → `project status` → `project push`.
|
|
23
23
|
- **Sync vs single-file ops.** Use `status`/`pull`/`push` for normal sync; use `project file <read|save|delete|...>` only for one hosted-file operation without a full push/pull cycle.
|
|
24
24
|
- **Project context required.** All `project file *` and `publish` commands must run inside a folder containing `forgecad.json`.
|
|
@@ -15,7 +15,7 @@ Reconstruct a readable parametric ForgeCAD model from an existing CAD or mesh fi
|
|
|
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-build-model
|
|
18
|
+
Routing: user wants to KEEP the file as a live component and design around it (bracket, enclosure, mating assembly) → `forgecad-build-model`, not this skill; prepared benchmark/RL episodes → use the task-local benchmark instructions, not the public skill library; inspection-bundle interpretation → `forgecad-build-model/references/inspection-feedback.md`; readiness review → `forgecad-build-model/references/readiness-review.md`; 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
|
|
53
|
+
The final model must run, render, re-compare at `--samples 5000`, and pass an `inspect compare overlay`. Add targeted inspects using `forgecad-build-model`'s inspection feedback reference 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
|
|
@@ -18,9 +18,8 @@ The reference image is evidence, not the deliverable. The deliverable is a real
|
|
|
18
18
|
### Companion Skills
|
|
19
19
|
|
|
20
20
|
- `forgecad` — API docs, model authoring, renderer behavior.
|
|
21
|
-
- `forgecad-
|
|
22
|
-
- `forgecad-build-model` —
|
|
23
|
-
- `forgecad-inspect-model` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
21
|
+
- `forgecad-build-model` — design stages, file placement, project structure, decomposition, definition of done.
|
|
22
|
+
- `forgecad-build-model/references/inspection-feedback.md` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
24
23
|
|
|
25
24
|
### Core Rule
|
|
26
25
|
|
|
@@ -30,13 +29,13 @@ Infer the real object before matching any camera — identity, manufacture, scal
|
|
|
30
29
|
|
|
31
30
|
1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
|
|
32
31
|
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.
|
|
32
|
+
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. Follow `forgecad-build-model` design stages when these are underdetermined.
|
|
34
33
|
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
34
|
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
35
|
6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
|
|
37
36
|
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
37
|
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-
|
|
38
|
+
9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-build-model`'s inspection feedback reference.
|
|
40
39
|
|
|
41
40
|
### Comparison Boards
|
|
42
41
|
|
|
@@ -30,7 +30,8 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
|
|
|
30
30
|
|
|
31
31
|
#### Import and Composition
|
|
32
32
|
|
|
33
|
-
- Always include the extension in relative imports: `require("./file.forge.js"
|
|
33
|
+
- Always include the extension in relative imports: `require("./file.forge.js")` for model files, `require("./helpers.js")` for plain helper modules. Extensionless imports such as `require("./file")` do not resolve; ForgeCAD resolves project imports by exact path.
|
|
34
|
+
- Reusable `.forge.js` part files should return builder functions such as `return { buildPart }`; direct-run preview params belong inside `if (require.main === module)`.
|
|
34
35
|
- ForgeCAD APIs are injected globals in `.forge.js` files. Use `bom()`, `box()`, `scene()`, `Shape`, etc. directly; never destructure those names from helpers (`const { bom } = require("./bom.js")`). Import helper files under a project-specific name such as `const bomHelpers = require("./bom.js")`.
|
|
35
36
|
- For static multi-part models, connectors + `matchTo()` are the default way to assemble touching parts.
|
|
36
37
|
- Top-level scripts can return `Assembly` or `SolvedAssembly` directly. Do not call `.toGroup()` just to render an assembly; use it only when you need `ShapeGroup` composition, transforms, or named-child lookup.
|
|
@@ -48,6 +49,7 @@ Execution model, colors, coordinate system, primitives, booleans, patterns, impo
|
|
|
48
49
|
|
|
49
50
|
- `docs/skill/API/core/concepts.md`
|
|
50
51
|
- `docs/skill/generated/runtime-names.md`
|
|
52
|
+
- `docs/skill/guides/manual-parameters.md`
|
|
51
53
|
- `docs/skill/generated/core.md`
|
|
52
54
|
|
|
53
55
|
#### 2. Static Assembly and Positioning (for any multi-part model)
|
|
@@ -114,6 +116,7 @@ Test-run, export pipelines, debug flags.
|
|
|
114
116
|
|
|
115
117
|
- `docs/skill/CLI.md`
|
|
116
118
|
- `docs/skill/guides/inspection-bundles.md`
|
|
119
|
+
- `docs/skill/guides/structural-fea.md`
|
|
117
120
|
|
|
118
121
|
#### SDF Modeling (smooth booleans, TPMS, deformations, fromFunction)
|
|
119
122
|
|
|
@@ -11,12 +11,8 @@ 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-build-model](/docs/skills/forgecad-build-model) | `forgecad skill install` | Build or edit
|
|
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. |
|
|
14
|
+
| [forgecad-build-model](/docs/skills/forgecad-build-model) | `forgecad skill install` | Build or edit `.forge.js` real product models through design, automatic/manual feedback gathering, inspection/simulation/FEA evidence, and iteration until ready. |
|
|
17
15
|
| [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
16
|
| [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
17
|
| [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
18
|
| [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,19 @@
|
|
|
1
|
+
const aluminum = Fea.material('6061-T6', {
|
|
2
|
+
densityKgM3: 2700,
|
|
3
|
+
youngsModulusMPa: 68900,
|
|
4
|
+
poissonRatio: 0.33,
|
|
5
|
+
yieldStrengthMPa: 276,
|
|
6
|
+
});
|
|
7
|
+
|
|
8
|
+
const beam = box(200, 20, 10);
|
|
9
|
+
|
|
10
|
+
return assembly('Cantilever FEA')
|
|
11
|
+
.addPart('Beam', beam, { fea: Fea.body({ material: aluminum }) })
|
|
12
|
+
.withFeaStudy(
|
|
13
|
+
Fea.study.staticStress('tip-load', {
|
|
14
|
+
fixtures: [Fea.fix.fixed(Fea.region.face('Beam', 'left'))],
|
|
15
|
+
loads: [Fea.load.force(Fea.region.face('Beam', 'right'), { newtons: 100, direction: [0, 0, -1] })],
|
|
16
|
+
target: Fea.target.minSafetyFactor(2),
|
|
17
|
+
mesh: Fea.mesh.quadraticTets({ maxSizeMm: 3 }),
|
|
18
|
+
}),
|
|
19
|
+
);
|