forgecad 0.9.4 → 0.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (90) hide show
  1. package/dist/assets/{AdminPage-jwoEgwE_.js → AdminPage-Da6hhpJx.js} +1 -1
  2. package/dist/assets/{BlogPage-Ck7g3ue2.js → BlogPage-Bl_sKeWb.js} +1 -1
  3. package/dist/assets/{DocsPage-9WaRC14b.js → DocsPage-Blz3Tp4j.js} +1 -6
  4. package/dist/assets/EditorApp-CuiPbtn5.js +12754 -0
  5. package/dist/assets/{EmbedViewer-37_PfMwv.js → EmbedViewer-BFG6-Ufm.js} +2 -2
  6. package/dist/assets/{LandingPageProofDriven-CO8WL0CY.js → LandingPageProofDriven-DB9fQd5P.js} +1 -1
  7. package/dist/assets/{PricingPage-DADKGuOa.js → PricingPage-BMxYT_F0.js} +1 -1
  8. package/dist/assets/{SettingsPage-DKKI4W49.js → SettingsPage-VVQNrCAg.js} +1 -1
  9. package/dist/assets/{app-CwI02pTA.js → app-Dl9ymBWC.js} +355 -36
  10. package/dist/assets/cli/{render-Kw5hLEcL.js → render-CFtwKCCY.js} +203 -862
  11. package/dist/assets/{sectionPlaneMath-C8N0w8o3.js → distance-BEC2RjJi.js} +4150 -801
  12. package/dist/assets/{evalWorker-D6ub3kfS.js → evalWorker-CRvbzTXm.js} +2611 -528
  13. package/dist/assets/{manifold-CwDdMKyc.js → manifold-B9QSr-qP.js} +1 -1
  14. package/dist/assets/{manifold-DTvmxSDf.js → manifold-DpBXFS2K.js} +1 -1
  15. package/dist/assets/{manifold-lru0jwVw.js → manifold-DzZ4VRPs.js} +2 -2
  16. package/dist/assets/{renderSceneState-tvtNKNRi.js → renderSceneState-BuAXF2jh.js} +1 -1
  17. package/dist/assets/{reportWorker-DeqktDGt.js → reportWorker-BNWEnRg1.js} +2606 -525
  18. package/dist/cli/render.html +1 -1
  19. package/dist/docs/index.html +2 -2
  20. package/dist/docs-raw/AI/usage.md +0 -1
  21. package/dist/docs-raw/API/core/concepts.md +11 -1
  22. package/dist/docs-raw/CLI.md +64 -13
  23. package/dist/docs-raw/beta-operations.md +4 -0
  24. package/dist/docs-raw/deployment.md +38 -23
  25. package/dist/docs-raw/generated/assembly.md +8 -3
  26. package/dist/docs-raw/generated/concepts.md +126 -46
  27. package/dist/docs-raw/generated/core.md +97 -47
  28. package/dist/docs-raw/generated/curves.md +113 -595
  29. package/dist/docs-raw/generated/lib.md +40 -3
  30. package/dist/docs-raw/generated/output.md +6 -1
  31. package/dist/docs-raw/generated/sdf.md +50 -4
  32. package/dist/docs-raw/generated/sketch.md +9 -1
  33. package/dist/docs-raw/generated/viewport.md +1 -9
  34. package/dist/docs-raw/guides/inspection-bundles.md +40 -9
  35. package/dist/docs-raw/runbook.md +3 -3
  36. package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -0
  37. package/dist/docs-raw/skills/forgecad-image-replicator.md +3 -1
  38. package/dist/docs-raw/skills/forgecad-make-a-model.md +48 -4
  39. package/dist/docs-raw/skills/forgecad-render-inspect.md +3 -1
  40. package/dist/docs-raw/skills/forgecad-visual-spec.md +2 -0
  41. package/dist/docs-raw/skills/forgecad.md +2 -1
  42. package/dist/docs-raw/skills/index.md +0 -1
  43. package/dist/index.html +1 -1
  44. package/dist/sitemap.xml +6 -6
  45. package/dist-cli/blender/render.py +43 -8
  46. package/dist-cli/forgecad.js +5729 -2015
  47. package/dist-cli/forgecad.js.map +1 -1
  48. package/dist-skill/CONTEXT.md +372 -667
  49. package/dist-skill/SKILL-dev.md +2 -1
  50. package/dist-skill/SKILL.md +2 -1
  51. package/dist-skill/docs/API/core/concepts.md +11 -1
  52. package/dist-skill/docs/CLI.md +64 -13
  53. package/dist-skill/docs/generated/assembly.md +8 -3
  54. package/dist-skill/docs/generated/core.md +97 -47
  55. package/dist-skill/docs/generated/curves.md +113 -595
  56. package/dist-skill/docs/generated/lib.md +40 -3
  57. package/dist-skill/docs/generated/output.md +6 -1
  58. package/dist-skill/docs/generated/sdf.md +50 -4
  59. package/dist-skill/docs/generated/sketch.md +9 -1
  60. package/dist-skill/docs/generated/viewport.md +1 -9
  61. package/dist-skill/docs/guides/inspection-bundles.md +40 -9
  62. package/dist-skill/docs-dev/API/core/concepts.md +11 -1
  63. package/dist-skill/docs-dev/CLI.md +64 -13
  64. package/dist-skill/docs-dev/generated/assembly.md +8 -3
  65. package/dist-skill/docs-dev/generated/core.md +97 -47
  66. package/dist-skill/docs-dev/generated/curves.md +113 -595
  67. package/dist-skill/docs-dev/generated/lib.md +40 -3
  68. package/dist-skill/docs-dev/generated/output.md +6 -1
  69. package/dist-skill/docs-dev/generated/sdf.md +50 -4
  70. package/dist-skill/docs-dev/generated/sketch.md +9 -1
  71. package/dist-skill/docs-dev/generated/viewport.md +1 -9
  72. package/dist-skill/docs-dev/guides/inspection-bundles.md +40 -9
  73. package/dist-skill/library/README.md +0 -1
  74. package/dist-skill/library/forgecad-blockout-model/SKILL.md +1 -0
  75. package/dist-skill/library/forgecad-image-replicator/SKILL.md +3 -1
  76. package/dist-skill/library/forgecad-make-a-model/SKILL.md +48 -4
  77. package/dist-skill/library/forgecad-render-inspect/SKILL.md +3 -1
  78. package/dist-skill/library/forgecad-visual-spec/SKILL.md +2 -0
  79. package/examples/api/drive-wheel-regions.forge.js +43 -0
  80. package/examples/api/guided-loft-olive-oil-bottle.forge.js +135 -0
  81. package/examples/api/sdf-circular-array-knurling.forge.js +19 -0
  82. package/examples/api/sdf-pattern2d-ceramic-ripple-set.forge.js +83 -0
  83. package/examples/api/sdf-pattern2d-grip-tread.forge.js +72 -0
  84. package/examples/api/sdf-pattern2d-orbital-jewelry.forge.js +62 -0
  85. package/examples/api/sdf-surface-basket-weave.forge.js +67 -0
  86. package/examples/api/sector-gear-body.forge.js +34 -0
  87. package/package.json +20 -2
  88. package/dist/assets/EditorApp-Dja2jMmW.js +0 -12509
  89. package/dist/docs-raw/skills/forgecad-api-dogfood.md +0 -130
  90. package/dist-skill/library/forgecad-api-dogfood/SKILL.md +0 -125
@@ -19,6 +19,7 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
19
19
  7. Validate with `forgecad run <file>` (add `--debug-imports` for import chain issues, and pass `--backend manifold|occt|truck` when the backend matters).
20
20
  8. For `jointsView()` animations, keep wrapped revolute tracks continuous across branch cuts; do not assume the viewport will auto-fix `-180/180` jumps.
21
21
  9. Model the physical artifact, not an educational diagram. Do not add explanatory labels, arrows, legends, or text plaques unless the user explicitly asks for a presentation or teaching view. Product markings are allowed only when they would exist on the real object.
22
+ 10. Build the real closed CAD first. Do not bake cutaways, sectioned shells, permanently exploded layouts, or hidden-parts views into the default model just to show internals. Use viewer-only cut planes, `explodeView`, object hiding, transparency, or `render inspect` section channels after the artifact exists.
22
23
 
23
24
  ### Import and Composition
24
25
 
@@ -86,7 +87,7 @@ Parametric bolts, nuts, washers, standard hardware, gears, pipes, and structural
86
87
  - `{{SKILL_DIR}}/docs/generated/lib.md`
87
88
  - `{{SKILL_DIR}}/docs/generated/wood.md`
88
89
 
89
- ### 9. Runtime Viewport APIs (for cut planes, jointsView, and animation playback)
90
+ ### 9. Runtime Viewport APIs (for cut planes, exploded views, hiding, and animation playback)
90
91
 
91
92
  Viewer-only APIs such as cutPlane, explodeView, jointsView, and animation behavior.
92
93
 
@@ -19,6 +19,7 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
19
19
  7. Validate with `forgecad run <file>` (add `--debug-imports` for import chain issues, and pass `--backend manifold|occt|truck` when the backend matters).
20
20
  8. For `jointsView()` animations, keep wrapped revolute tracks continuous across branch cuts; do not assume the viewport will auto-fix `-180/180` jumps.
21
21
  9. Model the physical artifact, not an educational diagram. Do not add explanatory labels, arrows, legends, or text plaques unless the user explicitly asks for a presentation or teaching view. Product markings are allowed only when they would exist on the real object.
22
+ 10. Build the real closed CAD first. Do not bake cutaways, sectioned shells, permanently exploded layouts, or hidden-parts views into the default model just to show internals. Use viewer-only cut planes, `explodeView`, object hiding, transparency, or `render inspect` section channels after the artifact exists.
22
23
 
23
24
  ### Import and Composition
24
25
 
@@ -86,7 +87,7 @@ Parametric bolts, nuts, washers, standard hardware, gears, pipes, and structural
86
87
  - `{{SKILL_DIR}}/docs/generated/lib.md`
87
88
  - `{{SKILL_DIR}}/docs/generated/wood.md`
88
89
 
89
- ### 9. Runtime Viewport APIs (for cut planes, jointsView, and animation playback)
90
+ ### 9. Runtime Viewport APIs (for cut planes, exploded views, hiding, and animation playback)
90
91
 
91
92
  Viewer-only APIs such as cutPlane, explodeView, jointsView, and animation behavior.
92
93
 
@@ -34,7 +34,7 @@ Top-level declarations such as `const bom = ...`, `let scene = ...`, or `class S
34
34
 
35
35
  - Scripts re-execute on every parameter change (400ms debounce)
36
36
  - Geometry operations are **immutable** — shapes, sketches, groups, imported assemblies, and wood boards return new values instead of modifying in place
37
- - Must return one of: `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, `SdfShape`, `Array` of renderables, `Array` of `{ name, shape?, sketch?, group?, color? }`, or a **metadata object** (see below)
37
+ - Must return one of: `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, `SdfShape`, `Array` of renderables, `Array` of `{ name, tags?, shape?, sketch?, group?, color? }`, or a **metadata object** (see below)
38
38
 
39
39
  Top-level assembly scripts can return an unsolved `Assembly` directly; ForgeCAD solves it at default joint values for display. Return `assembly.solve(state)` when you want a specific pose. Do not call `.toGroup()` just to make an assembly render — use `.toGroup()` only when you specifically need `ShapeGroup` composition, group-style transforms, or named-child lookup.
40
40
 
@@ -67,6 +67,16 @@ return {
67
67
  };
68
68
  ```
69
69
 
70
+ Named return objects and named `group(...)` children can include `tags`. Tags are viewport metadata: they do not affect geometry, exports, face labels, or BOM rows, but the command palette can hide, show only, or focus every object with a selected tag.
71
+
72
+ ```javascript
73
+ return [
74
+ { name: 'Base Plate', tags: ['printed', 'structural'], shape: base },
75
+ { name: 'M4 Bolt A', tags: 'fastener', shape: boltA },
76
+ { name: 'M4 Bolt B', tags: 'fastener', shape: boltB },
77
+ ];
78
+ ```
79
+
70
80
  ## Coordinate System
71
81
 
72
82
  Z-up right-handed: X = left/right, Y = forward/back, Z = up/down.
@@ -113,12 +113,14 @@ forgecad run examples/constraints/06-complex-spectrogram.forge.js --solver-debug
113
113
 
114
114
  ### `forgecad render`
115
115
 
116
- Render a Forge scene. Use a subcommand — `3d`, `inspect`, `section`, `wireframe`, `sketch`, or `hq`.
116
+ Render a Forge scene. Use a subcommand — `3d`, `inspect`, `views`, `section`, `wireframe`, `sketch`, or `hq`.
117
117
 
118
118
  `forgecad render` is a group of rendering subcommands. Pick one based on what you want:
119
119
 
120
120
  - `render 3d` — standard viewport PNG, the usual way to visually verify geometry
121
121
  - `render inspect` — machine-readable inspection bundle with geometry channels and a manifest
122
+ - `render inspect channels` — list supported inspection channels
123
+ - `render views` — list named cameras declared with `scene({ views })`
122
124
  - `render wireframe` — edges only, no shading
123
125
  - `render section` — 2D cross-section cut by a plane (SVG or PNG)
124
126
  - `render sketch` — 2D sketch script to PNG
@@ -127,6 +129,8 @@ Render a Forge scene. Use a subcommand — `3d`, `inspect`, `section`, `wirefram
127
129
  ```bash
128
130
  forgecad render 3d examples/cup.forge.js
129
131
  forgecad render inspect examples/api/static-assembly-connectors.forge.js --channels rgb,mask
132
+ forgecad render inspect channels
133
+ forgecad render views examples/cup.forge.js
130
134
  forgecad render wireframe examples/cup.forge.js
131
135
  forgecad render section examples/furniture/01-table.forge.js --plane XZ
132
136
  forgecad render hq examples/cup.forge.js --preset dramatic
@@ -138,7 +142,7 @@ Render a Forge scene to PNG using the real viewport renderer.
138
142
 
139
143
  Launches a headless Chrome instance, renders the scene with the same WebGL viewport as the editor, and saves a PNG. The output path defaults to `<script-name>.png` next to the input file.
140
144
 
141
- Use `--focus` to isolate specific parts (hides everything else) or `--hide` to remove clutter like mock objects. The `--view` flag selects a named camera declared in `scene({ views })`. The `--camera` flag accepts built-in views (`front`, `top`, `iso`), `azimuth:elevation` angles, or an exact `proj/pos/target/up/fov` camera spec — pass `--camera` multiple times to render several viewpoints in one run.
145
+ Use `--focus` to isolate specific parts (hides everything else) or `--hide` to remove clutter like mock objects. The `--view` flag selects a named camera declared in `scene({ views })`. The `--camera` flag accepts built-in views (`front`, `top`, `iso`), `azimuth:elevation` angles, or an exact `proj/pos/target/up/fov` camera spec — pass `--camera` multiple times to render several viewpoints in one run. Use `--camera-json <file>` or `--scene <file>` for exact reproducible viewport cameras without shell escaping.
142
146
 
143
147
  Use `--edges=<off|thin|bold>` to control the edge overlay. For a pure wireframe look, use `render wireframe` instead.
144
148
 
@@ -152,16 +156,29 @@ forgecad render 3d examples/cup.forge.js --hide "wall,bolt"
152
156
  forgecad render 3d model.forge.js --view hero
153
157
  forgecad render 3d model.forge.js --camera 45:30
154
158
  forgecad render 3d model.forge.js --camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38"
159
+ forgecad render 3d model.forge.js --camera-json camera.json
160
+ forgecad render 3d model.forge.js --scene scene.json
155
161
  forgecad render 3d model.forge.js --camera front --camera side
156
162
  forgecad render 3d model.forge.js --edges bold
157
163
  forgecad render 3d model.forge.js --edges off
158
164
  ```
159
165
 
166
+ ### `forgecad render views`
167
+
168
+ List named camera views declared by a model with `scene({ views })`.
169
+
170
+ Runs the script headlessly and prints every named render view with an exact camera spec that can be passed back to `render 3d`, `render hq`, or `capture`.
171
+
172
+ ```bash
173
+ forgecad render views model.forge.js
174
+ forgecad render views model.forge.js --json
175
+ ```
176
+
160
177
  ### `forgecad render inspect`
161
178
 
162
179
  Render a machine-readable inspection bundle with geometry channels and a manifest.
163
180
 
164
- Launches the headless viewport renderer and writes a directory bundle for agent and automation workflows. Every channel is opt-in with `--channels`; there is no default bundle. Selected channels emit canonical `front`, `right`, `top`, and `iso` views for RGB, depth, normals, object masks, physical connectivity, rooted component distance, collisions, and wall thickness, or a principal-plane section atlas, plus a root `manifest.json` with scene metadata, filters, object visibility, and relative file paths.
181
+ Launches the headless viewport renderer and writes a directory bundle for agent and automation workflows. Every channel is opt-in with `--channels`; there is no default bundle. Selected channels emit canonical `front`, `right`, `top`, and `iso` views for RGB, depth, normals, surface roughness, object masks, physical connectivity, rooted component distance, collisions, and wall thickness, or a principal-plane section atlas, plus a root `manifest.json` with scene metadata, filters, object visibility, and relative file paths.
165
182
 
166
183
  Use `--focus` to isolate specific parts or hide mocks, and `--hide` to remove named clutter. Output defaults to `<script-name>-inspect/` next to the input file.
167
184
 
@@ -173,6 +190,15 @@ forgecad render inspect examples/api/static-assembly-connectors.forge.js out/ben
173
190
  forgecad render inspect examples/api/static-assembly-connectors.forge.js --channels rgb,mask,collisions --hide "Bench.Slat0" --force
174
191
  ```
175
192
 
193
+ ### `forgecad render inspect channels`
194
+
195
+ List supported inspection bundle channels.
196
+
197
+ ```bash
198
+ forgecad render inspect channels
199
+ forgecad render inspect channels --json
200
+ ```
201
+
176
202
  ### `forgecad render wireframe`
177
203
 
178
204
  Render a Forge scene as a wireframe (edges only, no shading).
@@ -190,13 +216,15 @@ High-quality render via Blender Cycles — path-traced, HDRI, material presets.
190
216
 
191
217
  Exports the scene to Blender and renders with Cycles (path tracer). Requires Blender installed and on PATH.
192
218
 
193
- Choose a `--preset` for the look: `studio` (neutral product shot), `dramatic` (high-contrast), `clay` (matte, no color), `glass`, `metallic`, `toon`, `xray`, `normals`, `silhouette`, and more. Control quality vs speed with `--samples` (default 256). Use `--transparent` for a transparent background (compositing-ready).
219
+ Choose a `--preset` for the look: `studio` (neutral product shot), `dramatic` (high-contrast), `clay` (matte, no color), `glass`, `metallic`, `toon`, `xray`, `normals`, `silhouette`, and more. Control quality vs speed with `--samples` (default 256). Use `--view`, `--camera`, `--camera-json`, or `--scene <file>` for still camera control, matching `render 3d`. Use `--transparent` for a transparent background (compositing-ready).
194
220
 
195
221
  Output defaults to `<script-name>-hq.png`. Great for documentation, marketing renders, and social media.
196
222
 
197
223
  ```bash
198
224
  forgecad render hq examples/cup.forge.js
199
225
  forgecad render hq examples/cup.forge.js hero.png --preset dramatic --samples 1024
226
+ forgecad render hq examples/cup.forge.js hero.png --view hero
227
+ forgecad render hq examples/cup.forge.js hero.png --camera-json camera.json
200
228
  forgecad render hq examples/cup.forge.js --preset clay --size 2048
201
229
  forgecad render hq examples/cup.forge.js --transparent --preset glass
202
230
  ```
@@ -205,16 +233,20 @@ forgecad render hq examples/cup.forge.js --transparent --preset glass
205
233
 
206
234
  Animated orbit or joint playback.
207
235
 
208
- Renders an animated sequence by either orbiting the camera around the model or playing back a `jointsView` animation. Use `--capture orbit` (default) for a turntable rotation, `--capture animation --animation <name>` to play a named joints clip, or `--capture section-sweep` to move a clipping plane through the model. Supports `--cut-plane` to animate with a static cross-section visible.
236
+ Renders an animated sequence by either orbiting the camera around the model or playing back a `jointsView` animation. Use `--capture orbit` (default) for a turntable rotation, `--capture animation --animation <name>` to play a named joints clip, or `--capture section-sweep` to move a clipping plane through the model. Supports `--cut-plane` to animate with a static cross-section visible. Use `--view`, `--camera`, `--camera-json`, or `--scene <file>` to choose the orbit base camera or the fixed camera for animations and section sweeps.
209
237
 
210
238
  ```bash
211
239
  forgecad capture gif examples/cup.forge.js
212
240
  forgecad capture gif examples/3d-printer.forge.js out/section.gif --cut-plane "Front Section"
213
241
  forgecad capture gif model.forge.js out/raw.gif --param "Output=raw-sdf"
242
+ forgecad capture gif model.forge.js out/front.gif --camera front
243
+ forgecad capture gif model.forge.js out/hero.gif --view hero
214
244
  forgecad capture gif examples/3d-printer.forge.js out/sweep.gif --capture section-sweep --sweep-plane YZ
215
245
  forgecad capture mp4 examples/cup.forge.js
216
246
  forgecad capture mp4 examples/api/runtime-joints-view.forge.js out/step.mp4 --capture animation --animation Step
217
247
  forgecad capture mp4 model.forge.js out/raw.mp4 --param "Output=raw-sdf"
248
+ forgecad capture mp4 model.forge.js out/front.mp4 --camera front
249
+ forgecad capture mp4 model.forge.js out/hero.mp4 --view hero
218
250
  forgecad capture mp4 examples/3d-printer.forge.js out/sweep.mp4 --capture section-sweep --sweep-plane YZ --sweep-frames 180
219
251
  ```
220
252
 
@@ -247,18 +279,22 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
247
279
  | `--focus <names>` | Focus: no arg hides mocks; comma-separated names shows only those |
248
280
  | `--hide <names>` | Hide comma-separated object names |
249
281
  | `--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. |
282
+ | `--camera-json <file>` | Exact viewport camera JSON file |
250
283
  | `--view <name>` | Named camera view declared by the model with scene({ views }) |
251
284
  | `--size <px>` | Image size in pixels |
252
- | `--scene <json>` | Viewport scene state JSON |
285
+ | `--scene <json\|file>` | Viewport scene state JSON or JSON file |
253
286
  | `--background <color>` | Canvas background override |
254
287
  | `--render-mode <solid\|wireframe>` | Shaded solid (default) or wireframe only |
255
- | `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: thin) |
288
+ | `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: off) |
256
289
  | `--render-style <classic\|studio\|fast\|glass>` | Visual render style (default: classic) |
257
290
  | `--port <n>` | Vite dev server port |
291
+ | `--fresh-server` | Start a fresh renderer instead of reusing an existing one |
258
292
  | `--chrome-path <path>` | Chrome or Chromium executable path |
259
293
  | `--output <path>` | Output file path |
260
- | `--channels <rgb,depth,normals,mask,connectivity,distance,collisions,thickness,section>` | Required inspection channels to emit; no default |
261
- | `--quality <default\|live\|high>` | Mesh/render quality |
294
+ | `--json` | Print machine-readable JSON |
295
+ | `--quality <default\|live\|high>` | Mesh quality preset |
296
+ | `--backend <manifold\|occt\|truck>` | Geometry backend |
297
+ | `--channels <rgb,depth,normals,roughness,mask,connectivity,distance,collisions,thickness,section>` | Required inspection channels to emit; no default |
262
298
  | `--force` | Replace an existing bundle directory |
263
299
  | `--min-thickness <mm>` | Critical thickness threshold in model units |
264
300
  | `--warn-thickness <mm>` | Warning thickness threshold in model units |
@@ -276,7 +312,6 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
276
312
  | `--frames <n>` | Video frames per revolution |
277
313
  | `--fps <n>` | Video frame rate |
278
314
  | `--pitch <deg>` | Camera pitch angle in degrees |
279
- | `--backend <manifold\|occt\|truck>` | Geometry backend |
280
315
  | `--format <gif\|mp4>` | Output format |
281
316
  | `--capture <orbit\|animation\|section-sweep>` | Capture preset |
282
317
  | `--animation <name>` | Named jointsView animation clip |
@@ -330,6 +365,7 @@ forgecad cut-list examples/api/sheet-stock-cut-list.forge.js
330
365
  forgecad export cutting-layout examples/api/sheet-stock-cut-list.forge.js --sheet-width 420 --sheet-height 594 --kerf 3
331
366
 
332
367
  # 3D printing
368
+ forgecad check print bracket.forge.js
333
369
  forgecad export stl bracket.forge.js
334
370
  forgecad export 3mf bracket.forge.js --quality high
335
371
 
@@ -494,11 +530,26 @@ forgecad skill one-file ~/Desktop/forgecad-context.md
494
530
  forgecad skill flattened-files ~/Desktop/forgecad-skills
495
531
  ```
496
532
 
497
- > **Workflow:** Agent writes the model -> `forgecad run` validates it -> `forgecad render inspect` produces evidence -> `forgecad check params` sweeps the parameter range -> export ships the result. All in the terminal.
533
+ > **Workflow:** Agent writes the model -> `forgecad run` validates it -> `forgecad check print` catches printability risks -> `forgecad render inspect` produces visual evidence -> `forgecad check params` sweeps parameter robustness -> export ships the result. All in the terminal.
498
534
 
499
535
  ## Validation
500
536
 
501
- Test parameter ranges and run invariant suites.
537
+ Check printability, test parameter ranges, and run invariant suites.
538
+
539
+ ### `forgecad check print`
540
+
541
+ Run fast 3D-print readiness checks for collisions, mesh health, walls, overhangs, and bed contact.
542
+
543
+ Runs a Forge script with the headless kernel and emits a slicer-adjacent printability report without launching a browser. The check is designed for agents: JSON is stable, failures name the specific print risk, and the default profile is conservative for FDM PLA on a 0.4mm nozzle.
544
+
545
+ Checks include script `verify.*` results, exact positive-volume object collisions, physical component count, mesh topology, sampled wall thickness, unsupported overhang budget, and bed-contact area. Use `--json` for automation and `--output` to save the full report while keeping the readable terminal summary.
546
+
547
+ ```bash
548
+ forgecad check print examples/api/attachTo-basics.forge.js
549
+ forgecad check print examples/api/verification-demo.forge.js --json
550
+ forgecad check print model.forge.js --min-wall 1.2 --warn-wall 2
551
+ forgecad check print model.forge.js --expect-components 1 -p "Wall Thickness=3"
552
+ ```
502
553
 
503
554
  ### `forgecad check params`
504
555
 
@@ -566,7 +617,7 @@ The CLI is free for core workflows and exports. Production outputs are free to r
566
617
 
567
618
  | Free | Production outputs | Pro |
568
619
  |------|--------------------|-----|
569
- | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `check params`, `check suite` | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export sdf`, `export urdf`, `export report`, `export cutting-layout` are free to run; Pro covers commercial use. | `render hq`, `capture gif`, `capture mp4` |
620
+ | `run`, `dev`, `studio`, `render 3d`, `export stl`, `export 3mf`, `export svg`, `check print`, `check params`, `check suite` | `cut-list`, `export sketch-pdf`, `export step`, `export brep`, `export gcode`, `export sdf`, `export urdf`, `export report`, `export cutting-layout` are free to run; Pro covers commercial use. | `render hq`, `capture gif`, `capture mp4` |
570
621
 
571
622
  ```bash
572
623
  forgecad license # Check signed-in account status
@@ -29,7 +29,12 @@ bomToCsv(rows: BomRow[]): string
29
29
 
30
30
  **`BomRow`**: `part: string`, `qty: number`, `material?: string`, `process?: string`, `tolerance?: string`, `notes?: string`, `metadata?: PartMetadata`
31
31
 
32
- **`PartMetadata`**: `material?: string`, `process?: string`, `tolerance?: string`, `qty?: number`, `notes?: string`, `densityKgM3?: number`, `massKg?: number`
32
+ **`PartMetadata`**
33
+
34
+ | Option | Type | Description |
35
+ |--------|------|-------------|
36
+ | `tags?` | `string \| readonly string[]` | Viewport organization tags applied to scene objects produced from this part. |
37
+ | `material?`, `process?`, `tolerance?`, `qty?`, `notes?`, `densityKgM3?`, `massKg?` | | — |
33
38
 
34
39
  #### `assembly()` — Create an assembly container with named parts and joints for kinematic mechanisms.
35
40
 
@@ -670,13 +675,13 @@ toGroup(): ShapeGroup
670
675
  Each part becomes `{ name, shape }` or `{ name, group: [...] }` if the part is a [`ShapeGroup`](/docs/core#shapegroup). Top-level scripts should normally return the `SolvedAssembly` directly. Use `toGroup()` when you need [`ShapeGroup`](/docs/core#shapegroup) behavior; use this method only for advanced scene-graph control where you need access to the flat per-part array with metadata.
671
676
 
672
677
  ```ts
673
- toSceneObjects(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; }>; metadata?: PartMetadata; }>
678
+ toSceneObjects(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; tags?: string[]; }>; metadata?: PartMetadata; }>
674
679
  ```
675
680
 
676
681
  #### `toScene()` — Backward-compatible alias for `toSceneObjects()`.
677
682
 
678
683
  ```ts
679
- toScene(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; }>; metadata?: PartMetadata; }>
684
+ toScene(): Array<{ name: string; shape?: Shape; group?: Array<{ name: string; shape: Shape; tags?: string[]; }>; metadata?: PartMetadata; }>
680
685
  ```
681
686
 
682
687
  #### [`bom()`](/docs/output#bom) — Generate a bill of materials for all parts in the solved assembly.
@@ -18,15 +18,15 @@ skill-order: 100
18
18
  - [Grouping & Local Coordinates](#grouping-local-coordinates) — `group`
19
19
  - [Section & Projection](#section-projection) — `intersectWithPlane`, `faceProfile`, `projectToPlane`
20
20
  - [Transforms](#transforms) — `composeChain`
21
- - [Backend Runtime](#backend-runtime) — `initKernel`, `setActiveBackend`, `activateBackend`, `getActiveBackend`
22
21
  - [Verification](#verification) — `spec`
23
22
  - [Shape](#shape) — Appearance, Face Topology, Edge Topology, Transforms, Booleans & Cutting, Features, Placement, Connectors, References, Measurement
24
23
  - [Transform](#transform)
25
24
  - [ShapeGroup](#shapegroup) — Children, Transforms, Placement, Connectors, References
26
25
  - [SurfacePattern](#surfacepattern)
26
+ - [Pattern2D](#pattern2d)
27
+ - [Pattern2DBuilder](#pattern2dbuilder)
27
28
  - [ShapeRef](#shaperef)
28
29
  - [ANCHOR3D_NAMES](#anchor3d-names)
29
- - [DEFAULT_ACTIVE_BACKEND](#default-active-backend)
30
30
  - [verify](#verify)
31
31
  - [Constraint](#constraint)
32
32
  - [Points](#points)
@@ -121,9 +121,11 @@ intersection(...inputs: ShapeOperandInput[]): Shape
121
121
 
122
122
  ### Edge Features
123
123
 
124
- #### `fillet()` — Apply fillets (rounded edges) to one or more edges of a shape.
124
+ #### `fillet()` — Apply experimental fillets (rounded edges) to one or more edges of a shape.
125
125
 
126
- Works on edge selections from any active backend. Truck and OCCT route edge finishes through native kernel operations; unsupported selections fail as explicit kernel gaps instead of using TypeScript geometry fallbacks.
126
+ **Experimental**: fillets are still backend-sensitive. The Manifold backend is known to produce incorrect results for some edge-finish cases, and the OCCT backend can be very slow, especially with broad edge selections. Prefer targeted edge selectors and inspect the result before treating it as production-ready geometry.
127
+
128
+ Edge selections compile into backend operations; unsupported selections fail as explicit kernel gaps instead of using TypeScript geometry fallbacks.
127
129
 
128
130
  The `edges` parameter is flexible:
129
131
 
@@ -149,9 +151,11 @@ fillet(myShape, 3, edges)
149
151
  fillet(shape: Shape, radius: number, edges?: EdgeSelector, segments?: number): Shape
150
152
  ```
151
153
 
152
- #### `chamfer()` — Apply chamfers (beveled edges) to one or more edges of a shape.
154
+ #### `chamfer()` — Apply experimental chamfers (beveled edges) to one or more edges of a shape.
155
+
156
+ **Experimental**: chamfers are still backend-sensitive. The Manifold backend is known to produce incorrect results for some edge-finish cases, and the OCCT backend can be very slow, especially with broad edge selections. Prefer targeted edge selectors and inspect the result before treating it as production-ready geometry.
153
157
 
154
- Produces a 45° bevel at the specified `size` (distance from edge). Works on edge selections from any active backend. Truck and OCCT route chamfers through native kernel operations; unsupported selections fail as explicit kernel gaps instead of using TypeScript geometry fallbacks.
158
+ Produces a 45° bevel at the specified `size` (distance from edge). Edge selections compile into backend operations; unsupported selections fail as explicit kernel gaps instead of using TypeScript geometry fallbacks.
155
159
 
156
160
  The `edges` parameter accepts the same options as `fillet()`: inline `EdgeQuery`, pre-selected `EdgeSegment`/`EdgeSegment[]`, or `undefined` (all sharp edges).
157
161
 
@@ -376,11 +380,8 @@ selectEdges(shape: Shape, query?: EdgeQuery): EdgeSegment[]
376
380
  | `normalA` | `Vec3` | Normal of first adjacent face. |
377
381
  | `normalB` | `Vec3` | Normal of second adjacent face (same as normalA for boundary edges). |
378
382
  | `boundary` | `boolean` | true if this is a boundary (unmatched) edge — unusual for closed solids. |
379
- | `nativeTopology?` | `EdgeNativeTopologyRef` | Native kernel topology identity when the active backend can provide one. |
380
383
  | `start`, `end`, `midpoint`, `length` | | — |
381
384
 
382
- `EdgeNativeTopologyRef`: `{ backend: "truck", edge: number }`
383
-
384
385
  #### `selectEdge()` — Select the single best-matching edge from a shape.
385
386
 
386
387
  When `near` is specified, returns the edge whose midpoint is closest to that point. Otherwise returns the first matching edge in mesh order. Throws if no edges match the query — useful as a guard when you expect exactly one result.
@@ -481,7 +482,7 @@ importSvgSketch(fileName: string, options?: SvgImportOptions): Sketch
481
482
  importMesh(fileName: string, options?: { scale?: number; center?: boolean; }): Shape
482
483
  ```
483
484
 
484
- #### `importStep()` — Import a STEP file (.step, .stp) as an exact OCCT-backed Shape. Preserves NURBS curves, B-spline surfaces, and exact topology. Requires `setActiveBackend('occt')`.
485
+ #### `importStep()` — Import a STEP file (.step, .stp) as an exact OCCT-backed Shape. Preserves NURBS curves, B-spline surfaces, and exact topology. Requires running with the OCCT backend.
485
486
 
486
487
  ```ts
487
488
  importStep(fileName: string): Shape
@@ -617,18 +618,21 @@ Param.list<T extends Record<string, number | boolean | string>>(name: string, de
617
618
 
618
619
  Unlike union(), child colors and individual identities are preserved. Children can be plain shapes, named descriptors ({ name, shape/sketch/group }), or nested groups. The returned ShapeGroup supports all Shape transforms (translate, rotate, etc.).
619
620
 
621
+ Named descriptors can include `tags` for viewport organization. Tags do not affect geometry; they let the command palette hide, show only, or focus all objects with the same tag.
622
+
620
623
  **Local coordinate pattern:** Build child parts at the origin (local coordinates), then group and translate once to place the whole assembly. This eliminates the error-prone pattern of manually adding parent offsets to every sub-part.
621
624
 
622
625
  ```js
623
- // BAD every sub-part repeats the parent's global offset
624
- const unitX = 0, unitY = -18, unitZ = 70;
625
- const body = roundedBox(100, 20, 32, 4).translate(unitX, unitY, unitZ);
626
- const panel = box(98, 2, 18).translate(unitX, unitY - 12, unitZ + 4);
627
- const louver = box(88, 2, 6).translate(unitX, unitY - 14, unitZ - 11);
626
+ const body = roundedBox(100, 20, 32, 4);
627
+ const panel = box(98, 2, 18).translate(0, -12, 4);
628
+ const louver = box(88, 2, 6).translate(0, -14, -11);
629
+ const indoorUnit = group(
630
+ { name: 'Body', shape: body },
631
+ { name: 'Panel', tags: 'cover', shape: panel },
632
+ { name: 'Louver', tags: ['cover', 'moving'], shape: louver },
633
+ ).translate(0, -18, 70);
628
634
  ```
629
635
 
630
- // GOOD — build at origin, group, translate once const body = roundedBox(100, 20, 32, 4); const panel = box(98, 2, 18).translate(0, -12, 4); const louver = box(88, 2, 6).translate(0, -14, -11); const indoorUnit = group( { name: 'Body', shape: body }, { name: 'Panel', shape: panel }, { name: 'Louver', shape: louver }, ).translate(0, -18, 70);
631
-
632
636
  ```ts
633
637
  group(...items: GroupInput[]): ShapeGroup
634
638
  ```
@@ -663,32 +667,6 @@ projectToPlane(shape: Shape, plane: PlaneSpec): Sketch
663
667
  composeChain(...steps: TransformInput[]): Transform
664
668
  ```
665
669
 
666
- ### Backend Runtime
667
-
668
- #### `initKernel()`
669
-
670
- ```ts
671
- initKernel(): Promise<unknown>
672
- ```
673
-
674
- #### `setActiveBackend()`
675
-
676
- ```ts
677
- setActiveBackend(backend: ActiveBackend): void
678
- ```
679
-
680
- #### `activateBackend()` — Set the active backend and ensure its WASM module is initialized. Call this instead of `setActiveBackend` when you're about to execute code — it guarantees the backend is ready, not just selected.
681
-
682
- ```ts
683
- activateBackend(backend: ActiveBackend): Promise<void>
684
- ```
685
-
686
- #### `getActiveBackend()`
687
-
688
- ```ts
689
- getActiveBackend(): ActiveBackend
690
- ```
691
-
692
670
  ### Verification
693
671
 
694
672
  #### `spec()` — Create a named, reusable bundle of verification checks.
@@ -1674,6 +1652,82 @@ color(hex: string): ShapeGroup
1674
1652
  | `body` | `string` | Function body: receives (u, v) in surface mm, returns height displacement. |
1675
1653
  | `constants` | `Record<string, number>` | Named constants injected into the function. |
1676
1654
 
1655
+ ### `Pattern2D`
1656
+
1657
+ #### `add()` — Add this pattern to one or more patterns or constant height offsets.
1658
+
1659
+ ```ts
1660
+ add(...patterns: Pattern2DInput[]): Pattern2D
1661
+ ```
1662
+
1663
+ #### `subtract()` — Subtract another pattern or constant height offset from this pattern.
1664
+
1665
+ ```ts
1666
+ subtract(pattern: Pattern2DInput): Pattern2D
1667
+ ```
1668
+
1669
+ #### `multiply()` — Multiply this pattern by one or more patterns or numeric scale factors.
1670
+
1671
+ ```ts
1672
+ multiply(...patterns: Pattern2DInput[]): Pattern2D
1673
+ ```
1674
+
1675
+ #### `min()` — Keep the lower height between this pattern and one or more other patterns.
1676
+
1677
+ ```ts
1678
+ min(...patterns: Pattern2DInput[]): Pattern2D
1679
+ ```
1680
+
1681
+ #### `max()` — Keep the higher height between this pattern and one or more other patterns.
1682
+
1683
+ ```ts
1684
+ max(...patterns: Pattern2DInput[]): Pattern2D
1685
+ ```
1686
+
1687
+ #### `clamp()` — Limit pattern height to the inclusive `[min, max]` range in millimeters.
1688
+
1689
+ ```ts
1690
+ clamp(min: number, max: number): Pattern2D
1691
+ ```
1692
+
1693
+ #### `abs()` — Convert negative heights to positive heights.
1694
+
1695
+ ```ts
1696
+ abs(): Pattern2D
1697
+ ```
1698
+
1699
+ #### `negate()` — Flip the pattern height sign.
1700
+
1701
+ ```ts
1702
+ negate(): Pattern2D
1703
+ ```
1704
+
1705
+ ### `Pattern2DBuilder`
1706
+
1707
+ #### `constant()` — Create a constant-height pattern in millimeters.
1708
+
1709
+ ```ts
1710
+ constant(value?: number): Pattern2D
1711
+ ```
1712
+
1713
+ #### `sineWave()` — Create a sinusoidal wave pattern in UV space.
1714
+
1715
+ ```ts
1716
+ sineWave(options: Pattern2DSineWaveOptions): Pattern2D
1717
+ ```
1718
+
1719
+ #### `stripes()` — Create recessed stripe bands in UV space.
1720
+
1721
+ ```ts
1722
+ stripes(options: Pattern2DStripesOptions): Pattern2D
1723
+ ```
1724
+
1725
+ #### `overUnderWeave()` — Create an over-under woven relief pattern in UV space.
1726
+
1727
+ ```ts
1728
+ overUnderWeave(options: Pattern2DOverUnderWeaveOptions): Pattern2D
1729
+ ```
1730
+
1677
1731
  ### `ShapeRef`
1678
1732
 
1679
1733
  A first-class reference path over a shape's semantic faces and face relationships.
@@ -1796,10 +1850,6 @@ toString(): string
1796
1850
 
1797
1851
  ### `ANCHOR3D_NAMES`
1798
1852
 
1799
- ### `DEFAULT_ACTIVE_BACKEND`
1800
-
1801
- Default geometry backend when no explicit backend is selected.
1802
-
1803
1853
  ### `verify`
1804
1854
 
1805
1855
  - `that(label: string, check: () => boolean, message?: string): void` — Custom predicate check.