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
|
@@ -97,7 +97,7 @@ To verify installation, ask the agent:
|
|
|
97
97
|
What ForgeCAD skills are available?
|
|
98
98
|
```
|
|
99
99
|
|
|
100
|
-
You should see `forgecad` plus companion skills such as `forgecad-make-a-model`, `forgecad-render-inspect`, `forgecad-
|
|
100
|
+
You should see `forgecad` plus companion skills such as `forgecad-make-a-model`, `forgecad-render-inspect`, `forgecad-spec-by-walking-through-it`, and `forgecad-project`.
|
|
101
101
|
|
|
102
102
|
If you only want the core modeling skill without companion workflows:
|
|
103
103
|
|
|
@@ -205,9 +205,7 @@ For the full command reference, see [ForgeCAD CLI](../CLI.md).
|
|
|
205
205
|
| Skill | Use it for |
|
|
206
206
|
|---|---|
|
|
207
207
|
| `forgecad` | Core model authoring, editing, debugging, imports, assembly, render/export commands, and CLI validation. |
|
|
208
|
-
| `forgecad-
|
|
209
|
-
| `forgecad-high-level-spec` | Writing an HLD before modeling: requirements, alternatives, decisions, and open questions. |
|
|
210
|
-
| `forgecad-lld` | Writing the exact low-level model specification: dimensions, constraints, parameters, and verification criteria. |
|
|
208
|
+
| `forgecad-spec-by-walking-through-it` | Designing in a git-reviewed document before code: fuzzy-request intake and process choice, the HLD (requirements, alternatives, decisions), and the LLD (exact dimensions, constraints, parameters, verification). |
|
|
211
209
|
| `forgecad-make-a-model` | Creating a new `.forge.js` model in the active ForgeCAD project and validating it. |
|
|
212
210
|
| `forgecad-component-model` | Building or reviewing multi-file assemblies where parts build at origin and the parent assembly positions them through connectors. |
|
|
213
211
|
| `forgecad-blockout-model` | Making rough concept geometry to explore proportions, layout, motion envelope, or spatial intuition before detailed modeling. |
|
package/dist/docs-raw/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
|
package/dist/docs-raw/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Generated — do not edit
|
|
2
2
|
|
|
3
3
|
Everything in `docs/public/` is generated by `scripts/gen-public-docs.ts`:
|
|
4
|
-
docs are copied from `docs/
|
|
4
|
+
docs are copied from `docs/skill/` and `docs/internal/` per `docs/public-docs.json`, skill pages
|
|
5
5
|
from `dist-skill/website/skills/` (rendered out of `agent-skill-library/`), and
|
|
6
6
|
legal docs by `scripts/gen-legal-docs.ts`. Edit those sources instead.
|
|
@@ -5,7 +5,7 @@ skill-order: 4
|
|
|
5
5
|
|
|
6
6
|
# The Component Model
|
|
7
7
|
|
|
8
|
-
Long-form rationale for ForgeCAD's multi-part architecture. The enforceable rule sheet — anti-patterns, design gate, file-structure rules — lives in the `forgecad-component-model` skill (`agent-skill-library/forgecad-component-model/SKILL.md`). Connector and joint mechanics (frame semantics, mating, mirrored-revolute handedness) live in the assembly JSDoc, surfaced in `docs/
|
|
8
|
+
Long-form rationale for ForgeCAD's multi-part architecture. The enforceable rule sheet — anti-patterns, design gate, file-structure rules — lives in the `forgecad-component-model` skill (`agent-skill-library/forgecad-component-model/SKILL.md`). Connector and joint mechanics (frame semantics, mating, mirrored-revolute handedness) live in the assembly JSDoc, surfaced in `docs/skill/generated/assembly.md`.
|
|
9
9
|
|
|
10
10
|
## The Principle
|
|
11
11
|
|
|
@@ -373,7 +373,7 @@ return mech.solve({ theta: 45 });
|
|
|
373
373
|
|
|
374
374
|
#### `withSimulation(options: SimAssemblySimulationOptions): Assembly` — Attach the root simulation contract for this assembly.
|
|
375
375
|
|
|
376
|
-
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
|
|
376
|
+
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.
|
|
377
377
|
|
|
378
378
|
`SimAssemblySimulationOptions`: `{ profile: SimProfileDef, rootPart?: string, controllers?: SimControllerDef[] }`
|
|
379
379
|
|
|
@@ -584,4 +584,4 @@ console.log("Collisions", solved.collisionReport());
|
|
|
584
584
|
|
|
585
585
|
#### `minClearance(partA: string, partB: string, searchLength?: number): number` — Compute the minimum gap (clearance) between two parts in this solved pose.
|
|
586
586
|
|
|
587
|
-
Returns `0` if the parts are touching or overlapping.
|
|
587
|
+
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.
|
|
@@ -7,7 +7,7 @@ Every public API function belongs to one of 16 fundamental concepts. This is an
|
|
|
7
7
|
- **[C1: Primitive Construction](#c1-primitive-construction)** — Create geometry from parameters — no input geometry required. *(66 functions)*
|
|
8
8
|
- **[C2: Boolean Combination](#c2-boolean-combination)** — Combine same-dimension geometry using CSG set operations. *(6 functions)*
|
|
9
9
|
- **[C3: Rigid Transform](#c3-rigid-transform)** — Reposition or reorient geometry without changing its shape. *(0 functions)*
|
|
10
|
-
- **[C4: Dimensional Promotion](#c4-dimensional-promotion)** — Convert a 2D profile into a 3D solid (extrude, revolve, loft, sweep). *(
|
|
10
|
+
- **[C4: Dimensional Promotion](#c4-dimensional-promotion)** — Convert a 2D profile into a 3D solid (extrude, revolve, loft, sweep). *(50 functions)*
|
|
11
11
|
- **[C5: Topology Query](#c5-topology-query)** — Select or inspect named faces and edges on a shape. *(3 functions)*
|
|
12
12
|
- **[C6: Edge Feature](#c6-edge-feature)** — Modify edges of a solid — fillets, chamfers, draft, offset. *(4 functions)*
|
|
13
13
|
- **[C7: Pattern Replication](#c7-pattern-replication)** — Duplicate geometry in regular arrangements (linear, circular, mirror). *(6 functions)*
|
|
@@ -16,7 +16,7 @@ Every public API function belongs to one of 16 fundamental concepts. This is an
|
|
|
16
16
|
- **[C10: Assembly & Kinematics](#c10-assembly-kinematics)** — Compose parts with joints for kinematic simulation. *(15 functions)*
|
|
17
17
|
- **[C11: Parameterization & UI](#c11-parameterization-ui)** — Declare user-facing controls that drive model geometry. *(6 functions)*
|
|
18
18
|
- **[C12: Dimensional Demotion](#c12-dimensional-demotion)** — Extract 2D geometry from a 3D solid (section, projection). *(3 functions)*
|
|
19
|
-
- **[C13: Export & Output](#c13-export-output)** — Convert geometry to external formats (STL, 3MF, SVG, DXF, G-code, PDF). *(
|
|
19
|
+
- **[C13: Export & Output](#c13-export-output)** — Convert geometry to external formats (STL, 3MF, SVG, DXF, G-code, PDF). *(14 functions)*
|
|
20
20
|
- **[C14: Visual & Debugging](#c14-visual-debugging)** — Control viewport appearance and debugging aids. *(35 functions)*
|
|
21
21
|
- **[C15: Import & Composition](#c15-import-composition)** — Bring external geometry or other ForgeCAD modules into the current script. *(1 functions)*
|
|
22
22
|
- **[C16: Part Library](#c16-part-library)** — Pre-built parametric parts accessible via `lib.*`. *(4 functions)*
|
|
@@ -53,7 +53,7 @@ Create geometry from parameters — no input geometry required.
|
|
|
53
53
|
- `sdf.basketWeave(options?)` — Basket weave surface pattern — threads with over-under crossings in UV space. → [sdf](/docs/sdf#sdf)
|
|
54
54
|
- `sdf.pattern2d()` — Create typed, composable 2D surface patterns for `.surfaceDisplace()`. → [sdf](/docs/sdf#sdf)
|
|
55
55
|
- `sdf.SurfacePattern` — A 2D surface pattern — a heightmap function for use with `.surfaceDisplace()`. → [sdf](/docs/sdf#sdf)
|
|
56
|
-
- `sdf.fromFunction(fn, options)` — Create a custom SDF from one expression; shader-safe expressions
|
|
56
|
+
- `sdf.fromFunction(fn, options)` — Create a custom SDF from one expression; shader-safe expressions keep shader metadata for tooling. → [sdf](/docs/sdf#sdf)
|
|
57
57
|
- `sdf.combine(value, options?)` — Collapse a plain object/array tree of SDF leaves into one continuous implicit field. → [sdf](/docs/sdf#sdf)
|
|
58
58
|
- `sdf.Sculpt` — Sculpt-like facade: friendly liquid-modeling verbs backed by the same SDF kernel. → [sdf](/docs/sdf#sdf)
|
|
59
59
|
- `Sculpt.sphere(radius)` — Create a liquid SDF sphere centered at the origin. → [sdf](/docs/sdf#sculpt)
|
|
@@ -144,11 +144,13 @@ Convert a 2D profile into a 3D solid (extrude, revolve, loft, sweep).
|
|
|
144
144
|
- `Loft.withGuideRails(stations, rails, options?)` — Loft through profile stations while forcing generated sections to follow guide rails. → [curves](/docs/curves#curves-surfacing)
|
|
145
145
|
- `Analysis.EdgeContinuity(shape, options?)` → [curves](/docs/curves#analysis)
|
|
146
146
|
- `Analysis.SurfaceContinuity(shape, options?)` → [curves](/docs/curves#analysis)
|
|
147
|
+
- `Analysis.EdgeMatch(edgeA, edgeB, options?)` — 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). → [curves](/docs/curves#analysis)
|
|
147
148
|
- `Analysis.CurvatureComb(input, options?)` → [curves](/docs/curves#analysis)
|
|
148
149
|
- `Analysis.SurfaceHealth(shape, options?)` → [curves](/docs/curves#analysis)
|
|
149
150
|
- `Analysis.BRepValidity(shape, options?)` — Validate B-rep/shell/solid structure and return closedness, manifoldness, orientation, and issue diagnostics. → [curves](/docs/curves#analysis)
|
|
150
151
|
- `Blend.Edge(options)` → [curves](/docs/curves#blend)
|
|
151
152
|
- `Blend.Surface(options)` → [curves](/docs/curves#blend)
|
|
153
|
+
- `Blend.Bridge(edgeA, edgeB)` — Build a transition strip between two `Surface.Net` sheet edges. → [curves](/docs/curves#blend)
|
|
152
154
|
- `Surface.Plane(options)` — Create a finite analytic plane sheet that can be trimmed, sewn, thickened, or used as a low-level face. → [curves](/docs/curves#surface)
|
|
153
155
|
- `Surface.Cylinder(options)` — Create a finite analytic cylindrical sheet, optionally bounded by start/end angles. → [curves](/docs/curves#surface)
|
|
154
156
|
- `Surface.Cone(options)` — Create a finite analytic conical or frustum sheet, optionally bounded by start/end angles. → [curves](/docs/curves#surface)
|
|
@@ -165,6 +167,7 @@ Convert a 2D profile into a 3D solid (extrude, revolve, loft, sweep).
|
|
|
165
167
|
- `Surface.Trim(shape, tool)` → [curves](/docs/curves#surface)
|
|
166
168
|
- `Surface.Split(shape, tool)` → [curves](/docs/curves#surface)
|
|
167
169
|
- `Surface.Match(shape, options)` → [curves](/docs/curves#surface)
|
|
170
|
+
- `Surface.Net()` — Begin a curve-network (Gordon) surface — the class-A keystone. → [curves](/docs/curves#surface)
|
|
168
171
|
- `loft(profiles, heights, options?)` — Loft between multiple sketches along Z stations. → [curves](/docs/curves#loft)
|
|
169
172
|
- `sweep(profile, path, options?)` → [curves](/docs/curves#sweep)
|
|
170
173
|
- `variableSweep(spine, sections, options?)` — Sweep a variable cross-section along a 3D spine curve. → [curves](/docs/curves#variablesweep)
|
|
@@ -286,7 +289,6 @@ Convert geometry to external formats (STL, 3MF, SVG, DXF, G-code, PDF).
|
|
|
286
289
|
- `Laser.lookupKerf(material, thickness, laserType?)` — Look up kerf for a material + thickness + laser combo in `Laser.COMMON_KERFS`. → [sheet-metal](/docs/sheet-metal#laser)
|
|
287
290
|
- `Laser.COMMON_KERFS` — Common full-kerf values by material, thickness, and laser type. → [sheet-metal](/docs/sheet-metal#laser)
|
|
288
291
|
- `bom(quantity, description, opts?)` — Register a Bill of Materials entry for report export. → [output](/docs/output#bom)
|
|
289
|
-
- `robotExport(options)` — Compatibility shim for SDF/URDF robot package metadata. → [output](/docs/output#robotexport)
|
|
290
292
|
- `sheetMetal(options)` — Create a parametric sheet metal part with flanges, bend allowances, and flat-pattern unfolding. → [sheet-metal](/docs/sheet-metal#sheetmetal)
|
|
291
293
|
- `sketchToDxf(sketch, options?)` — Export a 2D sketch as a DXF string (R12/AC1009 — maximally compatible). → [output](/docs/output#sketchtodxf)
|
|
292
294
|
- `sketchToSvg(sketch, options?)` — Export a 2D sketch as an SVG string. → [output](/docs/output#sketchtosvg)
|
|
@@ -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.
|
|
@@ -429,7 +429,11 @@ const outlet = route.port("outlet");
|
|
|
429
429
|
|
|
430
430
|
#### `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.
|
|
431
431
|
|
|
432
|
-
#### `normalAt(u: number, v: number): Vec3` — Evaluate the surface normal at (u, v)
|
|
432
|
+
#### `normalAt(u: number, v: number): Vec3` — Evaluate the surface unit normal at (u, v) from analytic first derivatives.
|
|
433
|
+
|
|
434
|
+
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.
|
|
435
|
+
|
|
436
|
+
#### `derivativesAt(u: number, v: number): { S: Vec3; Su: Vec3; Sv: Vec3; }` — Analytic first partial derivatives S_u, S_v (rational quotient rule).
|
|
433
437
|
|
|
434
438
|
#### `tessellate(resU?: number, resV?: number): { positions: Vec3[]; normals: Vec3[]; indices: number[]; }` — Tessellate the surface into a triangle mesh. Returns positions, normals, and triangle indices.
|
|
435
439
|
|
|
@@ -1169,16 +1173,19 @@ Members (full entries under [Curves & Surfacing](#curves-surfacing)): `Curve.Ble
|
|
|
1169
1173
|
- `Trim(shape: Shape, tool: Shape | SurfacePlaneOp): Shape`
|
|
1170
1174
|
- `Split(shape: Shape, tool: Shape | SurfacePlaneOp): [ Shape, Shape ]`
|
|
1171
1175
|
- `Match(shape: Shape, options: { edge: "u0" | "u1" | "v0" | "v1"; target: EdgeRef; continuity?: SurfaceContinuity; }): Shape`
|
|
1176
|
+
- `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.
|
|
1172
1177
|
|
|
1173
1178
|
### `Blend`
|
|
1174
1179
|
|
|
1175
1180
|
- `Edge(options: BlendEdgeOptions): Shape`
|
|
1176
1181
|
- `Surface(options: BlendSurfaceOptions): Shape`
|
|
1182
|
+
- `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`.
|
|
1177
1183
|
|
|
1178
1184
|
### `Analysis`
|
|
1179
1185
|
|
|
1180
1186
|
- `EdgeContinuity(shape: Shape, options?: EdgeContinuityThresholds): EdgeContinuityReport`
|
|
1181
1187
|
- `SurfaceContinuity(shape: Shape, options?: EdgeContinuityThresholds): EdgeContinuityReport`
|
|
1188
|
+
- `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.
|
|
1182
1189
|
- `CurvatureComb(input: NurbsCurve3D | EdgeRef, options?: { samples?: number; }): CurvatureSample[]`
|
|
1183
1190
|
- `SurfaceHealth(shape: Shape, options?: { tinyEdgeThreshold?: number; sliverThreshold?: number; }): SurfaceHealthReport`
|
|
1184
1191
|
- `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
|
<!-- forgecad-skill:exclude-start symbol="compatibility runtime names" reason="Compatibility-only renamed runtime globals." -->
|
|
@@ -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
|
|