forgecad 0.9.16 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/dist/assets/{AdminPage-CXvls4-J.js → AdminPage-DwYHz72L.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-a9_f-1US.js} +1 -1
  3. package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DodHpvmf.js} +1 -1
  4. package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-B5LePEuj.js} +8 -858
  5. package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
  6. package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-DdEHGUMU.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-yhhOodbf.js} +1 -1
  8. package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-5RbKRGYK.js} +1 -1
  9. package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-E3Rma7aV.js} +1 -1
  10. package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-BJZcM97j.js} +1 -1
  11. package/dist/assets/{app-T0pDcSX4.js → app-DSYrDg0V.js} +733 -205
  12. package/dist/assets/cli/{render-C5pcIISc.js → render-ZMHR9HkV.js} +19 -46
  13. package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
  14. package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-DbNs7Dkp.js} +3798 -1622
  15. package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
  16. package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DO6mnXn_.js} +1 -1
  17. package/dist/assets/{manifold-BWgsjmAM.js → manifold-BGlQBBH9.js} +1 -1
  18. package/dist/assets/{manifold-rZexZI0G.js → manifold-BU-tJwQh.js} +1 -1
  19. package/dist/assets/{manifold-D6IFSkhH.js → manifold-fy2MV7K1.js} +2 -2
  20. package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-DO6hcQbh.js} +7155 -2437
  21. package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-o90NSNmF.js} +3940 -1742
  22. package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
  23. package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
  24. package/dist/cli/render.html +1 -1
  25. package/dist/docs/index.html +3 -3
  26. package/dist/docs-raw/AI/usage.md +1 -1
  27. package/dist/docs-raw/CLI.md +63 -241
  28. package/dist/docs-raw/README.md +6 -0
  29. package/dist/docs-raw/component-model.md +17 -150
  30. package/dist/docs-raw/generated/assembly.md +139 -598
  31. package/dist/docs-raw/generated/concepts.md +245 -3501
  32. package/dist/docs-raw/generated/core.md +277 -1251
  33. package/dist/docs-raw/generated/curves.md +387 -1608
  34. package/dist/docs-raw/generated/legacy.md +162 -0
  35. package/dist/docs-raw/generated/lib.md +227 -85
  36. package/dist/docs-raw/generated/output.md +38 -73
  37. package/dist/docs-raw/generated/runtime-names.md +23 -23
  38. package/dist/docs-raw/generated/sdf.md +68 -284
  39. package/dist/docs-raw/generated/sheet-metal.md +68 -335
  40. package/dist/docs-raw/generated/sketch.md +240 -1161
  41. package/dist/docs-raw/generated/viewport.md +75 -316
  42. package/dist/docs-raw/generated/wood.md +21 -49
  43. package/dist/docs-raw/guides/coordinate-system.md +4 -42
  44. package/dist/docs-raw/guides/inspection-bundles.md +44 -442
  45. package/dist/docs-raw/guides/joint-design.md +18 -79
  46. package/dist/docs-raw/guides/positioning.md +21 -143
  47. package/dist/docs-raw/guides/scene-presentation.md +89 -0
  48. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
  49. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  50. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  51. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  52. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  53. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  54. package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
  55. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  56. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  57. package/dist/docs-raw/skills/forgecad-project.md +13 -131
  58. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  59. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  60. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  61. package/dist/docs-raw/skills/forgecad.md +19 -18
  62. package/dist/docs-raw/skills/index.md +2 -0
  63. package/dist/docs-raw/welcome.md +2 -2
  64. package/dist/index.html +1 -1
  65. package/dist/llms.txt +1 -2
  66. package/dist/sitemap.xml +13 -13
  67. package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-JTVBITCR.js} +1 -1
  68. package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-3FFLSMVN.js} +1 -1
  69. package/dist-cli/{chunk-SPZE3DUY.js → chunk-OAN5T4XD.js} +4412 -2212
  70. package/dist-cli/forgecad.js +507 -179
  71. package/dist-skill/CONTEXT.md +2172 -8377
  72. package/dist-skill/SKILL.md +15 -15
  73. package/dist-skill/docs/API/core/concepts.md +27 -157
  74. package/dist-skill/docs/CLI.md +63 -241
  75. package/dist-skill/docs/generated/assembly.md +138 -549
  76. package/dist-skill/docs/generated/core.md +277 -1251
  77. package/dist-skill/docs/generated/curves.md +387 -1609
  78. package/dist-skill/docs/generated/lib.md +227 -85
  79. package/dist-skill/docs/generated/output.md +38 -73
  80. package/dist-skill/docs/generated/runtime-names.md +16 -21
  81. package/dist-skill/docs/generated/sdf.md +68 -284
  82. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  83. package/dist-skill/docs/generated/sketch.md +240 -1160
  84. package/dist-skill/docs/generated/viewport.md +75 -223
  85. package/dist-skill/docs/generated/wood.md +21 -49
  86. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  87. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  88. package/dist-skill/docs/guides/joint-design.md +18 -79
  89. package/dist-skill/docs/guides/positioning.md +21 -143
  90. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  91. package/dist-skill/docs/guides/surface-members.md +26 -0
  92. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  93. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  94. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  95. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  96. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  97. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  98. package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
  99. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  100. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  101. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  102. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  103. package/dist-skill/library/forgecad-project/SKILL.md +13 -133
  104. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  105. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  106. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  107. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  108. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  109. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  110. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  111. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  112. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  113. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  114. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  115. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  116. package/dist-skill/website/skills/forgecad-project.md +26 -0
  117. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  118. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  119. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  120. package/dist-skill/website/skills/forgecad.md +122 -0
  121. package/dist-skill/website/skills/index.md +26 -0
  122. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  123. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  124. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  125. package/examples/api/extrude-options.forge.js +4 -2
  126. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  127. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  128. package/examples/api/highlight-debug.forge.js +10 -10
  129. package/examples/api/mesh-import-slats.forge.js +1 -1
  130. package/examples/api/real-product-curves.forge.js +1 -1
  131. package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
  132. package/examples/api/sdf-shapes.forge.js +2 -5
  133. package/examples/api/sketch-rounding-strategies.forge.js +6 -6
  134. package/examples/api/surface-member-bottle-cage.forge.js +3 -3
  135. package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
  136. package/examples/api/surface-member-razor-inlay.forge.js +1 -1
  137. package/examples/api/variable-sweep-test.forge.js +3 -3
  138. package/examples/mechanical/airplane-propeller.forge.js +74 -39
  139. package/examples/nurbs-surface.forge.js +1 -1
  140. package/examples/products/iphone.forge.js +1 -1
  141. package/package.json +1 -1
  142. package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
  143. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  144. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  145. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  146. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  147. package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
@@ -9,7 +9,7 @@ Cut planes, exploded views, joint animations, and scene configuration.
9
9
 
10
10
  ## Contents
11
11
 
12
- - [Viewport & Runtime](#viewport-runtime) — `Viewport.label`, `scene`, `viewConfig`, `explodeView`, `compareWith`, `cutPlane`, `mock`, `showLabels`, `highlight`
12
+ - [Viewport & Runtime](#viewport-runtime)
13
13
  - [RouteBuilder](#routebuilder)
14
14
  - [route](#route)
15
15
 
@@ -17,7 +17,7 @@ Cut planes, exploded views, joint animations, and scene configuration.
17
17
 
18
18
  ### Viewport & Runtime
19
19
 
20
- #### `Viewport.label()` — Add a render-only viewport label at a world-space point.
20
+ #### `Viewport.label(text: string, at: Vec3, options?: RenderLabelOptions): void` — Add a render-only viewport label at a world-space point.
21
21
 
22
22
  `Viewport.label()` is for temporary review, debug, tutorial, or explicitly requested presentation overlays. It does not create sketches, meshes, B-rep topology, exported text, or face labels, so it stays off the OCCT path. Default production models should be understandable from physical geometry, materials, part boundaries, and named objects, not viewport annotations.
23
23
 
@@ -36,10 +36,6 @@ Viewport.label('Bearing bore', [0, 0, 18], {
36
36
  return box(40, 30, 12);
37
37
  ```
38
38
 
39
- ```ts
40
- Viewport.label(text: string, at: [ number, number, number ], options?: RenderLabelOptions): void
41
- ```
42
-
43
39
  **`RenderLabelOptions`**
44
40
 
45
41
  | Option | Type | Description |
@@ -47,23 +43,54 @@ Viewport.label(text: string, at: [ number, number, number ], options?: RenderLab
47
43
  | `color?` | `string` | Text color as any CSS color string. |
48
44
  | `background?` | `string` | Background color as any CSS color string. Use `'transparent'` for no pill background. |
49
45
  | `size?` | `number` | Font size in CSS pixels. Defaults to 12. |
50
- | `offset?` | `[ number, number, number ]` | Additional world-space offset from `at`. |
46
+ | `offset?` | `Vec3` | Additional world-space offset from `at`. |
51
47
  | `anchor?` | `RenderLabelAnchor` | Which point of the label box is anchored to `at`. Defaults to `'center'`. |
52
48
  | `alwaysOnTop?` | `boolean` | When false, the label is hidden when occluded by scene geometry. Defaults to true. |
53
49
 
54
- #### `scene()` — Configure the scene environment for the current script execution.
50
+ #### `Viewport.highlight(target: unknown, options?: HighlightOptions): void` — Highlight any geometry for visual debugging in the viewport.
51
+
52
+ `Viewport.highlight()` draws render-only debug overlays — distinctive colored markers that appear in the viewport but never become geometry, never export, and never appear in `objects`.
53
+
54
+ Supported inputs:
55
+
56
+ - `[x, y, z]` — 3D point
57
+ - `[[x1,y1,z1], [x2,y2,z2]]` — edge (line segment)
58
+ - `{ normal: [x,y,z], offset: number }` — plane by normal + distance from origin
59
+ - `{ normal: [x,y,z], point: [x,y,z] }` — plane by normal + point on plane
60
+ - [`Shape`](/docs/core#shape) — highlight an entire 3D shape
61
+ - `FaceRef` (from `shape.face('top')`) — highlight as plane at face center
62
+ - `EdgeRef` (from `shape.edge('left')`) — highlight as edge segment
63
+ - `string` — 2D sketch entity ID (e.g. `'L0'`, `'P0'`)
64
+
65
+ Pass `{ labels: true }` with a [`Shape`](/docs/core#shape) to annotate every user-authored labeled face with its name (the face-label debugging view).
66
+
67
+ ```js
68
+ const b = box(30, 20, 15);
69
+ Viewport.highlight([0, 0, 0], { color: 'cyan', label: 'origin' });
70
+ Viewport.highlight(b.face('top'), { color: 'red' });
71
+ Viewport.highlight(b, { labels: true }); // annotate all user-labeled faces
72
+ return b;
73
+ ```
74
+
75
+ **`HighlightOptions`**
76
+ - `size?: number` — Size hint for points (radius in mm) or planes (disc radius in mm).
77
+ - `labels?: boolean` — Shape inputs only: when true, annotate every user-authored labeled face with its label name (one plane highlight per labeled face). The whole-shape tint is added only when other visual options (`color`, `label`, `pulse`) are also passed.
78
+ - Also: `color?: string`, `label?: string`, `pulse?: boolean`.
79
+
80
+ #### `scene(options: SceneOptions): void` — Configure the scene environment for the current script execution.
55
81
 
56
- Controls camera position, named render views, optional model journeys, lighting rig, background color or gradient, atmospheric fog, environment maps, post-processing effects, and capture parameters for the `forgecad capture` command. Multiple calls merge — later values override earlier ones on a per-key basis, so you can split configuration across multiple `scene()` calls.
82
+ Controls camera, named render views, guided journeys, lighting, background, fog, environment maps, post-processing, 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.
57
83
 
58
- When `lights` is specified, **all** default lights are removed. You must include your own ambient light or the scene will be fully dark.
84
+ Two behavioral cliffs:
59
85
 
60
- Setting `camera.position` overrides auto-framing the viewport will no longer auto-fit the geometry on script reload.
86
+ - Specifying `lights` removes **all** default lights. Include your own ambient light or the scene is fully dark.
87
+ - Setting `camera.position` disables auto-framing — the viewport no longer auto-fits the geometry on script reload.
61
88
 
62
- Named render views let scripts check in repeatable cameras next to the model code. The canonical shape is `{ camera: { position, target } }`, and a direct camera shorthand `{ position, target }` is also accepted. Use the canonical shape when you may add view metadata later. Use it from the CLI with `--view hero` on `forgecad render 3d`, `forgecad render hq`, or `forgecad capture`.
89
+ Named views are repeatable cameras checked in with the model code. Canonical shape is `{ camera: { position, target } }`; a direct `{ position, target }` shorthand is also accepted. Render one with `--view <name>` (see CLI docs).
63
90
 
64
- Model journeys let scripts check in a compact guided path through named objects. Each journey has ordered `steps`; each step can name a `focus` target by object name/tree path, provide a caption, and optionally provide an explicit camera. In the viewer, journeys are opt-in: they appear as a small Explore control and do not move the camera until the user starts them. Use `forgecad run model.forge.js --journeys` or `--journeys-json` to inspect resolved targets.
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`.
65
92
 
66
- Post-processing effects (`bloom`, `vignette`, `grain`) work in the browser viewport only. The CLI applies camera, lights, background, fog, and `toneMappingExposure` but skips shader effects.
93
+ Post-processing (`bloom`, `vignette`, `grain`) is browser-only; the CLI applies camera, lights, background, fog, and `toneMappingExposure` but skips shader effects.
67
94
 
68
95
  All numeric values accept `param()` expressions.
69
96
 
@@ -72,52 +99,32 @@ scene({
72
99
  background: { top: '#000814', bottom: '#001d3d' },
73
100
  camera: { position: [160, -120, 100], target: [0, 0, 50], fov: 52 },
74
101
  views: {
75
- hero: {
76
- camera: { position: [180, -140, 90], target: [0, 0, 25], up: [0, 0, 1], fov: 38 },
77
- },
78
- side: { position: [240, 0, 70], target: [0, 0, 25], fov: 34 },
102
+ hero: { camera: { position: [180, -140, 90], target: [0, 0, 25], fov: 38 } },
79
103
  },
80
104
  journeys: {
81
- grandTour: {
82
- title: 'Grand Tour',
83
- startsAt: 'overview',
84
- steps: [
85
- { id: 'overview', focus: 'Solar System', caption: 'Start with the whole model.' },
86
- { id: 'earth', focus: 'Earth', caption: 'Fit and inspect Earth.' },
87
- ],
88
- },
105
+ tour: { steps: [{ id: 'earth', focus: 'Earth', caption: 'Fit and inspect Earth.' }] },
89
106
  },
90
107
  lights: [
91
108
  { type: 'ambient', color: '#001233', intensity: 0.08 },
92
- { type: 'point', position: [120, -80, 130], color: '#00f5d4', intensity: 4, distance: 400, decay: 1 },
93
- { type: 'point', position: [-100, 60, 20], color: '#f72585', intensity: 3, distance: 350 },
94
109
  { type: 'directional', position: [50, -30, 200], color: '#ffd60a', intensity: 1.2 },
95
- { type: 'hemisphere', skyColor: '#003566', groundColor: '#000814', intensity: 0.2 },
96
110
  ],
97
111
  fog: { color: '#000814', near: 100, far: 450 },
98
- postProcessing: {
99
- bloom: { intensity: param('bloom', 1.5, 0, 4), threshold: 0.5, radius: 0.7 },
100
- vignette: { darkness: 0.8, offset: 0.25 },
101
- grain: { intensity: 0.08 },
102
- toneMappingExposure: param('exposure', 1.5, 0.5, 4),
103
- },
112
+ postProcessing: { bloom: { intensity: param('bloom', 1.5, 0, 4) } },
113
+ jointOverlay: { axisColor: '#13dfff', arcColor: '#ff7a1a' },
104
114
  });
105
115
  ```
106
116
 
107
- ```ts
108
- scene(options: SceneOptions): void
109
- ```
110
-
111
117
  **`SceneOptions`**
112
118
 
113
119
  | Option | Type | Description |
114
120
  |--------|------|-------------|
115
121
  | `capture?` | `SceneCaptureConfig` | Default capture parameters for `forgecad capture` — CLI flags override these. |
116
- | `background?`, `camera?`, `views?`, `journeys?`, `lights?`, `environment?`, `fog?`, `postProcessing?`, `ground?` | | — |
122
+
123
+ Also: `background?: string | SceneBackgroundGradient`, `camera?: SceneCameraConfig`, `views?: Record<string, SceneViewInputConfig>`, `journeys?: Record<string, SceneJourneyConfig>`, `lights?: SceneLightConfig[]`, `environment?: SceneEnvironmentConfig`, `fog?: SceneFogConfig`, `postProcessing?: ScenePostProcessingConfig`, `ground?: SceneGroundConfig`.
117
124
 
118
125
  `SceneBackgroundGradient`: `{ top: string, bottom: string }`
119
126
 
120
- **`SceneCameraConfig`**: `position?: [ number, number, number ]`, `target?: [ number, number, number ]`, `up?: [ number, number, number ]`, `fov?: number`, `type?: "perspective" | "orthographic"`
127
+ `SceneCameraConfig`: `{ position?: Vec3, target?: Vec3, up?: Vec3, fov?: number, type?: "perspective" | "orthographic" }`
121
128
 
122
129
  **`SceneJourneyConfig`**
123
130
 
@@ -145,7 +152,7 @@ scene(options: SceneOptions): void
145
152
 
146
153
  | Option | Type | Description |
147
154
  |--------|------|-------------|
148
- | `target?` | `[ number, number, number ]` | Target for directional/spot lights |
155
+ | `target?` | `Vec3` | Target for directional/spot lights |
149
156
  | `groundColor?` | `string` | Ground color for hemisphere lights |
150
157
  | `skyColor?` | `string` | Sky color alias for hemisphere lights (same as color) |
151
158
  | `angle?` | `number` | Spot light cone angle in radians |
@@ -153,7 +160,8 @@ scene(options: SceneOptions): void
153
160
  | `decay?` | `number` | Point/spot light decay |
154
161
  | `distance?` | `number` | Point/spot light distance (0 = infinite) |
155
162
  | `castShadow?` | `boolean` | Whether this light casts shadows |
156
- | `type`, `color?`, `intensity?`, `position?` | | — |
163
+
164
+ Also: `type: SceneLightType`, `color?: string`, `intensity?: number`, `position?: Vec3`.
157
165
 
158
166
  **`SceneEnvironmentConfig`**
159
167
  - `preset?: "studio" | "sunset" | "dawn" | "warehouse" | "forest" | "apartment" | "lobby" | "city" | "park" | "night" | "none"` — Built-in preset name or 'none' to disable
@@ -164,7 +172,7 @@ scene(options: SceneOptions): void
164
172
  - `near?: number` — Linear fog near distance
165
173
  - `far?: number` — Linear fog far distance
166
174
  - `density?: number` — Exponential fog density (if set, uses FogExp2 instead of linear Fog)
167
- - Also: `color?: string`
175
+ - Also: `color?: string`.
168
176
 
169
177
  `ScenePostProcessingConfig`: `{ bloom?: SceneBloomConfig, vignette?: SceneVignetteConfig, grain?: SceneGrainConfig, toneMappingExposure?: number }`
170
178
 
@@ -194,28 +202,7 @@ scene(options: SceneOptions): void
194
202
  | `size?` | `number` | Output frame size in pixels (default: 960) |
195
203
  | `background?` | `string` | Canvas background color for capture (default: '#252526') |
196
204
 
197
- #### `viewConfig()` — Configure viewport helper visuals for the current script execution.
198
-
199
- Controls renderer-only overlays that appear in the viewport but are not part of the geometry. Currently supports the joint overlay that renders axis arrows and arc indicators when joint controls are active. Multiple calls merge — later values override earlier ones per key.
200
-
201
- This does **not** trigger a geometry recompute; it only affects the visual helpers drawn on top of the 3D scene.
202
-
203
- ```js
204
- viewConfig({
205
- jointOverlay: {
206
- axisColor: '#13dfff',
207
- arcColor: '#ff7a1a',
208
- axisLineRadiusScale: 0.03,
209
- arcLineRadiusScale: 0.022,
210
- },
211
- });
212
- ```
213
-
214
- ```ts
215
- viewConfig(options?: ViewConfigOptions): void
216
- ```
217
-
218
- #### `explodeView()` — Configure how the viewport explode slider offsets returned objects.
205
+ #### `explodeView(options?: ExplodeViewOptions): void` — Configure how the viewport explode slider offsets returned objects.
219
206
 
220
207
  Offsets are resolved from the returned object tree, not a flat list. In `radial` mode each node follows its parent branch direction, then fans locally from the immediate parent center — nested assemblies peel apart level by level. In fixed-axis or fixed-vector modes, the branch follows that axis/vector but nested descendants fan out perpendicular by default.
221
208
 
@@ -232,10 +219,6 @@ explodeView({
232
219
  });
233
220
  ```
234
221
 
235
- ```ts
236
- explodeView(options?: ExplodeViewOptions): void
237
- ```
238
-
239
222
  **`ExplodeViewOptions`**
240
223
 
241
224
  | Option | Type | Description |
@@ -253,100 +236,7 @@ explodeView(options?: ExplodeViewOptions): void
253
236
  - `direction?: ExplodeDirection` — Direction mode for this node
254
237
  - `axisLock?: ExplodeAxis` — Optional axis lock after direction is resolved
255
238
 
256
- <!-- forgecad-skill:exclude-start symbol="jointsView" reason="Compatibility-only viewport FK API. Prefer returning [`Assembly`](/docs/assembly#assembly) directly so controls move through the solver-backed link/edge kinematics model." -->
257
- #### `jointsView()` — Register legacy viewport-only mechanism controls that animate returned objects without re-running the script.
258
-
259
- > **Not included in ForgeCAD AI skill context yet.** This API remains visible in human docs, but is intentionally omitted from shipped agent skills until it is ready for agent-first use. Compatibility-only viewport FK API. Prefer returning [`Assembly`](/docs/assembly#assembly) directly so controls move through the solver-backed link/edge kinematics model.
260
-
261
- Defines joints (revolute or prismatic), optional gear/rack couplings, and named animations. The viewport resolves transforms through the joint chain at display time — the script geometry is computed only once at rest pose.
262
-
263
- For [`Assembly`](/docs/assembly#assembly) mechanisms, prefer returning the [`Assembly`](/docs/assembly#assembly) directly. Returned assemblies expose solver-backed controls automatically, so link/edge closed loops move through the real assembly solver instead of this viewport-only FK layer.
264
-
265
- **Critical:** Solve the assembly at **rest pose** (all animated joints = 0). The viewport applies `jointsView` transforms on top of the returned scene. If geometry is already solved at non-zero angles, animation will double-rotate everything.
266
-
267
- ```js
268
- // BAD — double rotation
269
- const solved = mech.solve({ shoulder: 45, elbow: 30 });
270
- jointsView({ joints: [{ name: 'shoulder', ... }] });
271
- return solved;
272
-
273
- // GOOD — rest pose, jointsView controls all posing
274
- const solved = mech.solve({ shoulder: 0, elbow: 0 });
275
- jointsView({
276
- joints: [
277
- { name: 'shoulder', child: 'Upper Arm', default: 45, ... },
278
- { name: 'elbow', child: 'Forearm', parent: 'Upper Arm', default: 30, ... },
279
- ],
280
- });
281
- return solved;
282
- ```
283
-
284
- **Pivot coordinates** are world-space positions of each joint origin at rest pose. For `addRevolute('shoulder', 'Base', 'Link', { frame: Transform.identity().translate(0, 0, 20) })` where "Base" is at world origin, the pivot is `[0, 0, 20]`.
285
-
286
- **Fixed attachments** that must follow a parent during animation need a zero-angle revolute joint in the chain:
287
-
288
- ```js
289
- { name: 'EE_Follow', child: 'End Effector', parent: 'Last Link',
290
- type: 'revolute', axis: [0, 0, 1], pivot: [linkLength, 0, 0],
291
- min: 0, max: 0, default: 0 }
292
- ```
293
-
294
- Animation values are interpolated linearly between keyframes. ForgeCAD does **not** auto-wrap revolute values across `-180/180`. Keep keyframe values continuous — a `-180 -> 171` jump spins the part the long way around. Use `-180 -> -189` instead. Author high-speed multi-turn joints as accumulating angles (`0, 360, 720, ...`) with `continuous: true`.
295
-
296
- **Mirrored revolute axes:** `default` values and animation keyframes are physical joint values, signed by the joint axis. In a bilateral mechanism, mirrored hinge axes such as `[1, 0, 0]` and `[-1, 0, 0]` need opposite physical values for the same mirrored pose. Negate the mirrored revolute track and mirror physical limits as `[min, max] -> [-max, -min]`. Prismatic tracks do not have this handedness flip.
297
-
298
- **Tick-based keyframes:** Omit `at` from all keyframes to auto-distribute by tick weight:
299
-
300
- ```js
301
- keyframes: [
302
- { ticks: 3, values: { Shoulder: 20 } }, // slow segment (3x weight)
303
- { ticks: 1, values: { Shoulder: -10 } }, // fast segment (1x weight)
304
- { values: { Shoulder: 20 } }, // last keyframe; ticks ignored
305
- ]
306
- // positions: 0, 0.75, 1.0
307
- ```
308
-
309
- Mixing explicit `at` and omitted `at` in the same animation is not allowed.
310
-
311
- ```js
312
- jointsView({
313
- joints: [{
314
- name: 'Shoulder', child: 'Upper Arm', parent: 'Base',
315
- type: 'revolute', axis: [0, -1, 0], pivot: [0, 0, 46],
316
- min: -30, max: 110, default: 15,
317
- }],
318
- animations: [{
319
- name: 'Walk Cycle', duration: 1.6, loop: true,
320
- keyframes: [
321
- { values: { Shoulder: 20 } },
322
- { values: { Shoulder: -10 } },
323
- { values: { Shoulder: 20 } },
324
- ],
325
- }],
326
- });
327
- ```
328
-
329
- ```ts
330
- jointsView(options?: JointsViewOptions): void
331
- ```
332
-
333
- **`JointsViewOptions`**: `enabled?: boolean`, `joints?: JointViewInput[]`, `couplings?: JointViewCouplingInput[]`, `animations?: JointViewAnimationInput[]`, `defaultAnimation?: string`
334
-
335
- **`JointViewInput`**: `name: string`, `child: string`, `parent?: string`, `type?: JointViewType`, `axis?: JointViewAxis`, `pivot?: [ number, number, number ]`, `min?: number`, `max?: number`, `default?: number`, `unit?: string`, `hidden?: boolean`
336
-
337
- `JointViewCouplingInput`: `{ joint: string, terms: JointViewCouplingTermInput[], offset?: number }`
338
-
339
- `JointViewCouplingTermInput`: `{ joint: string, ratio?: number }`
340
-
341
- `JointViewAnimationInput`: `{ name: string, duration?: number, loop?: boolean, continuous?: boolean, keyframes: JointViewAnimationKeyframeInput[] }`
342
-
343
- **`JointViewAnimationKeyframeInput`**
344
- - `at?: number` — Timeline position [0, 1]. If omitted from ALL keyframes, positions are auto-computed from tick weights.
345
- - `ticks?: number` — Relative weight of the segment from this keyframe to the next (default 1). Only used in tick-based mode (when `at` is omitted). Last keyframe's ticks value is ignored.
346
- - Also: `values: Record<string, number>`
347
- <!-- forgecad-skill:exclude-end -->
348
-
349
- #### `compareWith()` — Declare a reference model for comparison inspection.
239
+ #### `compareWith(path: string, options?: CompareWithOptions): void` Declare a reference model for comparison inspection.
350
240
 
351
241
  `compareWith()` lets a model carry its own comparison target for inspection workflows. `forgecad inspect compare overlay model.forge.js` uses this reference to render the same Difference Only comparison overlay as the live viewport. Amber marks candidate mismatch evidence, cyan marks reference mismatch evidence, and faint model context keeps the overlay readable. When the CLI can resolve the referenced file, the manifest also includes the same geometric score produced by `forgecad compare 3d`.
352
242
 
@@ -357,10 +247,6 @@ compareWith('./reference.3mf', { align: 'center', toleranceMm: 0.25, samples: 30
357
247
  return rebuiltBearing;
358
248
  ```
359
249
 
360
- ```ts
361
- compareWith(path: string, options?: CompareWithOptions): void
362
- ```
363
-
364
250
  **`CompareWithOptions`**
365
251
 
366
252
  | Option | Type | Description |
@@ -372,6 +258,11 @@ compareWith(path: string, options?: CompareWithOptions): void
372
258
 
373
259
  #### `cutPlane()` — Define a named section plane for inspecting internal geometry.
374
260
 
261
+ Overloads:
262
+
263
+ - `cutPlane(name: string, normal: Vec3, offset?: number, options?: CutPlaneOptions): void`
264
+ - `cutPlane(name: string, normal: Vec3, options?: CutPlaneOptions): void`
265
+
375
266
  Registers a cut plane that appears as a toggle in the viewport View Panel. When enabled, geometry on the positive side of the plane (the side the normal points toward) is clipped away, revealing the internal cross-section. The newly exposed section faces render with a hatched overlay; pre-existing coplanar boundary faces are left unhatched.
376
267
 
377
268
  Planes are registered once per script run. The viewport toggle state (on/off) persists across parameter changes without re-running the script. The `exclude` option only works correctly when the excluded object names are stable across parameter changes.
@@ -383,16 +274,11 @@ const cutZ = param('Cut Height', 10, { min: -50, max: 50, unit: 'mm' });
383
274
  cutPlane('Inspection', [0, 0, 1], cutZ, { exclude: ['Probe', 'Fasteners'] });
384
275
  ```
385
276
 
386
- Overloads:
387
-
388
- - `cutPlane(name: string, normal: [ number, number, number ], offset?: number, options?: CutPlaneOptions): void`
389
- - `cutPlane(name: string, normal: [ number, number, number ], options?: CutPlaneOptions): void`
390
-
391
277
  **`CutPlaneOptions`**
392
278
  - `offset?: number` — Optional offset along the plane normal (primarily for object-form overload).
393
279
  - `exclude?: CutPlaneExcludeInput` — Object names to keep uncut for this plane.
394
280
 
395
- #### `mock()` — Register a mock (context) object for visualization and inspection.
281
+ #### `mock<T extends Shape>(shape: T, name?: string): T` — Register a mock (context) object for visualization and inspection.
396
282
 
397
283
  Mock objects appear in the viewport and inspection analysis when you run a file directly, but are excluded when the file is imported via [`require()`](/docs/core#require). This lets you model the surrounding context — walls, bolts, mating parts — without polluting the module's exports.
398
284
 
@@ -415,174 +301,47 @@ return bracket;
415
301
  // When run directly: bracket + wall + bolt all visible
416
302
  ```
417
303
 
418
- ```ts
419
- mock<T extends Shape>(shape: T, name?: string): T
420
- ```
421
-
422
- #### `showLabels()` — Highlight all user-labeled faces on a shape for visual debugging.
423
-
424
- Shows each user-authored label name in the viewport for visual debugging. Returns the shape unchanged for chaining: `return showLabels(myShape)`.
425
-
426
- ```ts
427
- showLabels(shape: Shape): Shape
428
- ```
429
-
430
- #### `highlight()` — Highlight any geometry for visual debugging in the viewport.
431
-
432
- Supported inputs:
433
-
434
- - `string` — sketch entity ID (e.g. `'L0'`, `'P0'`, `'C0'`)
435
- - `[x, y, z]` — 3D point
436
- - `[[x1,y1,z1], [x2,y2,z2]]` — edge (line segment)
437
- - `{ normal: [x,y,z], offset: number }` — plane by normal + distance from origin
438
- - `{ normal: [x,y,z], point: [x,y,z] }` — plane by normal + point on plane
439
- - [`Shape`](/docs/core#shape) — highlight entire 3D shape
440
- - `FaceRef` (from `shape.face('top')`) — highlight as plane at face center
441
- - `EdgeRef` (from `shape.edge('left')`) — highlight as edge segment
442
-
443
- Overloads:
444
-
445
- - `highlight(entityId: string, opts?: HighlightOptions): void`
446
- - `highlight(point: [ number, number, number ], opts?: HighlightOptions): void`
447
- - `highlight(edge: [ [ number, number, number ], [ number, number, number ] ], opts?: HighlightOptions): void`
448
- - `highlight(plane: { normal: [ number, number, number ]; offset: number; }, opts?: HighlightOptions): void`
449
- - `highlight(plane: { normal: [ number, number, number ]; point: [ number, number, number ]; }, opts?: HighlightOptions): void`
450
- - `highlight(shape: Shape, opts?: HighlightOptions): void`
451
- - `highlight(face: FaceRef, opts?: HighlightOptions): void`
452
- - `highlight(edge: EdgeRef, opts?: HighlightOptions): void`
453
-
454
- **`HighlightOptions`**
455
- - `size?: number` — Size hint for points (radius in mm) or planes (disc radius in mm).
456
- - Also: `color?: string, label?: string, pulse?: boolean`
457
-
458
- **`FaceRef`**
459
-
460
- | Option | Type | Description |
461
- |--------|------|-------------|
462
- | `normal` | `[ number, number, number ]` | Normal direction of the face |
463
- | `center` | `[ number, number, number ]` | Center point of the face |
464
- | `query?` | `FaceQueryRef` | Compiler-owned face query when available. |
465
- | `planar?` | `boolean` | True when the face can host a 2D sketch placement frame |
466
- | `uAxis?` | `[ number, number, number ]` | Face-local horizontal axis for planar faces |
467
- | `vAxis?` | `[ number, number, number ]` | Face-local vertical axis for planar faces |
468
- | `surface?` | `FaceSurface` | Analytic surface family when the backend can identify one. |
469
- | `descendant?` | `FaceDescendantMetadata` | Shared descendant-resolution metadata when this face is a semantic region/set. |
470
- | `name` | | — |
471
-
472
- **`FaceDescendantMetadata`**: `kind: "single" | "face-set"`, `semantic: FaceDescendantSemantic`, `memberCount: number`, `memberNames: string[]`, `coplanar: boolean`
473
-
474
- **`EdgeRef`**
475
-
476
- | Option | Type | Description |
477
- |--------|------|-------------|
478
- | `start` | `[ number, number, number ]` | Start point |
479
- | `end` | `[ number, number, number ]` | End point |
480
- | `query?` | `EdgeQueryRef` | Compiler-owned edge query when available. |
481
- | `curve?` | `EdgeCurve` | Exact or parametric curve family when the backend/source can identify one. |
482
- | `faceName?` | `string` | Owning face name when the edge is associated with one face in a larger topology. |
483
- | `name` | | — |
484
-
485
304
  ---
486
305
 
487
306
  ## Classes
488
307
 
489
308
  ### `RouteBuilder`
490
309
 
491
- #### `up()` — Vertical line going +Y. Length is optional (solver determines it from constraints).
310
+ #### `up(length?: number): LineId` — Vertical line going +Y. Length is optional (solver determines it from constraints).
492
311
 
493
- ```ts
494
- up(length?: number): LineId
495
- ```
312
+ #### `down(length?: number): LineId` — Vertical line going -Y. Length is optional.
496
313
 
497
- #### `down()` — Vertical line going -Y. Length is optional.
314
+ #### `right(length?: number): LineId` — Horizontal line going +X. Length is optional.
498
315
 
499
- ```ts
500
- down(length?: number): LineId
501
- ```
316
+ #### `left(length?: number): LineId` — Horizontal line going -X. Length is optional.
502
317
 
503
- #### `right()` — Horizontal line going +X. Length is optional.
318
+ #### `lineAt(angleDeg: number, length?: number): LineId` — Line at an arbitrary angle (degrees from +X). Length is optional.
504
319
 
505
- ```ts
506
- right(length?: number): LineId
507
- ```
508
-
509
- #### `left()` — Horizontal line going -X. Length is optional.
510
-
511
- ```ts
512
- left(length?: number): LineId
513
- ```
514
-
515
- #### `lineAt()` — Line at an arbitrary angle (degrees from +X). Length is optional.
516
-
517
- ```ts
518
- lineAt(angleDeg: number, length?: number): LineId
519
- ```
520
-
521
- #### [`line()`](/docs/sketch#line) — Line with solver-determined direction. Length is optional. Direction comes from tangency to previous arc or from constraints.
320
+ #### `line(length?: number): LineId` — Line with solver-determined direction. Length is optional. Direction comes from tangency to previous arc or from constraints.
522
321
 
523
- ```ts
524
- line(length?: number): LineId
525
- ```
526
-
527
- #### `toward()` — Line toward a specific point. Length defaults to the distance to that point.
528
-
529
- ```ts
530
- toward(x: number, y: number): LineId
531
- ```
322
+ #### `toward(x: number, y: number): LineId` — Line toward a specific point. Length defaults to the distance to that point.
532
323
 
533
- #### `arcLeft()` — Tangent arc turning left relative to travel direction.
324
+ #### `arcLeft(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId` — Tangent arc turning left relative to travel direction.
534
325
 
535
326
  or `{ minSweep: degrees }` to seed the geometry without constraining. `minSweep` guides the solver to the correct branch for arcs that sweep more than the default 90° seed.
536
327
 
537
- ```ts
538
- arcLeft(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId
539
- ```
540
-
541
- #### `arcRight()` — Tangent arc turning right relative to travel direction.
328
+ #### `arcRight(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId` — Tangent arc turning right relative to travel direction.
542
329
 
543
330
  or `{ minSweep: degrees }` to seed without constraining.
544
331
 
545
- ```ts
546
- arcRight(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId
547
- ```
548
-
549
- #### `close()` — Close the route with a straight line back to the start point.
550
-
551
- ```ts
552
- close(): void
553
- ```
332
+ #### `close(): void` — Close the route with a straight line back to the start point.
554
333
 
555
- #### `done()` — Close the route back to its start point and register as a profile loop.
334
+ #### `done(): void` — Close the route back to its start point and register as a profile loop.
556
335
 
557
336
  No extra line segment is added. A coincident constraint connects the last point to the start, and tangency is added for G1 smoothness when arcs are at the junction. The session's incremental solver processes these constraints, keeping seed positions accurate for the final solve.
558
337
 
559
- ```ts
560
- done(): void
561
- ```
562
-
563
- #### `start()` — PointId of the route's start point.
564
-
565
- ```ts
566
- get start(): PointId
567
- ```
568
-
569
- #### `end()` — PointId of the current cursor (route's end).
570
-
571
- ```ts
572
- get end(): PointId
573
- ```
574
-
575
- #### `startOf()` — Get the start point of a segment.
338
+ #### `get start(): PointId` — PointId of the route's start point.
576
339
 
577
- ```ts
578
- startOf(segId: LineId | ArcId): PointId
579
- ```
340
+ #### `get end(): PointId` — PointId of the current cursor (route's end).
580
341
 
581
- #### `endOf()` — Get the end point of a segment.
342
+ #### `startOf(segId: LineId | ArcId): PointId` — Get the start point of a segment.
582
343
 
583
- ```ts
584
- endOf(segId: LineId | ArcId): PointId
585
- ```
344
+ #### `endOf(segId: LineId | ArcId): PointId` — Get the end point of a segment.
586
345
 
587
346
  ---
588
347
 
@@ -36,59 +36,23 @@ WoodBoard operations are immutable. Joint operations return new boards instead o
36
36
 
37
37
  **Methods:**
38
38
 
39
- #### `cut()` — Subtract a cutter from this board, returning a new board. Used by joint functions (dado, rabbet, mortiseAndTenon).
39
+ #### `cut(cutter: Shape): WoodBoard` — Subtract a cutter from this board, returning a new board. Used by joint functions (dado, rabbet, mortiseAndTenon).
40
40
 
41
- ```ts
42
- cut(cutter: Shape): WoodBoard
43
- ```
41
+ #### `translate(x: number, y: number, z: number): WoodBoard` — Translate the board in 3D space.
44
42
 
45
- #### `translate()` — Translate the board in 3D space.
43
+ #### `rotate(axis: Vec3, angleDeg: number, options?: { pivot?: Vec3; }): WoodBoard` — Rotate the board around an axis by a given angle in degrees.
46
44
 
47
- ```ts
48
- translate(x: number, y: number, z: number): WoodBoard
49
- ```
45
+ #### `rotateX(angleDeg: number): WoodBoard` — Rotate the board around the X axis by a given angle in degrees.
50
46
 
51
- #### `rotate()` — Rotate the board around an axis by a given angle in degrees.
47
+ #### `rotateY(angleDeg: number): WoodBoard` — Rotate the board around the Y axis by a given angle in degrees.
52
48
 
53
- ```ts
54
- rotate(axis: [ number, number, number ], angleDeg: number, options?: { pivot?: [ number, number, number ]; }): WoodBoard
55
- ```
49
+ #### `rotateZ(angleDeg: number): WoodBoard` — Rotate the board around the Z axis by a given angle in degrees.
56
50
 
57
- #### `rotateX()` — Rotate the board around the X axis by a given angle in degrees.
51
+ #### `mirror(normal: Vec3): WoodBoard` — Mirror the board across a plane defined by its normal.
58
52
 
59
- ```ts
60
- rotateX(angleDeg: number): WoodBoard
61
- ```
53
+ #### `color(value: string): WoodBoard` — Set the board's display color.
62
54
 
63
- #### `rotateY()` — Rotate the board around the Y axis by a given angle in degrees.
64
-
65
- ```ts
66
- rotateY(angleDeg: number): WoodBoard
67
- ```
68
-
69
- #### `rotateZ()` — Rotate the board around the Z axis by a given angle in degrees.
70
-
71
- ```ts
72
- rotateZ(angleDeg: number): WoodBoard
73
- ```
74
-
75
- #### `mirror()` — Mirror the board across a plane defined by its normal.
76
-
77
- ```ts
78
- mirror(normal: [ number, number, number ]): WoodBoard
79
- ```
80
-
81
- #### `color()` — Set the board's display color.
82
-
83
- ```ts
84
- color(value: string): WoodBoard
85
- ```
86
-
87
- #### `clone()` — Clone the board (creates an independent copy of the underlying shape).
88
-
89
- ```ts
90
- clone(): WoodBoard
91
- ```
55
+ #### `clone(): WoodBoard` — Clone the board (creates an independent copy of the underlying shape).
92
56
 
93
57
  ---
94
58
 
@@ -102,7 +66,15 @@ Woodworking namespace — create boards and cut joints.
102
66
 
103
67
  **Joints:** `Wood.dado()`, `Wood.rabbet()`, and `Wood.mortiseAndTenon()` are immutable — they return new board value(s) with the joint cut applied.
104
68
 
105
- - `readonly board: (width: number, height: number, thickness: number, opts?: WoodBoardOptions) => WoodBoard` — Create a wood board with metadata for manufacturing. The board is a box(width, height, thickness) centered on XY, base at Z=0. Width along X, height along Y, thickness along Z (0 to thickness).
106
- - `dado(host: WoodBoard, guest: WoodBoard, opts: DadoOptions): WoodBoard` — Cut a dado (channel) across the face of a host board for a guest board to sit in. Returns a new host board with the dado cut applied.
107
- - `rabbet(board: WoodBoard, opts: RabbetOptions): WoodBoard` Cut a rabbet (L-shaped step) along an edge of a board. Returns a new board with the rabbet cut applied.
108
- - `mortiseAndTenon(mortiseBoard: WoodBoard, tenonBoard: WoodBoard, opts?: MortiseAndTenonOptions): MortiseAndTenonResult` — Cut a mortise in one board and shape a tenon on another. Returns new boards with the mortise pocket and tenon cuts applied.
69
+ - `board: (width: number, height: number, thickness: number, opts?: WoodBoardOptions) => WoodBoard` — Create a wood board with metadata for manufacturing.
70
+
71
+ The board is a box(width, height, thickness) centered on XY, base at Z=0. Width along X, height along Y, thickness along Z (0 to thickness).
72
+ - `dado(host: WoodBoard, guest: WoodBoard, opts: DadoOptions): WoodBoard` — Cut a dado (channel) across the face of a host board for a guest board to sit in.
73
+
74
+ Returns a new host board with the dado cut applied.
75
+ - `rabbet(board: WoodBoard, opts: RabbetOptions): WoodBoard` — Cut a rabbet (L-shaped step) along an edge of a board.
76
+
77
+ Returns a new board with the rabbet cut applied.
78
+ - `mortiseAndTenon(mortiseBoard: WoodBoard, tenonBoard: WoodBoard, opts?: MortiseAndTenonOptions): MortiseAndTenonResult` — Cut a mortise in one board and shape a tenon on another.
79
+
80
+ Returns new boards with the mortise pocket and tenon cuts applied.