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.
Files changed (121) hide show
  1. package/dist/assets/{AdminPage-B3L3W1Uo.js → AdminPage-B1nIvqLS.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DXKVXMrJ.js → BenchmarkPage-YZJbw5nd.js} +2 -2
  3. package/dist/assets/{BlogPage-B7BWxOCg.js → BlogPage-DIWRApKS.js} +1 -1
  4. package/dist/assets/{DocsPage-BPGGwht1.js → DocsPage-ClL6X1hR.js} +8 -22
  5. package/dist/assets/EditorApp-CYBDvSyT.js +17067 -0
  6. package/dist/assets/{EmbedViewer-DygByZS2.js → EmbedViewer-Dmfu_LIw.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-BoVE7JGY.js → LandingPageProofDriven-XYTiYxfM.js} +2 -2
  8. package/dist/assets/{LegalPage-Din8wv8d.js → LegalPage-D5Z3CscF.js} +2 -2
  9. package/dist/assets/{PricingPage-C2PMzmDc.js → PricingPage-BP4lIGio.js} +2 -2
  10. package/dist/assets/{SettingsPage-BlJDCRe8.js → SettingsPage-D3bcPBsC.js} +1 -1
  11. package/dist/assets/{app-BsRYSfxY.js → app-BKjogwIZ.js} +3288 -512
  12. package/dist/assets/{backendInit-6C0DLgH0.js → backendInit-6a9-ilom.js} +80498 -74979
  13. package/dist/assets/cli/{render-XXol_ET7.js → render-CMNudGb0.js} +1264 -113
  14. package/dist/assets/{constructionHistoryWorker-cTHWRJEi.js → constructionHistoryWorker-BuZgc606.js} +8369 -6839
  15. package/dist/assets/{evalWorker-BssDYW9u.js → evalWorker-DQ82ueGu.js} +45438 -39996
  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-Cuby2qfT.js} +4899 -1303
  19. package/dist/assets/{jointPose-B0blBj9A.js → jointPose-CFql5I-u.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-CYlIm-M6.js → manifold-02pmr7O7.js} +2 -2
  22. package/dist/assets/{manifold-B_7QXpGB.js → manifold-C6KU0oII.js} +1 -1
  23. package/dist/assets/{manifold-CNShmpEJ.js → manifold-P1yF3GKn.js} +1 -1
  24. package/dist/assets/{reportWorker-Cb5eyM7D.js → reportWorker-kg065BVL.js} +76583 -65731
  25. package/dist/cli/render.html +1 -1
  26. package/dist/docs/index.html +2 -2
  27. package/dist/docs-raw/AI/usage.md +6 -8
  28. package/dist/docs-raw/CLI.md +14 -12
  29. package/dist/docs-raw/component-model.md +28 -9
  30. package/dist/docs-raw/generated/assembly.md +76 -3
  31. package/dist/docs-raw/generated/concepts.md +43 -7
  32. package/dist/docs-raw/generated/core.md +399 -73
  33. package/dist/docs-raw/generated/curves.md +357 -6
  34. package/dist/docs-raw/generated/runtime-names.md +12 -12
  35. package/dist/docs-raw/generated/sketch.md +16 -3
  36. package/dist/docs-raw/guides/inspection-bundles.md +5 -3
  37. package/dist/docs-raw/guides/structural-fea.md +235 -0
  38. package/dist/docs-raw/skills/forgecad-build-model.md +70 -147
  39. package/dist/docs-raw/skills/forgecad-image-prompt.md +1 -1
  40. package/dist/docs-raw/skills/forgecad-project-sync.md +3 -3
  41. package/dist/docs-raw/skills/forgecad-reconstruct-cad-file.md +2 -2
  42. package/dist/docs-raw/skills/forgecad-reconstruct-from-images.md +4 -5
  43. package/dist/docs-raw/skills/forgecad.md +4 -1
  44. package/dist/docs-raw/skills/index.md +1 -5
  45. package/dist/docs-raw/welcome.md +3 -4
  46. package/dist/index.html +1 -1
  47. package/dist/llms.txt +1 -2
  48. package/dist/sitemap.xml +15 -15
  49. package/dist-cli/{check-compiler-4RPB6SB5.js → check-compiler-UJWUEIDC.js} +1 -1
  50. package/dist-cli/{check-query-propagation-KN3DFQTX.js → check-query-propagation-O2EPDJSY.js} +1 -1
  51. package/dist-cli/{chunk-UHBRMYA6.js → chunk-MNDROM7T.js} +78926 -73392
  52. package/dist-cli/forgecad.js +6306 -1061
  53. package/dist-cli/forgecad_geometry_bg.wasm +0 -0
  54. package/dist-skill/CONTEXT.md +1257 -110
  55. package/dist-skill/SKILL.md +4 -1
  56. package/dist-skill/docs/API/core/concepts.md +31 -4
  57. package/dist-skill/docs/CLI.md +14 -12
  58. package/dist-skill/docs/generated/assembly.md +73 -3
  59. package/dist-skill/docs/generated/core.md +395 -74
  60. package/dist-skill/docs/generated/curves.md +356 -6
  61. package/dist-skill/docs/generated/runtime-names.md +12 -12
  62. package/dist-skill/docs/generated/sketch.md +16 -3
  63. package/dist-skill/docs/guides/inspection-bundles.md +5 -3
  64. package/dist-skill/docs/guides/manual-parameters.md +130 -0
  65. package/dist-skill/docs/guides/structural-fea.md +235 -0
  66. package/dist-skill/library/README.md +0 -4
  67. package/dist-skill/library/forgecad-build-model/SKILL.md +57 -150
  68. package/dist-skill/library/forgecad-build-model/references/inspection-feedback.md +58 -0
  69. package/dist-skill/library/forgecad-build-model/references/module-contracts.md +53 -0
  70. package/dist-skill/library/forgecad-build-model/references/parameter-controls.md +22 -0
  71. package/dist-skill/library/forgecad-build-model/references/readiness-review.md +43 -0
  72. package/dist-skill/library/forgecad-build-model/references/simulation-feedback.md +49 -0
  73. package/dist-skill/library/forgecad-build-model/references/stage-1-design-intent.md +21 -0
  74. package/dist-skill/library/forgecad-build-model/references/stage-2-architecture-plan.md +23 -0
  75. package/dist-skill/library/forgecad-build-model/references/stage-3-build-slices.md +39 -0
  76. package/dist-skill/library/forgecad-build-model/references/stage-4-feedback-iteration.md +24 -0
  77. package/dist-skill/library/forgecad-build-model/references/stage-5-readiness-package.md +34 -0
  78. package/dist-skill/library/forgecad-image-prompt/SKILL.md +1 -1
  79. package/dist-skill/library/forgecad-project-sync/SKILL.md +3 -3
  80. package/dist-skill/library/forgecad-reconstruct-cad-file/SKILL.md +2 -2
  81. package/dist-skill/library/forgecad-reconstruct-from-images/SKILL.md +4 -5
  82. package/dist-skill/website/skills/forgecad-build-model.md +70 -147
  83. package/dist-skill/website/skills/forgecad-image-prompt.md +1 -1
  84. package/dist-skill/website/skills/forgecad-project-sync.md +3 -3
  85. package/dist-skill/website/skills/forgecad-reconstruct-cad-file.md +2 -2
  86. package/dist-skill/website/skills/forgecad-reconstruct-from-images.md +4 -5
  87. package/dist-skill/website/skills/forgecad.md +4 -1
  88. package/dist-skill/website/skills/index.md +1 -5
  89. package/examples/analysis/structural-stress-fea.forge.js +19 -0
  90. package/examples/api/blend-full-round.forge.js +37 -0
  91. package/examples/api/blend-variable-radius.forge.js +51 -0
  92. package/examples/api/curve-project-and-intersect.forge.js +59 -0
  93. package/examples/api/extrude-up-to-face.forge.js +47 -0
  94. package/examples/api/param-path2d.forge.js +65 -0
  95. package/examples/api/param-placement2d.forge.js +80 -0
  96. package/examples/api/param-spline2d-g-continuity.forge.js +57 -0
  97. package/examples/api/spoon-full-tang-handle.forge.js +188 -0
  98. package/examples/api/surface-boundarynet-dished-bowl.forge.js +63 -0
  99. package/examples/api/surface-fill-interior-constraints.forge.js +59 -0
  100. package/examples/api/surface-variable-thickness-panel.forge.js +62 -0
  101. package/examples/mechanical/airplane-propeller.forge.js +81 -28
  102. package/package.json +5 -2
  103. package/dist/assets/EditorApp-BWUGCdD5.js +0 -16610
  104. package/dist/docs-raw/skills/forgecad-design-spec.md +0 -145
  105. package/dist/docs-raw/skills/forgecad-grade-model.md +0 -84
  106. package/dist/docs-raw/skills/forgecad-inspect-model.md +0 -80
  107. package/dist/docs-raw/skills/forgecad-verify-mujoco.md +0 -78
  108. package/dist-skill/library/forgecad-design-spec/SKILL.md +0 -132
  109. package/dist-skill/library/forgecad-design-spec/references/default-profiles.md +0 -99
  110. package/dist-skill/library/forgecad-design-spec/references/master-prompt.md +0 -73
  111. package/dist-skill/library/forgecad-grade-model/SKILL.md +0 -72
  112. package/dist-skill/library/forgecad-grade-model/agents/openai.yaml +0 -4
  113. package/dist-skill/library/forgecad-inspect-model/SKILL.md +0 -68
  114. package/dist-skill/library/forgecad-verify-mujoco/SKILL.md +0 -66
  115. package/dist-skill/website/skills/forgecad-design-spec.md +0 -145
  116. package/dist-skill/website/skills/forgecad-grade-model.md +0 -84
  117. package/dist-skill/website/skills/forgecad-inspect-model.md +0 -80
  118. package/dist-skill/website/skills/forgecad-verify-mujoco.md +0 -78
  119. /package/dist/assets/{landing-proof-driven-BxZZh5r5.js → landing-proof-driven-DNPRKL_p.js} +0 -0
  120. /package/dist-skill/library/{forgecad-verify-mujoco → forgecad-build-model}/scripts/mujoco_verify.py +0 -0
  121. /package/dist-skill/library/{forgecad-inspect-model → forgecad-build-model/scripts}/summarize_manifest.py +0 -0
@@ -23,7 +23,8 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
23
23
 
24
24
  ### Import and Composition
25
25
 
26
- - Always include the extension in relative imports: `require("./file.forge.js", { Param: value })` 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.
26
+ - 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.
27
+ - Reusable `.forge.js` part files should return builder functions such as `return { buildPart }`; direct-run preview params belong inside `if (require.main === module)`.
27
28
  - 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")`.
28
29
  - For static multi-part models, connectors + `matchTo()` are the default way to assemble touching parts.
29
30
  - 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.
@@ -41,6 +42,7 @@ Execution model, colors, coordinate system, primitives, booleans, patterns, impo
41
42
 
42
43
  - `{{SKILL_DIR}}/docs/API/core/concepts.md`
43
44
  - `{{SKILL_DIR}}/docs/generated/runtime-names.md`
45
+ - `{{SKILL_DIR}}/docs/guides/manual-parameters.md`
44
46
  - `{{SKILL_DIR}}/docs/generated/core.md`
45
47
 
46
48
  ### 2. Static Assembly and Positioning (for any multi-part model)
@@ -107,6 +109,7 @@ Test-run, export pipelines, debug flags.
107
109
 
108
110
  - `{{SKILL_DIR}}/docs/CLI.md`
109
111
  - `{{SKILL_DIR}}/docs/guides/inspection-bundles.md`
112
+ - `{{SKILL_DIR}}/docs/guides/structural-fea.md`
110
113
 
111
114
  ### SDF Modeling (smooth booleans, TPMS, deformations, fromFunction)
112
115
 
@@ -11,10 +11,10 @@ A `.forge.js` script is plain JavaScript that returns geometry. The entire forge
11
11
 
12
12
  All geometry operations are **immutable** — shapes, sketches, groups, assemblies, and boards return new values, never mutate in place.
13
13
 
14
- A script must return one of three shapes:
14
+ A script should return one of three shapes:
15
15
 
16
16
  1. **A single renderable** — `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, or `SdfShape`.
17
- 2. **An array** of renderables or named descriptors `{ name, tags?, shape | sketch | group, color? }`:
17
+ 2. **An array** of renderables or named descriptors `{ name, tags?, shape | sketch | group, color? }`, usually for direct-run previews and multi-object display:
18
18
 
19
19
  ```javascript
20
20
  return [
@@ -23,11 +23,38 @@ A script must return one of three shapes:
23
23
  ];
24
24
  ```
25
25
 
26
- 3. **A metadata object** — a plain object whose renderable values are rendered and whose non-renderable values (numbers, hole tables, builder functions) are silently skipped at render but flow to importers via `require()`. Each key becomes a named group, so don't pile independent parts into one array key (`{ parts: [a, b, c] }`) — the integrity gate reads that as a single fragmented part. Give each part its own key (`{ collar12, collar16, plug }`) or use named descriptors (form 2).
26
+ 3. **A module interface object** — usually builder functions, optionally a built shape plus interface data:
27
+
28
+ ```javascript
29
+ return { buildBracket };
30
+ // or, when the file's useful output is already built:
31
+ return { shape, connectors, boltPattern };
32
+ ```
33
+
34
+ For reusable part files, prefer a builder export and keep direct-run preview controls inside the entry guard:
35
+
36
+ ```javascript
37
+ function buildThing(props) {
38
+ return box(props.width, props.depth, props.height);
39
+ }
40
+
41
+ if (require.main === module) {
42
+ const previewProps = {
43
+ width: param("Width", 80),
44
+ depth: param("Depth", 40),
45
+ height: param("Height", 12),
46
+ };
47
+ return buildThing(previewProps);
48
+ }
49
+
50
+ return { buildThing };
51
+ ```
52
+
53
+ When a plain object is returned directly, renderable values are shown in the viewport and non-renderable values are available to importers through `require()`.
27
54
 
28
55
  Return an unsolved `Assembly` directly — ForgeCAD solves it at default joint values for display. Use `assembly.solve(state)` for a specific pose. Never call `.toGroup()` just to make an assembly render; use it only when you need `ShapeGroup` composition or named-child lookup.
29
56
 
30
- For multi-file projects import path rules, the metadata pattern, and Forge-aware builder modules see the [`require()` docs](../../generated/core.md).
57
+ For multi-file projects, import path rules, and reusable builder modules, see the [`require()` docs](../../generated/core.md).
31
58
 
32
59
  ## Identity
33
60
 
@@ -13,8 +13,7 @@ Create projects, open local studios, run, inspect, export, publish, and sync `.f
13
13
  # 1. Install
14
14
  npm install -g forgecad
15
15
 
16
- # 2. Sign in and create a dedicated project folder
17
- forgecad login
16
+ # 2. Create a dedicated local project folder
18
17
  mkdir spool-adapter
19
18
  cd spool-adapter
20
19
  forgecad project init "Spool Adapter" --visibility private
@@ -25,14 +24,15 @@ forgecad new adapter --template part
25
24
  # 4. Open the local editor
26
25
  forgecad studio .
27
26
 
28
- # 5. Validate, export, and push to the browser
27
+ # 5. Validate, export, sign in, and push to the browser
29
28
  forgecad run adapter.forge.js
30
29
  forgecad export stl adapter.forge.js
30
+ forgecad login
31
31
  forgecad project push
32
32
  forgecad project open
33
33
  ```
34
34
 
35
- Local modeling, inspection, export, and skill-install commands do not require a ForgeCAD account. Hosted project sync, publishing, token management, and license activation require sign-in: run `forgecad login` and choose email/password or API token (for GitHub/Google accounts, create a token in Settings > API Tokens first). Use `FORGECAD_TOKEN=fc_pat_... forgecad <hosted-command>` only for CI/CD and one-off automation. `forgecad studio` always requires an explicit project path; use `.` for the current project.
35
+ Local modeling, project initialization, inspection, export, and skill-install commands do not require a ForgeCAD account. Hosted project sync, publishing, token management, and license activation require sign-in: run `forgecad login` and choose email/password or API token (for GitHub/Google accounts, create a token in Settings > API Tokens first). Use `FORGECAD_TOKEN=fc_pat_... forgecad <hosted-command>` only for CI/CD and one-off automation. `forgecad studio` always requires an explicit project path; use `.` for the current project.
36
36
 
37
37
  You can also start from the hosted starter project with `forgecad project clone start-here`, then `cd start-here` and `forgecad studio .`.
38
38
 
@@ -74,7 +74,7 @@ The fast validation command: runs the script with the real geometry kernel (no b
74
74
 
75
75
  A bare `forgecad run` skips expensive diagnostics. Opt in with `--details` (volumes/bounds), `--history` (construction tree), `--features` (feature tallies), `--solver-profile` (constraint solver timing), or `--connectivity` (physical connected components — bbox contact is evidence, exact geometry is checked by default). `--quality live|default|high` selects the same geometry quality profile as the editor and export tools; `live` is fastest for large models.
76
76
 
77
- Direct `.stl`/`.obj`/`.3mf`/`.step`/`.stp` inputs are imported automatically; STEP/STP auto-selects OCCT unless you pass `--backend`. For deeper confidence gates, prefer `inspect mechanical-integrity`, `check print`, or `inspect fit interference` instead of turning `run` into a catch-all audit command.
77
+ Direct `.stl`/`.obj`/`.3mf`/`.step`/`.stp` inputs are imported automatically; STEP/STP auto-selects OCCT unless you pass `--backend`. Use `--project-root <dir>` when running a file inside a larger uninitialized folder and you intentionally want relative imports to resolve against that root. For deeper confidence gates, prefer `inspect mechanical-integrity`, `check print`, or `inspect fit interference` instead of turning `run` into a catch-all audit command.
78
78
 
79
79
  ```bash
80
80
  forgecad run model.forge.js
@@ -136,7 +136,8 @@ Inspect a model by asking for one explicit kind of evidence.
136
136
  - `inspect surface zebra|roughness` — surface continuity and roughness evidence
137
137
  - `inspect physical components|floating|gaps` — physical component graph evidence
138
138
  - `inspect fit interference` — positive-volume overlap evidence
139
- - `inspect manufacture thickness` — wall-thickness evidence
139
+ - `inspect manufacture thickness|through-thickness` — wall-thickness and minimum solid span evidence
140
+ - `inspect structural stress` — solver-produced structural stress scalar-field evidence
140
141
  - `inspect compare overlay` — candidate-vs-reference visual mismatch evidence
141
142
  - `inspect sections at|stack|sample` — exact section evidence for precise cuts, dense scans, or sparse samples
142
143
  - `inspect mechanical-integrity` — model-focused integrity audit for generated assemblies
@@ -292,6 +293,7 @@ Export to every format you need.
292
293
  | `export svg` | SVG | 2D vector output from sketches |
293
294
  | `export sketch-pdf` **\[Production\]** | PDF | Sketch with dimensions and constraints |
294
295
  | `export step` **\[Production\]** | STEP | CAD interchange (exact geometry) |
296
+ | `export fea` **\[Production\]** | FEA package | Exact STEP plus authored structural load-case metadata |
295
297
  | `export brep` **\[Production\]** | BREP | Boundary representation |
296
298
  | `export 3mf` | 3MF | 3D printing (color, multi-part) |
297
299
  | `export stl` | STL | 3D printing |
@@ -356,16 +358,16 @@ Script-backed exports accept repeatable `--param Key=Value` overrides before the
356
358
 
357
359
  ForgeCAD has a hosted platform at [forgecad.io](https://forgecad.io). The CLI connects a dedicated local project folder to it.
358
360
 
359
- A project is a local folder linked to the hosted app by `forgecad.json`. Use `forgecad project clone <slug>` to download an existing hosted project into a local folder, or run `forgecad project init` inside a folder that should become a new ForgeCAD project. Open local projects with `forgecad studio <project-path>`.
361
+ A project is a local folder marked by `forgecad.json`; after the first push, that same file also links it to the hosted app. Use `forgecad project clone <slug>` to download an existing hosted project into a local folder, or run `forgecad project init` inside a folder that should become a new ForgeCAD project. Open local projects with `forgecad studio <project-path>`.
360
362
 
361
363
  Keep the project root small and intentional. Do not run the editor from `~`, downloads, desktop, or a huge source tree. ForgeCAD scans project files such as `.forge.js`, `.js`, `.svg`, and `.dxf`; broad roots make local workflows and AI-agent context slow and confusing.
362
364
 
363
- First-time setup (login, init, studio) is the [Quick Start](#quick-start) sequence above. `forgecad project init` creates the remote project, writes `forgecad.json`, pushes any existing local source files, and records server file IDs. `forgecad project push` syncs an already initialized project; it does not create a remote project from an arbitrary folder.
365
+ First-time setup (init, studio, login, push) is the [Quick Start](#quick-start) sequence above. `forgecad project init` writes a local `forgecad.json` with the project name, slug, server, and visibility. It does not contact the server. The first `forgecad project push` creates the hosted project if `forgecad.json` has no project ID yet, uploads local source files, and records server file IDs. Later pushes sync the already linked hosted project. `forgecad project push` still requires `forgecad.json`; it does not initialize a random folder.
364
366
 
365
367
  ### Sync
366
368
 
367
369
  ```bash
368
- forgecad project push # Upload local changes
370
+ forgecad project push # Create hosted project if needed; upload changes
369
371
  forgecad project pull # Download remote changes
370
372
  forgecad project status # See what's different
371
373
  ```
@@ -393,10 +395,10 @@ Shares are live references — always the current version, not a snapshot.
393
395
 
394
396
  | Command | Description |
395
397
  |---------|-------------|
396
- | `project init` | Initialize the current directory as a ForgeCAD project and create it on the server. |
398
+ | `project init` | Initialize the current directory as a local ForgeCAD project. |
397
399
  | `project clone` | Download a remote project into a new local directory. |
398
400
  | `project pull` | Download remote changes into the current project. |
399
- | `project push` | Upload local changes to the remote project. |
401
+ | `project push` | Create the hosted project if needed, then upload local changes. |
400
402
  | `project status` | Show differences between local and remote project files. |
401
403
  | `project list` | List your remote projects. |
402
404
  | `project open` | Open the current project in the browser. |
@@ -543,7 +545,7 @@ The CLI is free for personal non-commercial use. Pro covers human-operated comme
543
545
 
544
546
  | Free | Production outputs | Pro | Enterprise |
545
547
  |------|--------------------|-----|------------|
546
- | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `compare 3d`, `check print`, `inspect fit interference`, `inspect mechanical-integrity` for personal non-commercial use | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export implicit`, `export sdf`, `export mjcf`, `export urdf`, `export usd`, `export report`, `export cutting-layout` are free to run for personal non-commercial use; Pro covers human-operated commercial CAD work | `render hq`, `capture gif`, `capture mp4` plus commercial coverage for client/customer work | Backend, hosted, embedded, or application workflows that call ForgeCAD automatically |
548
+ | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `compare 3d`, `check print`, `inspect fit interference`, `inspect mechanical-integrity` for personal non-commercial use | `cut-list`, `export sketch-pdf`, `export step`, `export fea`, `export brep`, `export gcode`, `export implicit`, `export sdf`, `export mjcf`, `export urdf`, `export usd`, `export report`, `export cutting-layout` are free to run for personal non-commercial use; Pro covers human-operated commercial CAD work | `render hq`, `capture gif`, `capture mp4` plus commercial coverage for client/customer work | Backend, hosted, embedded, or application workflows that call ForgeCAD automatically |
547
549
 
548
550
  ```bash
549
551
  forgecad license # Check local license status
@@ -26,12 +26,14 @@ Assembly-owned links, constraints, connectors, solved poses, and source-level si
26
26
 
27
27
  #### `Sim.body(options: SimBodyOptions): SimBodyDef` — Describe one assembly part as a physical body with mass/density, material, collider intent, and optional contact surfaces.
28
28
 
29
- **`SimBodyOptions`**: `massKg?: number`, `densityKgM3?: number`, `material?: SimMaterialDef`, `collider?: SimColliderDef`, `contacts?: Record<string, SimContactDef>`
29
+ **`SimBodyOptions`**: `massKg?: number`, `densityKgM3?: number`, `material?: SimMaterialDef`, `collider?: SimColliderDef`, `contacts?: Record<string, SimContactDef>`, `motion?: SimMotionDef`
30
30
 
31
- `SimColliderDef`: `{ kind: "collider", mode: SimColliderMode, reason?: string }`
31
+ `SimColliderDef`: `{ kind: "collider", mode: SimColliderMode, reason?: string, sdfResolution?: number }`
32
32
 
33
33
  `SimContactDef`: `{ kind: "wheelSurface" | "gripperSurface", connectorName: string }`
34
34
 
35
+ `SimMotionDef`: `{ kind: "motion", mode: SimMotionMode }`
36
+
35
37
  `SimBodyDef`: `{ kind: "body" }`
36
38
 
37
39
  #### `Sim.collider` — Collision-geometry intent constructors for physical parts.
@@ -39,8 +41,15 @@ Assembly-owned links, constraints, connectors, solved poses, and source-level si
39
41
  - `Sim.collider.convexHull(): SimColliderDef` — Use a generated collision mesh for the part. This is the default fast rigid-body collider for irregular parts.
40
42
  - `Sim.collider.boundingBox(): SimColliderDef` — Use the part bounding box as the collision geometry. This is fastest and works well for chassis and simple blocks.
41
43
  - `Sim.collider.visualMesh(): SimColliderDef` — Use the visual mesh as collision geometry. This is exact but usually slower in physics engines.
44
+ - `Sim.collider.sdfMesh: (options?: { resolution?: number` — Use an SDF mesh collider for complex concave contact geometry. Exporters warn when their target cannot encode it.
42
45
  - `Sim.collider.none(reason: string): SimColliderDef` — Disable collision for a part with an explicit reason, such as a sensor-only or decorative object.
43
46
 
47
+ #### `Sim.motion` — Body motion-state intent for simulation export. Dynamic is the default when omitted.
48
+
49
+ - `Sim.motion.dynamic(): SimMotionDef` — Simulate this body as a normal dynamic rigid body with mass and inertia.
50
+ - `Sim.motion.kinematic(): SimMotionDef` — Simulate this body as kinematic: moved by the simulator/user, but not force-integrated.
51
+ - `Sim.motion.static(): SimMotionDef` — Keep this body fixed in the world as a static collision/environment body.
52
+
44
53
  #### `Sim.drive` — Joint-drive intent constructors for passive or powered assembly joints.
45
54
 
46
55
  - `Sim.drive.passive(options?: SimPassiveDriveOptions): SimDriveDef` — Mark a joint as passive while preserving damping and friction metadata for simulation export.
@@ -71,6 +80,57 @@ Assembly-owned links, constraints, connectors, solved poses, and source-level si
71
80
 
72
81
  `SimDiffDriveControllerDef`: `{ kind: "diffDrive" }`
73
82
 
83
+ #### `Fea.material(name: string, options: FeaMaterialOptions): FeaMaterialDef` — Create a named linear-elastic structural material for static stress studies.
84
+
85
+ #### `Fea.body(options: FeaBodyOptions): FeaBodyDef` — Mark one assembly part as a structural body with a `Fea.material(...)` value.
86
+
87
+ #### `Fea.region` — Stable explicit region references for solver package manifests.
88
+
89
+ - `Fea.region.face(partName: string, faceName: string): FeaPartFaceRegionRef` — Reference a named face on a named assembly part without relying on object identity.
90
+ - `Fea.region.plane(partName: string, faceName: string, options: FeaPlaneRegionOptions): FeaPartPlaneRegionRef` — Reference a planar face by a point on the face and its outward normal in part-local coordinates.
91
+
92
+ `FeaPartFaceRegionRef`: `{ kind: "fea-region-face", partName: string, faceName: string }`
93
+
94
+ `FeaPlaneRegionOptions`: `{ center: Vec3, normal: Vec3 }`
95
+
96
+ `FeaPartPlaneRegionRef`: `{ kind: "fea-region-plane", partName: string, faceName: string, center: Vec3, normal: Vec3 }`
97
+
98
+ #### `Fea.fix` — Fixture constructors over authored face/region references.
99
+
100
+ - `Fea.fix.fixed(region: FeaRegionRef): FeaFixedFixtureDef` — Fully fix all translational degrees of freedom on a face/region.
101
+
102
+ `FeaFixedFixtureDef`: `{ kind: "fixed", region: FeaRegionRef }`
103
+
104
+ #### `Fea.load` — Load constructors over authored face/region references.
105
+
106
+ - `Fea.load.force(region: FeaRegionRef, options: FeaForceLoadOptions): FeaForceLoadDef` — Apply a force with magnitude in newtons along the given direction vector.
107
+
108
+ `FeaForceLoadOptions`: `{ newtons: number, direction: Vec3 }`
109
+
110
+ `FeaForceLoadDef`: `{ kind: "force", region: FeaRegionRef }`
111
+
112
+ #### `Fea.target` — Study target constructors used by feedback and pass/fail gates.
113
+
114
+ - `Fea.target.minSafetyFactor(value: number): FeaMinSafetyFactorTargetDef` — Require the solved minimum safety factor to be at least `value`.
115
+
116
+ `FeaMinSafetyFactorTargetDef`: `{ kind: "minSafetyFactor", value: number }`
117
+
118
+ #### `Fea.mesh` — Volume mesh intent. V1 structural stress uses second-order tetrahedra only.
119
+
120
+ - `Fea.mesh.quadraticTets(options: FeaQuadraticTetMeshOptions): FeaQuadraticTetMeshDef` — Request quadratic tetrahedral C3D10 elements with a maximum size in mm.
121
+
122
+ `FeaQuadraticTetMeshOptions`: `{ maxSizeMm: number, minQuality?: number }`
123
+
124
+ `FeaQuadraticTetMeshDef`: `{ kind: "quadraticTets", order: 2, element: "C3D10" }`
125
+
126
+ #### `Fea.study` — Study constructors.
127
+
128
+ - `Fea.study.staticStress(name: string, options: FeaStaticStressStudyOptions): FeaStaticStressStudyDef` — Create a linear static structural stress study.
129
+
130
+ `FeaStaticStressStudyOptions`: `{ fixtures: FeaFixtureDef[], loads: FeaLoadDef[], target?: FeaTargetDef, mesh: FeaMeshDef }`
131
+
132
+ `FeaStaticStressStudyDef`: `{ kind: "staticStress", name: string }`
133
+
74
134
  #### `assembly(name?: string): Assembly` — Create an assembly container with named parts, connectors, and kinematic links.
75
135
 
76
136
  **Use this from iteration 1 for any model with moving parts.** Do not build one static pose and retrofit motion later.
@@ -204,7 +264,7 @@ const housing = group(
204
264
  assembly.addPart("Base Assembly", housing);
205
265
  ```
206
266
 
207
- **`PartOptions`**: `transform?: TransformInput`, `metadata?: PartMetadata`, `sim?: SimBodyDef`, `mate?: AssemblyPartMateInput | AssemblyPartMateInput[]`, `bindToFrame?: string`
267
+ **`PartOptions`**: `transform?: TransformInput`, `metadata?: PartMetadata`, `sim?: SimBodyDef`, `fea?: FeaBodyDef`, `mate?: AssemblyPartMateInput | AssemblyPartMateInput[]`, `bindToFrame?: string`
208
268
 
209
269
  **`PartMetadata`**
210
270
 
@@ -214,6 +274,12 @@ assembly.addPart("Base Assembly", housing);
214
274
 
215
275
  Also: `material?: string`, `process?: string`, `tolerance?: string`, `qty?: number`, `notes?: string`, `densityKgM3?: number`, `massKg?: number`.
216
276
 
277
+ `FeaBodyDef`: `{ kind: "fea-body", material: FeaMaterialDef }`
278
+
279
+ `FeaMaterialOptions`: `{ densityKgM3: number, youngsModulusMPa: number, poissonRatio: number, yieldStrengthMPa: number }`
280
+
281
+ `FeaMaterialDef`: `{ kind: "fea-material", name: string }`
282
+
217
283
  **`AssemblyPartMateInput`**
218
284
  - `connector: string` — Name of a connector declared on the part (via `withConnectors()`).
219
285
  - `toLink: string` — Name of the link this connector's origin is pinned to.
@@ -360,6 +426,10 @@ Use this after adding physical parts and joints. Robot-body profiles require `ro
360
426
 
361
427
  `SimAssemblySimulationOptions`: `{ profile: SimProfileDef, rootPart?: string, controllers?: SimControllerDef[] }`
362
428
 
429
+ #### `withFeaStudy(study: FeaStudyDef): Assembly` — Attach a structural FEA study to this assembly.
430
+
431
+ The study is authored with `Fea.study.staticStress(...)` and consumed by `forgecad export fea`. This records load-case intent only; ForgeCAD refuses to invent fixtures, loads, mesh order, or region tags during export.
432
+
363
433
  #### `edgeBetweenFrames(a: string, b: string, options?: AssemblyFrameEdgeOptions): Assembly` — Add a visual skeleton edge between two rig frame origins.
364
434
 
365
435
  Frame edges follow the solved frame poses produced by `fixedJoint()`, `revoluteJoint()`, and `prismaticJoint()`. They do not add constraints, degrees of freedom, parts, or geometry; use them to make a frame-only rig readable in the Motion/rig inspection overlay.