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,235 @@
|
|
|
1
|
+
---
|
|
2
|
+
skill-group: cli
|
|
3
|
+
skill-order: 3
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Structural FEA Stress Inspection
|
|
7
|
+
|
|
8
|
+
Use structural FEA when you want a ForgeCAD model to answer a load-case question:
|
|
9
|
+
|
|
10
|
+
- Where does this part see the highest stress?
|
|
11
|
+
- How far does it deflect?
|
|
12
|
+
- What is the minimum safety factor against the material yield strength?
|
|
13
|
+
- Did the mesh and solver produce evidence that is good enough to inspect?
|
|
14
|
+
|
|
15
|
+
ForgeCAD owns the authoring contract, solver orchestration, result feedback, and inspection report. The numerical solve is done out of process with Gmsh and CalculiX. Users author a study in the model, run `forgecad fea run`, and inspect a result bundle.
|
|
16
|
+
|
|
17
|
+
## Contents
|
|
18
|
+
|
|
19
|
+
- What You Get
|
|
20
|
+
- What You Need Installed
|
|
21
|
+
- Author The Study
|
|
22
|
+
- Choose Stable Regions
|
|
23
|
+
- Run The Flow
|
|
24
|
+
- Read The Results
|
|
25
|
+
- Current Scope
|
|
26
|
+
- Troubleshooting
|
|
27
|
+
|
|
28
|
+
## What You Get
|
|
29
|
+
|
|
30
|
+
A solved FEA result bundle can produce:
|
|
31
|
+
|
|
32
|
+
- max von Mises stress
|
|
33
|
+
- max displacement
|
|
34
|
+
- minimum safety factor
|
|
35
|
+
- mesh quality and solver trust flags
|
|
36
|
+
- region-level hot spots
|
|
37
|
+
- `report.html`
|
|
38
|
+
- `summary.json`
|
|
39
|
+
- a safety-factor heatmap PNG
|
|
40
|
+
- a solver stress heatmap PNG
|
|
41
|
+
- a displacement magnitude heatmap PNG
|
|
42
|
+
|
|
43
|
+
The deformed render is display-only. It helps explain the displacement shape; it does not change the stress, displacement, or safety-factor numbers reported by the solver.
|
|
44
|
+
|
|
45
|
+
## What You Need Installed
|
|
46
|
+
|
|
47
|
+
The ForgeCAD CLI creates the package and renders the heatmap. The package runner uses self-contained `uv` Python scripts for Gmsh so every package resolves the same Python dependency set by default.
|
|
48
|
+
|
|
49
|
+
Run `forgecad doctor` to check these optional FEA tools in a separate section. Missing FEA tools do not block core ForgeCAD modeling, export, or render commands.
|
|
50
|
+
|
|
51
|
+
| Tool | Used For | Quick Check |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| `uv` | Runs the packaged Python scripts with pinned dependencies | `uv --version` |
|
|
54
|
+
| CalculiX `ccx` | Solves the static stress deck | `ccx -v` |
|
|
55
|
+
| Bash | Runs the package script | `bash --version` |
|
|
56
|
+
| Chrome or Chromium | Renders PNG heatmaps from solved evidence | Chrome installed in a standard location, `CHROME_PATH=/path/to/chrome`, or `--chrome-path /path/to/chrome` |
|
|
57
|
+
|
|
58
|
+
If `uv` is not on `PATH`, set `UV=/path/to/uv` when running `forgecad fea run` or `forgecad fea check`.
|
|
59
|
+
|
|
60
|
+
If `ccx` is not on `PATH`, set `CCX=/path/to/ccx` when running `forgecad fea run` or `forgecad fea check`.
|
|
61
|
+
|
|
62
|
+
If you need an offline or pre-provisioned Python environment, set `PYTHON=/path/to/python`. That opt-out Python must be able to `import gmsh`; use `GMSH_PYTHONPATH` / `GMSH_PYTHON_PATH` only for that override path.
|
|
63
|
+
|
|
64
|
+
ForgeCAD does not bundle CalculiX. The generated `uv` scripts pin the Gmsh Python package, and `uv` downloads/caches it from the configured Python package index. If you redistribute solver binaries or Python wheels to customers, handle their licenses as part of your distribution.
|
|
65
|
+
|
|
66
|
+
## Author The Study
|
|
67
|
+
|
|
68
|
+
Structural FEA starts in the `.forge.js` file. The script should return an authored `assembly(...)` with:
|
|
69
|
+
|
|
70
|
+
1. a structural part marked with `Fea.body(...)`
|
|
71
|
+
2. one or more static stress studies from `Fea.study.staticStress(...)`
|
|
72
|
+
3. explicit fixtures and loads
|
|
73
|
+
4. a second-order tetrahedral mesh intent
|
|
74
|
+
|
|
75
|
+
```js
|
|
76
|
+
const aluminum = Fea.material("6061-T6", {
|
|
77
|
+
densityKgM3: 2700,
|
|
78
|
+
youngsModulusMPa: 68900,
|
|
79
|
+
poissonRatio: 0.33,
|
|
80
|
+
yieldStrengthMPa: 276,
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
const beam = box(120, 12, 12);
|
|
84
|
+
|
|
85
|
+
return assembly("Cantilever Stress Study")
|
|
86
|
+
.addPart("Beam", beam, {
|
|
87
|
+
fea: Fea.body({ material: aluminum }),
|
|
88
|
+
})
|
|
89
|
+
.withFeaStudy(
|
|
90
|
+
Fea.study.staticStress("end-load", {
|
|
91
|
+
fixtures: [
|
|
92
|
+
Fea.fix.fixed(Fea.region.face("fixed-end", beam.face("left"))),
|
|
93
|
+
],
|
|
94
|
+
loads: [
|
|
95
|
+
Fea.load.force(Fea.region.face("load-end", beam.face("right")), {
|
|
96
|
+
newtons: 80,
|
|
97
|
+
direction: [0, 0, -1],
|
|
98
|
+
}),
|
|
99
|
+
],
|
|
100
|
+
target: Fea.target.minSafetyFactor(2),
|
|
101
|
+
mesh: Fea.mesh.quadraticTets({ maxSizeMm: 4 }),
|
|
102
|
+
}),
|
|
103
|
+
);
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
The complete API reference is generated from source in [Assembly](../generated/assembly.md). Keep reusable examples in `.forge.js` files; do not duplicate every API signature in handwritten docs.
|
|
107
|
+
|
|
108
|
+
## Choose Stable Regions
|
|
109
|
+
|
|
110
|
+
Fixtures and loads must name real geometric regions. ForgeCAD will not guess them later.
|
|
111
|
+
|
|
112
|
+
Use `Fea.region.face(...)` when you can refer to a compiler-owned exact face, such as a simple box face or a named face from the model API.
|
|
113
|
+
|
|
114
|
+
Use `Fea.region.plane(...)` when the target is a planar face created by profiles, booleans, or imported geometry and the face name is not stable enough. Make the plane specific enough that it matches exactly one STEP/Gmsh surface.
|
|
115
|
+
|
|
116
|
+
During export, ForgeCAD writes a region map and a STEP tag plan. During the package run, the Gmsh preflight matches every authored fixture/load region against the STEP surfaces. Missing or ambiguous matches fail hard. That is intentional: a silent substitute face would make the stress result untrustworthy.
|
|
117
|
+
|
|
118
|
+
## Run The Flow
|
|
119
|
+
|
|
120
|
+
Installed users run the CLI as `forgecad`. Developers running inside this repository can replace `forgecad` with `node dist-cli/forgecad.js`.
|
|
121
|
+
|
|
122
|
+
Run every authored FEA study and save an inspection result bundle:
|
|
123
|
+
|
|
124
|
+
```bash
|
|
125
|
+
forgecad fea run examples/analysis/structural-stress-fea.forge.js
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
Run one named study:
|
|
129
|
+
|
|
130
|
+
```bash
|
|
131
|
+
forgecad fea run bracket.forge.js --study side-load
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
Open the report:
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
forgecad fea open out/bracket-fea
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Render a customer-facing safety view:
|
|
141
|
+
|
|
142
|
+
```bash
|
|
143
|
+
forgecad fea render out/bracket-fea/side-load --field safety
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
Render the engineering stress heatmap:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
forgecad fea render out/bracket-fea/side-load --field stress
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
Render the displacement magnitude heatmap:
|
|
153
|
+
|
|
154
|
+
```bash
|
|
155
|
+
forgecad fea render out/bracket-fea/side-load --field displacement
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
Render a deformed stress view only when the displacement shape is useful to inspect:
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
forgecad fea render out/bracket-fea/side-load \
|
|
162
|
+
--field stress \
|
|
163
|
+
--shape deformed \
|
|
164
|
+
--exaggerate 10
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
The deformation scale only affects the render. It does not change the reported stress, displacement, or safety factor.
|
|
168
|
+
|
|
169
|
+
Each solved study result directory includes:
|
|
170
|
+
|
|
171
|
+
- `report.html` for the human inspection report
|
|
172
|
+
- `summary.json` for automation
|
|
173
|
+
- `renders/safety-factor.png` for the customer-facing safety heatmap
|
|
174
|
+
- `renders/stress.png` for the engineering von Mises stress heatmap
|
|
175
|
+
|
|
176
|
+
Displacement and deformed-shape PNGs are explicit render outputs from `forgecad fea render --field displacement` or `--shape deformed`.
|
|
177
|
+
|
|
178
|
+
Compare two solved result bundles:
|
|
179
|
+
|
|
180
|
+
```bash
|
|
181
|
+
forgecad fea compare out/baseline-fea/side-load out/four-x-fea/side-load
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
Comparison renders use one shared camera, image size, and safety-factor legend.
|
|
185
|
+
|
|
186
|
+
Run in CI and fail the process when authored targets fail:
|
|
187
|
+
|
|
188
|
+
```bash
|
|
189
|
+
forgecad fea check bracket.forge.js --json
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
## Read The Results
|
|
193
|
+
|
|
194
|
+
Start with `report.html` or `summary.json` in the result directory. The important fields are the maximum stress, maximum displacement, minimum safety factor, hot spots, and any mesh or solver trust findings.
|
|
195
|
+
|
|
196
|
+
The default user-facing result is safety factor because it answers "is this part okay?" Use stress when you need the raw engineering von Mises field.
|
|
197
|
+
|
|
198
|
+
Advanced users can still run the lower-level package flow:
|
|
199
|
+
|
|
200
|
+
```bash
|
|
201
|
+
forgecad export fea model.forge.js --output out/beam.feapkg
|
|
202
|
+
forgecad sim fea out/beam.feapkg --json
|
|
203
|
+
forgecad inspect structural stress out/beam.feapkg --camera iso --output out/stress.png
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Those commands are useful for debugging package evidence. Customer docs should prefer `forgecad fea ...`.
|
|
207
|
+
|
|
208
|
+
## Current Scope
|
|
209
|
+
|
|
210
|
+
Structural FEA V1 is intentionally narrow:
|
|
211
|
+
|
|
212
|
+
- linear static stress only
|
|
213
|
+
- one structural body per package
|
|
214
|
+
- exact OCCT STEP export only
|
|
215
|
+
- second-order tetrahedral elements only
|
|
216
|
+
- fixed fixtures and force loads only
|
|
217
|
+
- no contacts, bonded assemblies, thermal loads, buckling, fatigue, plasticity, or certification workflow
|
|
218
|
+
|
|
219
|
+
ForgeCAD refuses mesh or faceted fallback for FEA export. If exact geometry export, region mapping, mesh quality, solver convergence, result parsing, or evidence trust fails, the command should fail with an actionable error instead of inventing a weaker path.
|
|
220
|
+
|
|
221
|
+
## Troubleshooting
|
|
222
|
+
|
|
223
|
+
| Symptom | What It Means | What To Do |
|
|
224
|
+
| --- | --- | --- |
|
|
225
|
+
| `FEA.TOOLCHAIN_UV_MISSING` | The package runner cannot find `uv`. | Install `uv` or run with `UV=/path/to/uv`. |
|
|
226
|
+
| `FEA.TOOLCHAIN_PYTHON_MISSING` | A `PYTHON=...` override points to a missing Python executable. | Install Python 3 or fix the `PYTHON` path. |
|
|
227
|
+
| `FEA.TOOLCHAIN_GMSH_MISSING` | The selected Python process cannot import Gmsh. | Prefer the default `uv` path, or install the Gmsh Python module for the `PYTHON=...` override. |
|
|
228
|
+
| `FEA.TOOLCHAIN_CCX_MISSING` | CalculiX is not available as `ccx`. | Install CalculiX or run with `CCX=/path/to/ccx`. |
|
|
229
|
+
| `FEA.GMSH_FACE_MATCH_NONE` | An authored fixture/load region did not match a STEP surface. | Use a more stable face reference or a more precise planar region. |
|
|
230
|
+
| `FEA.GMSH_FACE_MATCH_AMBIGUOUS` | A region matched more than one STEP surface. | Make the target region more specific or change the model so the load/fixture face is unique. |
|
|
231
|
+
| `FEA.MESH_QUALITY_BELOW_TARGET` | The mesh exists but did not meet the package quality target. | Reduce mesh size, simplify tiny features, or improve the geometry around the hot area. |
|
|
232
|
+
| `FEA.SOLVER_FAILED` | CalculiX did not complete the solve. | Inspect `solver/static_stress.log`, then check fixtures, loads, material values, and over-constraint. |
|
|
233
|
+
| `FEA.FIELD_UNTRUSTED` | The heatmap input is not trusted package evidence. | Run inspection on the `.feapkg` directory after `forgecad sim fea`, not a copied JSON file. |
|
|
234
|
+
|
|
235
|
+
For command flags, use the [CLI reference](../CLI.md). For the public API, use the generated [Assembly reference](../generated/assembly.md).
|
|
@@ -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
|
|