forgecad 0.10.4 → 0.10.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/assets/{AdminPage-B3L3W1Uo.js → AdminPage-raksfnNA.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DXKVXMrJ.js → BenchmarkPage-DP3RxhPs.js} +2 -2
  3. package/dist/assets/{BlogPage-B7BWxOCg.js → BlogPage-D7Dos-vl.js} +1 -1
  4. package/dist/assets/{DocsPage-BPGGwht1.js → DocsPage-DO1kvBns.js} +7 -1
  5. package/dist/assets/{EditorApp-BWUGCdD5.js → EditorApp-DQJmcmRT.js} +9 -8
  6. package/dist/assets/{EmbedViewer-DygByZS2.js → EmbedViewer-DFDUhOma.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-BoVE7JGY.js → LandingPageProofDriven-DbE_tp8-.js} +2 -2
  8. package/dist/assets/{LegalPage-Din8wv8d.js → LegalPage-CominSso.js} +2 -2
  9. package/dist/assets/{PricingPage-C2PMzmDc.js → PricingPage-CcVIN9yj.js} +2 -2
  10. package/dist/assets/{SettingsPage-BlJDCRe8.js → SettingsPage-DLWcP289.js} +1 -1
  11. package/dist/assets/{app-BsRYSfxY.js → app-xW3hOdq9.js} +1135 -320
  12. package/dist/assets/{backendInit-6C0DLgH0.js → backendInit-mDHk97u7.js} +6630 -2493
  13. package/dist/assets/cli/{render-XXol_ET7.js → render--SIU27W_.js} +1263 -112
  14. package/dist/assets/{constructionHistoryWorker-cTHWRJEi.js → constructionHistoryWorker-uEe_Q7Kg.js} +1861 -610
  15. package/dist/assets/{evalWorker-BssDYW9u.js → evalWorker-BqyDHDcI.js} +6254 -2177
  16. package/dist/assets/{forgecad_geometry-CZ_IfuvA.js → forgecad_geometry-D8rWX7nQ.js} +1 -1
  17. package/dist/assets/{forgecad_geometry_bg-C3rQHfwg.wasm → forgecad_geometry_bg-ObqfqjJT.wasm} +0 -0
  18. package/dist/assets/{inspectWorker-ymhBV4Ll.js → inspectWorker-UXMxlcR8.js} +2738 -742
  19. package/dist/assets/{jointPose-B0blBj9A.js → jointPose-bYMlwU3v.js} +1 -1
  20. package/dist/assets/{landing-proof-driven-Cpf-MIbI.css → landing-proof-driven-_u4v_xQb.css} +2 -2
  21. package/dist/assets/{manifold-B_7QXpGB.js → manifold-BR7UYI4P.js} +1 -1
  22. package/dist/assets/{manifold-CYlIm-M6.js → manifold-CyOV5B9S.js} +2 -2
  23. package/dist/assets/{manifold-CNShmpEJ.js → manifold-D4d5NQst.js} +1 -1
  24. package/dist/assets/{reportWorker-Cb5eyM7D.js → reportWorker-DsaICZsn.js} +6010 -2032
  25. package/dist/cli/render.html +1 -1
  26. package/dist/docs/index.html +2 -2
  27. package/dist/docs-raw/CLI.md +4 -2
  28. package/dist/docs-raw/generated/assembly.md +76 -3
  29. package/dist/docs-raw/generated/concepts.md +31 -4
  30. package/dist/docs-raw/generated/core.md +159 -21
  31. package/dist/docs-raw/generated/curves.md +344 -6
  32. package/dist/docs-raw/generated/runtime-names.md +12 -12
  33. package/dist/docs-raw/generated/sketch.md +16 -3
  34. package/dist/docs-raw/guides/inspection-bundles.md +4 -2
  35. package/dist/docs-raw/guides/structural-fea.md +224 -0
  36. package/dist/docs-raw/skills/forgecad.md +1 -0
  37. package/dist/index.html +1 -1
  38. package/dist/sitemap.xml +15 -15
  39. package/dist-cli/{check-compiler-4RPB6SB5.js → check-compiler-7YAHVXYM.js} +1 -1
  40. package/dist-cli/{check-query-propagation-KN3DFQTX.js → check-query-propagation-ZRR6IOJW.js} +1 -1
  41. package/dist-cli/{chunk-UHBRMYA6.js → chunk-VNM67DIV.js} +6489 -2333
  42. package/dist-cli/forgecad.js +5258 -717
  43. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  44. package/dist-skill/CONTEXT.md +827 -45
  45. package/dist-skill/SKILL.md +1 -0
  46. package/dist-skill/docs/CLI.md +4 -2
  47. package/dist-skill/docs/generated/assembly.md +73 -3
  48. package/dist-skill/docs/generated/core.md +159 -21
  49. package/dist-skill/docs/generated/curves.md +343 -6
  50. package/dist-skill/docs/generated/runtime-names.md +12 -12
  51. package/dist-skill/docs/generated/sketch.md +16 -3
  52. package/dist-skill/docs/guides/inspection-bundles.md +4 -2
  53. package/dist-skill/docs/guides/structural-fea.md +224 -0
  54. package/dist-skill/website/skills/forgecad.md +1 -0
  55. package/examples/analysis/structural-stress-fea.forge.js +19 -0
  56. package/examples/api/blend-full-round.forge.js +37 -0
  57. package/examples/api/blend-variable-radius.forge.js +51 -0
  58. package/examples/api/curve-project-and-intersect.forge.js +59 -0
  59. package/examples/api/extrude-up-to-face.forge.js +47 -0
  60. package/examples/api/spoon-full-tang-handle.forge.js +148 -0
  61. package/examples/api/surface-boundarynet-dished-bowl.forge.js +63 -0
  62. package/examples/api/surface-fill-interior-constraints.forge.js +59 -0
  63. package/package.json +4 -1
  64. /package/dist/assets/{landing-proof-driven-BxZZh5r5.js → landing-proof-driven-DNPRKL_p.js} +0 -0
@@ -0,0 +1,224 @@
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
+ ## What You Get
18
+
19
+ A solved FEA result bundle can produce:
20
+
21
+ - max von Mises stress
22
+ - max displacement
23
+ - minimum safety factor
24
+ - mesh quality and solver trust flags
25
+ - region-level hot spots
26
+ - `report.html`
27
+ - `summary.json`
28
+ - a safety-factor heatmap PNG
29
+ - a solver stress heatmap PNG
30
+ - a displacement magnitude heatmap PNG
31
+
32
+ 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.
33
+
34
+ ## What You Need Installed
35
+
36
+ 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.
37
+
38
+ 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.
39
+
40
+ | Tool | Used For | Quick Check |
41
+ | --- | --- | --- |
42
+ | `uv` | Runs the packaged Python scripts with pinned dependencies | `uv --version` |
43
+ | CalculiX `ccx` | Solves the static stress deck | `ccx -v` |
44
+ | Bash | Runs the package script | `bash --version` |
45
+ | 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` |
46
+
47
+ If `uv` is not on `PATH`, set `UV=/path/to/uv` when running `forgecad fea run` or `forgecad fea check`.
48
+
49
+ If `ccx` is not on `PATH`, set `CCX=/path/to/ccx` when running `forgecad fea run` or `forgecad fea check`.
50
+
51
+ 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.
52
+
53
+ 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.
54
+
55
+ ## Author The Study
56
+
57
+ Structural FEA starts in the `.forge.js` file. The script should return an authored `assembly(...)` with:
58
+
59
+ 1. a structural part marked with `Fea.body(...)`
60
+ 2. one or more static stress studies from `Fea.study.staticStress(...)`
61
+ 3. explicit fixtures and loads
62
+ 4. a second-order tetrahedral mesh intent
63
+
64
+ ```js
65
+ const aluminum = Fea.material("6061-T6", {
66
+ densityKgM3: 2700,
67
+ youngsModulusMPa: 68900,
68
+ poissonRatio: 0.33,
69
+ yieldStrengthMPa: 276,
70
+ });
71
+
72
+ const beam = box(120, 12, 12);
73
+
74
+ return assembly("Cantilever Stress Study")
75
+ .addPart("Beam", beam, {
76
+ fea: Fea.body({ material: aluminum }),
77
+ })
78
+ .withFeaStudy(
79
+ Fea.study.staticStress("end-load", {
80
+ fixtures: [
81
+ Fea.fix.fixed(Fea.region.face("fixed-end", beam.face("left"))),
82
+ ],
83
+ loads: [
84
+ Fea.load.force(Fea.region.face("load-end", beam.face("right")), {
85
+ newtons: 80,
86
+ direction: [0, 0, -1],
87
+ }),
88
+ ],
89
+ target: Fea.target.minSafetyFactor(2),
90
+ mesh: Fea.mesh.quadraticTets({ maxSizeMm: 4 }),
91
+ }),
92
+ );
93
+ ```
94
+
95
+ 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.
96
+
97
+ ## Choose Stable Regions
98
+
99
+ Fixtures and loads must name real geometric regions. ForgeCAD will not guess them later.
100
+
101
+ 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.
102
+
103
+ 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.
104
+
105
+ 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.
106
+
107
+ ## Run The Flow
108
+
109
+ Installed users run the CLI as `forgecad`. Developers running inside this repository can replace `forgecad` with `node dist-cli/forgecad.js`.
110
+
111
+ Run every authored FEA study and save an inspection result bundle:
112
+
113
+ ```bash
114
+ forgecad fea run examples/analysis/structural-stress-fea.forge.js
115
+ ```
116
+
117
+ Run one named study:
118
+
119
+ ```bash
120
+ forgecad fea run bracket.forge.js --study side-load
121
+ ```
122
+
123
+ Open the report:
124
+
125
+ ```bash
126
+ forgecad fea open out/bracket-fea
127
+ ```
128
+
129
+ Render a customer-facing safety view:
130
+
131
+ ```bash
132
+ forgecad fea render out/bracket-fea/side-load --field safety
133
+ ```
134
+
135
+ Render the engineering stress heatmap:
136
+
137
+ ```bash
138
+ forgecad fea render out/bracket-fea/side-load --field stress
139
+ ```
140
+
141
+ Render the displacement magnitude heatmap:
142
+
143
+ ```bash
144
+ forgecad fea render out/bracket-fea/side-load --field displacement
145
+ ```
146
+
147
+ Render a deformed stress view only when the displacement shape is useful to inspect:
148
+
149
+ ```bash
150
+ forgecad fea render out/bracket-fea/side-load \
151
+ --field stress \
152
+ --shape deformed \
153
+ --exaggerate 10
154
+ ```
155
+
156
+ The deformation scale only affects the render. It does not change the reported stress, displacement, or safety factor.
157
+
158
+ Each solved study result directory includes:
159
+
160
+ - `report.html` for the human inspection report
161
+ - `summary.json` for automation
162
+ - `renders/safety-factor.png` for the customer-facing safety heatmap
163
+ - `renders/stress.png` for the engineering von Mises stress heatmap
164
+
165
+ Displacement and deformed-shape PNGs are explicit render outputs from `forgecad fea render --field displacement` or `--shape deformed`.
166
+
167
+ Compare two solved result bundles:
168
+
169
+ ```bash
170
+ forgecad fea compare out/baseline-fea/side-load out/four-x-fea/side-load
171
+ ```
172
+
173
+ Comparison renders use one shared camera, image size, and safety-factor legend.
174
+
175
+ Run in CI and fail the process when authored targets fail:
176
+
177
+ ```bash
178
+ forgecad fea check bracket.forge.js --json
179
+ ```
180
+
181
+ ## Read The Results
182
+
183
+ 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.
184
+
185
+ 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.
186
+
187
+ Advanced users can still run the lower-level package flow:
188
+
189
+ ```bash
190
+ forgecad export fea model.forge.js --output out/beam.feapkg
191
+ forgecad sim fea out/beam.feapkg --json
192
+ forgecad inspect structural stress out/beam.feapkg --camera iso --output out/stress.png
193
+ ```
194
+
195
+ Those commands are useful for debugging package evidence. Customer docs should prefer `forgecad fea ...`.
196
+
197
+ ## Current Scope
198
+
199
+ Structural FEA V1 is intentionally narrow:
200
+
201
+ - linear static stress only
202
+ - one structural body per package
203
+ - exact OCCT STEP export only
204
+ - second-order tetrahedral elements only
205
+ - fixed fixtures and force loads only
206
+ - no contacts, bonded assemblies, thermal loads, buckling, fatigue, plasticity, or certification workflow
207
+
208
+ 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.
209
+
210
+ ## Troubleshooting
211
+
212
+ | Symptom | What It Means | What To Do |
213
+ | --- | --- | --- |
214
+ | `FEA.TOOLCHAIN_UV_MISSING` | The package runner cannot find `uv`. | Install `uv` or run with `UV=/path/to/uv`. |
215
+ | `FEA.TOOLCHAIN_PYTHON_MISSING` | A `PYTHON=...` override points to a missing Python executable. | Install Python 3 or fix the `PYTHON` path. |
216
+ | `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. |
217
+ | `FEA.TOOLCHAIN_CCX_MISSING` | CalculiX is not available as `ccx`. | Install CalculiX or run with `CCX=/path/to/ccx`. |
218
+ | `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. |
219
+ | `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. |
220
+ | `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. |
221
+ | `FEA.SOLVER_FAILED` | CalculiX did not complete the solve. | Inspect `solver/static_stress.log`, then check fixtures, loads, material values, and over-constraint. |
222
+ | `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. |
223
+
224
+ For command flags, use the [CLI reference](../CLI.md). For the public API, use the generated [Assembly reference](../generated/assembly.md).
@@ -114,6 +114,7 @@ Test-run, export pipelines, debug flags.
114
114
 
115
115
  - `docs/skill/CLI.md`
116
116
  - `docs/skill/guides/inspection-bundles.md`
117
+ - `docs/skill/guides/structural-fea.md`
117
118
 
118
119
  #### SDF Modeling (smooth booleans, TPMS, deformations, fromFunction)
119
120
 
package/dist/index.html CHANGED
@@ -83,7 +83,7 @@
83
83
  * { margin: 0; padding: 0; box-sizing: border-box; }
84
84
  html, body, #root { width: 100%; min-height: 100%; background: var(--fc-bg); color: var(--fc-text); font-family: system-ui, -apple-system, sans-serif; }
85
85
  </style>
86
- <script type="module" crossorigin src="/assets/app-BsRYSfxY.js"></script>
86
+ <script type="module" crossorigin src="/assets/app-xW3hOdq9.js"></script>
87
87
  <link rel="stylesheet" crossorigin href="/assets/app-CjsbDlb7.css">
88
88
  </head>
89
89
  <body>
package/dist/sitemap.xml CHANGED
@@ -2,91 +2,91 @@
2
2
  <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3
3
  <url>
4
4
  <loc>https://forgecad.io/</loc>
5
- <lastmod>2026-06-15</lastmod>
5
+ <lastmod>2026-06-18</lastmod>
6
6
  <changefreq>weekly</changefreq>
7
7
  <priority>1.0</priority>
8
8
  </url>
9
9
  <url>
10
10
  <loc>https://forgecad.io/docs</loc>
11
- <lastmod>2026-06-15</lastmod>
11
+ <lastmod>2026-06-18</lastmod>
12
12
  <changefreq>weekly</changefreq>
13
13
  <priority>0.8</priority>
14
14
  </url>
15
15
  <url>
16
16
  <loc>https://forgecad.io/docs/ai-native-cad</loc>
17
- <lastmod>2026-06-15</lastmod>
17
+ <lastmod>2026-06-18</lastmod>
18
18
  <changefreq>weekly</changefreq>
19
19
  <priority>0.9</priority>
20
20
  </url>
21
21
  <url>
22
22
  <loc>https://forgecad.io/docs/ai-usage</loc>
23
- <lastmod>2026-06-15</lastmod>
23
+ <lastmod>2026-06-18</lastmod>
24
24
  <changefreq>weekly</changefreq>
25
25
  <priority>0.8</priority>
26
26
  </url>
27
27
  <url>
28
28
  <loc>https://forgecad.io/docs/cli</loc>
29
- <lastmod>2026-06-15</lastmod>
29
+ <lastmod>2026-06-18</lastmod>
30
30
  <changefreq>weekly</changefreq>
31
31
  <priority>0.7</priority>
32
32
  </url>
33
33
  <url>
34
34
  <loc>https://forgecad.io/docs/simready-quickstart</loc>
35
- <lastmod>2026-06-15</lastmod>
35
+ <lastmod>2026-06-18</lastmod>
36
36
  <changefreq>weekly</changefreq>
37
37
  <priority>0.8</priority>
38
38
  </url>
39
39
  <url>
40
40
  <loc>https://forgecad.io/docs/simulation-workflow</loc>
41
- <lastmod>2026-06-15</lastmod>
41
+ <lastmod>2026-06-18</lastmod>
42
42
  <changefreq>weekly</changefreq>
43
43
  <priority>0.8</priority>
44
44
  </url>
45
45
  <url>
46
46
  <loc>https://forgecad.io/docs/skills/forgecad-build-model</loc>
47
- <lastmod>2026-06-15</lastmod>
47
+ <lastmod>2026-06-18</lastmod>
48
48
  <changefreq>weekly</changefreq>
49
49
  <priority>0.7</priority>
50
50
  </url>
51
51
  <url>
52
52
  <loc>https://forgecad.io/benchmark</loc>
53
- <lastmod>2026-06-15</lastmod>
53
+ <lastmod>2026-06-18</lastmod>
54
54
  <changefreq>weekly</changefreq>
55
55
  <priority>0.7</priority>
56
56
  </url>
57
57
  <url>
58
58
  <loc>https://forgecad.io/blog</loc>
59
- <lastmod>2026-06-15</lastmod>
59
+ <lastmod>2026-06-18</lastmod>
60
60
  <changefreq>weekly</changefreq>
61
61
  <priority>0.6</priority>
62
62
  </url>
63
63
  <url>
64
64
  <loc>https://forgecad.io/pricing</loc>
65
- <lastmod>2026-06-15</lastmod>
65
+ <lastmod>2026-06-18</lastmod>
66
66
  <changefreq>monthly</changefreq>
67
67
  <priority>0.5</priority>
68
68
  </url>
69
69
  <url>
70
70
  <loc>https://forgecad.io/terms</loc>
71
- <lastmod>2026-06-15</lastmod>
71
+ <lastmod>2026-06-18</lastmod>
72
72
  <changefreq>yearly</changefreq>
73
73
  <priority>0.3</priority>
74
74
  </url>
75
75
  <url>
76
76
  <loc>https://forgecad.io/privacy</loc>
77
- <lastmod>2026-06-15</lastmod>
77
+ <lastmod>2026-06-18</lastmod>
78
78
  <changefreq>yearly</changefreq>
79
79
  <priority>0.3</priority>
80
80
  </url>
81
81
  <url>
82
82
  <loc>https://forgecad.io/license</loc>
83
- <lastmod>2026-06-15</lastmod>
83
+ <lastmod>2026-06-18</lastmod>
84
84
  <changefreq>yearly</changefreq>
85
85
  <priority>0.3</priority>
86
86
  </url>
87
87
  <url>
88
88
  <loc>https://forgecad.io/blog/hello-forgecad-io</loc>
89
- <lastmod>2026-06-15</lastmod>
89
+ <lastmod>2026-06-18</lastmod>
90
90
  <changefreq>monthly</changefreq>
91
91
  <priority>0.5</priority>
92
92
  </url>
@@ -9,7 +9,7 @@ import {
9
9
  resolvePackagePath,
10
10
  runDirectCliMain,
11
11
  setActiveBackend
12
- } from "./chunk-UHBRMYA6.js";
12
+ } from "./chunk-VNM67DIV.js";
13
13
 
14
14
  // cli/check-compiler.ts
15
15
  import assert from "assert/strict";
@@ -12,7 +12,7 @@ import {
12
12
  resolvePackagePath,
13
13
  runDirectCliMain,
14
14
  setActiveBackend
15
- } from "./chunk-UHBRMYA6.js";
15
+ } from "./chunk-VNM67DIV.js";
16
16
 
17
17
  // cli/check-query-propagation.ts
18
18
  import assert from "assert/strict";