forgecad 0.9.14 → 0.9.16
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/LICENSE +6 -4
- package/README.md +8 -4
- package/dist/assets/{AdminPage-eWGs2K6H.js → AdminPage-CXvls4-J.js} +2 -2
- package/dist/assets/{BenchmarkPage-CTrLKfpo.js → BenchmarkPage-B27zk8xL.js} +4 -15
- package/dist/assets/{BlogPage-5nPesyds.js → BlogPage-CMAVvgQL.js} +2 -2
- package/dist/assets/{DocsPage-C4Y3nbYc.js → DocsPage-knf4I4h7.js} +9 -3
- package/dist/assets/EditorApp-BHMQlJ-D.js +14686 -0
- package/dist/assets/{EditorApp-BAnckbsk.css → EditorApp-BpjZgzk0.css} +846 -0
- package/dist/assets/{EmbedViewer-C8fB4n5U.js → EmbedViewer-D7ZGlFjx.js} +3 -3
- package/dist/assets/{LandingPageProofDriven-jSz0LaMM.js → LandingPageProofDriven-CnevhTE8.js} +36 -38
- package/dist/assets/LegalPage-BPTUmqeg.js +39 -0
- package/dist/assets/LegalPage-BRlScr9A.css +91 -0
- package/dist/assets/{PricingPage-B83B90zh.js → PricingPage-B0D4goG_.js} +19 -19
- package/dist/assets/{PricingPage-BMedqFef.css → PricingPage-BPF6HKyO.css} +25 -0
- package/dist/assets/{SettingsPage-DY889pcu.js → SettingsPage-CFF-UgjI.js} +2 -2
- package/dist/assets/app-CE3sYcV7.css +3890 -0
- package/dist/assets/{app-bEww1ic4.js → app-T0pDcSX4.js} +3382 -1069
- package/dist/assets/cli/{render-Cho2uKG_.js → render-C5pcIISc.js} +477 -29
- package/dist/assets/{constructionHistoryWorker-HYwzJY4m.js → constructionHistoryWorker-Ba2Hm58b.js} +928 -243
- package/dist/assets/{evalWorker-CjQwJSE-.js → evalWorker-vkx310U2.js} +8883 -6040
- package/dist/assets/{forgecad_geometry-CH2nvuLA.js → forgecad_geometry-Dgceylq9.js} +43 -1
- package/dist/assets/forgecad_geometry_bg-dD4RNQF1.wasm +0 -0
- package/dist/assets/{inspectWorker-DeRnMVv1.js → inspectWorker-BuTJDVX6.js} +1179 -273
- package/dist/assets/{javascript-70-4uGcz.js → javascript-1kQXfVaz.js} +1 -1
- package/dist/assets/{targets-D6PWsv6X.js → jointPose-B_Cgedn9.js} +71 -3
- package/dist/assets/landing-proof-driven-DiGqdtWa.js +18 -0
- package/dist/assets/{landing-proof-driven-oFYW6mjz.css → landing-proof-driven-ORyigZ6p.css} +13 -7
- package/dist/assets/legalContent-ZfFGMmi4.js +251 -0
- package/dist/assets/{manifold-rmfAcdwF.js → manifold-BWgsjmAM.js} +1 -1
- package/dist/assets/{manifold-uRzgk5O8.js → manifold-D6IFSkhH.js} +2 -2
- package/dist/assets/{manifold-CG9Fokx-.js → manifold-rZexZI0G.js} +1 -1
- package/dist/assets/{reportWorker-4cW_ZpoS.js → reportWorker-0AGij1Ru.js} +8659 -12771
- package/dist/assets/{scalar-sampling-budget-CfDiFvh7.js → scalar-sampling-budget-J5cuzxT1.js} +8050 -6203
- package/dist/assets/{scanProxyWorker-Bs2TDgLw.js → scanProxyWorker-Vl4Wxa1y.js} +50 -6
- package/dist/assets/{solver-DuJAO8S6.js → solver-BZ9LPTHs.js} +1 -1
- package/dist/assets/solver_bg-DAHZJ_rw.wasm +0 -0
- package/dist/assets/{vendor-react-Da3A2QmU.js → vendor-react-6j1Kke-Y.js} +6 -5
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/AI/ai-native-cad.md +50 -0
- package/dist/docs-raw/AI/usage.md +5 -12
- package/dist/docs-raw/CLI.md +34 -10
- package/dist/docs-raw/component-model.md +27 -11
- package/dist/docs-raw/generated/assembly.md +374 -187
- package/dist/docs-raw/generated/concepts.md +245 -237
- package/dist/docs-raw/generated/core.md +283 -6
- package/dist/docs-raw/generated/curves.md +274 -361
- package/dist/docs-raw/generated/lib.md +9 -19
- package/dist/docs-raw/generated/output.md +29 -4
- package/dist/docs-raw/generated/runtime-names.md +49 -0
- package/dist/docs-raw/generated/sdf.md +31 -0
- package/dist/docs-raw/generated/sheet-metal.md +9 -0
- package/dist/docs-raw/generated/sketch.md +44 -1
- package/dist/docs-raw/generated/viewport.md +11 -3
- package/dist/docs-raw/guides/coordinate-system.md +20 -16
- package/dist/docs-raw/guides/geometry-conventions.md +2 -2
- package/dist/docs-raw/guides/inspection-bundles.md +2 -1
- package/dist/docs-raw/guides/joint-design.md +24 -0
- package/dist/docs-raw/guides/positioning.md +13 -3
- package/dist/docs-raw/legal/privacy.md +63 -0
- package/dist/docs-raw/legal/software-license.md +55 -0
- package/dist/docs-raw/legal/terms.md +87 -0
- package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +1 -1
- package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -1
- package/dist/docs-raw/skills/forgecad-component-model.md +11 -2
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +1 -1
- package/dist/docs-raw/skills/forgecad-image-replicator.md +8 -8
- package/dist/docs-raw/skills/forgecad-lld.md +1 -1
- package/dist/docs-raw/skills/forgecad-make-a-model.md +40 -39
- package/dist/docs-raw/skills/forgecad-model-grader.md +2 -2
- package/dist/docs-raw/skills/forgecad-prepare-prompt.md +2 -2
- package/dist/docs-raw/skills/forgecad-project.md +3 -1
- package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +1 -1
- package/dist/docs-raw/skills/forgecad-render-inspect.md +4 -2
- package/dist/docs-raw/skills/forgecad-visual-spec.md +1 -1
- package/dist/docs-raw/skills/forgecad.md +4 -3
- package/dist/docs-raw/welcome.md +2 -0
- package/dist/index.html +40 -12
- package/dist/llms.txt +8 -0
- package/dist/site.webmanifest +1 -1
- package/dist/sitemap.xml +49 -13
- package/dist-cli/{check-compiler-U5SOPN7X.js → check-compiler-SYQ2PWOB.js} +1 -2
- package/dist-cli/{check-query-propagation-XOKNSSYU.js → check-query-propagation-HIAGV62W.js} +1 -2
- package/dist-cli/{chunk-EXWGNL6K.js → chunk-SPZE3DUY.js} +20659 -17930
- package/dist-cli/forgecad.js +3568 -1250
- package/dist-cli/{forgecad_geometry-GYVNKPIE.js → forgecad_geometry-QOQIIP53.js} +42 -1
- package/dist-cli/forgecad_geometry_bg.wasm +0 -0
- package/dist-cli/{solver-46FFSK2U.js → solver-OK4HECRH.js} +0 -1
- package/dist-cli/solver_bg.wasm +0 -0
- package/dist-skill/CONTEXT.md +1192 -725
- package/dist-skill/SKILL.md +3 -2
- package/dist-skill/docs/API/core/concepts.md +64 -1
- package/dist-skill/docs/CLI.md +34 -10
- package/dist-skill/docs/generated/assembly.md +339 -213
- package/dist-skill/docs/generated/core.md +283 -6
- package/dist-skill/docs/generated/curves.md +272 -362
- package/dist-skill/docs/generated/lib.md +9 -19
- package/dist-skill/docs/generated/output.md +29 -4
- package/dist-skill/docs/generated/runtime-names.md +40 -0
- package/dist-skill/docs/generated/sdf.md +31 -0
- package/dist-skill/docs/generated/sheet-metal.md +9 -0
- package/dist-skill/docs/generated/sketch.md +44 -2
- package/dist-skill/docs/generated/viewport.md +2 -87
- package/dist-skill/docs/guides/coordinate-system.md +20 -16
- package/dist-skill/docs/guides/geometry-conventions.md +2 -2
- package/dist-skill/docs/guides/inspection-bundles.md +2 -1
- package/dist-skill/docs/guides/joint-design.md +24 -0
- package/dist-skill/docs/guides/positioning.md +13 -3
- package/dist-skill/library/forgecad-component-model/SKILL.md +10 -1
- package/dist-skill/library/forgecad-image-replicator/SKILL.md +6 -6
- package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.py +166 -0
- package/dist-skill/library/forgecad-make-a-model/SKILL.md +39 -38
- package/dist-skill/library/forgecad-model-grader/SKILL.md +1 -1
- package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +1 -1
- package/dist-skill/library/forgecad-project/SKILL.md +2 -0
- package/dist-skill/library/forgecad-render-inspect/SKILL.md +3 -1
- package/examples/api/assembly-kinematics-foundation.forge.js +65 -0
- package/examples/api/assembly-kinematics-four-bar.forge.js +115 -0
- package/examples/api/assembly-kinematics-limb.forge.js +116 -0
- package/examples/api/connector-frame-rig-chain.forge.js +102 -0
- package/examples/api/exact-sheet-shell-assembly.forge.js +0 -2
- package/examples/api/exact-surface-studio.forge.js +6 -8
- package/examples/api/helix-basics.forge.js +8 -8
- package/examples/api/lean-foundations/README.md +12 -0
- package/examples/api/lean-foundations/curve-blend-exact.forge.js +22 -0
- package/examples/api/lean-foundations/curve-fit-interpolation.forge.js +18 -0
- package/examples/api/lean-foundations/curve-helix-canonicalization.forge.js +27 -0
- package/examples/api/lean-foundations/curve-route-canonicalization.forge.js +16 -0
- package/examples/api/lean-foundations/curve-trim-reverse.forge.js +24 -0
- package/examples/api/lean-foundations/exact-curve-arc.forge.js +36 -0
- package/examples/api/mixed-edge-finishes-proof.forge.js +8 -11
- package/examples/api/route3d-elbow.forge.js +71 -0
- package/examples/api/transition-curves.forge.js +44 -15
- package/examples/api/variable-sweep-test.forge.js +3 -1
- package/examples/api/y-blend-corner-showcase.forge.js +0 -2
- package/examples/generative/coral-vase.forge.js +1 -1
- package/examples/nurbs-tube.forge.js +1 -1
- package/package.json +17 -13
- package/dist/assets/EditorApp-lXv53A1m.js +0 -13610
- package/dist/assets/app-CsHnaBWt.css +0 -1789
- package/dist/assets/forgecad_geometry_bg-C5_E9Oa9.wasm +0 -0
- package/dist/assets/solver_bg-CWvv4lnN.wasm +0 -0
- package/dist/docs-raw/API/README.md +0 -16
- package/dist/docs-raw/API/core/concepts.md +0 -118
- package/dist/docs-raw/INDEX.md +0 -138
- package/dist/docs-raw/RELEASING.md +0 -87
- package/dist/docs-raw/agent-native-api.md +0 -27
- package/dist/docs-raw/beta-deployment.md +0 -304
- package/dist/docs-raw/beta-operations.md +0 -325
- package/dist/docs-raw/blueprint-first.md +0 -145
- package/dist/docs-raw/cli-monetization.md +0 -112
- package/dist/docs-raw/coding-best-practices.md +0 -120
- package/dist/docs-raw/coding.md +0 -340
- package/dist/docs-raw/deployment.md +0 -374
- package/dist/docs-raw/guides/skill-maintenance.md +0 -161
- package/dist/docs-raw/guides/surface-members.md +0 -82
- package/dist/docs-raw/harbor-cli.md +0 -854
- package/dist/docs-raw/internals/backend-vocabulary.md +0 -35
- package/dist/docs-raw/internals/compiler.md +0 -307
- package/dist/docs-raw/internals/constraint-solver-quality.md +0 -161
- package/dist/docs-raw/internals/constraint-solver.md +0 -176
- package/dist/docs-raw/internals/shape-from-slices.md +0 -152
- package/dist/docs-raw/internals/sketch-2d-pipeline.md +0 -108
- package/dist/docs-raw/platform/admin.md +0 -45
- package/dist/docs-raw/platform/architecture.md +0 -82
- package/dist/docs-raw/platform/auth.md +0 -139
- package/dist/docs-raw/platform/email.md +0 -67
- package/dist/docs-raw/platform/google-oauth-setup.md +0 -88
- package/dist/docs-raw/platform/observability.md +0 -197
- package/dist/docs-raw/platform/projects.md +0 -111
- package/dist/docs-raw/platform/sharing.md +0 -90
- package/dist/docs-raw/product/README.md +0 -39
- package/dist/docs-raw/product/api-as-product-language.md +0 -13
- package/dist/docs-raw/product/business-model.md +0 -15
- package/dist/docs-raw/product/competitive-positioning.md +0 -17
- package/dist/docs-raw/product/creative-manufacturing.md +0 -15
- package/dist/docs-raw/product/founder-story.md +0 -11
- package/dist/docs-raw/product/manufacturing-workflows.md +0 -15
- package/dist/docs-raw/product/onboarding-first-experience.md +0 -256
- package/dist/docs-raw/product/product-loop.md +0 -17
- package/dist/docs-raw/product/strategic-decisions.md +0 -22
- package/dist/docs-raw/product/user-outreach-email-templates.md +0 -161
- package/dist/docs-raw/product/user-segments.md +0 -15
- package/dist/docs-raw/product/vision.md +0 -26
- package/dist/docs-raw/rl-environments.md +0 -350
- package/dist/docs-raw/runbook.md +0 -611
- package/dist-cli/check-compiler-U5SOPN7X.js.map +0 -1
- package/dist-cli/check-query-propagation-XOKNSSYU.js.map +0 -1
- package/dist-cli/chunk-EXWGNL6K.js.map +0 -1
- package/dist-cli/forgecad.js.map +0 -1
- package/dist-cli/forgecad_geometry-GYVNKPIE.js.map +0 -1
- package/dist-cli/solver-46FFSK2U.js.map +0 -1
- package/dist-skill/SKILL-dev.md +0 -145
- package/dist-skill/docs-dev/API/core/concepts.md +0 -118
- package/dist-skill/docs-dev/CLI.md +0 -677
- package/dist-skill/docs-dev/agent-native-api.md +0 -27
- package/dist-skill/docs-dev/blueprint-first.md +0 -145
- package/dist-skill/docs-dev/coding-best-practices.md +0 -120
- package/dist-skill/docs-dev/coding.md +0 -340
- package/dist-skill/docs-dev/component-model.md +0 -164
- package/dist-skill/docs-dev/generated/assembly.md +0 -794
- package/dist-skill/docs-dev/generated/core.md +0 -2117
- package/dist-skill/docs-dev/generated/curves.md +0 -2583
- package/dist-skill/docs-dev/generated/lib.md +0 -169
- package/dist-skill/docs-dev/generated/output.md +0 -247
- package/dist-skill/docs-dev/generated/sdf.md +0 -446
- package/dist-skill/docs-dev/generated/sheet-metal.md +0 -504
- package/dist-skill/docs-dev/generated/sketch.md +0 -1811
- package/dist-skill/docs-dev/generated/viewport.md +0 -585
- package/dist-skill/docs-dev/generated/wood.md +0 -108
- package/dist-skill/docs-dev/guides/coordinate-system.md +0 -46
- package/dist-skill/docs-dev/guides/geometry-conventions.md +0 -52
- package/dist-skill/docs-dev/guides/inspection-bundles.md +0 -485
- package/dist-skill/docs-dev/guides/joint-design.md +0 -78
- package/dist-skill/docs-dev/guides/modeling-recipes.md +0 -78
- package/dist-skill/docs-dev/guides/positioning.md +0 -161
- package/dist-skill/docs-dev/guides/skill-maintenance.md +0 -161
- package/dist-skill/docs-dev/internals/backend-vocabulary.md +0 -35
- package/dist-skill/docs-dev/internals/compiler.md +0 -307
- package/dist-skill/docs-dev/internals/constraint-solver-quality.md +0 -161
- package/dist-skill/docs-dev/internals/constraint-solver.md +0 -176
- package/dist-skill/docs-dev/internals/sketch-2d-pipeline.md +0 -108
- package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.mjs +0 -289
- package/examples/api/bolted-service-cover.forge.js +0 -17
- package/examples/api/cable-gland-anchor.forge.js +0 -14
- package/examples/api/captured-cartridge-guide.forge.js +0 -14
- package/examples/api/captured-linear-slide.forge.js +0 -13
- package/examples/api/clevis-pin-joint.forge.js +0 -13
- package/examples/api/datum-enclosure.forge.js +0 -16
- package/examples/api/hose-barb-port.forge.js +0 -14
- package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
- package/examples/api/living-hinge-cover.forge.js +0 -14
- package/examples/api/pcb-terminal-block.forge.js +0 -22
- package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
- package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
- package/examples/api/routed-tube-clip.forge.js +0 -15
- package/examples/api/seated-bearing-stack.forge.js +0 -30
- package/examples/api/snap-latch-cover.forge.js +0 -14
- package/examples/api/thumb-screw-clamp.forge.js +0 -15
package/dist-skill/SKILL.md
CHANGED
|
@@ -17,7 +17,7 @@ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefe
|
|
|
17
17
|
5. Default to a concrete first pass — easy iteration beats speculative design review.
|
|
18
18
|
6. If an existing model is broken, replace the weak structure rather than preserving bad architecture.
|
|
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
|
-
8. For
|
|
20
|
+
8. For moving assemblies, return the `Assembly` directly so runtime controls re-solve the link/edge kinematics model instead of stacking viewport-only transforms.
|
|
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
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 `inspect sections` after the artifact exists.
|
|
23
23
|
|
|
@@ -40,6 +40,7 @@ Load groups top-to-bottom, stopping when you have what the task needs.
|
|
|
40
40
|
Execution model, colors, coordinate system, primitives, booleans, patterns, imports, parameters, topology, edge queries.
|
|
41
41
|
|
|
42
42
|
- `{{SKILL_DIR}}/docs/API/core/concepts.md`
|
|
43
|
+
- `{{SKILL_DIR}}/docs/generated/runtime-names.md`
|
|
43
44
|
- `{{SKILL_DIR}}/docs/generated/core.md`
|
|
44
45
|
|
|
45
46
|
### 2. Static Assembly and Positioning (for any multi-part model)
|
|
@@ -89,7 +90,7 @@ Parametric bolts, nuts, washers, standard hardware, gears, pipes, and structural
|
|
|
89
90
|
|
|
90
91
|
### 9. Runtime Viewport APIs (for cut planes, exploded views, hiding, and animation playback)
|
|
91
92
|
|
|
92
|
-
Viewer-only APIs such as cutPlane, explodeView,
|
|
93
|
+
Viewer-only APIs such as cutPlane, explodeView, render labels, comparison references, and runtime display behavior.
|
|
93
94
|
|
|
94
95
|
- `{{SKILL_DIR}}/docs/generated/viewport.md`
|
|
95
96
|
|
|
@@ -28,7 +28,32 @@ const bomHelpers = require("./bom.js");
|
|
|
28
28
|
bomHelpers.addFasteners(...);
|
|
29
29
|
```
|
|
30
30
|
|
|
31
|
-
Top-level declarations such as `const bom = ...`, `let
|
|
31
|
+
Top-level lexical declarations such as `const bom = ...`, `let slot = ...`, `const lib = ...`, `const joint = ...`, or `class Shape {}` collide with the injected runtime names. This is checked when the script runs, so agents should treat these names as reserved before executing the model.
|
|
32
|
+
|
|
33
|
+
Use project-specific local names instead:
|
|
34
|
+
|
|
35
|
+
```javascript
|
|
36
|
+
// BAD — `lib` and `slot` are injected runtime names.
|
|
37
|
+
const lib = require("./wheel-lib.js");
|
|
38
|
+
const slot = rect(20, 5);
|
|
39
|
+
|
|
40
|
+
// GOOD — local names describe the project role.
|
|
41
|
+
const wheelLib = require("./wheel-lib.js");
|
|
42
|
+
const axleSlotSketch = rect(20, 5);
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If a helper module exports a name that matches a ForgeCAD runtime name, keep the module under one local object name or rename during destructuring:
|
|
46
|
+
|
|
47
|
+
```javascript
|
|
48
|
+
// GOOD — no top-level `slot` declaration.
|
|
49
|
+
const wheelHelpers = require("./wheel-helpers.js");
|
|
50
|
+
const axleSlot = wheelHelpers.slot(...);
|
|
51
|
+
|
|
52
|
+
// GOOD — imported helper is renamed.
|
|
53
|
+
const { slot: makeAxleSlot } = require("./wheel-helpers.js");
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The complete collision-reserved list is generated from the runtime source in [Runtime Names](../../generated/runtime-names.md). Check that list before using natural local names such as `lib`, `slot`, `joint`, `group`, `path`, `text2d`, `scene`, or `Shape`.
|
|
32
57
|
|
|
33
58
|
## Execution Model
|
|
34
59
|
|
|
@@ -67,6 +92,44 @@ return {
|
|
|
67
92
|
};
|
|
68
93
|
```
|
|
69
94
|
|
|
95
|
+
### Forge-Aware Builder Modules
|
|
96
|
+
|
|
97
|
+
A `.forge.js` file can also return builder functions. Those functions keep access to
|
|
98
|
+
the ForgeCAD runtime names from their defining file, so this is the supported way
|
|
99
|
+
to share sketch, profile, shape, or assembly builders that need APIs such as
|
|
100
|
+
`path()`, `circle2d()`, `box()`, or `assembly()`.
|
|
101
|
+
|
|
102
|
+
This pattern works well when a file should be both directly inspectable and
|
|
103
|
+
importable: render the flat profiles or part preview when the file is opened on
|
|
104
|
+
its own, and export builders under a named object for the assembly file.
|
|
105
|
+
|
|
106
|
+
```javascript
|
|
107
|
+
// profiles.forge.js - inspectable on its own, reusable through require()
|
|
108
|
+
function wheelProfile() {
|
|
109
|
+
return circle2d(40).subtract(circle2d(18));
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return {
|
|
113
|
+
preview: [{ name: 'Wheel profile', sketch: wheelProfile() }],
|
|
114
|
+
make: { wheelProfile },
|
|
115
|
+
};
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
```javascript
|
|
119
|
+
// main.forge.js - reuses the exact inspected profile
|
|
120
|
+
const profiles = require('./profiles.forge.js');
|
|
121
|
+
const wheel = profiles.make.wheelProfile().extrude(8);
|
|
122
|
+
return wheel;
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Keep builder modules pure over top-level constants, top-level `param()` values,
|
|
126
|
+
or explicit function arguments. Do not declare new `param()` values inside an
|
|
127
|
+
exported builder if callers need `require('./profiles.forge.js', { Width: 80 })`
|
|
128
|
+
overrides: import overrides are validated while the module loads, before any
|
|
129
|
+
exported builder is called. For plain constants, tables, math helpers, and
|
|
130
|
+
formatting code that does not construct ForgeCAD geometry, use `.js` helper
|
|
131
|
+
modules instead.
|
|
132
|
+
|
|
70
133
|
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
134
|
|
|
72
135
|
```javascript
|
package/dist-skill/docs/CLI.md
CHANGED
|
@@ -48,6 +48,8 @@ ForgeCAD includes a local editor. Open it around a dedicated project folder, edi
|
|
|
48
48
|
|
|
49
49
|
`forgecad studio <project-path>` is the normal installed-CLI command for users. `forgecad dev <project-path>` starts the Vite dev server and is mainly for ForgeCAD source development.
|
|
50
50
|
|
|
51
|
+
Keep one long-running `forgecad studio <project-path> [project-path ...]` process open with every active project folder listed in its arguments; the user opens the single printed localhost port once, and AI agents should only create or edit files under those folders so the browser updates live without starting more servers.
|
|
52
|
+
|
|
51
53
|
<details>
|
|
52
54
|
<summary>Common flags for studio / dev</summary>
|
|
53
55
|
|
|
@@ -162,11 +164,12 @@ Inspect a model by asking for one explicit kind of evidence.
|
|
|
162
164
|
|
|
163
165
|
`forgecad inspect` is the evidence-first inspection surface. Pick the job you want to verify, then choose the view like you would with `render 3d`.
|
|
164
166
|
|
|
167
|
+
- `inspect sketch` — returned sketch/profile regions, selector dry-runs, and extrusion compatibility
|
|
165
168
|
- `inspect history` — final-object feature recipes and feedback anchors
|
|
166
169
|
- `inspect design-trace` — raw construction DAG, source spans, and cache diagnostics
|
|
167
170
|
- `inspect section` — agent-native one-off section probe with optional ray rulers and replay JSON
|
|
168
171
|
- `inspect replay` — rerun a saved section probe on the same or another source
|
|
169
|
-
- `inspect visual image|cutaway|depth|normals|objects` — visual context, clipped 3D cutaways, depth, normals, and identity evidence
|
|
172
|
+
- `inspect visual image|cutaway|depth|normals|rig|objects` — visual context, clipped 3D cutaways, depth, normals, rig skeletons, and identity evidence
|
|
170
173
|
- `inspect surface zebra|roughness` — surface continuity and roughness evidence
|
|
171
174
|
- `inspect physical components|floating|gaps` — physical component graph evidence
|
|
172
175
|
- `inspect fit interference` — positive-volume overlap evidence
|
|
@@ -189,8 +192,27 @@ forgecad inspect sections stack main.forge.js --plane yz --every 1
|
|
|
189
192
|
forgecad inspect compare overlay candidate.forge.js --with reference.3mf
|
|
190
193
|
```
|
|
191
194
|
|
|
195
|
+
### `forgecad inspect sketch`
|
|
196
|
+
|
|
197
|
+
Inspect returned sketches and profile regions used by returned shapes.
|
|
198
|
+
|
|
199
|
+
Runs a model and reports inspectable 2D sketch/profile regions without requiring model code to register inspection hooks. The command inspects returned Sketch objects and profile-bearing shape compile plans such as extrude, cut, and revolve. Use `--seed x,y` to dry-run which region a point selector would consume, and `--operation extrude` to check extrusion compatibility.
|
|
200
|
+
|
|
201
|
+
```bash
|
|
202
|
+
forgecad inspect sketch examples/api/sketch-regions.forge.js
|
|
203
|
+
forgecad inspect sketch model.forge.js --object "Profile" --seed 45,15
|
|
204
|
+
forgecad inspect sketch model.forge.js --json --object "Body" --seed 45,15 --operation extrude
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
`inspect sketch` is external inspection: it runs the script, then reads returned scene objects and shape compile plans. Model code should not call an inspection API. It reports selectable 2D `regions` from returned `Sketch` / `ConstraintSketch` objects and from profile-bearing returned shapes (`extrude.profile`, `cut.profile`, `revolve.profile`).
|
|
208
|
+
|
|
209
|
+
JSON contract: `targets[]` are inspectable sketches/profile uses; `regions[]` are filled selectable areas sorted largest-first with run-local ids like `R0`; `holes[]` are excluded interiors; `selection` is present only with `--seed`; `profileTree` is compile-plan provenance, not JavaScript variable names. Stable selection v1 is `--seed x,y`, not region id.
|
|
210
|
+
|
|
211
|
+
Seed failures are explicit and exit nonzero when no target matches: outside every region, on a boundary, inside a hole, ambiguous, no regions, or incompatible operation. `--operation extrude` only checks whether the selected filled region can be consumed by extrusion; open path/rail selection is intentionally unsupported in v1.
|
|
212
|
+
|
|
192
213
|
| Command | Description |
|
|
193
214
|
|---------|-------------|
|
|
215
|
+
| `inspect sketch` | Inspect returned sketches and profile regions used by returned shapes. |
|
|
194
216
|
| `inspect visual image` | Capture standard shaded viewport evidence. |
|
|
195
217
|
| `inspect visual objects` | Capture object identity evidence. |
|
|
196
218
|
| `inspect section` | Run one exact section probe with optional ray rulers. |
|
|
@@ -229,7 +251,7 @@ forgecad render hq examples/products/cup.forge.js --preset dramatic
|
|
|
229
251
|
|
|
230
252
|
Render a Forge scene to PNG using the real viewport renderer.
|
|
231
253
|
|
|
232
|
-
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.
|
|
254
|
+
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. Each render uses a private renderer server by default, so parallel renders do not compete for the same Vite port.
|
|
233
255
|
|
|
234
256
|
The input can be a `.forge.js` script or a direct `.stl`, `.obj`, `.3mf`, `.step`, or `.stp` asset. Direct STEP/STP rendering auto-selects OCCT unless you pass `--backend`.
|
|
235
257
|
|
|
@@ -299,9 +321,9 @@ forgecad render hq examples/products/cup.forge.js --transparent --preset glass
|
|
|
299
321
|
|
|
300
322
|
### `forgecad capture gif|mp4` **\[Pro\]**
|
|
301
323
|
|
|
302
|
-
Animated orbit or joint playback.
|
|
324
|
+
Animated orbit, section sweep, or named joint playback.
|
|
303
325
|
|
|
304
|
-
Renders an animated sequence by either orbiting the camera around the model or playing back a
|
|
326
|
+
Renders an animated sequence by either orbiting the camera around the model or playing back a named joint animation. Use `--capture orbit` (default) for a turntable rotation, `--capture animation --animation <name>` to play a named joint 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.
|
|
305
327
|
|
|
306
328
|
```bash
|
|
307
329
|
forgecad capture gif examples/products/cup.forge.js
|
|
@@ -311,7 +333,7 @@ forgecad capture gif model.forge.js out/front.gif --camera front
|
|
|
311
333
|
forgecad capture gif model.forge.js out/hero.gif --view hero
|
|
312
334
|
forgecad capture gif examples/3d-printer.forge.js out/sweep.gif --capture section-sweep --sweep-plane YZ
|
|
313
335
|
forgecad capture mp4 examples/products/cup.forge.js
|
|
314
|
-
forgecad capture mp4 examples/api/
|
|
336
|
+
forgecad capture mp4 examples/api/assembly-kinematics-four-bar.forge.js out/four-bar.mp4 --view iso
|
|
315
337
|
forgecad capture mp4 model.forge.js out/raw.mp4 --param "Output=raw-sdf"
|
|
316
338
|
forgecad capture mp4 model.forge.js out/front.mp4 --camera front
|
|
317
339
|
forgecad capture mp4 model.forge.js out/hero.mp4 --view hero
|
|
@@ -346,6 +368,7 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
|
|
|
346
368
|
|--------|-------------|
|
|
347
369
|
| `--param <Key=Value>` | Override a parameter value (Key=Value). Repeatable. |
|
|
348
370
|
| `-p <Key=Value>` | Shorthand for --param |
|
|
371
|
+
| `--joint <JointName=Value>` | Override a Motion tab joint value (JointName=Value). Repeatable. |
|
|
349
372
|
| `--focus <names>` | Focus: no arg hides mocks; comma-separated names/globs show only those |
|
|
350
373
|
| `--hide <names>` | Hide comma-separated object names/globs |
|
|
351
374
|
| `--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. |
|
|
@@ -356,9 +379,9 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
|
|
|
356
379
|
| `--background <color>` | Canvas background override |
|
|
357
380
|
| `--render-mode <solid\|wireframe>` | Shaded solid (default) or wireframe only |
|
|
358
381
|
| `--edges <off\|thin\|bold>` | Edge overlay preset in solid mode (default: off) |
|
|
359
|
-
| `--render-style <classic\|studio\|fast\|glass\|inspection\|
|
|
382
|
+
| `--render-style <classic\|studio\|fast\|glass\|inspection\|contour\|scan>` | Visual render style (render default: classic; inspect default: inspection) |
|
|
360
383
|
| `--scan-granularity <12-144>` | Scan cells across the scene longest axis |
|
|
361
|
-
| `--port <n>` |
|
|
384
|
+
| `--port <n>` | Renderer server port |
|
|
362
385
|
| `--fresh-server` | Start a fresh renderer instead of reusing an existing one |
|
|
363
386
|
| `--chrome-path <path>` | Chrome or Chromium executable path |
|
|
364
387
|
| `--output <path>` | Output file path |
|
|
@@ -379,7 +402,7 @@ forgecad render section examples/furniture/01-table.forge.js out/bold.svg --edge
|
|
|
379
402
|
| `--pitch <deg>` | Camera pitch angle in degrees |
|
|
380
403
|
| `--format <gif\|mp4>` | Output format |
|
|
381
404
|
| `--capture <orbit\|animation\|section-sweep>` | Capture preset |
|
|
382
|
-
| `--animation <name>` | Named
|
|
405
|
+
| `--animation <name>` | Named joint animation clip |
|
|
383
406
|
| `--animation-loops <n>` | Repeat the selected animation clip |
|
|
384
407
|
| `--cut-plane <name>` | Enable a named cut plane |
|
|
385
408
|
| `--sweep-plane <XY\|XZ\|YZ>` | Moving plane for section-sweep |
|
|
@@ -448,9 +471,10 @@ forgecad export sdf rover.forge.js --output out/forge_scout
|
|
|
448
471
|
|
|
449
472
|
| Option | Description |
|
|
450
473
|
|--------|-------------|
|
|
474
|
+
| `--joint <JointName=Value>` | Override a Motion tab joint value (JointName=Value). Repeatable. |
|
|
451
475
|
| `--output <path>` | Output STEP path |
|
|
476
|
+
| `--backend <occt\|truck>` | Exact BREP exporter: occt (default) or truck (native analytic kernel) |
|
|
452
477
|
| `--quality <default\|live\|high>` | Forge quality preset |
|
|
453
|
-
| `--backend <manifold\|occt\|truck>` | Geometry backend (default: manifold) |
|
|
454
478
|
| `-o <path>` | Shorthand for --output |
|
|
455
479
|
| `--dim-angle-tol <deg>` | Dimension routing tolerance in degrees |
|
|
456
480
|
| `--format <pdf\|dxf>` | Output format |
|
|
@@ -484,7 +508,7 @@ cd start-here
|
|
|
484
508
|
forgecad studio .
|
|
485
509
|
```
|
|
486
510
|
|
|
487
|
-
`forgecad login` asks how you want to sign in, then prompts for either email/password or an API token. If your account was created through GitHub or Google, create an API token in Settings > API Tokens, run `forgecad login`, and choose API token. Use `FORGECAD_TOKEN=fc_pat_...` only for CI/CD and one-off automation.
|
|
511
|
+
`forgecad login` asks how you want to sign in, then prompts for either email/password or an API token. If your account was created through GitHub or Google, create an API token in Settings > API Tokens, run `forgecad login`, and choose API token. Use `FORGECAD_TOKEN=fc_pat_...` only for CI/CD and one-off automation.
|
|
488
512
|
|
|
489
513
|
`forgecad project init` creates the remote project, writes `forgecad.json`, pushes any existing local source files, and records server file IDs. `forgecad project push` syncs an already initialized project; it does not create a remote project from an arbitrary folder.
|
|
490
514
|
|