forgecad 0.10.1 → 0.10.3
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/README.md +7 -6
- package/dist/assets/{AdminPage-DcCnj0qo.js → AdminPage-CK7ObBz3.js} +1 -1
- package/dist/assets/{BenchmarkPage-BVEpJSVk.js → BenchmarkPage-Ds7Z2doN.js} +1 -1
- package/dist/assets/{BlogPage-DHaGP50_.js → BlogPage-DlPbpt6A.js} +1 -1
- package/dist/assets/{DocsPage-CDoxHkz8.js → DocsPage-vZb3b3Y0.js} +9 -14
- package/dist/assets/{EditorApp-BpjZgzk0.css → EditorApp-C5f24ZN9.css} +8 -0
- package/dist/assets/{EditorApp-BJ0Dloyh.js → EditorApp-HLoKfe15.js} +152 -21
- package/dist/assets/{EmbedViewer-CRKZbY0y.js → EmbedViewer--KnqBKrJ.js} +3 -3
- package/dist/assets/{LandingPageProofDriven-BxHkYRE7.js → LandingPageProofDriven-C_LssmnA.js} +1 -1
- package/dist/assets/{LegalPage-B-u6FrVv.js → LegalPage-DGsyo4n1.js} +1 -1
- package/dist/assets/{PricingPage-CzpZ6-Ce.js → PricingPage-BOE27B-R.js} +1 -1
- package/dist/assets/{SettingsPage-CIZSSAd0.js → SettingsPage-f47cnk39.js} +1 -1
- package/dist/assets/{app-DaTMg3nH.js → app-D6ccu2Xx.js} +7826 -7559
- package/dist/assets/{scalar-sampling-budget-prBw_s8t.js → backendInit-DbTkQN9J.js} +87141 -78777
- package/dist/assets/cli/{render-DPf4AYJK.js → render-BsngirjC.js} +147 -186
- package/dist/assets/{constructionHistoryWorker-AwMMWSxg.js → constructionHistoryWorker-PCwXrTDB.js} +8419 -1447
- package/dist/assets/{evalWorker-CjZZWRWW.js → evalWorker-CS63PfZu.js} +25501 -17997
- package/dist/assets/{forgecad_geometry-Dgceylq9.js → forgecad_geometry-CZ_IfuvA.js} +120 -9
- package/dist/assets/forgecad_geometry_bg-C3rQHfwg.wasm +0 -0
- package/dist/assets/{inspectWorker-CZsCFtQT.js → inspectWorker-Y4cOzNyA.js} +37208 -34464
- package/dist/assets/{jointPose-DzQOViQH.js → jointPose-AMvCywzS.js} +1 -1
- package/dist/assets/{manifold-DgXo0T5P.js → manifold-CBry38ly.js} +2 -2
- package/dist/assets/{manifold-K1SkarlQ.js → manifold-Crd_F2qx.js} +1 -1
- package/dist/assets/{manifold-BYlzU521.js → manifold-k2kRcc85.js} +1 -1
- package/dist/assets/{reportWorker-B9nWwSrB.js → reportWorker-CWvn0CEv.js} +46635 -44646
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/AI/usage.md +2 -4
- package/dist/docs-raw/CLI.md +34 -20
- package/dist/docs-raw/README.md +1 -1
- package/dist/docs-raw/component-model.md +1 -1
- package/dist/docs-raw/generated/assembly.md +2 -2
- package/dist/docs-raw/generated/concepts.md +6 -4
- package/dist/docs-raw/generated/core.md +71 -2
- package/dist/docs-raw/generated/curves.md +8 -1
- package/dist/docs-raw/generated/lib.md +1 -1
- package/dist/docs-raw/generated/output.md +0 -64
- package/dist/docs-raw/generated/runtime-names.md +6 -6
- package/dist/docs-raw/generated/sdf.md +2 -2
- package/dist/docs-raw/generated/viewport.md +3 -12
- package/dist/docs-raw/guides/inspection-bundles.md +1 -1
- package/dist/docs-raw/guides/simready-quickstart.md +3 -1
- package/dist/docs-raw/simulation-workflow.md +58 -0
- package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -1
- package/dist/docs-raw/skills/forgecad-image-replicator.md +2 -2
- package/dist/docs-raw/skills/forgecad-mujoco-verify.md +78 -0
- package/dist/docs-raw/skills/forgecad-spec-by-walking-through-it.md +145 -0
- package/dist/docs-raw/skills/forgecad-visual-spec.md +1 -1
- package/dist/docs-raw/skills/forgecad.md +24 -24
- package/dist/docs-raw/skills/index.md +2 -3
- package/dist/index.html +1 -1
- package/dist/sitemap.xml +15 -15
- package/dist-cli/{check-compiler-II7NLPAB.js → check-compiler-HPF2T2FS.js} +1 -1
- package/dist-cli/{check-query-propagation-7462TR3R.js → check-query-propagation-HYSLTXAB.js} +1 -1
- package/dist-cli/{chunk-UWTJCGXF.js → chunk-WLUKAW3H.js} +51134 -43247
- package/dist-cli/forgecad.js +5467 -1451
- package/dist-cli/{forgecad_geometry-QOQIIP53.js → forgecad_geometry-2IMYCUWW.js} +119 -8
- package/dist-cli/forgecad_geometry_bg.wasm +0 -0
- package/dist-skill/CONTEXT.md +98 -86
- package/dist-skill/SKILL.md +1 -1
- package/dist-skill/docs/API/core/concepts.md +1 -1
- package/dist-skill/docs/CLI.md +34 -20
- package/dist-skill/docs/generated/assembly.md +2 -2
- package/dist-skill/docs/generated/core.md +71 -2
- package/dist-skill/docs/generated/curves.md +8 -1
- package/dist-skill/docs/generated/lib.md +1 -1
- package/dist-skill/docs/generated/output.md +0 -64
- package/dist-skill/docs/generated/runtime-names.md +6 -6
- package/dist-skill/docs/generated/sdf.md +2 -2
- package/dist-skill/docs/generated/viewport.md +3 -12
- package/dist-skill/docs/guides/inspection-bundles.md +1 -1
- package/dist-skill/library/README.md +2 -3
- package/dist-skill/library/forgecad-blockout-model/SKILL.md +1 -1
- package/dist-skill/library/forgecad-image-replicator/SKILL.md +2 -2
- package/dist-skill/library/forgecad-mujoco-verify/SKILL.md +66 -0
- package/dist-skill/library/forgecad-mujoco-verify/scripts/mujoco_verify.py +385 -0
- package/dist-skill/library/forgecad-spec-by-walking-through-it/SKILL.md +132 -0
- package/dist-skill/library/forgecad-visual-spec/SKILL.md +1 -1
- package/dist-skill/website/skills/forgecad-blockout-model.md +1 -1
- package/dist-skill/website/skills/forgecad-image-replicator.md +2 -2
- package/dist-skill/website/skills/forgecad-mujoco-verify.md +78 -0
- package/dist-skill/website/skills/forgecad-spec-by-walking-through-it.md +145 -0
- package/dist-skill/website/skills/forgecad-visual-spec.md +1 -1
- package/dist-skill/website/skills/forgecad.md +24 -24
- package/dist-skill/website/skills/index.md +2 -3
- package/examples/analysis/clearance-fit.forge.js +31 -0
- package/examples/analysis/lever-arm-actuator.forge.js +43 -0
- package/examples/analysis/tipping-tripod.forge.js +35 -0
- package/examples/api/gyroid-voronoi-blend.forge.js +1 -1
- package/examples/api/organic-noise-sculpture.forge.js +1 -1
- package/examples/api/sdf-circular-array-knurling.forge.js +1 -1
- package/examples/api/{sdf-custom-raymarch.forge.js → sdf-custom-field-mesh-preview.forge.js} +3 -4
- package/examples/api/sdf-materialize-tree.forge.js +2 -2
- package/examples/api/sdf-plain-return.forge.js +3 -2
- package/examples/api/sdf-shapes.forge.js +2 -2
- package/examples/api/sdf-surface-basket-weave.forge.js +2 -2
- package/examples/generative/twisted-lattice-tower.forge.js +1 -1
- package/examples/generative/voronoi-lampshade.forge.js +1 -1
- package/examples/products/sportscar.forge.js +77 -0
- package/package.json +2 -4
- package/dist/assets/forgecad_geometry_bg-dD4RNQF1.wasm +0 -0
- package/dist/assets/manifold-CzYf_iub.js +0 -3023
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +0 -101
- package/dist/docs-raw/skills/forgecad-lld.md +0 -41
- package/dist/docs-raw/skills/forgecad-prepare-prompt.md +0 -63
- package/dist-skill/library/forgecad-high-level-spec/SKILL.md +0 -94
- package/dist-skill/library/forgecad-lld/SKILL.md +0 -34
- package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +0 -50
- package/dist-skill/website/skills/forgecad-high-level-spec.md +0 -101
- package/dist-skill/website/skills/forgecad-lld.md +0 -41
- package/dist-skill/website/skills/forgecad-prepare-prompt.md +0 -63
- /package/dist-skill/library/{forgecad-prepare-prompt → forgecad-spec-by-walking-through-it}/references/default-profiles.md +0 -0
- /package/dist-skill/library/{forgecad-prepare-prompt → forgecad-spec-by-walking-through-it}/references/master-prompt.md +0 -0
package/dist-skill/docs/CLI.md
CHANGED
|
@@ -78,7 +78,7 @@ Direct `.stl`/`.obj`/`.3mf`/`.step`/`.stp` inputs are imported automatically; ST
|
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
forgecad run model.forge.js
|
|
81
|
-
forgecad run model.forge.js --
|
|
81
|
+
forgecad run model.forge.js other-model.forge.js --quality live
|
|
82
82
|
```
|
|
83
83
|
|
|
84
84
|
### `forgecad ls`
|
|
@@ -104,7 +104,7 @@ Without a target, `show` renders the whole scene and behaves like a shorter, int
|
|
|
104
104
|
|
|
105
105
|
```bash
|
|
106
106
|
forgecad show model.forge.js
|
|
107
|
-
forgecad show model.forge.js Bench
|
|
107
|
+
forgecad show model.forge.js --target Bench
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
### Object Filtering: `--focus` and `--hide`
|
|
@@ -112,7 +112,7 @@ forgecad show model.forge.js Bench
|
|
|
112
112
|
`render 3d`, `render wireframe`, `inspect <family> <mode>`, `capture`, and `check print` can filter the visible object set without changing model code. Use `forgecad ls model.forge.js` to list exact object paths, then pass names or globs:
|
|
113
113
|
|
|
114
114
|
```bash
|
|
115
|
-
forgecad render 3d model.forge.js bench.png --focus "Bench.*"
|
|
115
|
+
forgecad render 3d model.forge.js --output bench.png --focus "Bench.*"
|
|
116
116
|
forgecad inspect visual objects model.forge.js --hide "Bench.Slat0,Bench.Slat1" --camera iso
|
|
117
117
|
```
|
|
118
118
|
|
|
@@ -200,7 +200,7 @@ Runs the script headlessly and prints every named render view with an exact came
|
|
|
200
200
|
|
|
201
201
|
```bash
|
|
202
202
|
forgecad render views model.forge.js
|
|
203
|
-
forgecad render views model.forge.js
|
|
203
|
+
forgecad render views model.forge.js reference.step
|
|
204
204
|
```
|
|
205
205
|
|
|
206
206
|
### `forgecad render wireframe`
|
|
@@ -224,7 +224,7 @@ Exports the scene to Blender and renders with Cycles (path tracer); requires Ble
|
|
|
224
224
|
|
|
225
225
|
```bash
|
|
226
226
|
forgecad render hq model.forge.js
|
|
227
|
-
forgecad render hq model.forge.js hero.png --preset dramatic --samples 1024
|
|
227
|
+
forgecad render hq model.forge.js --output hero.png --preset dramatic --samples 1024
|
|
228
228
|
```
|
|
229
229
|
|
|
230
230
|
### `forgecad capture gif|mp4` **\[Pro\]**
|
|
@@ -235,18 +235,22 @@ Renders an animated sequence: `--capture orbit` (default) for a turntable, `--ca
|
|
|
235
235
|
|
|
236
236
|
```bash
|
|
237
237
|
forgecad capture gif model.forge.js
|
|
238
|
-
forgecad capture gif model.forge.js
|
|
238
|
+
forgecad capture gif model.forge.js other-model.forge.js
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
### `forgecad render section`
|
|
242
242
|
|
|
243
243
|
Render a 2D cross-section of a 3D model (cut by a plane) to SVG or PNG.
|
|
244
244
|
|
|
245
|
-
Cuts all shapes with an axis-aligned plane
|
|
245
|
+
Cuts all shapes in the scene with an axis-aligned plane and produces a 2D cross-section drawing. The default plane is XY at Z=0. Use `--plane XZ` or `--plane YZ` for other orientations, and `--offset` to shift the cut position.
|
|
246
|
+
|
|
247
|
+
Output defaults to `.svg`; pass `--format png` or a single-input `--output *.png` path for a rasterized PNG at `--size` pixels. Use `--edges=<off|thin|bold>` to control the outline stroke on cut shapes.
|
|
248
|
+
|
|
249
|
+
Useful for verifying internal geometry, wall thicknesses, and fit checks that aren't visible in 3D renders.
|
|
246
250
|
|
|
247
251
|
```bash
|
|
248
252
|
forgecad render section model.forge.js
|
|
249
|
-
forgecad render section model.forge.js out/section.svg --plane XZ --offset 10
|
|
253
|
+
forgecad render section model.forge.js --output out/section.svg --plane XZ --offset 10
|
|
250
254
|
```
|
|
251
255
|
|
|
252
256
|
| Command | Description |
|
|
@@ -261,7 +265,7 @@ forgecad render section model.forge.js out/section.svg --plane XZ --offset 10
|
|
|
261
265
|
|
|
262
266
|
### Cross-cutting flags
|
|
263
267
|
|
|
264
|
-
These flags work across run
|
|
268
|
+
These flags work across script-backed run, render, export, capture, inspect, and check commands that evaluate `.forge.js` files. Use `--param Key=Value` for parameter overrides; repeat it for multiple parameters.
|
|
265
269
|
|
|
266
270
|
| Option | Description |
|
|
267
271
|
|--------|-------------|
|
|
@@ -272,8 +276,8 @@ These flags work across run / render / capture / inspect commands:
|
|
|
272
276
|
| `--camera <front\|back\|side\|right\|top\|iso\|az:el\|az:el:dist\|spec>` | Camera preset, spherical (az:el), or full spec such as `proj=perspective;pos=x,y,z;target=x,y,z;up=x,y,z;fov=45`. Repeatable. |
|
|
273
277
|
| `--view <name>` | Named camera view declared by the model with scene({ views }) |
|
|
274
278
|
| `--size <px>` | Image size in pixels |
|
|
279
|
+
| `--backend <manifold\|occt\|truck\|sdf>` | Geometry backend (default: manifold; STEP inputs default to OCCT) |
|
|
275
280
|
| `--quality <default\|live\|high>` | Mesh quality preset |
|
|
276
|
-
| `--backend <manifold\|occt\|truck>` | Geometry backend (default: manifold; STEP inputs default to OCCT) |
|
|
277
281
|
| `--json` | Print machine-readable JSON |
|
|
278
282
|
|
|
279
283
|
Every command has more — Blender-only `render hq` flags (`--preset`, `--samples`, `--engine`, `--hdri`, `--transparent`, `--video`) and capture-only flags (`--capture`, `--animation`, `--cut-plane`, `--sweep-*`, `--fps`) among them. Run `forgecad <command> --help` for the full list.
|
|
@@ -295,43 +299,53 @@ Export to every format you need.
|
|
|
295
299
|
| `export sdf` **\[Production\]** | SDF package | Gazebo robot simulation |
|
|
296
300
|
| `export mjcf` **\[Production\]** | MJCF package | MuJoCo / MJX robot simulation |
|
|
297
301
|
| `export urdf` **\[Production\]** | URDF package | ROS / PyBullet / MuJoCo |
|
|
302
|
+
| `export usd` **\[Production\]** | USD package | Isaac Sim / OpenUSD simulation |
|
|
298
303
|
| `export report` **\[Production\]** | PDF report | Multi-view report with BOM and dimensions |
|
|
299
304
|
| `export cutting-layout` **\[Production\]** | PDF/DXF | Sheet cutting layout with cut sequence |
|
|
300
305
|
| `link` | URL | Share link from a GitHub Gist URL or ID (copied to clipboard) |
|
|
301
306
|
|
|
302
307
|
```bash
|
|
303
308
|
# Sheet material
|
|
304
|
-
forgecad cut-list shelf.forge.js
|
|
309
|
+
forgecad cut-list shelf.forge.js --param Material=plywood
|
|
305
310
|
forgecad export cutting-layout shelf.forge.js --sheet-width 420 --sheet-height 594 --kerf 3
|
|
311
|
+
forgecad export cutting-layout shelf.forge.js --output out/layout.dxf
|
|
306
312
|
|
|
307
313
|
# 3D printing
|
|
308
314
|
forgecad check print bracket.forge.js
|
|
309
|
-
forgecad export stl bracket.forge.js
|
|
315
|
+
forgecad export stl bracket.forge.js --param Width=42
|
|
310
316
|
forgecad export 3mf bracket.forge.js --quality high
|
|
311
317
|
|
|
312
318
|
# CAD interchange
|
|
313
|
-
forgecad export step bracket.forge.js
|
|
319
|
+
forgecad export step bracket.forge.js --param Width=42
|
|
314
320
|
|
|
315
321
|
# Technical drawings
|
|
316
|
-
forgecad export report bracket.forge.js out/report.pdf
|
|
322
|
+
forgecad export report bracket.forge.js --output out/report.pdf
|
|
317
323
|
|
|
318
324
|
# Robot simulation
|
|
319
325
|
forgecad export sdf rover.forge.js --output out/forge_scout
|
|
320
|
-
forgecad export mjcf rover.forge.js --output out/forge_scout_mjcf
|
|
326
|
+
forgecad export mjcf rover.forge.js --param Wheelbase=180 --output out/forge_scout_mjcf
|
|
327
|
+
forgecad export usd rover.forge.js --output out/forge_scout_usd
|
|
321
328
|
```
|
|
322
329
|
|
|
330
|
+
Script-backed exports accept repeatable `--param Key=Value` overrides before the model is evaluated. The MuJoCo/MJX package export command is `export mjcf`.
|
|
331
|
+
|
|
323
332
|
<details>
|
|
324
333
|
<summary>Export flags</summary>
|
|
325
334
|
|
|
326
335
|
| Option | Description |
|
|
327
336
|
|--------|-------------|
|
|
337
|
+
| `--param <Key=Value>` | Override a parameter value (Key=Value). Repeatable. |
|
|
338
|
+
| `-p <Key=Value>` | Shorthand for --param |
|
|
328
339
|
| `--joint <JointName=Value>` | Override a Motion tab joint value (JointName=Value). Repeatable. |
|
|
329
|
-
| `--output <path>` | Output
|
|
340
|
+
| `--output <path>` | Output SVG path for a single input |
|
|
330
341
|
| `--backend <occt\|truck>` | Exact BREP exporter: occt (default) or truck (native analytic kernel) |
|
|
331
342
|
| `--quality <default\|live\|high>` | Forge quality preset |
|
|
332
343
|
| `-o <path>` | Shorthand for --output |
|
|
344
|
+
| `--format <json\|webgpu-brick>` | Implicit artifact format |
|
|
345
|
+
| `-q <live\|default\|high>` | Shorthand for --quality |
|
|
346
|
+
| `--workgroup-size <x>x<y>x<z>` | WebGPU compute workgroup size |
|
|
333
347
|
| `--dim-angle-tol <deg>` | Dimension routing tolerance in degrees |
|
|
334
|
-
| `--
|
|
348
|
+
| `--out <path>` | Alias for --output |
|
|
335
349
|
| `--sheet-width <mm>` | Stock sheet width in mm |
|
|
336
350
|
| `--sheet-height <mm>` | Stock sheet height in mm |
|
|
337
351
|
| `--kerf <mm>` | Cutting clearance (saw blade width) in mm |
|
|
@@ -478,7 +492,7 @@ Checks include script `verify.*` results, exact positive-volume object collision
|
|
|
478
492
|
|
|
479
493
|
```bash
|
|
480
494
|
forgecad check print model.forge.js
|
|
481
|
-
forgecad check print model.forge.js
|
|
495
|
+
forgecad check print model.forge.js other-model.forge.js
|
|
482
496
|
```
|
|
483
497
|
|
|
484
498
|
### `forgecad check simready`
|
|
@@ -489,7 +503,7 @@ Runs a Forge script and checks the returned `assembly(...).withSimulation(...)`
|
|
|
489
503
|
|
|
490
504
|
```bash
|
|
491
505
|
forgecad check simready model.forge.js
|
|
492
|
-
forgecad check simready
|
|
506
|
+
forgecad check simready model.forge.js other-model.forge.js
|
|
493
507
|
```
|
|
494
508
|
|
|
495
509
|
### `forgecad inspect mechanical-integrity`
|
|
@@ -529,7 +543,7 @@ The CLI is free for personal non-commercial use. Pro covers human-operated comme
|
|
|
529
543
|
|
|
530
544
|
| Free | Production outputs | Pro | Enterprise |
|
|
531
545
|
|------|--------------------|-----|------------|
|
|
532
|
-
| `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 sdf`, `export mjcf`, `export urdf`, `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 |
|
|
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 |
|
|
533
547
|
|
|
534
548
|
```bash
|
|
535
549
|
forgecad license # Check local license status
|
|
@@ -356,7 +356,7 @@ return mech.solve({ theta: 45 });
|
|
|
356
356
|
|
|
357
357
|
#### `withSimulation(options: SimAssemblySimulationOptions): Assembly` — Attach the root simulation contract for this assembly.
|
|
358
358
|
|
|
359
|
-
Use this after adding physical parts and joints. Robot-body profiles require `rootPart`; asset profiles can describe one-part or multi-part physical assets. URDF/SDF exporters and `forgecad check simready` read this contract directly
|
|
359
|
+
Use this after adding physical parts and joints. Robot-body profiles require `rootPart`; asset profiles can describe one-part or multi-part physical assets. URDF/SDF/MJCF/USD exporters and `forgecad check simready` read this contract directly from the returned assembly.
|
|
360
360
|
|
|
361
361
|
`SimAssemblySimulationOptions`: `{ profile: SimProfileDef, rootPart?: string, controllers?: SimControllerDef[] }`
|
|
362
362
|
|
|
@@ -567,4 +567,4 @@ console.log("Collisions", solved.collisionReport());
|
|
|
567
567
|
|
|
568
568
|
#### `minClearance(partA: string, partB: string, searchLength?: number): number` — Compute the minimum gap (clearance) between two parts in this solved pose.
|
|
569
569
|
|
|
570
|
-
Returns `0` if the parts are touching or overlapping.
|
|
570
|
+
Returns `0` if the parts are touching or overlapping. Manifold-backed parts use the exact Manifold gap query. SDF-backed parts use a mesh-derived sampled gap. `searchLength` bounds the Manifold search radius in mm — increase it for widely separated Manifold parts.
|
|
@@ -24,6 +24,10 @@ skill-order: 100
|
|
|
24
24
|
- [SurfacePattern](#surfacepattern)
|
|
25
25
|
- [Pattern2D](#pattern2d)
|
|
26
26
|
- [Pattern2DBuilder](#pattern2dbuilder)
|
|
27
|
+
- [Sheet](#sheet)
|
|
28
|
+
- [CurveNetBuilder](#curvenetbuilder)
|
|
29
|
+
- [MatchEdgeBuilder](#matchedgebuilder)
|
|
30
|
+
- [BridgeBuilder](#bridgebuilder)
|
|
27
31
|
- [ShapeRef](#shaperef)
|
|
28
32
|
- [ANCHOR3D_NAMES](#anchor3d-names)
|
|
29
33
|
- [verify](#verify)
|
|
@@ -155,7 +159,7 @@ chamfer(base, 3, base.edge('vert-br'))
|
|
|
155
159
|
|
|
156
160
|
Adds a taper angle to the vertical faces of a solid so that it can be extracted from a mold. The neutral plane is the Z position where the draft angle is zero — faces above and below are tapered symmetrically. Typical values for injection molding are 1–5°.
|
|
157
161
|
|
|
158
|
-
Truck
|
|
162
|
+
SDF, Manifold, and Truck lower supported vertical-prism solids with Z-axis pull directions to a tapered loft. OCCT uses its native draft operation when available.
|
|
159
163
|
|
|
160
164
|
```ts
|
|
161
165
|
// Add 3° draft to a box for injection molding
|
|
@@ -708,7 +712,7 @@ Supports transforms (translate, rotate, scale, mirror, transform, rotateAround,
|
|
|
708
712
|
|
|
709
713
|
Returns a new Shape with the specified material properties merged on top of any previously set properties. All properties are optional — omitted keys retain their current value. Material properties survive transforms and boolean operations.
|
|
710
714
|
|
|
711
|
-
Use `.color()` to set the base diffuse color; `.material()` controls how that color behaves under light (metalness, roughness, clearcoat) and can add emissive glow independent of lighting.
|
|
715
|
+
Use `.color()` to set the base diffuse color; `.material()` controls how that color behaves under light (metalness, roughness, clearcoat) and can add emissive glow independent of lighting.
|
|
712
716
|
|
|
713
717
|
```js
|
|
714
718
|
box(50, 50, 50).material({ metalness: 0.9, roughness: 0.1 }); // polished metal
|
|
@@ -1333,6 +1337,71 @@ const bracket = group(
|
|
|
1333
1337
|
| `depth?` | `number` | Thread groove depth in millimeters. Default: 0.8. |
|
|
1334
1338
|
| `underScale?` | `number` | Relative height of the under-crossing thread. Default: 0.15. |
|
|
1335
1339
|
|
|
1340
|
+
### `Sheet`
|
|
1341
|
+
|
|
1342
|
+
A parametric open surface value (control grid + knots + analytic differential geometry).
|
|
1343
|
+
|
|
1344
|
+
**Properties:**
|
|
1345
|
+
|
|
1346
|
+
| Property | Type | Description |
|
|
1347
|
+
|----------|------|-------------|
|
|
1348
|
+
| `surface` | `BSplineSurface` | — |
|
|
1349
|
+
|
|
1350
|
+
**Methods:**
|
|
1351
|
+
|
|
1352
|
+
#### `get frontEdge(): SheetEdge` — Edge naming follows parameter direction (documented): front=v0, rear=v1, left=u0, right=u1.
|
|
1353
|
+
|
|
1354
|
+
#### `thicken(wall: number, options?: { resolution?: number; }): Shape` — Offset the sheet along its analytic normals into a watertight solid shell of the given wall thickness. Throws if the wall would self-intersect on a concave region (no silent degenerate solid).
|
|
1355
|
+
|
|
1356
|
+
#### `matchEdge(edge: SheetEdge): MatchEdgeBuilder` — Per-edge continuity match against a neighbor (returns a NEW Sheet).
|
|
1357
|
+
|
|
1358
|
+
**`SheetEdge`**
|
|
1359
|
+
- `fixed: "u" | "v"` — Which parameter is held fixed along this edge.
|
|
1360
|
+
- `value: 0 | 1` — The fixed value (0 or 1).
|
|
1361
|
+
- Also: `sheet: Sheet`.
|
|
1362
|
+
|
|
1363
|
+
- `get rearEdge(): SheetEdge`
|
|
1364
|
+
- `get leftEdge(): SheetEdge`
|
|
1365
|
+
- `get rightEdge(): SheetEdge`
|
|
1366
|
+
- `pointAt(u: number, v: number): Vec3`
|
|
1367
|
+
- `normalAt(u: number, v: number): Vec3`
|
|
1368
|
+
- `curvatureAt(u: number, v: number): SurfaceCurvature`
|
|
1369
|
+
|
|
1370
|
+
### `CurveNetBuilder`
|
|
1371
|
+
|
|
1372
|
+
#### `toSheet(): Sheet` — Build (once) and return the Sheet.
|
|
1373
|
+
|
|
1374
|
+
- `lengthwise(...curves: CurveInput[]): this`
|
|
1375
|
+
- `crosswise(...curves: CurveInput[]): this`
|
|
1376
|
+
- `alongRails(railA: CurveInput, railB: CurveInput): this`
|
|
1377
|
+
- `sections(...curves: CurveInput[]): this`
|
|
1378
|
+
- `cage(grid: Vec3[][]): this`
|
|
1379
|
+
- `degree(u: number, v: number): this`
|
|
1380
|
+
- `get frontEdge(): SheetEdge`
|
|
1381
|
+
- `get rearEdge(): SheetEdge`
|
|
1382
|
+
- `get leftEdge(): SheetEdge`
|
|
1383
|
+
- `get rightEdge(): SheetEdge`
|
|
1384
|
+
- `get surface(): BSplineSurface`
|
|
1385
|
+
- `pointAt(u: number, v: number): Vec3`
|
|
1386
|
+
- `normalAt(u: number, v: number): Vec3`
|
|
1387
|
+
- `curvatureAt(u: number, v: number): SurfaceCurvature`
|
|
1388
|
+
- `thicken(wall: number, options?: { resolution?: number; }): Shape`
|
|
1389
|
+
- `matchEdge(edge: SheetEdge): MatchEdgeBuilder`
|
|
1390
|
+
|
|
1391
|
+
### `MatchEdgeBuilder`
|
|
1392
|
+
|
|
1393
|
+
- `toG0(neighbor: SheetEdge): Sheet`
|
|
1394
|
+
- `toG1(neighbor: SheetEdge): Sheet`
|
|
1395
|
+
- `toG2(neighbor: SheetEdge): Sheet`
|
|
1396
|
+
|
|
1397
|
+
### `BridgeBuilder`
|
|
1398
|
+
|
|
1399
|
+
#### `bulge(a: number, b: number): this` — Tune the influence of each side (Rhino-style bulge).
|
|
1400
|
+
|
|
1401
|
+
- `g0(): Sheet`
|
|
1402
|
+
- `g1(): Sheet`
|
|
1403
|
+
- `g2(): Sheet`
|
|
1404
|
+
|
|
1336
1405
|
### `ShapeRef`
|
|
1337
1406
|
|
|
1338
1407
|
A first-class reference path over a shape's semantic faces and face relationships.
|
|
@@ -426,7 +426,11 @@ const outlet = route.port("outlet");
|
|
|
426
426
|
|
|
427
427
|
#### `pointAt(u: number, v: number): Vec3` — Evaluate the surface at parameters (u, v) ∈ [0, 1]². Uses tensor product evaluation: evaluate basis functions in U and V independently.
|
|
428
428
|
|
|
429
|
-
#### `normalAt(u: number, v: number): Vec3` — Evaluate the surface normal at (u, v)
|
|
429
|
+
#### `normalAt(u: number, v: number): Vec3` — Evaluate the surface unit normal at (u, v) from analytic first derivatives.
|
|
430
|
+
|
|
431
|
+
Uses Algorithm A2.3 basis-function derivatives with the rational quotient rule, so the normal is exact (no finite-difference epsilon, no error near the boundary). Constant chain-rule factors from the parameter remap scale Su and Sv positively and cancel under normalization, so they are omitted.
|
|
432
|
+
|
|
433
|
+
#### `derivativesAt(u: number, v: number): { S: Vec3; Su: Vec3; Sv: Vec3; }` — Analytic first partial derivatives S_u, S_v (rational quotient rule).
|
|
430
434
|
|
|
431
435
|
#### `tessellate(resU?: number, resV?: number): { positions: Vec3[]; normals: Vec3[]; indices: number[]; }` — Tessellate the surface into a triangle mesh. Returns positions, normals, and triangle indices.
|
|
432
436
|
|
|
@@ -1165,16 +1169,19 @@ Members (full entries under [Curves & Surfacing](#curves-surfacing)): `Curve.Ble
|
|
|
1165
1169
|
- `Trim(shape: Shape, tool: Shape | SurfacePlaneOp): Shape`
|
|
1166
1170
|
- `Split(shape: Shape, tool: Shape | SurfacePlaneOp): [ Shape, Shape ]`
|
|
1167
1171
|
- `Match(shape: Shape, options: { edge: "u0" | "u1" | "v0" | "v1"; target: EdgeRef; continuity?: SurfaceContinuity; }): Shape`
|
|
1172
|
+
- `Net(): CurveNet` — Begin a curve-network (Gordon) surface — the class-A keystone. Chain `.lengthwise(...)/.crosswise(...)` (or `.alongRails(a,b).sections(...)`, or `.cage(grid)`), then `.thicken(wall)` to get a solid Shape. Returns a fluent [`Sheet`](/docs/core#sheet) builder with analytic point/normal/curvature queries and named edges.
|
|
1168
1173
|
|
|
1169
1174
|
### `Blend`
|
|
1170
1175
|
|
|
1171
1176
|
- `Edge(options: BlendEdgeOptions): Shape`
|
|
1172
1177
|
- `Surface(options: BlendSurfaceOptions): Shape`
|
|
1178
|
+
- `Bridge(edgeA: SheetEdge, edgeB: SheetEdge): BridgeBuilder` — Build a transition strip between two `Surface.Net` sheet edges. Chain `.bulge(a, b)` then `.g0()/.g1()/.g2()` for the continuity order. Returns a [`Sheet`](/docs/core#sheet); verify the seam with `Analysis.EdgeMatch`.
|
|
1173
1179
|
|
|
1174
1180
|
### `Analysis`
|
|
1175
1181
|
|
|
1176
1182
|
- `EdgeContinuity(shape: Shape, options?: EdgeContinuityThresholds): EdgeContinuityReport`
|
|
1177
1183
|
- `SurfaceContinuity(shape: Shape, options?: EdgeContinuityThresholds): EdgeContinuityReport`
|
|
1184
|
+
- `EdgeMatch(edgeA: SheetEdge, edgeB: SheetEdge, options?: { samples?: number; }): ContinuityReport` — Measure G0/G1/G2 agreement between two `Surface.Net` sheet edges: worst position gap, cross-boundary tangent angle (0 = G1), and normal-curvature mismatch (0 = G2). The reflection/fairness check for matched panel seams.
|
|
1178
1185
|
- `CurvatureComb(input: NurbsCurve3D | EdgeRef, options?: { samples?: number; }): CurvatureSample[]`
|
|
1179
1186
|
- `SurfaceHealth(shape: Shape, options?: { tinyEdgeThreshold?: number; sliverThreshold?: number; }): SurfaceHealthReport`
|
|
1180
1187
|
- `BRepValidity(shape: Shape, options?: BRepValidityOptions): BRepValidityReport` — Validate B-rep/shell/solid structure and return closedness, manifoldness, orientation, and issue diagnostics.
|
|
@@ -63,7 +63,7 @@ Pre-built fasteners, gears, pipes, structural profiles, and utility shapes. Acce
|
|
|
63
63
|
|
|
64
64
|
Pre-built parametric parts available in user scripts as `lib.*`.
|
|
65
65
|
|
|
66
|
-
exposed to `.forge.js` scripts — see the member list below for the catalog. Sizes outside the supported ranges throw at runtime with a descriptive error.
|
|
66
|
+
Every key in this object becomes a method or namespace on the `lib` object exposed to `.forge.js` scripts — see the member list below for the catalog. Sizes outside the supported ranges throw at runtime with a descriptive error.
|
|
67
67
|
|
|
68
68
|
- `fastenerHole(opts: FastenerHoleOptions): Shape` — ISO metric fastener hole cutter with optional counterbore or countersink.
|
|
69
69
|
|
|
@@ -58,70 +58,6 @@ bom(tubeLen, "rectangular steel tube", {
|
|
|
58
58
|
| `notes?` | `string` | Free-form notes |
|
|
59
59
|
| `grain?` | `string` | Wood grain direction, e.g. "long", "cross" |
|
|
60
60
|
|
|
61
|
-
#### `robotExport(options: RobotExportOptions): CollectedRobotExport` — Compatibility shim for SDF/URDF robot package metadata.
|
|
62
|
-
|
|
63
|
-
Prefer returning `assembly(...).withSimulation(...)` with `Sim.body(...)`, `Sim.drive.*(...)`, and `Sim.controller.*(...)` metadata. The CLI commands `forgecad export sdf` and `forgecad export urdf` now read that assembly simulation contract directly.
|
|
64
|
-
|
|
65
|
-
`robotExport()` remains available for one compatibility window. It converts the legacy descriptor into the same internal simulation model used by source-authored `Sim` metadata and produces a robot package with:
|
|
66
|
-
|
|
67
|
-
- Mesh-based inertia tensors (full 6-component, not bounding-box approximations)
|
|
68
|
-
- Separate collision meshes
|
|
69
|
-
- Joint limits, effort/velocity/damping/friction metadata from assembly joints
|
|
70
|
-
|
|
71
|
-
**Collision mesh modes** (set per-link via `links["PartName"].collision`):
|
|
72
|
-
|
|
73
|
-
| Mode | Description | Default |
|
|
74
|
-
|------|-------------|---------|
|
|
75
|
-
| `'convex'` | Convex hull (separate `_collision.stl`) | Yes |
|
|
76
|
-
| `'box'` | AABB primitive — fastest physics | |
|
|
77
|
-
| `'visual'` | Same mesh as visual — exact but slow | |
|
|
78
|
-
| `'none'` | No collision geometry | |
|
|
79
|
-
|
|
80
|
-
**Unit conventions:**
|
|
81
|
-
|
|
82
|
-
- Revolute `velocity` is in degrees/second in Forge; exporters convert to rad/s.
|
|
83
|
-
- Prismatic distances are in mm in Forge; exported in meters.
|
|
84
|
-
- `massKg` is preferred; `densityKgM3` is used when mass is unknown.
|
|
85
|
-
- Compatibility coupling metadata, when present, maps only the primary term (largest ratio) to `<mimic>` — SDF/URDF support single-leader mimic only. Dropped terms emit a warning.
|
|
86
|
-
|
|
87
|
-
**Legacy example**
|
|
88
|
-
|
|
89
|
-
```ts
|
|
90
|
-
robotExport({
|
|
91
|
-
assembly: rover, // assembly() with parts + revolute wheel joints
|
|
92
|
-
modelName: "Scout",
|
|
93
|
-
links: { Chassis: { massKg: 10 }, "Left Wheel": { massKg: 0.8 } },
|
|
94
|
-
plugins: {
|
|
95
|
-
diffDrive: {
|
|
96
|
-
leftJoints: ["leftWheel"], rightJoints: ["rightWheel"],
|
|
97
|
-
wheelSeparationMm: 280, wheelRadiusMm: 60,
|
|
98
|
-
},
|
|
99
|
-
},
|
|
100
|
-
world: { generateDemoWorld: true },
|
|
101
|
-
});
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
**Preferred CLI usage**
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
forgecad export sdf model.forge.js # SDF package (Gazebo/Ignition)
|
|
108
|
-
forgecad export urdf model.forge.js # URDF package (ROS/PyBullet/MuJoCo)
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
**`RobotExportOptions`**: `assembly: Assembly`, `modelName?: string`, `state?: JointState`, `static?: boolean`, `selfCollide?: boolean`, `allowAutoDisable?: boolean`, `links?: Record<string, RobotLinkExportOptions>`, `joints?: Record<string, RobotJointExportOptions>`, `plugins?: { diffDrive?: RobotDiffDrivePluginOptions; jointStatePublisher?: RobotJointStatePublisherOptions; }`, `world?: RobotWorldOptions`
|
|
112
|
-
|
|
113
|
-
`RobotLinkExportOptions`: `{ massKg?: number, densityKgM3?: number, collision?: "visual" | "convex" | "box" | "none" }`
|
|
114
|
-
|
|
115
|
-
`RobotJointExportOptions`: `{ effort?: number, velocity?: number, damping?: number, friction?: number }`
|
|
116
|
-
|
|
117
|
-
**`RobotDiffDrivePluginOptions`**: `leftJoints: string[]`, `rightJoints: string[]`, `wheelSeparationMm: number`, `wheelRadiusMm: number`, `topic?: string`, `odomTopic?: string`, `tfTopic?: string`, `frameId?: string`, `odomFrameId?: string`, `maxLinearVelocity?: number`, `maxAngularVelocity?: number`, `linearAcceleration?: number`, `angularAcceleration?: number`
|
|
118
|
-
|
|
119
|
-
`RobotJointStatePublisherOptions`: `{ enabled?: boolean, joints?: string[], topic?: string, updateRate?: number }`
|
|
120
|
-
|
|
121
|
-
`RobotWorldOptions`: `{ name?: string, generateDemoWorld?: boolean, spawnPose?: RobotPose6, keyboardTeleop?: RobotWorldKeyboardTeleopOptions }`
|
|
122
|
-
|
|
123
|
-
`RobotWorldKeyboardTeleopOptions`: `{ enabled?: boolean, linearStep?: number, angularStep?: number }`
|
|
124
|
-
|
|
125
61
|
#### `dim()` — Add a dimension annotation between two points, or along an entity.
|
|
126
62
|
|
|
127
63
|
Overloads:
|
|
@@ -24,12 +24,12 @@ lib, Line2D, linearPattern, linearPattern2d, loadFont, loft, Loft, mirrorCopy
|
|
|
24
24
|
mock, ngon, NurbsCurve3D, NurbsSurface, offsetSolid, param, Param, path
|
|
25
25
|
Point2D, Points, polygon, polygonVertices, port, Product, ProductPanelBuilder, ProductRibbonBuilder
|
|
26
26
|
ProductSkin, ProductSkinBuilder, ProductStationBuilder, ProductSurfaceBuilder, ProductSurfaceRef, projectToPlane, queueMicrotask, rect
|
|
27
|
-
Rectangle2D,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
Rectangle2D, roundedRect, Route3D, scene, Sculpt, sdf, SdfShape, selectEdge
|
|
28
|
+
selectEdges, self, setActiveBackend, setImmediate, setInterval, setTimeout, Shape, ShapeGroup
|
|
29
|
+
sheetMetal, SheetMetalPart, sheetStock, Sim, Sketch, sketchToDxf, sketchToSvg, slot
|
|
30
|
+
SolvedAssembly, spec, sphere, spline2d, stroke, Surface, SurfaceBody, SurfaceMembers
|
|
31
|
+
sweep, text2d, textWidth, torus, toShape, Transform, union, union2d
|
|
32
|
+
variableSweep, verify, Viewport, window, Wood
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
`showLabels` is also a runtime global, but it is not part of the top-level collision check. Avoid reusing it unless you intentionally want a local value with that name.
|
|
@@ -53,7 +53,7 @@ An immutable SDF expression. Supports SDF-specific operations (smooth booleans,
|
|
|
53
53
|
|
|
54
54
|
#### `clone(): SdfShape` — Clone this SDF expression and its visual metadata.
|
|
55
55
|
|
|
56
|
-
#### `toShape(options?: SdfToShapeOptions): Shape` — Mesh this SDF into a ForgeCAD Shape through
|
|
56
|
+
#### `toShape(options?: SdfToShapeOptions): Shape` — Mesh this SDF into a ForgeCAD Shape. Typed SDF trees materialize through Rust Manifold Dual Contouring; dynamic trees (custom/noise/voronoi/displace/blend callbacks) mesh through the Surface Nets pipeline. Once converted, the result is a regular Shape — booleans, transforms, export all work.
|
|
57
57
|
|
|
58
58
|
#### `color(value: string | undefined): SdfShape` — Set the display color for this implicit leaf.
|
|
59
59
|
|
|
@@ -230,7 +230,7 @@ return {
|
|
|
230
230
|
- `basketWeave(options?: BasketWeaveOptions): SurfacePattern` — Basket weave surface pattern — threads with over-under crossings in UV space. Returns a SurfacePattern for use with `.surfaceDisplace()`.
|
|
231
231
|
- `pattern2d(): Pattern2DBuilder` — Create typed, composable 2D surface patterns for `.surfaceDisplace()`.
|
|
232
232
|
- `SurfacePattern: typeof SurfacePattern` — A 2D surface pattern — a heightmap function for use with `.surfaceDisplace()`.
|
|
233
|
-
- `fromFunction(fn: SdfFunctionSource, options: SdfFunctionOptions): SdfShape` — Create a custom SDF from one expression; shader-safe expressions
|
|
233
|
+
- `fromFunction(fn: SdfFunctionSource, options: SdfFunctionOptions): SdfShape` — Create a custom SDF from one expression; shader-safe expressions keep shader metadata for tooling.
|
|
234
234
|
- `combine(value: unknown, options?: CombineOptions): SdfShape` — Collapse a plain object/array tree of SDF leaves into one continuous implicit field. Per-leaf color/material identity is intentionally discarded — the result is one scalar field. Use plain object returns for multi-material SDF preview, and `sdf.combine(...)` only when you want one implicit body. Explicit shape lists are covered by `a.union(b, c)`; pass `{ op: 'intersection' }` to intersect instead.
|
|
235
235
|
|
|
236
236
|
```js
|
|
@@ -79,7 +79,7 @@ return b;
|
|
|
79
79
|
|
|
80
80
|
#### `scene(options: SceneOptions): void` — Configure the scene environment for the current script execution.
|
|
81
81
|
|
|
82
|
-
Controls camera, named render views, guided journeys, lighting, background, fog, environment maps,
|
|
82
|
+
Controls camera, named render views, guided journeys, lighting, background, fog, environment maps, capture defaults, and the joint-control helper overlay (`jointOverlay` — axis arrows and arc indicators, renderer-only). Multiple `scene()` calls merge per-key — later values win — so configuration can be split across calls.
|
|
83
83
|
|
|
84
84
|
Two behavioral cliffs:
|
|
85
85
|
|
|
@@ -90,7 +90,7 @@ Named views are repeatable cameras checked in with the model code. Canonical sha
|
|
|
90
90
|
|
|
91
91
|
Journeys are ordered `steps`, each focusing a returned object by name/tree path with an optional caption and camera. In the viewer they are opt-in (an Explore control; the camera does not move until started). Inspect resolved targets with `forgecad run --journeys`.
|
|
92
92
|
|
|
93
|
-
Post-processing
|
|
93
|
+
Post-processing is disabled for now while the browser EffectComposer flicker path is being rebuilt. Existing scripts that pass `postProcessing` continue running, but the option is not part of the active scene API.
|
|
94
94
|
|
|
95
95
|
All numeric values accept `param()` expressions.
|
|
96
96
|
|
|
@@ -109,7 +109,6 @@ scene({
|
|
|
109
109
|
{ type: 'directional', position: [50, -30, 200], color: '#ffd60a', intensity: 1.2 },
|
|
110
110
|
],
|
|
111
111
|
fog: { color: '#000814', near: 100, far: 450 },
|
|
112
|
-
postProcessing: { bloom: { intensity: param('bloom', 1.5, 0, 4) } },
|
|
113
112
|
jointOverlay: { axisColor: '#13dfff', arcColor: '#ff7a1a' },
|
|
114
113
|
});
|
|
115
114
|
```
|
|
@@ -120,7 +119,7 @@ scene({
|
|
|
120
119
|
|--------|------|-------------|
|
|
121
120
|
| `capture?` | `SceneCaptureConfig` | Default capture parameters for `forgecad capture` — CLI flags override these. |
|
|
122
121
|
|
|
123
|
-
Also: `background?: string | SceneBackgroundGradient`, `camera?: SceneCameraConfig`, `views?: Record<string, SceneViewInputConfig>`, `journeys?: Record<string, SceneJourneyConfig>`, `lights?: SceneLightConfig[]`, `environment?: SceneEnvironmentConfig`, `fog?: SceneFogConfig`, `
|
|
122
|
+
Also: `background?: string | SceneBackgroundGradient`, `camera?: SceneCameraConfig`, `views?: Record<string, SceneViewInputConfig>`, `journeys?: Record<string, SceneJourneyConfig>`, `lights?: SceneLightConfig[]`, `environment?: SceneEnvironmentConfig`, `fog?: SceneFogConfig`, `ground?: SceneGroundConfig`.
|
|
124
123
|
|
|
125
124
|
`SceneBackgroundGradient`: `{ top: string, bottom: string }`
|
|
126
125
|
|
|
@@ -174,14 +173,6 @@ Also: `type: SceneLightType`, `color?: string`, `intensity?: number`, `position?
|
|
|
174
173
|
- `density?: number` — Exponential fog density (if set, uses FogExp2 instead of linear Fog)
|
|
175
174
|
- Also: `color?: string`.
|
|
176
175
|
|
|
177
|
-
`ScenePostProcessingConfig`: `{ bloom?: SceneBloomConfig, vignette?: SceneVignetteConfig, grain?: SceneGrainConfig, toneMappingExposure?: number }`
|
|
178
|
-
|
|
179
|
-
`SceneBloomConfig`: `{ intensity?: number, threshold?: number, radius?: number }`
|
|
180
|
-
|
|
181
|
-
`SceneVignetteConfig`: `{ darkness?: number, offset?: number }`
|
|
182
|
-
|
|
183
|
-
`SceneGrainConfig`: `{ intensity?: number }`
|
|
184
|
-
|
|
185
176
|
**`SceneGroundConfig`**
|
|
186
177
|
|
|
187
178
|
| Option | Type | Description |
|
|
@@ -5,7 +5,7 @@ skill-order: 2
|
|
|
5
5
|
|
|
6
6
|
# Inspection Bundles — Evidence Contract
|
|
7
7
|
|
|
8
|
-
`forgecad inspect <family> <mode>` writes a deterministic bundle: evidence PNGs under `evidence/<type>/` plus a root `manifest.json`. **The manifest is the authoritative contract** — take file paths, encodings, per-view ranges, thresholds, tolerances, and identity maps from it; never hard-code bundle layout or infer object identity from object order. The PNGs are a visual index for locating findings, not standalone artifacts. Command tree, flags, and `--focus`/`--hide` filtering live in `docs/
|
|
8
|
+
`forgecad inspect <family> <mode>` writes a deterministic bundle: evidence PNGs under `evidence/<type>/` plus a root `manifest.json`. **The manifest is the authoritative contract** — take file paths, encodings, per-view ranges, thresholds, tolerances, and identity maps from it; never hard-code bundle layout or infer object identity from object order. The PNGs are a visual index for locating findings, not standalone artifacts. Command tree, flags, and `--focus`/`--hide` filtering live in `docs/skill/CLI.md` and `forgecad inspect evidence`; the inspection workflow lives in the `forgecad-render-inspect` skill. Model-authored `scene()` background, lights, fog, and exposure are ignored for inspection captures so evidence stays stable; named scene views remain available via `--view`.
|
|
9
9
|
|
|
10
10
|
Manifest evidence keys are evidence-oriented and stable for bundle readers: e.g. `fit interference` writes `manifest.evidence.collisions`, `physical components` writes `manifest.evidence.connectivity`.
|
|
11
11
|
|
|
@@ -11,13 +11,12 @@ The installed skill names are namespaced to avoid collisions with a user's exist
|
|
|
11
11
|
- `forgecad-3d-reconstruction`
|
|
12
12
|
- `forgecad-blockout-model`
|
|
13
13
|
- `forgecad-component-model`
|
|
14
|
-
- `forgecad-high-level-spec`
|
|
15
14
|
- `forgecad-image-replicator`
|
|
16
|
-
- `forgecad-lld`
|
|
17
15
|
- `forgecad-make-a-model`
|
|
18
16
|
- `forgecad-model-grader`
|
|
19
|
-
- `forgecad-
|
|
17
|
+
- `forgecad-mujoco-verify`
|
|
20
18
|
- `forgecad-project`
|
|
21
19
|
- `forgecad-reconstruction-benchmark`
|
|
22
20
|
- `forgecad-render-inspect`
|
|
21
|
+
- `forgecad-spec-by-walking-through-it`
|
|
23
22
|
- `forgecad-visual-spec`
|
|
@@ -11,7 +11,7 @@ A blockout is a spatial planning artifact: 3-7 simple masses that answer where p
|
|
|
11
11
|
| Need | Skill |
|
|
12
12
|
|------|-------|
|
|
13
13
|
| High-level 3D idea using simple masses | `forgecad-blockout-model` |
|
|
14
|
-
| Written concept or architecture before CAD | `forgecad-
|
|
14
|
+
| Written concept or architecture before CAD | `forgecad-spec-by-walking-through-it` |
|
|
15
15
|
| Accurate, detailed, parametric ForgeCAD model | `forgecad-make-a-model` |
|
|
16
16
|
|
|
17
17
|
## Method
|
|
@@ -11,7 +11,7 @@ The reference image is evidence, not the deliverable. The deliverable is a real
|
|
|
11
11
|
## Companion Skills
|
|
12
12
|
|
|
13
13
|
- `forgecad` — API docs, model authoring, renderer behavior.
|
|
14
|
-
- `forgecad-
|
|
14
|
+
- `forgecad-spec-by-walking-through-it` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
|
|
15
15
|
- `forgecad-make-a-model` — file placement, project structure, decomposition, definition of done.
|
|
16
16
|
- `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
17
17
|
|
|
@@ -23,7 +23,7 @@ Infer the real object before matching any camera — identity, manufacture, scal
|
|
|
23
23
|
|
|
24
24
|
1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
|
|
25
25
|
2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
|
|
26
|
-
3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-
|
|
26
|
+
3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-spec-by-walking-through-it` when these are underdetermined.
|
|
27
27
|
4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-make-a-model` for project structure.
|
|
28
28
|
5. Calibrate one camera per usable reference, only after the blockout makes sense from canonical views. Use the object center as `target`; estimate azimuth/elevation/distance/FOV from visible faces and perspective cues; use orthographic when parallel edges stay parallel with no perspective convergence.
|
|
29
29
|
6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: forgecad-mujoco-verify
|
|
3
|
+
description: Verify ForgeCAD MJCF exports in MuJoCo with real dynamics, contacts, root behavior, controls, required joint travel, and rendered evidence before calling a model simulation-ready. Use when making a ForgeCAD assembly sim-ready, debugging MJCF contacts, checking why a body falls through the floor, validating actuator motion, or proving a mechanism moved through the intended range.
|
|
4
|
+
forgecad-public: true
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# ForgeCAD MuJoCo Verify
|
|
8
|
+
|
|
9
|
+
Use this when `forgecad export mjcf ...` is part of the deliverable. A model is not sim-ready just because `forgecad check simready` passes or the MJCF file loads: it must be loaded in MuJoCo, stepped under gravity, driven with the intended controls, contact pairs inspected, and rendered from useful views.
|
|
10
|
+
|
|
11
|
+
Routing: geometry-only visual inspection -> `forgecad-render-inspect`; model authoring/API questions -> `forgecad`; building a new model -> `forgecad-make-a-model`.
|
|
12
|
+
|
|
13
|
+
## Definition Of Done
|
|
14
|
+
|
|
15
|
+
1. **Export from the exact source file.**
|
|
16
|
+
```bash
|
|
17
|
+
rm -rf /tmp/forgecad-mjcf && mkdir -p /tmp/forgecad-mjcf
|
|
18
|
+
forgecad export mjcf path/to/model.forge.js --output /tmp/forgecad-mjcf
|
|
19
|
+
```
|
|
20
|
+
2. **Load the generated scene in MuJoCo.** Use `scene.xml`, not only the model XML, so the floor/camera/package context is included.
|
|
21
|
+
3. **Check the root behavior.** If the model has a free root, it needs real support/contact geometry or an explicit fixed-root export path. Do not hide a floor failure by turning the whole shell into a giant bounding box that blocks moving internals.
|
|
22
|
+
4. **Check initial poses numerically.** For mechanisms, compute the expected body/link axes from the design source and compare them to MuJoCo `xmat`/`xpos`. Joint `ref`/default and connector frames can disagree with visual intuition.
|
|
23
|
+
5. **Keep meaningful collisions.** Do not mark moving functional parts `Sim.collider.none(...)` just to make motion pass. If full visual mesh contact is unstable, use a physically defensible simplified collider or proxy and state what physical surface it represents.
|
|
24
|
+
6. **Run the intended control with numeric acceptance criteria.** Define the expected signed post-settle joint travel before running the test: e.g. "this drive should rotate the drum -0.04 to -0.06 cycles, then stop near zero velocity" or "this wheel should move at least +1 cycle and keep spinning". Use cycles for revolute/indexing mechanisms when that is easier to reason about, and radians for direct MuJoCo qpos checks. A controller that only jitters, moves the wrong direction, overshoots through a stop, or eventually jams after skipping the intended state is a failure even when the process exits 0.
|
|
25
|
+
7. **Inspect contact pairs.** Contact names should match the physical story: floor/support, card/card, wheel/ground, stop/follower, etc. Contacts against a filled-in AABB, hidden fixture, or unrelated side plate usually indicate bad collider selection.
|
|
26
|
+
8. **Render evidence.** Save initial, settled, and driven frames from views that actually show the moving parts. If the model orientation is not obvious, generate a labeled camera preview grid first, inspect it, then rerun with the azimuth/elevation that shows the functional face. Do not report GIFs/frames before visually confirming they are not from the back, underside, or an occluded side.
|
|
27
|
+
|
|
28
|
+
## Helper Script
|
|
29
|
+
|
|
30
|
+
This skill ships a MuJoCo smoke verifier:
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
uv run --python 3.11 --with mujoco --with pillow \
|
|
34
|
+
python <this-skill-dir>/scripts/mujoco_verify.py /tmp/forgecad-mjcf \
|
|
35
|
+
--settle-seconds 2 \
|
|
36
|
+
--seconds 8 \
|
|
37
|
+
--actuator drum_velocity=-0.75 \
|
|
38
|
+
--watch-joint drum_joint \
|
|
39
|
+
--expect-drive-cycles drum_joint=-0.06:-0.03 \
|
|
40
|
+
--expect-final-qvel drum_joint=-0.02:0.02 \
|
|
41
|
+
--render-dir /tmp/forgecad-mjcf/verify \
|
|
42
|
+
--camera-preview-grid
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Use `--actuator name=value` more than once for multi-actuator models. Use `--expect-drive-cycles joint=min:max` to assert signed final-minus-settled revolute travel in cycles/turns. Use `--expect-drive-delta joint=min:max` when you want raw MuJoCo qpos units instead. Use `--expect-final-qvel joint=min:max` to assert terminal velocity when the mechanism should stop or continue at a bounded speed. The script prints JSON with root drift, initial-to-final joint delta, post-settle drive delta, derived cycle counts, final velocities, expectation ranges, and top contact pairs, then writes PNG frames if `--render-dir` is supplied.
|
|
46
|
+
|
|
47
|
+
Prefer explicit travel envelopes over loose "it moved" checks:
|
|
48
|
+
|
|
49
|
+
- Stops/latches: assert a signed drive cycle or delta range and a near-zero final velocity range.
|
|
50
|
+
- Continuous drives: assert the signed drive cycle/delta is large enough over the run and final velocity remains in the expected direction/range.
|
|
51
|
+
- Indexing mechanisms: assert the expected cycle step size, not just eventual stall. If the mechanism reaches a stop only after skipping several indices, treat that as failure.
|
|
52
|
+
- Gravity-settling mechanisms: evaluate functional travel with post-settle drive delta, not initial-to-final delta.
|
|
53
|
+
|
|
54
|
+
When rendered orientation matters, start with `--camera-preview-grid`, open `camera_preview_grid.png`, pick the azimuth that shows the mechanism face or contact interface, then rerun with `--camera-azimuth <deg>` and any needed `--camera-lookat`, `--camera-distance`, or `--camera-elevation` adjustment. For mechanism evidence, prefer front/front-quarter views for user-facing GIFs and add a side/contact view only when it explains a collision better.
|
|
55
|
+
|
|
56
|
+
## Contact Debugging Rules
|
|
57
|
+
|
|
58
|
+
- In MuJoCo UI, enable contact visualization with `Rendering` -> `Contact points` and `Contact forces`; use the right-side perturb/visualization panels if available in your build.
|
|
59
|
+
- If rotation is blocked, list contacts during the stall and sort by repeated pairs. The blocker is usually the pair that appears every step while the driven joint velocity trends to zero.
|
|
60
|
+
- If a body falls through the floor, inspect the exported geoms. Visual geoms have `contype="0" conaffinity="0"` and cannot support anything; collision geoms are usually group 3.
|
|
61
|
+
- Bounding boxes are fast but dangerous for hollow frames, windows, handles, and side plates. They collide as the filled AABB, not the visible object.
|
|
62
|
+
- Mesh collision on complex moving parts can be too exact or solver-hostile. Prefer simple physical proxies for contact-critical moving bodies, such as a slab for a flap card or cylinders for rolling contact, but keep them colliding.
|
|
63
|
+
|
|
64
|
+
## Reporting
|
|
65
|
+
|
|
66
|
+
Report the exact export command, the MuJoCo command/script, key numeric results, the most important contact pairs, and the rendered image paths. Say what was not verified. Never say "sim-ready" when only `forgecad run`, `forgecad check simready`, or a successful export was executed.
|