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.
- package/dist/assets/{AdminPage-CXvls4-J.js → AdminPage-DwYHz72L.js} +1 -1
- package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-a9_f-1US.js} +1 -1
- package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DodHpvmf.js} +1 -1
- package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-B5LePEuj.js} +8 -858
- package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
- package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-DdEHGUMU.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-yhhOodbf.js} +1 -1
- package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-5RbKRGYK.js} +1 -1
- package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-E3Rma7aV.js} +1 -1
- package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-BJZcM97j.js} +1 -1
- package/dist/assets/{app-T0pDcSX4.js → app-DSYrDg0V.js} +733 -205
- package/dist/assets/cli/{render-C5pcIISc.js → render-ZMHR9HkV.js} +19 -46
- package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
- package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-DbNs7Dkp.js} +3798 -1622
- package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
- package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DO6mnXn_.js} +1 -1
- package/dist/assets/{manifold-BWgsjmAM.js → manifold-BGlQBBH9.js} +1 -1
- package/dist/assets/{manifold-rZexZI0G.js → manifold-BU-tJwQh.js} +1 -1
- package/dist/assets/{manifold-D6IFSkhH.js → manifold-fy2MV7K1.js} +2 -2
- package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-DO6hcQbh.js} +7155 -2437
- package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-o90NSNmF.js} +3940 -1742
- package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
- package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +3 -3
- package/dist/docs-raw/AI/usage.md +1 -1
- package/dist/docs-raw/CLI.md +63 -241
- package/dist/docs-raw/README.md +6 -0
- package/dist/docs-raw/component-model.md +17 -150
- package/dist/docs-raw/generated/assembly.md +139 -598
- package/dist/docs-raw/generated/concepts.md +245 -3501
- package/dist/docs-raw/generated/core.md +277 -1251
- package/dist/docs-raw/generated/curves.md +387 -1608
- package/dist/docs-raw/generated/legacy.md +162 -0
- package/dist/docs-raw/generated/lib.md +227 -85
- package/dist/docs-raw/generated/output.md +38 -73
- package/dist/docs-raw/generated/runtime-names.md +23 -23
- package/dist/docs-raw/generated/sdf.md +68 -284
- package/dist/docs-raw/generated/sheet-metal.md +68 -335
- package/dist/docs-raw/generated/sketch.md +240 -1161
- package/dist/docs-raw/generated/viewport.md +75 -316
- package/dist/docs-raw/generated/wood.md +21 -49
- package/dist/docs-raw/guides/coordinate-system.md +4 -42
- package/dist/docs-raw/guides/inspection-bundles.md +44 -442
- package/dist/docs-raw/guides/joint-design.md +18 -79
- package/dist/docs-raw/guides/positioning.md +21 -143
- package/dist/docs-raw/guides/scene-presentation.md +89 -0
- package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
- package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
- package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
- package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
- package/dist/docs-raw/skills/forgecad-lld.md +19 -113
- package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
- package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
- package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
- package/dist/docs-raw/skills/forgecad-project.md +13 -131
- package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
- package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
- package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
- package/dist/docs-raw/skills/forgecad.md +19 -18
- package/dist/docs-raw/skills/index.md +2 -0
- package/dist/docs-raw/welcome.md +2 -2
- package/dist/index.html +1 -1
- package/dist/llms.txt +1 -2
- package/dist/sitemap.xml +13 -13
- package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-JTVBITCR.js} +1 -1
- package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-3FFLSMVN.js} +1 -1
- package/dist-cli/{chunk-SPZE3DUY.js → chunk-OAN5T4XD.js} +4412 -2212
- package/dist-cli/forgecad.js +507 -179
- package/dist-skill/CONTEXT.md +2172 -8377
- package/dist-skill/SKILL.md +15 -15
- package/dist-skill/docs/API/core/concepts.md +27 -157
- package/dist-skill/docs/CLI.md +63 -241
- package/dist-skill/docs/generated/assembly.md +138 -549
- package/dist-skill/docs/generated/core.md +277 -1251
- package/dist-skill/docs/generated/curves.md +387 -1609
- package/dist-skill/docs/generated/lib.md +227 -85
- package/dist-skill/docs/generated/output.md +38 -73
- package/dist-skill/docs/generated/runtime-names.md +16 -21
- package/dist-skill/docs/generated/sdf.md +68 -284
- package/dist-skill/docs/generated/sheet-metal.md +68 -335
- package/dist-skill/docs/generated/sketch.md +240 -1160
- package/dist-skill/docs/generated/viewport.md +75 -223
- package/dist-skill/docs/generated/wood.md +21 -49
- package/dist-skill/docs/guides/coordinate-system.md +4 -42
- package/dist-skill/docs/guides/inspection-bundles.md +44 -442
- package/dist-skill/docs/guides/joint-design.md +18 -79
- package/dist-skill/docs/guides/positioning.md +21 -143
- package/dist-skill/docs/guides/scene-presentation.md +89 -0
- package/dist-skill/docs/guides/surface-members.md +26 -0
- package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
- package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
- package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
- package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
- package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
- package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
- package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
- package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
- package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
- package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
- package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
- package/dist-skill/library/forgecad-project/SKILL.md +13 -133
- package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
- package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
- package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
- package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
- package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
- package/dist-skill/website/skills/forgecad-component-model.md +53 -0
- package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
- package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
- package/dist-skill/website/skills/forgecad-lld.md +41 -0
- package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
- package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
- package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
- package/dist-skill/website/skills/forgecad-project.md +26 -0
- package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
- package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
- package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
- package/dist-skill/website/skills/forgecad.md +122 -0
- package/dist-skill/website/skills/index.md +26 -0
- package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
- package/examples/api/conformal-product-ribbon.forge.js +1 -1
- package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
- package/examples/api/extrude-options.forge.js +4 -2
- package/examples/api/field-loft-drive-tip.forge.js +40 -0
- package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
- package/examples/api/highlight-debug.forge.js +10 -10
- package/examples/api/mesh-import-slats.forge.js +1 -1
- package/examples/api/real-product-curves.forge.js +1 -1
- package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
- package/examples/api/sdf-shapes.forge.js +2 -5
- package/examples/api/sketch-rounding-strategies.forge.js +6 -6
- package/examples/api/surface-member-bottle-cage.forge.js +3 -3
- package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
- package/examples/api/surface-member-razor-inlay.forge.js +1 -1
- package/examples/api/variable-sweep-test.forge.js +3 -3
- package/examples/mechanical/airplane-propeller.forge.js +74 -39
- package/examples/nurbs-surface.forge.js +1 -1
- package/examples/products/iphone.forge.js +1 -1
- package/package.json +1 -1
- package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
- package/dist/docs-raw/guides/geometry-conventions.md +0 -52
- package/dist/docs-raw/guides/modeling-recipes.md +0 -78
- package/dist-skill/docs/guides/geometry-conventions.md +0 -52
- package/dist-skill/docs/guides/modeling-recipes.md +0 -78
- 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)
|
|
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?` | `
|
|
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
|
-
#### `
|
|
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
|
|
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
|
-
|
|
84
|
+
Two behavioral cliffs:
|
|
59
85
|
|
|
60
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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?` | `
|
|
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
|
-
|
|
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
|
-
#### `
|
|
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,7 +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
|
-
#### `compareWith()` — Declare a reference model for comparison inspection.
|
|
239
|
+
#### `compareWith(path: string, options?: CompareWithOptions): void` — Declare a reference model for comparison inspection.
|
|
257
240
|
|
|
258
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`.
|
|
259
242
|
|
|
@@ -264,10 +247,6 @@ compareWith('./reference.3mf', { align: 'center', toleranceMm: 0.25, samples: 30
|
|
|
264
247
|
return rebuiltBearing;
|
|
265
248
|
```
|
|
266
249
|
|
|
267
|
-
```ts
|
|
268
|
-
compareWith(path: string, options?: CompareWithOptions): void
|
|
269
|
-
```
|
|
270
|
-
|
|
271
250
|
**`CompareWithOptions`**
|
|
272
251
|
|
|
273
252
|
| Option | Type | Description |
|
|
@@ -279,6 +258,11 @@ compareWith(path: string, options?: CompareWithOptions): void
|
|
|
279
258
|
|
|
280
259
|
#### `cutPlane()` — Define a named section plane for inspecting internal geometry.
|
|
281
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
|
+
|
|
282
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.
|
|
283
267
|
|
|
284
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.
|
|
@@ -290,16 +274,11 @@ const cutZ = param('Cut Height', 10, { min: -50, max: 50, unit: 'mm' });
|
|
|
290
274
|
cutPlane('Inspection', [0, 0, 1], cutZ, { exclude: ['Probe', 'Fasteners'] });
|
|
291
275
|
```
|
|
292
276
|
|
|
293
|
-
Overloads:
|
|
294
|
-
|
|
295
|
-
- `cutPlane(name: string, normal: [ number, number, number ], offset?: number, options?: CutPlaneOptions): void`
|
|
296
|
-
- `cutPlane(name: string, normal: [ number, number, number ], options?: CutPlaneOptions): void`
|
|
297
|
-
|
|
298
277
|
**`CutPlaneOptions`**
|
|
299
278
|
- `offset?: number` — Optional offset along the plane normal (primarily for object-form overload).
|
|
300
279
|
- `exclude?: CutPlaneExcludeInput` — Object names to keep uncut for this plane.
|
|
301
280
|
|
|
302
|
-
#### `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.
|
|
303
282
|
|
|
304
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.
|
|
305
284
|
|
|
@@ -322,174 +301,47 @@ return bracket;
|
|
|
322
301
|
// When run directly: bracket + wall + bolt all visible
|
|
323
302
|
```
|
|
324
303
|
|
|
325
|
-
```ts
|
|
326
|
-
mock<T extends Shape>(shape: T, name?: string): T
|
|
327
|
-
```
|
|
328
|
-
|
|
329
|
-
#### `showLabels()` — Highlight all user-labeled faces on a shape for visual debugging.
|
|
330
|
-
|
|
331
|
-
Shows each user-authored label name in the viewport for visual debugging. Returns the shape unchanged for chaining: `return showLabels(myShape)`.
|
|
332
|
-
|
|
333
|
-
```ts
|
|
334
|
-
showLabels(shape: Shape): Shape
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
#### `highlight()` — Highlight any geometry for visual debugging in the viewport.
|
|
338
|
-
|
|
339
|
-
Supported inputs:
|
|
340
|
-
|
|
341
|
-
- `string` — sketch entity ID (e.g. `'L0'`, `'P0'`, `'C0'`)
|
|
342
|
-
- `[x, y, z]` — 3D point
|
|
343
|
-
- `[[x1,y1,z1], [x2,y2,z2]]` — edge (line segment)
|
|
344
|
-
- `{ normal: [x,y,z], offset: number }` — plane by normal + distance from origin
|
|
345
|
-
- `{ normal: [x,y,z], point: [x,y,z] }` — plane by normal + point on plane
|
|
346
|
-
- [`Shape`](/docs/core#shape) — highlight entire 3D shape
|
|
347
|
-
- `FaceRef` (from `shape.face('top')`) — highlight as plane at face center
|
|
348
|
-
- `EdgeRef` (from `shape.edge('left')`) — highlight as edge segment
|
|
349
|
-
|
|
350
|
-
Overloads:
|
|
351
|
-
|
|
352
|
-
- `highlight(entityId: string, opts?: HighlightOptions): void`
|
|
353
|
-
- `highlight(point: [ number, number, number ], opts?: HighlightOptions): void`
|
|
354
|
-
- `highlight(edge: [ [ number, number, number ], [ number, number, number ] ], opts?: HighlightOptions): void`
|
|
355
|
-
- `highlight(plane: { normal: [ number, number, number ]; offset: number; }, opts?: HighlightOptions): void`
|
|
356
|
-
- `highlight(plane: { normal: [ number, number, number ]; point: [ number, number, number ]; }, opts?: HighlightOptions): void`
|
|
357
|
-
- `highlight(shape: Shape, opts?: HighlightOptions): void`
|
|
358
|
-
- `highlight(face: FaceRef, opts?: HighlightOptions): void`
|
|
359
|
-
- `highlight(edge: EdgeRef, opts?: HighlightOptions): void`
|
|
360
|
-
|
|
361
|
-
**`HighlightOptions`**
|
|
362
|
-
- `size?: number` — Size hint for points (radius in mm) or planes (disc radius in mm).
|
|
363
|
-
- Also: `color?: string, label?: string, pulse?: boolean`
|
|
364
|
-
|
|
365
|
-
**`FaceRef`**
|
|
366
|
-
|
|
367
|
-
| Option | Type | Description |
|
|
368
|
-
|--------|------|-------------|
|
|
369
|
-
| `normal` | `[ number, number, number ]` | Normal direction of the face |
|
|
370
|
-
| `center` | `[ number, number, number ]` | Center point of the face |
|
|
371
|
-
| `query?` | `FaceQueryRef` | Compiler-owned face query when available. |
|
|
372
|
-
| `planar?` | `boolean` | True when the face can host a 2D sketch placement frame |
|
|
373
|
-
| `uAxis?` | `[ number, number, number ]` | Face-local horizontal axis for planar faces |
|
|
374
|
-
| `vAxis?` | `[ number, number, number ]` | Face-local vertical axis for planar faces |
|
|
375
|
-
| `surface?` | `FaceSurface` | Analytic surface family when the backend can identify one. |
|
|
376
|
-
| `descendant?` | `FaceDescendantMetadata` | Shared descendant-resolution metadata when this face is a semantic region/set. |
|
|
377
|
-
| `name` | | — |
|
|
378
|
-
|
|
379
|
-
**`FaceDescendantMetadata`**: `kind: "single" | "face-set"`, `semantic: FaceDescendantSemantic`, `memberCount: number`, `memberNames: string[]`, `coplanar: boolean`
|
|
380
|
-
|
|
381
|
-
**`EdgeRef`**
|
|
382
|
-
|
|
383
|
-
| Option | Type | Description |
|
|
384
|
-
|--------|------|-------------|
|
|
385
|
-
| `start` | `[ number, number, number ]` | Start point |
|
|
386
|
-
| `end` | `[ number, number, number ]` | End point |
|
|
387
|
-
| `query?` | `EdgeQueryRef` | Compiler-owned edge query when available. |
|
|
388
|
-
| `curve?` | `EdgeCurve` | Exact or parametric curve family when the backend/source can identify one. |
|
|
389
|
-
| `faceName?` | `string` | Owning face name when the edge is associated with one face in a larger topology. |
|
|
390
|
-
| `name` | | — |
|
|
391
|
-
|
|
392
304
|
---
|
|
393
305
|
|
|
394
306
|
## Classes
|
|
395
307
|
|
|
396
308
|
### `RouteBuilder`
|
|
397
309
|
|
|
398
|
-
#### `up()` — Vertical line going +Y. Length is optional (solver determines it from constraints).
|
|
399
|
-
|
|
400
|
-
```ts
|
|
401
|
-
up(length?: number): LineId
|
|
402
|
-
```
|
|
403
|
-
|
|
404
|
-
#### `down()` — Vertical line going -Y. Length is optional.
|
|
405
|
-
|
|
406
|
-
```ts
|
|
407
|
-
down(length?: number): LineId
|
|
408
|
-
```
|
|
409
|
-
|
|
410
|
-
#### `right()` — Horizontal line going +X. Length is optional.
|
|
411
|
-
|
|
412
|
-
```ts
|
|
413
|
-
right(length?: number): LineId
|
|
414
|
-
```
|
|
415
|
-
|
|
416
|
-
#### `left()` — Horizontal line going -X. Length is optional.
|
|
417
|
-
|
|
418
|
-
```ts
|
|
419
|
-
left(length?: number): LineId
|
|
420
|
-
```
|
|
310
|
+
#### `up(length?: number): LineId` — Vertical line going +Y. Length is optional (solver determines it from constraints).
|
|
421
311
|
|
|
422
|
-
#### `
|
|
312
|
+
#### `down(length?: number): LineId` — Vertical line going -Y. Length is optional.
|
|
423
313
|
|
|
424
|
-
|
|
425
|
-
lineAt(angleDeg: number, length?: number): LineId
|
|
426
|
-
```
|
|
314
|
+
#### `right(length?: number): LineId` — Horizontal line going +X. Length is optional.
|
|
427
315
|
|
|
428
|
-
####
|
|
316
|
+
#### `left(length?: number): LineId` — Horizontal line going -X. Length is optional.
|
|
429
317
|
|
|
430
|
-
|
|
431
|
-
line(length?: number): LineId
|
|
432
|
-
```
|
|
318
|
+
#### `lineAt(angleDeg: number, length?: number): LineId` — Line at an arbitrary angle (degrees from +X). Length is optional.
|
|
433
319
|
|
|
434
|
-
#### `
|
|
320
|
+
#### `line(length?: number): LineId` — Line with solver-determined direction. Length is optional. Direction comes from tangency to previous arc or from constraints.
|
|
435
321
|
|
|
436
|
-
|
|
437
|
-
toward(x: number, y: number): LineId
|
|
438
|
-
```
|
|
322
|
+
#### `toward(x: number, y: number): LineId` — Line toward a specific point. Length defaults to the distance to that point.
|
|
439
323
|
|
|
440
|
-
#### `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.
|
|
441
325
|
|
|
442
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.
|
|
443
327
|
|
|
444
|
-
|
|
445
|
-
arcLeft(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
#### `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.
|
|
449
329
|
|
|
450
330
|
or `{ minSweep: degrees }` to seed without constraining.
|
|
451
331
|
|
|
452
|
-
|
|
453
|
-
arcRight(radius?: number, sweepDegOrOpts?: number | { minSweep: number; }): ArcId
|
|
454
|
-
```
|
|
455
|
-
|
|
456
|
-
#### `close()` — Close the route with a straight line back to the start point.
|
|
457
|
-
|
|
458
|
-
```ts
|
|
459
|
-
close(): void
|
|
460
|
-
```
|
|
332
|
+
#### `close(): void` — Close the route with a straight line back to the start point.
|
|
461
333
|
|
|
462
|
-
#### `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.
|
|
463
335
|
|
|
464
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.
|
|
465
337
|
|
|
466
|
-
|
|
467
|
-
done(): void
|
|
468
|
-
```
|
|
469
|
-
|
|
470
|
-
#### `start()` — PointId of the route's start point.
|
|
471
|
-
|
|
472
|
-
```ts
|
|
473
|
-
get start(): PointId
|
|
474
|
-
```
|
|
475
|
-
|
|
476
|
-
#### `end()` — PointId of the current cursor (route's end).
|
|
338
|
+
#### `get start(): PointId` — PointId of the route's start point.
|
|
477
339
|
|
|
478
|
-
|
|
479
|
-
get end(): PointId
|
|
480
|
-
```
|
|
481
|
-
|
|
482
|
-
#### `startOf()` — Get the start point of a segment.
|
|
483
|
-
|
|
484
|
-
```ts
|
|
485
|
-
startOf(segId: LineId | ArcId): PointId
|
|
486
|
-
```
|
|
340
|
+
#### `get end(): PointId` — PointId of the current cursor (route's end).
|
|
487
341
|
|
|
488
|
-
#### `
|
|
342
|
+
#### `startOf(segId: LineId | ArcId): PointId` — Get the start point of a segment.
|
|
489
343
|
|
|
490
|
-
|
|
491
|
-
endOf(segId: LineId | ArcId): PointId
|
|
492
|
-
```
|
|
344
|
+
#### `endOf(segId: LineId | ArcId): PointId` — Get the end point of a segment.
|
|
493
345
|
|
|
494
346
|
---
|
|
495
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
|
-
|
|
42
|
-
cut(cutter: Shape): WoodBoard
|
|
43
|
-
```
|
|
41
|
+
#### `translate(x: number, y: number, z: number): WoodBoard` — Translate the board in 3D space.
|
|
44
42
|
|
|
45
|
-
#### `
|
|
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
|
-
|
|
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
|
-
#### `
|
|
47
|
+
#### `rotateY(angleDeg: number): WoodBoard` — Rotate the board around the Y axis by a given angle in degrees.
|
|
52
48
|
|
|
53
|
-
|
|
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
|
-
#### `
|
|
51
|
+
#### `mirror(normal: Vec3): WoodBoard` — Mirror the board across a plane defined by its normal.
|
|
58
52
|
|
|
59
|
-
|
|
60
|
-
rotateX(angleDeg: number): WoodBoard
|
|
61
|
-
```
|
|
53
|
+
#### `color(value: string): WoodBoard` — Set the board's display color.
|
|
62
54
|
|
|
63
|
-
#### `
|
|
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
|
-
- `
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
- `
|
|
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.
|
|
@@ -3,48 +3,10 @@ skill-group: geometry
|
|
|
3
3
|
skill-order: 1
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# Coordinate System
|
|
6
|
+
# Coordinate System
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
Z-up right-handed: +X right, +Y back, +Z up. Ground plane is XY at Z = 0; extrusion goes along +Z. Units are millimeters; angles are degrees.
|
|
9
9
|
|
|
10
|
-
|
|
10
|
+
Model fronts (face/nose/camera side) point toward **-Y**; rear is +Y; the forward vector is `[0, -1, 0]`. Anchors follow: `front` resolves to the minimum-Y side, `back` to the maximum-Y side.
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
| Axis | Direction | Positive |
|
|
15
|
-
|------|-----------------|----------|
|
|
16
|
-
| X | Left / Right | Right |
|
|
17
|
-
| Y | Front / Back | Back |
|
|
18
|
-
| Z | Up / Down | Up |
|
|
19
|
-
|
|
20
|
-
## Standard Views
|
|
21
|
-
|
|
22
|
-
The camera position direction says where the camera sits relative to the model. A front view camera sits at `-Y` and looks toward `+Y`, so it sees the model's `-Y` front face.
|
|
23
|
-
|
|
24
|
-
| View | Camera position direction | Sees plane |
|
|
25
|
-
|--------|---------------------------|------------|
|
|
26
|
-
| Front | -Y | XZ |
|
|
27
|
-
| Back | +Y | XZ |
|
|
28
|
-
| Right | +X | YZ |
|
|
29
|
-
| Left | -X | YZ |
|
|
30
|
-
| Top | +Z | XY |
|
|
31
|
-
| Bottom | -Z | XY |
|
|
32
|
-
|
|
33
|
-
## GizmoViewcube Face Mapping
|
|
34
|
-
|
|
35
|
-
Renderer/view-cube internals may have their own material ordering. Map any view-cube labels to the ForgeCAD directions below:
|
|
36
|
-
|
|
37
|
-
| Direction | ForgeCAD label |
|
|
38
|
-
|-----------|----------------|
|
|
39
|
-
| +X | Right |
|
|
40
|
-
| -X | Left |
|
|
41
|
-
| +Y | Back |
|
|
42
|
-
| -Y | Front |
|
|
43
|
-
| +Z | Top |
|
|
44
|
-
| -Z | Bottom |
|
|
45
|
-
|
|
46
|
-
The face/anchor API is the source of truth: `front` resolves to the minimum-Y side and `back` resolves to the maximum-Y side.
|
|
47
|
-
|
|
48
|
-
## Grid
|
|
49
|
-
|
|
50
|
-
The ground plane is XY (Z = 0). Extrusion goes along +Z. Manifold is Y-up internally — if a kernel-facing operation behaves as if axes are swapped, check for Manifold Y-up semantics leaking through.
|
|
12
|
+
A `front` view camera sits on the -Y side looking toward +Y, so it sees the model's front face. The other views follow: back +Y, right +X, left -X, top +Z, bottom -Z.
|