forgecad 0.9.16 → 0.10.1
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-DcCnj0qo.js} +1 -1
- package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-BVEpJSVk.js} +1 -1
- package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DHaGP50_.js} +1 -1
- package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-CDoxHkz8.js} +40 -859
- package/dist/assets/EditorApp-BJ0Dloyh.js +16446 -0
- package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-CRKZbY0y.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-BxHkYRE7.js} +1 -1
- package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-B-u6FrVv.js} +1 -1
- package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-CzpZ6-Ce.js} +1 -1
- package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-CIZSSAd0.js} +1 -1
- package/dist/assets/{app-CE3sYcV7.css → app-CjsbDlb7.css} +143 -0
- package/dist/assets/{app-T0pDcSX4.js → app-DaTMg3nH.js} +1310 -290
- package/dist/assets/cli/{render-C5pcIISc.js → render-DPf4AYJK.js} +55 -60
- package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
- package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-CjZZWRWW.js} +5209 -2643
- package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
- package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DzQOViQH.js} +1 -1
- package/dist/assets/{manifold-BWgsjmAM.js → manifold-BYlzU521.js} +1 -1
- package/dist/assets/{manifold-D6IFSkhH.js → manifold-DgXo0T5P.js} +2 -2
- package/dist/assets/{manifold-rZexZI0G.js → manifold-K1SkarlQ.js} +1 -1
- package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-B9nWwSrB.js} +8501 -3393
- package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-prBw_s8t.js} +6067 -3479
- 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 +77 -240
- package/dist/docs-raw/README.md +6 -0
- package/dist/docs-raw/component-model.md +17 -150
- package/dist/docs-raw/generated/assembly.md +188 -582
- package/dist/docs-raw/generated/concepts.md +259 -3501
- package/dist/docs-raw/generated/core.md +283 -1250
- 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 +35 -99
- 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/guides/simready-quickstart.md +171 -0
- package/dist/docs-raw/simulation-workflow.md +273 -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 +2 -2
- package/dist/llms.txt +1 -2
- package/dist/sitemap.xml +25 -13
- package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-II7NLPAB.js} +1 -1
- package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-7462TR3R.js} +1 -1
- package/dist-cli/{chunk-SPZE3DUY.js → chunk-UWTJCGXF.js} +5848 -2915
- package/dist-cli/forgecad.js +3496 -703
- package/dist-skill/CONTEXT.md +1797 -7963
- package/dist-skill/SKILL.md +15 -15
- package/dist-skill/docs/API/core/concepts.md +27 -157
- package/dist-skill/docs/CLI.md +77 -240
- package/dist-skill/docs/generated/assembly.md +182 -532
- package/dist-skill/docs/generated/core.md +283 -1250
- 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 +35 -99
- 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/examples/robotics/README.md +46 -0
- package/examples/robotics/scout-cam-rover-simready/README.md +119 -0
- package/examples/robotics/scout-cam-rover-simready/lib/dims.js +140 -0
- package/examples/robotics/scout-cam-rover-simready/main.forge.js +343 -0
- package/examples/robotics/scout-cam-rover-simready/parts/body.forge.js +304 -0
- package/examples/robotics/scout-cam-rover-simready/parts/chassis.forge.js +320 -0
- package/examples/robotics/scout-cam-rover-simready/parts/hardware.forge.js +21 -0
- package/examples/robotics/scout-cam-rover-simready/parts/turret.forge.js +70 -0
- package/examples/robotics/scout-cam-rover-simready/parts/wheel.forge.js +116 -0
- package/examples/robotics/simready-asset-crate.forge.js +79 -0
- package/examples/robotics/simready-diff-drive-rover.forge.js +141 -0
- package/examples/robotics/simready-parallel-gripper.forge.js +102 -0
- 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
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-make-a-model/SKILL.md instead. -->
|
|
2
|
+
|
|
1
3
|
# forgecad-make-a-model
|
|
2
4
|
|
|
3
5
|
Create manufacture-realistic prototype ForgeCAD (.forge.js) models in the active CAD project. Handles file placement, invokes the forgecad skill for API guidance, and validates the result.
|
|
@@ -15,592 +17,170 @@ Create new ForgeCAD models in the user's active ForgeCAD project.
|
|
|
15
17
|
|
|
16
18
|
### Default Output Standard
|
|
17
19
|
|
|
18
|
-
Unless the user
|
|
19
|
-
|
|
20
|
-
That means the model should look and behave like a serious prototype someone could fabricate, buy parts for, assemble, inspect, and iterate in a real shop or product lab. It is not a casual concept sketch, not a universal 3D-printing exercise, and not a claim of certified production readiness.
|
|
20
|
+
Unless the user asks otherwise, the output is a **manufacture-realistic prototype**: a model someone could fabricate, buy parts for, assemble, inspect, and iterate in a real shop — not a concept sketch, not a universal 3D-printing exercise, not a claim of certified production readiness.
|
|
21
21
|
|
|
22
|
-
-
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
- If the user asks for `production-realistic`, push toward manufacturing DFM and production-intent materials. If they ask for `printable`, make the selected printed parts honest. If they ask for `visual-CAD`, keep it clearly visual rather than pretending it is build-ready.
|
|
26
|
-
- Checking for collisions and removing unexpected overlaps is part of the normal definition of done. The expected final collision count is zero except in rare, explicit cases such as welded, fused, overmolded, cast-in, potted, or bonded matter; those exceptions must be declared with `verify.intentionalOverlap(...)` or isolated with focused inspection so the remaining collision report is meaningful.
|
|
22
|
+
- Include prototype-real features: wall thickness, fastener stacks, bosses, ribs, flanges, seats, gaskets, cable exits, service access, toleranced clearances, believable purchased parts. No invented tooling details, certifications, or safety ratings unless asked.
|
|
23
|
+
- Modifiers shift the standard: `blockout` → rough massing; `production-realistic` → DFM and production-intent materials; `printable` → make the selected printed parts honest; `visual-CAD` → clearly visual, not pretending build-ready.
|
|
24
|
+
- Zero unexpected final collisions is part of the definition of done (see Collision Policy).
|
|
27
25
|
|
|
28
26
|
### File Placement
|
|
29
27
|
|
|
30
|
-
|
|
28
|
+
New `.forge.js` files go under date-based directories (today's date) in the user's current ForgeCAD project or a clearly named local folder:
|
|
31
29
|
|
|
32
30
|
```
|
|
33
|
-
YYYY/MM/DD/file.forge.js
|
|
34
|
-
YYYY/MM/DD/folder/main.forge.js
|
|
35
|
-
YYYY/MM/DD/folder/parts/*.forge.js — standalone/importable
|
|
36
|
-
YYYY/MM/DD/folder/lib/*.js
|
|
31
|
+
YYYY/MM/DD/file.forge.js — single-file model
|
|
32
|
+
YYYY/MM/DD/folder/main.forge.js — multi-file entry point (always main.forge.js)
|
|
33
|
+
YYYY/MM/DD/folder/parts/*.forge.js — standalone/importable parts
|
|
34
|
+
YYYY/MM/DD/folder/lib/*.js — pure helpers/constants, no geometry
|
|
37
35
|
```
|
|
38
36
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- Use kebab-case for file and folder names: `parametric-lego.forge.js`
|
|
44
|
-
- Use descriptive names that communicate what the model is
|
|
45
|
-
- For any multi-file project, name the runnable ForgeCAD entry point `main.forge.js`
|
|
46
|
-
- Put renderable/importable parts and sub-assemblies in separate `.forge.js` files when splitting is justified; each should be standalone-runnable and importable with `require('./parts/name.forge.js', params)`.
|
|
47
|
-
- Use plain `.js` files only for pure constants, math helpers, tables, or formatting code that does not construct and return ForgeCAD geometry.
|
|
48
|
-
- Do not create multiple `.forge.js` files merely for organization; split only for reusable parts, large self-contained components, or independent sub-assemblies.
|
|
37
|
+
- Kebab-case descriptive names (`parametric-lego.forge.js`). Each part file must run standalone and import via `require('./parts/name.forge.js', params)`.
|
|
38
|
+
- Plain `.js` only for constants, math, tables, formatting — never geometry.
|
|
39
|
+
- Split files only for reusable parts or independent sub-assemblies, never for organization.
|
|
49
40
|
|
|
50
41
|
### Workflow
|
|
51
42
|
|
|
52
|
-
1. Load the
|
|
53
|
-
2.
|
|
54
|
-
3.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
4. Write the model — create the `.forge.js` file(s) following ForgeCAD conventions:
|
|
60
|
-
- Treat the default build profile as `manufacture-realistic prototype`; choose and encode the artifact's manufacturing/process cues before adding styling detail
|
|
61
|
-
- Declare `param()` / `boolParam()` for all tunable dimensions
|
|
62
|
-
- If the model is split across files, use `main.forge.js` as the primary entry point, import renderable parts from neighboring `.forge.js` files, and keep only pure helpers/constants in plain `.js` modules
|
|
63
|
-
- When there are multiple versions of the same object, expose the version as a choice parameter and render one selected version at a time
|
|
64
|
-
- Use clear variable names
|
|
65
|
-
- Build any implied internal structure as real geometry, even when it will be hidden in the final view
|
|
66
|
-
- Build the complete physical artifact first: closed shells, installed covers, real part positions, and all meaningful internal structure in place
|
|
67
|
-
- Make final mating geometry physically plausible: parts may touch, clear each other, or be boolean-joined, but should not unintentionally pass through each other
|
|
68
|
-
- Model the physical artifact, not an educational diagram: no explanatory arrows, floating labels, section labels, legends, or text plaques unless the user explicitly requested a presentation/teaching view
|
|
69
|
-
- Do not make the default returned model a cutaway, sectioned shell, permanently exploded assembly, or hidden-parts teaching view. ForgeCAD gives the user viewer and inspection tools for slicing, exploding, hiding, and looking inside after the real CAD exists.
|
|
70
|
-
- Return the final artifact (single shape, array, named objects array, or `Assembly` for moving mechanisms)
|
|
71
|
-
- For moving assemblies, return the `Assembly` itself whenever possible so Motion controls re-run the real kinematic solve; avoid legacy viewport-only animation APIs for new work unless the user explicitly asks for them
|
|
72
|
-
- Treat `fillet(shape, r)` and `chamfer(shape, r)` as experimental edge treatments: Manifold can produce incorrect results and OCCT can be very slow. Prefer simpler primitive profiles, lower segment counts, targeted edge selectors, and inspection before relying on the result.
|
|
73
|
-
5. Validate — run `forgecad run <file>` to check for errors. For multi-file projects, always validate `main.forge.js`. For moving assemblies, also run representative joint states with `--joint`, including rest/default, mid-travel, both limits, and any coupled or mirrored poses.
|
|
74
|
-
6. Verify geometry — render a multi-angle visual evidence set before final delivery: whole-model context plus agent-chosen orthographic, oblique, underside, or hidden-object views that expose the relevant components and interfaces. Choose camera directions from the model's shape and likely failure modes, not from a fixed recipe. Use those views to look for internals that are accidentally visible, parts that visibly do not fit, floating details, blocked access, missing seats, and unexpected interference. For moving assemblies, render at several joint values with `--joint` so clearance, range, stops, and connected followers are proven in motion, not only at rest. Run `forgecad inspect physical components` when the model has multiple returned objects or visible attachments, run `forgecad debug assembly --fail-on warning` when the script uses `assembly()`, run `forgecad inspect mechanical-integrity <project-or-file> --collisions` before sharing generated mechanical work, and run the targeted `forgecad inspect <family> <mode>` commands that match the task (see Final Acceptance Gate and Render-Verify Loop below). For multi-file projects, render and inspect `main.forge.js`. Collision findings are model work, not FYI: remove unexpected overlaps before delivery.
|
|
75
|
-
7. Iterate from visual and inspection feedback — treat every render and inspection bundle as model evidence, not a checkbox. Read the normal PNGs, manifest, and evidence PNGs; convert each unexpected collision, thin region, missing section detail, wrong component count, floating body, distance gap, confusing object-color result, accidentally exposed internal structure, bad fit, bad joint sweep, unconverged pose, follower drift, or visually unsupported interface into a concrete model edit; then rerun the same targeted evidence pass until the result matches the intended physical component graph.
|
|
76
|
-
|
|
77
|
-
### Manufacturing Process Is Not Assumed
|
|
78
|
-
|
|
79
|
-
Do not interpret every ForgeCAD model as a printable object.
|
|
80
|
-
Choose the manufacturing/process cues that fit the artifact unless the user explicitly asked for a specific process. A manufacture-realistic prototype can be CNC-machined, bent sheet, tube-and-plate, wood/composite, molded-look low-volume, printed, or hybrid; the right answer depends on the load path and operating story.
|
|
81
|
-
|
|
82
|
-
- For rideable products such as scooters, bikes, skateboards, carts, or mobility-adjacent devices, use realistic metal/composite/wood structural members, purchased wheels/bearings/axles/brakes/grips, and standard hardware unless the user asked for a printable toy/model.
|
|
83
|
-
- For furniture and load-bearing structures, consider wood, sheet goods, tube, metal brackets, conventional joinery, and printed parts only where they are honest secondary components.
|
|
84
|
-
- For enclosures, choose injection-molded, sheet-metal, CNC, thermoformed, printed, or hybrid cues based on quantity, ruggedness, serviceability, and the brief.
|
|
85
|
-
- For fixtures and tooling, choose machined, laser-cut, welded, printed, or hybrid construction based on load, repeatability, and shop realism.
|
|
86
|
-
- Use printing-specific features such as slicer clearances, support strategy, layer-oriented ribs, and heat-set inserts only when the selected process includes printed parts.
|
|
87
|
-
|
|
88
|
-
### Physical Artifact, Not Teaching Diagram
|
|
89
|
-
|
|
90
|
-
The deliverable is the object someone would build, assemble, inspect, or export. It is not an educational display model unless the user explicitly asks for one.
|
|
91
|
-
|
|
92
|
-
- Do not add explanatory text labels, arrows, callouts, legends, section-title slabs, exploded labels, coordinate axes, or "this is the motor" plaques to production geometry.
|
|
93
|
-
- Do not use in-model text to make a vague object understandable. If the geometry needs labels to be understood, make the geometry more physically specific instead.
|
|
94
|
-
- Explain part roles through named return objects, clear variable names, comments, BOM entries, docs, and inspection results.
|
|
95
|
-
- Product markings are allowed only when they would exist on the real artifact: serial plates, connector labels, keyboard legends, gauge ticks, warning marks, alignment marks, service arrows, scale marks, branding, or molded icons.
|
|
96
|
-
- Keep real markings sparse and process-appropriate. Prefer simple recessed/raised marks or icons over heavy font geometry, especially on exact/OCCT workflows.
|
|
97
|
-
- If a temporary review view needs annotations, use `Viewport.label()` or a separate debug/presentation mode, not final exported geometry.
|
|
43
|
+
1. **Load the `forgecad` skill** — read at least the Core API reference. Moving parts: also the assembly group and joint-design guide. Mating parts: the positioning guide; default to connectors + `matchTo()`.
|
|
44
|
+
2. `mkdir -p YYYY/MM/DD/[folder]`.
|
|
45
|
+
3. Moving parts: prove the rig first (Kinematics-First below).
|
|
46
|
+
4. Write the model — `param()`/`Param.bool()` for tunable dimensions; pick the manufacturing process before styling; build real internals; follow the contracts below.
|
|
47
|
+
5. Validate — `forgecad run <file>` (`main.forge.js` for multi-file).
|
|
48
|
+
6. Run the Final Acceptance Gate and Manufacturing Outputs checks below on `main.forge.js`.
|
|
49
|
+
7. Iterate — convert every render/inspect finding into a model edit and rerun the same targeted evidence until reality matches the intended component graph.
|
|
98
50
|
|
|
99
|
-
###
|
|
51
|
+
### Process, Style, and Variants
|
|
100
52
|
|
|
101
|
-
|
|
53
|
+
**Manufacturing process is a choice, not an assumption.** Never treat every model as printable. Pick process cues from the load path and operating story: machined, bent sheet, tube-and-plate, wood/composite, molded-look, printed, or hybrid purchased-hardware construction (rideables: metal/composite structure + purchased wheels/bearings; furniture: real joinery). Print-specific features (slicer clearances, heat-set inserts, layer-oriented ribs) only when the process includes printed parts.
|
|
102
54
|
|
|
103
|
-
|
|
104
|
-
- Use bright colors sparingly as small accents for controls, seals, indicators, warnings, or brand-neutral identity lines.
|
|
105
|
-
- Match color to material/process: anodized or powder-coated metal, molded or dyed polymer, rubber/silicone, glass/acrylic, PCB/FR4, wood grain, leather/fabric, and standard hardware should each read differently.
|
|
106
|
-
- Avoid one-note rainbow/neon palettes, random saturated part colors, or color groups that make a serious artifact feel like a toy unless the brief asks for that.
|
|
107
|
-
- If the object normally has user-facing markings, include only the markings that belong on the real artifact: keyboard legends, button labels, gauge ticks, icons, connector labels, alignment marks, service arrows, and scale markings. Do not leave expected production markings blank, but do not add explanatory labels just to teach the model.
|
|
108
|
-
- Use color to clarify part boundaries and serviceability without hiding the engineering stack: seams, fasteners, gaskets, inserts, ports, and purchased components should remain legible.
|
|
55
|
+
**Visual style: expensive and credible, not generically colorful.** Restrained material-driven palette (ivory, charcoal, satin black, brushed aluminum, brass, muted burgundy/green/navy, smoked polymer, natural wood); match color to material/process so metal, polymer, rubber, PCB, and wood read differently. Bright color only as small accents (controls, seals, indicators). Keep seams, fasteners, gaskets, and purchased parts legible.
|
|
109
56
|
|
|
110
|
-
|
|
57
|
+
**Form is part of credibility.** Real products carry deliberate edge treatment — chamfered or rounded profiles where hands, seals, or tooling meet the part, draft on molded faces, consistent proportions and design language across parts. A knife-sharp box reads as a blockout, not a product. Get the rounding from profile-level geometry (rounded sketch corners, chamfered profiles) per the fillet caveat below.
|
|
111
58
|
|
|
112
|
-
|
|
59
|
+
**Variants are parameter-selected.** Sizes/styles/revisions go behind one choice parameter (`Variant`, `Preset`); return only the selected variant. Comparison lineups only behind an explicit debug parameter so they can never pollute collision findings.
|
|
113
60
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Internal Geometry Is Part of the Model
|
|
117
|
-
|
|
118
|
-
If the requested object would have meaningful internal structure in the real artifact, model that structure too. Do not satisfy an enclosure, robot, tool, mechanism, vehicle, appliance, prop, or functional manufactured part with only an exterior shell unless the user explicitly asks for a facade or blockout.
|
|
119
|
-
|
|
120
|
-
Build hidden features as actual geometry:
|
|
121
|
-
|
|
122
|
-
- Internal cavities, wall thickness, ribs, bosses, posts, brackets, ledges, and snap/latch features
|
|
123
|
-
- Screw holes, inserts, bearing seats, axle paths, shaft clearances, and fastener access
|
|
124
|
-
- Electronics volumes, battery bays, servo/motor pockets, wire channels, cable exits, and connector clearances
|
|
125
|
-
- Mechanism clearances, travel envelopes, stops, guides, rails, hinges, gear spaces, and service access
|
|
126
|
-
- Process-specific features such as bends, tubes, sheet-metal flanges, machined bosses, cast ribs, molded draft, weld tabs, laser-cut slots, or print-oriented ribs where appropriate
|
|
61
|
+
### Physical Artifact, Not Teaching Diagram
|
|
127
62
|
|
|
128
|
-
|
|
63
|
+
Deliver the real closed artifact — covers installed, parts in assembled positions. The `forgecad` skill carries the no-labels/no-cutaway rule (no explanatory labels, arrows, or legends in production geometry; never a cutaway, sectioned, or exploded default); it binds here. Markings only when the real artifact has them (serial plates, gauge ticks, molded icons) — sparse, process-appropriate. Explain roles via named return objects and `verify.*`; review annotations go in `Viewport.label()` or a debug mode, never exported geometry.
|
|
129
64
|
|
|
130
|
-
|
|
65
|
+
**Internal geometry is part of the model.** If the real artifact has internals, model them as real geometry even when hidden: cavities, ribs, bosses, screw holes, bearing seats, electronics/battery volumes, wire channels, mechanism clearances and stops. Verify hidden structure with exploration tools — alternate views, `inspect sections`, `--hide`, transparent shells, named ghosts — never by mutilating the returned model.
|
|
131
66
|
|
|
132
67
|
### Kinematics-First for Moving Parts
|
|
133
68
|
|
|
134
|
-
For
|
|
135
|
-
|
|
136
|
-
- Decide the rig shape before geometry: point links for closed-loop skeletons and distance/angle constraints; frames and connector joints for serial rigid parts whose orientation matters.
|
|
137
|
-
- Name every moving degree of freedom and encode its limits/defaults at the rig level. For mirrored revolute axes, make the sign mapping explicit instead of assuming equal values create mirrored poses.
|
|
138
|
-
- Add simple proxy geometry only to expose the rig: pivot markers, bars between links, slider blocks, wheel discs, or frame axes. Use those proxies to verify the mechanism before adding real material.
|
|
139
|
-
- Attach final geometry to solved links, frames, and connectors. A visible arm, cover, wheel, drawer, or follower should move because it is mated to the rig, not because a final `rotate()` or `translate()` happens to make one pose look assembled.
|
|
140
|
-
- Keep the default return as the unsolved `Assembly` when possible. This lets Motion controls and CLI `--joint` overrides re-run the real solve.
|
|
141
|
-
- Put representative pose checks in the script with `verify.*`: convergence, connector origins coinciding, link lengths holding, end effectors reaching their expected points, followers remaining attached, and required running clearances staying positive.
|
|
69
|
+
For any mechanism (linkage, hinge, slider, suspension, gripper, drawer), the rig is the source of truth: build and prove the motion structure first, then attach geometry — never retrofit motion onto finished shells.
|
|
142
70
|
|
|
143
|
-
|
|
71
|
+
- Pick the rig shape before geometry: point-link graphs for closed-loop skeletons with distance/angle constraints; frames and connector joints when part orientation matters (API roster in the assembly docs).
|
|
72
|
+
- Name every degree of freedom; encode limits/defaults at rig level. Mirrored revolute axes need an explicit sign mapping — equal joint values do not automatically mirror poses.
|
|
73
|
+
- Attach proxy geometry only (pivot markers, bars, slider blocks, wheel discs). Run the rig at rest, mid-travel, both limits, and mirrored/coupled poses until the solver, controls, connector alignment, and `verify.*` checks all pass:
|
|
144
74
|
|
|
145
|
-
```bash
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
node dist-cli/forgecad.js render 3d model.forge.js /tmp/model-theta-45.png --joint "theta=45" --camera iso --size 700
|
|
150
|
-
```
|
|
75
|
+
```bash
|
|
76
|
+
forgecad run model.forge.js --joint "theta=45"
|
|
77
|
+
forgecad render 3d model.forge.js /tmp/theta-45.png --joint "theta=45" --camera iso
|
|
78
|
+
```
|
|
151
79
|
|
|
152
|
-
Use
|
|
80
|
+
Use real joint names; repeat `--joint` per control. A pose that fails to solve, clamps unexpectedly, breaks a connector check, or adds a collision means the rig is not ready for final geometry.
|
|
81
|
+
- Only then attach manufacture-real geometry to the solved links, frames, and connectors — never via a final `rotate()` that makes one pose look assembled.
|
|
82
|
+
- Return the unsolved `Assembly` so Motion controls re-run the real solve. Never bake a posed `SolvedAssembly` to make one pose look right.
|
|
83
|
+
- Encode pose checks in-script with `verify.*`: convergence, connector origins coinciding, link lengths holding, end effectors reaching targets, running clearances positive.
|
|
153
84
|
|
|
154
85
|
### Mechanical Assembly Contract
|
|
155
86
|
|
|
156
|
-
|
|
87
|
+
A mechanical script is not done when it merely looks assembled. Every visible piece needs a physical reason to be where it is: fused material, contact faces, a screw stack, a pin in a bore, a tab in a slot, a gasket on a land, a bearing in a seat, a cable in a channel, or a named intentional ghost.
|
|
157
88
|
|
|
158
|
-
-
|
|
159
|
-
-
|
|
160
|
-
- A named
|
|
161
|
-
- Screws are not decoration
|
|
162
|
-
- Handles and levers need a load path
|
|
163
|
-
- Covers, doors, cartridges,
|
|
164
|
-
- Cables, wires,
|
|
165
|
-
- Purchased loose parts may
|
|
166
|
-
- Encode interface intent with `verify.*`, not
|
|
89
|
+
- Bespoke fixed assemblies: build each part in local coordinates, pick one root, place every touching part with `matchTo()`, verify each mate with `verify.connectorDistance`. Final `translate()` calls are not assembly contracts.
|
|
90
|
+
- Manual joint frames (`addFixed`/`addRevolute`/`addPrismatic` with a hand-built `frame:`) are scaffolding, not contracts. Before delivery, convert mating interfaces to connectors with `connect()`/`match()`, or prove the manual joint with `forgecad debug assembly --fail-on warning` and documented geometry.
|
|
91
|
+
- A named part must not contain unintentional disconnected bodies: boolean-join manufactured features, model fasteners/seals as separate named parts, or add the receiving holes/lands that explain the separation.
|
|
92
|
+
- Screws are not decoration: clearance/counterbore in the cover, receiving boss or through stack in the parent, material around both, axes aligned from one shared bolt pattern.
|
|
93
|
+
- Handles and levers need a load path: hub-to-arm neck, pivot pin/bore, thrust shoulders, stops/detents, and the connected follower. A handle tangent to a hub is a failed mechanism.
|
|
94
|
+
- Covers, doors, cartridges, service panels need seats: ledges, gasket grooves, bosses, snap hooks, tabs, or hinge barrels — plus a visible retention story.
|
|
95
|
+
- Cables, wires, tubes need receiving geometry: gland, grommet, clamp, socket, ferrule, routed channel, or hose barb. Never let a cylinder end in open space.
|
|
96
|
+
- Purchased loose parts may stay separate bodies — name them as purchased hardware/consumables and seat them in believable sockets, bores, races, or fastener stacks.
|
|
97
|
+
- Encode interface intent with `verify.*`, not comments: `verify.clearanceBetween` for seated fits and clearance bands, `verify.minClearance`/`verify.notColliding` for keep-out and running gaps, `verify.connectorDistance` for connector mates. Part counts and generic dimensions never prove an interface.
|
|
98
|
+
- No canned finished-object helpers for project-specific assemblies. Reusable vocabulary is primitives, cutters, patterns, and mechanical contracts (`lib.fastenerSet()`, `lib.boltPattern()`, real bores and pockets, connectors + `matchTo()`) — not finished backplates, brackets, or hinge leaves.
|
|
167
99
|
|
|
168
|
-
|
|
100
|
+
Treat `fillet()`/`chamfer()` as experimental (Manifold can be incorrect, OCCT slow); prefer profile-level rounding and inspect before relying on the result.
|
|
169
101
|
|
|
170
|
-
###
|
|
102
|
+
### Imported Parts (User-Supplied 3D Files)
|
|
171
103
|
|
|
172
|
-
|
|
104
|
+
When the user supplies mesh or CAD files to design around (a motor, an off-the-shelf housing, a scanned part), the import IS a component of the assembly — keep it, don't rebuild it parametrically (rebuilding is `forgecad-3d-reconstruction`, a different request).
|
|
173
105
|
|
|
174
|
-
|
|
106
|
+
- Wrap each import in its own part file: `Import.mesh()` for STL/OBJ/3MF, `Import.step()` for STEP (OCCT backend), normalize scale and orientation, recenter to a sane local origin, then treat it exactly like a purchased part — connectors at its real mating features, positioned by the assembly via `matchTo()`.
|
|
107
|
+
- Never trust units. Verify against a known dimension before mating anything: bbox via `forgecad run --details`, or `inspect section --ray` across a bore or face pair. For 3MF, account for every build item printed by `forgecad run` before flattening.
|
|
108
|
+
- Derive mating geometry by measurement, not eyeball: pull bore positions, diameters, and face offsets from sections, then hold them with `verify.clearanceBetween`/`verify.connectorDistance` against the import like any other body. Collision Policy applies to imports too.
|
|
109
|
+
- The import is a purchased/fixed line item; the manufactured deliverables are the ForgeCAD-authored parts around it. Remodel an imported feature only where a boolean against the mesh is unreliable — and say so.
|
|
175
110
|
|
|
176
|
-
|
|
111
|
+
### Collision Policy
|
|
177
112
|
|
|
178
|
-
|
|
113
|
+
Each returned part is real matter. Expected final collision count: **zero**.
|
|
179
114
|
|
|
180
|
-
|
|
115
|
+
- Only exceptions: welded, fused, overmolded, cast-in, potted, or bonded matter — declared with `verify.intentionalOverlap` on the exact visible object pair with the physical reason. The mechanical-integrity gate honors a declaration only when that pair has a confirmed exact collision; unused or non-visible declarations still fail.
|
|
116
|
+
- Never use interpenetration as a placement shortcut. Model contact honestly: pins in holes, shafts in seats, tabs in slots, hinges with knuckle clearance, nested parts with wall offsets, moving parts with travel envelopes.
|
|
117
|
+
- Temporary construction overlaps (oversized cutters before `difference()`, primitives before `union()`, exploratory layouts) must be consumed, hidden, named as ghosts, or isolated with `--focus`/`--hide` so final findings stay meaningful.
|
|
118
|
+
- Collision removal is part of the modeling pass, not optional polish.
|
|
181
119
|
|
|
182
120
|
### Final Acceptance Gate
|
|
183
121
|
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
1. State the intended physical component graph. Decide whether the final artifact should be one connected component, several intentionally separate components, or a selected assembly plus named ghosts. Then run:
|
|
187
|
-
|
|
188
|
-
```bash
|
|
189
|
-
forgecad inspect physical components model.forge.js --camera iso
|
|
190
|
-
```
|
|
191
|
-
|
|
192
|
-
The reported component count must match the design intent. Treat unexpected islands, accidental fusion, or bbox-only "touching" that does not make physical sense as model bugs.
|
|
193
|
-
|
|
194
|
-
If the script uses `assembly()`, also run:
|
|
195
|
-
|
|
196
|
-
```bash
|
|
197
|
-
forgecad debug assembly model.forge.js --fail-on warning
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
Fix warnings about multiple roots, manual joint contracts, disconnected bodies inside parts, unused connectors, solve warnings, and collisions before delivery. If a warning is truly intentional, rename the part or add a short code comment so a reviewer can see the physical reason.
|
|
201
|
-
|
|
202
|
-
For generated mechanical projects or batches, also run:
|
|
203
|
-
|
|
204
|
-
```bash
|
|
205
|
-
forgecad inspect mechanical-integrity . --collisions
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
This is the shareability gate. It fails on missing `verify.*` checks, missing mechanical-interface verification, fragmented named groups, uncontracted manual assemblies, positive-volume object collisions, timeouts, and runtime failures. Do not share a generated mechanical model while this gate is red unless the user explicitly asked for a rough concept/blockout.
|
|
209
|
-
|
|
210
|
-
The model should include at least one verification that proves a mechanical interface, not just object count. Prefer checks such as `verify.clearanceBetween("bearing is seated in pocket", bearing, housing, -0.01, 0.1)`, `verify.minClearance("carriage clears rail", carriage, rail, 0.15)`, `verify.notColliding("cover screw clears parent hole", screw, parent)`, or `verify.connectorDistance("leg connector is seated", bench, "Rail.leg_0", "Leg0.head", 0, 0.01)`.
|
|
211
|
-
|
|
212
|
-
For moving assemblies, this gate is incomplete until the rig has been run through representative control states. Use `--joint` overrides and/or in-script `solve(state)` verification to cover rest/default, mid-travel, physical limits, coupled states, and mirrored-side poses. Each tested pose should keep the solver converged, attached geometry following the rig, and clearances/collisions within the intended mechanical contract.
|
|
213
|
-
|
|
214
|
-
2. Run collision evidence and read both the manifest and images:
|
|
215
|
-
|
|
216
|
-
```bash
|
|
217
|
-
forgecad inspect fit interference model.forge.js /tmp/model-collisions-inspect --camera <collision-evidence-camera> --force --size 700
|
|
218
|
-
jq '.evidence.collisions | {collisionCount, collisions, warnings}' /tmp/model-collisions-inspect/manifest.json
|
|
219
|
-
```
|
|
220
|
-
|
|
221
|
-
`collisionCount` should be zero unless an overlap is deliberately manufactured, fused, welded, overmolded, or isolated with `--focus` / `--hide`. Do not ignore the evidence PNGs; visually inspect where the findings or warnings appear.
|
|
222
|
-
|
|
223
|
-
3. Render risk-specific views, not only a hero shot. Build a small visual evidence set that answers the model's physical questions from more than one direction:
|
|
122
|
+
Prove technical validity and visual plausibility before declaring done. Apply to any model with multiple bodies, surface details, cables, rails, handles, product skins, or hidden mating geometry.
|
|
224
123
|
|
|
225
|
-
|
|
226
|
-
-
|
|
227
|
-
-
|
|
228
|
-
-
|
|
229
|
-
-
|
|
124
|
+
1. **State the intended physical component graph** — one connected component, several intentionally separate, or a selected assembly plus named ghosts — then run `forgecad inspect physical components` and require the count to match. Unexpected islands, accidental fusion, or bbox-only "touching" are model bugs.
|
|
125
|
+
- Scripts using `assembly()`: `forgecad debug assembly model.forge.js --fail-on warning`. Fix warnings (multiple roots, manual joint contracts, disconnected bodies, unused connectors, collisions); a truly intentional one gets a visible reason in code.
|
|
126
|
+
- Generated mechanical work: `forgecad inspect mechanical-integrity . --collisions` is the shareability gate — it fails on missing `verify.*` interface checks, fragmented named groups, uncontracted manual assemblies, positive-volume collisions, timeouts, runtime failures. Do not share while red unless the user asked for a blockout.
|
|
127
|
+
- Include at least one verification that proves a mechanical interface (clearance band, keep-out, connector mate), not just object counts.
|
|
128
|
+
- Moving assemblies: incomplete until poses cover rest, mid-travel, both limits, coupled and mirrored states via `--joint` and/or in-script `solve(state)` checks, with convergence, attachment, and clearances holding at every pose.
|
|
129
|
+
2. **Collision evidence**: run `forgecad inspect fit interference`; read the manifest collision count AND the evidence PNGs. Zero unexpected findings per Collision Policy; visually confirm where any findings appear.
|
|
130
|
+
3. **Risk-specific views, not just a hero shot.** Delivery renders use the model's `scene()` rig (Scene Presentation below) — default flat lighting in a final render is a finding. One whole-model context view plus views chosen from this object's failure modes — opposing, underside, interior-facing, or grazing angles that catch internals showing through openings, covers that don't close, bad boolean cuts. Per meaningful interface: one contextual and one focused/isolated view. Risk prompts:
|
|
131
|
+
- long products, rails, handles, tools: views along and across the dominant length (bends, sag, end attachments)
|
|
132
|
+
- enclosures/shells with internals: exterior plus hidden-cover views (fit, concealment, service access)
|
|
133
|
+
- sockets, underside joins, stands, brackets: look directly into the mating face or underside; `inspect sections` for hidden geometry
|
|
134
|
+
- cables, strings, belts, tubes: both endpoints, route clearance, sag, termination hardware
|
|
135
|
+
- surface details on curved ProductSkin bodies: grazing and contextual views proving details conform or embed
|
|
136
|
+
4. **Visual attachment audit.** For every detail that should be connected, ask "where does this physically enter, seat, wrap, terminate, or fasten?" and check that view directly. Known failures to fix before delivery:
|
|
137
|
+
- a flat rail or bed sitting on a curved shell instead of being recessed, saddled, socketed, or blended in
|
|
138
|
+
- strings/cables passing through space without knots, hooks, holes, posts, ferrules, pulleys, or anchors
|
|
139
|
+
- trim lines floating above the body instead of following the surface or being inset/raised strips with real thickness
|
|
140
|
+
- handles/grips touching only by a tangent instead of having a neck, bridge, socket, screws, or overmolded landing
|
|
141
|
+
- small hardware/gems that are bbox-connected but visually levitate; give them flush/inset seats or explicit brackets
|
|
142
|
+
5. **ProductSkin honesty.** Boolean-test warnings from sampled-loft boundary edges are not real collisions. Deliver only if the collision count is clean, connectivity is correct, and the attachment audit passes; mention the residual warning in the final response.
|
|
143
|
+
6. **Name the evidence** in the final response: commands run, views checked, joint values tested, focus/hide filters, component count, collision count, residual warnings or intentional exceptions. Never just say "validated."
|
|
230
144
|
|
|
231
|
-
|
|
145
|
+
### Manufacturing Outputs
|
|
232
146
|
|
|
233
|
-
|
|
234
|
-
- enclosures, shells, covers, and products with internals: choose exterior and hidden-cover views that reveal whether internal structures fit, stay hidden when they should, and leave service access
|
|
235
|
-
- sockets, underside joins, stands, brackets, and handles: choose views that look directly into the mating face or underside; use `inspect sections at|stack|sample` when hidden geometry must be checked
|
|
236
|
-
- cables, strings, belts, tubes, and hoses: choose views that show both endpoints, route clearance, sag, and termination hardware
|
|
237
|
-
- surface details on curved ProductSkin bodies: choose grazing and contextual views that prove details conform or are embedded as intended
|
|
147
|
+
A manufacture-realistic model must yield a package a shop can consume, not just a clean viewport.
|
|
238
148
|
|
|
239
|
-
|
|
149
|
+
- Register every purchased and fabricated part with `bom()` (exact spec, quantity, purpose) so the BOM lives in the model — `forgecad export report` must reproduce it without prose supplements.
|
|
150
|
+
- Put `dim()` annotations on the dimensions a builder must hit: overall envelope, critical interfaces, mating bores and bolt patterns.
|
|
151
|
+
- Prove the process-appropriate export runs cleanly and name the output path in the final response: `export stl`/`export 3mf` for printed parts; `export step` for machined parts and CAD interchange; sheet-metal parts must unfold to a valid flat pattern (`export cutting-layout` for sheet goods). `step`, `report`, and `cutting-layout` need a Production license — if unavailable, run the free exports and name the gated commands that complete the package instead of failing.
|
|
152
|
+
- An export failure (non-manifold body, open shell, fused multi-part blob where one fabricated part was expected) is a model bug, not an export problem.
|
|
240
153
|
|
|
241
|
-
|
|
242
|
-
- strings/cables that pass through space without terminal knots, hooks, holes, posts, ferrules, pulleys, or anchors
|
|
243
|
-
- decorative brass/trim lines floating above the body instead of following a ProductSkin surface or being built as inset/raised strips with believable thickness
|
|
244
|
-
- handles/grips touching only by a tangent or thin face instead of having a neck, bridge, socket, screws, or overmolded landing
|
|
245
|
-
- small hardware or gems that are bbox-connected but visually read as levitating; replace with flush/inset seats or explicit brackets
|
|
154
|
+
### Render and Inspect Cadence
|
|
246
155
|
|
|
247
|
-
|
|
156
|
+
**You are building blind unless you render.** `forgecad run` passing only means the code didn't crash — it cannot tell you a hole is misplaced, a rib pokes through a cover, or a part doesn't fit. Render from angles chosen for the model's actual geometry and read every PNG. For command syntax, evidence selection, and manifest reading, use the `forgecad-render-inspect` skill and the CLI docs — this skill fixes only the cadence and the gates.
|
|
248
157
|
|
|
249
|
-
|
|
158
|
+
Render after every feature addition, boolean cut, symmetric copy placement, and the last feature. Inspect after adding hidden geometry a surface render cannot prove, after adding or moving mating parts, ghosts, connectors, thin walls, or screw holes, and before delivery with thresholds set for the material/process.
|
|
250
159
|
|
|
251
|
-
|
|
160
|
+
**Keep inspection scenes small.** Return one selected configuration; include only the parts needed to prove the current risk (if a check concerns three objects, inspect those three, not the whole shop floor); prefer `--focus`/`--hide` and parameter-selected diagnostic modes over permanent extra objects; collapse proven subassemblies into fewer named objects where identity doesn't matter for collisions, masks, or contracts. If you cannot hold the scene in your head, you cannot debug it honestly.
|
|
252
161
|
|
|
253
|
-
|
|
162
|
+
**Ghost parts for fit checks.** When a part holds or contains another object, render both with the contained object as a compact transparent named ghost — e.g. a `box()` at the seat position with `.color('#ff4444').material({ opacity: 0.4 })`, returned as `{ name: 'Servo Ghost', shape: ghost }`.
|
|
254
163
|
|
|
255
|
-
|
|
164
|
+
Use `verify.*` for dimensions and clearances that decide acceptance; `console.log()` only for explanatory traces (shown under "Script output:" in `forgecad run`).
|
|
256
165
|
|
|
257
|
-
|
|
258
|
-
# Render from multiple agent-chosen angles; do not stop at one hero view.
|
|
259
|
-
node dist-cli/forgecad.js render model.forge.js /tmp/preview.png \
|
|
260
|
-
--camera <context-az:el> \
|
|
261
|
-
--camera <failure-mode-az:el> \
|
|
262
|
-
--camera <interface-az:el> \
|
|
263
|
-
--size 600
|
|
166
|
+
### Build Bottom-Up
|
|
264
167
|
|
|
265
|
-
|
|
266
|
-
# Choose camera directions that prove or disprove the physical questions in this model.
|
|
267
|
-
# Good evidence sets usually include a context view plus views aimed at hidden internals,
|
|
268
|
-
# underside joins, mating faces, routed paths, thin walls, or surface attachments.
|
|
269
|
-
```
|
|
270
|
-
|
|
271
|
-
Then read the PNG(s) to inspect visually. Single camera → single file. Multiple cameras → suffixed files (`_az45_el25.png`). If any angle reveals internal geometry where the outside should be closed, a cover that does not seat, a hidden part that cannot fit, or a detail that floats/intersects, edit the model and rerender the same angles.
|
|
272
|
-
|
|
273
|
-
#### Focused visual evidence
|
|
274
|
-
|
|
275
|
-
Use focused and hidden-object renders to collect evidence from the parts a normal hero shot hides. The goal is to answer specific physical questions: "is the cover seated?", "does the cable enter a gland?", "are the screws aligned with bosses?", "does the bracket actually touch the frame?"
|
|
276
|
-
|
|
277
|
-
```bash
|
|
278
|
-
# Isolate the target subsystem from several angles.
|
|
279
|
-
node dist-cli/forgecad.js render model.forge.js /tmp/model-cover-stack.png \
|
|
280
|
-
--focus "Cover,Screws,Gasket,Bosses" \
|
|
281
|
-
--camera <subsystem-context-az:el> \
|
|
282
|
-
--camera <seating-interface-az:el> \
|
|
283
|
-
--camera <fastener-axis-az:el> \
|
|
284
|
-
--size 700
|
|
285
|
-
|
|
286
|
-
# Hide exterior clutter to inspect the installed internals in context.
|
|
287
|
-
node dist-cli/forgecad.js render model.forge.js /tmp/model-internals.png \
|
|
288
|
-
--hide "Outer Shell,Top Cover" \
|
|
289
|
-
--camera <internal-context-az:el> \
|
|
290
|
-
--camera <clearance-path-az:el> \
|
|
291
|
-
--camera <underside-or-access-az:el> \
|
|
292
|
-
--size 700
|
|
293
|
-
```
|
|
294
|
-
|
|
295
|
-
For important components, collect both:
|
|
296
|
-
|
|
297
|
-
- Context view — neighbors present, proving the part belongs in the final assembly.
|
|
298
|
-
- Focus view — only the relevant objects visible, making small gaps, intersections, missing seats, and floating parts easy to see.
|
|
299
|
-
|
|
300
|
-
Prefer CLI `--focus` / `--hide` filters, named views, or parameter-selected diagnostic modes over changing production geometry. Use the object paths from `node dist-cli/forgecad.js ls model.forge.js --tree` when you are unsure what the filters should target.
|
|
301
|
-
|
|
302
|
-
#### Structured inspection bundles
|
|
303
|
-
|
|
304
|
-
After the normal PNG render, run targeted `forgecad inspect <family> <mode>` commands and read both the evidence PNGs and `manifest.json`. Keep inspection bundles targeted to the current risk; for any multi-part final build, `inspect fit interference` is mandatory:
|
|
305
|
-
|
|
306
|
-
```bash
|
|
307
|
-
forgecad inspect fit interference model.forge.js /tmp/model-collisions-inspect --camera <collision-evidence-camera> --force --size 700
|
|
308
|
-
```
|
|
309
|
-
|
|
310
|
-
#### Inspection feedback loop
|
|
311
|
-
|
|
312
|
-
Use inspections as the repair loop for the model:
|
|
313
|
-
|
|
314
|
-
1. Ask one physical question before each bundle: "what evidence would prove this model is wrong?"
|
|
315
|
-
2. Run the smallest inspection command that can answer it. Add `inspect visual image` or `inspect visual objects` alongside the risk evidence when you need visual context or object-color lookup.
|
|
316
|
-
3. Read `manifest.json` first for counts, pairs, thresholds, filters, object mappings, and warnings.
|
|
317
|
-
4. Read the evidence PNGs next, using `inspect visual image` and `inspect visual objects` outputs to locate findings in the real geometry when needed.
|
|
318
|
-
5. Convert findings into model edits:
|
|
319
|
-
- `collisions`: add real receiving geometry, holes, seats, clearance, connectors, or `verify.intentionalOverlap(...)` for true fused/overmolded/bonded matter only.
|
|
320
|
-
- `thickness`: change wall, rib, boss, shell, slot, or process dimensions; set material/process thresholds before accepting the result.
|
|
321
|
-
- `sections`: add or repair the hidden cavity, screw path, pocket, cable route, captured part, or internal support the slice exposed.
|
|
322
|
-
- `connectivity`, `floating`, and `distance`: fix disconnected islands, accidental fusion, unsupported bodies, or surprising gaps in the component graph.
|
|
323
|
-
- `objects`, `depth`, `normals`, and `zebra`: fix missing objects, confusing object identity, flipped/odd surfaces, faceting, protrusions, and bad surface continuity.
|
|
324
|
-
6. Rerun the same targeted evidence command after the edit so the before/after evidence is comparable. Add a second evidence command only when the repaired area creates a new risk.
|
|
325
|
-
|
|
326
|
-
#### Keep CLI inspection scenes small
|
|
327
|
-
|
|
328
|
-
When using CLI inspection commands, make the scene as few returned/named objects as the requirement allows. The goal is not to hide required geometry; it is to keep the evidence small enough that the agent can reason about it properly.
|
|
329
|
-
|
|
330
|
-
- Return one selected configuration, not every variant, option bundle, or debug lineup.
|
|
331
|
-
- Include only the parts, ghosts, and fixtures needed to prove the current risk. If a collision, clearance, thickness, or section check concerns three objects, inspect those three objects instead of the whole shop floor.
|
|
332
|
-
- Prefer `--focus` / `--hide` and parameter-selected diagnostic modes over adding permanent extra objects to the default scene.
|
|
333
|
-
- Collapse decorative or already-proven subassemblies into fewer named objects when their internal boundaries are irrelevant to the inspection. Keep separate names only where object identity matters for collisions, masks, clearances, BOM roles, or mechanical contracts.
|
|
334
|
-
|
|
335
|
-
Small inspection scenes make `manifest.json`, mask colors, collision pairs, component counts, and section images cognitively tractable. If the agent cannot hold the scene in its head, it cannot debug the model honestly.
|
|
336
|
-
|
|
337
|
-
For faster iteration, request the evidence that matches the current risk:
|
|
338
|
-
|
|
339
|
-
- `inspect fit interference` — final multi-part assemblies, fixtures, enclosures, ghost fit checks, moving clearances, and any parts intended to touch without overlapping. Visually inspect this evidence; do not rely only on the count.
|
|
340
|
-
- `inspect manufacture thickness` — printed shells, sheet metal, molded walls, ribs, bosses, holes, snap fits, slots, brackets, and any feature where thin walls can fail. Set thresholds for the selected material/process instead of blindly accepting defaults.
|
|
341
|
-
- `inspect sections at|stack|sample` — hidden internals, cavities, wire channels, pockets, screw paths, captured components, and anything a surface render cannot show.
|
|
342
|
-
- `inspect physical components` — parts that should be one connected solid, parts that should remain separate, and assemblies where floating or accidentally fused bodies matter.
|
|
343
|
-
- `inspect physical floating` and `inspect physical gaps` — loose bodies, unsupported bodies, or surprising gaps in the component graph.
|
|
344
|
-
- `inspect visual objects` — object identity, missing named parts, duplicate geometry, hidden mocks, and color/name confusion.
|
|
345
|
-
- `inspect visual depth` / `inspect visual normals` / `inspect surface zebra` — occlusion, orientation, flipped surfaces, odd protrusions, faceting, and surface continuity.
|
|
346
|
-
- `inspect visual image` — the human-readable view that keeps structured evidence grounded.
|
|
347
|
-
|
|
348
|
-
Useful manifest checks:
|
|
349
|
-
|
|
350
|
-
```bash
|
|
351
|
-
jq '.evidence.collisions | {collisionCount, collisions, warnings}' /tmp/model-inspect/manifest.json
|
|
352
|
-
jq '.evidence.thickness.objects[] | {name, minThickness, p05Thickness, criticalAreaPercent, warningAreaPercent, unresolvedAreaPercent}' /tmp/model-inspect/manifest.json
|
|
353
|
-
jq '.evidence.connectivity | {componentCount, edges, warnings}' /tmp/model-inspect/manifest.json
|
|
354
|
-
```
|
|
355
|
-
|
|
356
|
-
Treat unexpected collision findings, critical thin regions, high unresolved thickness, missing sections, or wrong component counts as model bugs. If an overlap is intentional, make that explicit in the model or isolate the inspection with `--focus` / `--hide` so the remaining findings are meaningful:
|
|
357
|
-
|
|
358
|
-
```bash
|
|
359
|
-
forgecad inspect fit interference model.forge.js /tmp/model-fit-collisions --focus "Bracket,Screw Ghost" --camera <fit-evidence-camera> --force
|
|
360
|
-
forgecad inspect sections sample model.forge.js /tmp/model-fit-sections --plane yz --count 5 --focus "Bracket,Screw Ghost" --force
|
|
361
|
-
forgecad inspect manufacture thickness model.forge.js /tmp/model-thickness --min 1.6 --warn 2.4 --camera <thickness-evidence-camera> --force
|
|
362
|
-
```
|
|
168
|
+
You cannot target a complex model in one pass. Decompose, solve the smallest piece, verify, compose upward:
|
|
363
169
|
|
|
364
|
-
|
|
170
|
+
1. **Decompose** into the smallest parts you can reason about confidently. A gear is not small — a single tooth profile is.
|
|
171
|
+
2. **Solve one piece** in isolation: own variables, own return, no connection logic yet.
|
|
172
|
+
3. **Verify it**: `forgecad run`, then render and read the PNG. Fix while the scope is tiny.
|
|
173
|
+
4. **Compose one layer at a time**, verifying at each level so a break is always at the newest seam.
|
|
365
174
|
|
|
366
|
-
|
|
367
|
-
- After any boolean subtraction that creates a hole/pocket
|
|
368
|
-
- After placing symmetric copies (to check symmetry)
|
|
369
|
-
- After adding the last feature (final check)
|
|
370
|
-
|
|
371
|
-
#### When to inspect
|
|
372
|
-
|
|
373
|
-
- After adding hidden/internal geometry that a surface render cannot prove
|
|
374
|
-
- After adding or moving mating parts, ghosts, connectors, holes, pockets, or clearances
|
|
375
|
-
- After adding thin walls, ribs, slots, snap features, bosses, or screw holes
|
|
376
|
-
- Before final delivery, with the evidence that matches the remaining risks, and with thresholds appropriate to the model
|
|
377
|
-
|
|
378
|
-
#### Ghost parts for fit verification
|
|
379
|
-
|
|
380
|
-
When building a part that holds/contains another object (enclosure, mount, bracket), render both together with the contained object transparent:
|
|
381
|
-
|
|
382
|
-
```js
|
|
383
|
-
// Ghost servo for visual fit check
|
|
384
|
-
const ghost = box(servoW, servoD, servoH)
|
|
385
|
-
.placeReference('center', [0, 0, wallThick])
|
|
386
|
-
.color('#ff4444').material({ opacity: 0.4 });
|
|
387
|
-
|
|
388
|
-
return [
|
|
389
|
-
{ name: 'Mount', shape: mount.color('#556B2F') },
|
|
390
|
-
{ name: 'Servo Ghost', shape: ghost },
|
|
391
|
-
];
|
|
392
|
-
```
|
|
393
|
-
|
|
394
|
-
This immediately reveals: does it fit? Does it collide with walls? Does the shaft clear the opening?
|
|
395
|
-
|
|
396
|
-
#### Use verify for acceptance, console.log for traces
|
|
397
|
-
|
|
398
|
-
Use `verify.*` for dimensions and clearances that decide whether the model is acceptable. Use `console.log()` only for explanatory traces that help you read the run output.
|
|
399
|
-
|
|
400
|
-
```js
|
|
401
|
-
verify.greaterThan("wall remains around slot", (outerW - slotW) / 2, 1.6);
|
|
402
|
-
verify.greaterThan("hole clears flange edge", flangeW / 2 - holeX - holeDia / 2, 2.0);
|
|
403
|
-
console.log("wall remaining:", ((outerW - slotW) / 2).toFixed(1));
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
Output appears under "Script output:" in `forgecad run`.
|
|
407
|
-
|
|
408
|
-
#### Self-inspecting shared constants
|
|
409
|
-
|
|
410
|
-
For multi-file projects with a shared constants file (e.g. `shared-dims.js`), add a summary block that prints all computed values when the file is run directly. This replaces one-off throwaway debug scripts.
|
|
411
|
-
|
|
412
|
-
```js
|
|
413
|
-
// At the bottom of shared-dims.js:
|
|
414
|
-
if (require.main === module) {
|
|
415
|
-
console.log('=== SERVO ===');
|
|
416
|
-
console.log(' body:', servo.bodyW, '×', servo.bodyD, '×', servo.bodyH, 'mm');
|
|
417
|
-
// ... all computed dimensions, clearance checks, etc.
|
|
418
|
-
console.log('✓ All validations passed.');
|
|
419
|
-
}
|
|
420
|
-
```
|
|
421
|
-
|
|
422
|
-
Run with `node shared-dims.js` to see the full dimension summary. Don't write throwaway `node -e "require(...)..."` scripts — put the inspection logic in the source file itself where it stays up to date automatically.
|
|
423
|
-
|
|
424
|
-
### ForgeCAD Quick Reference
|
|
425
|
-
|
|
426
|
-
The `forgecad` skill has full API docs.
|
|
427
|
-
|
|
428
|
-
Key primitives:
|
|
429
|
-
|
|
430
|
-
- `box(x, y, z)`, `cylinder(h, r, rTop?, segments?)`, `sphere(r)`, `torus(R, r)`
|
|
431
|
-
- `union()`, `difference()`, `intersection()`
|
|
432
|
-
- `.fillet()`, `.chamfer()` for experimental edge treatments only
|
|
433
|
-
- `param(name, default, opts)`, `boolParam(name, default)`
|
|
434
|
-
- Return `[{ name, shape, color }]` for multi-part colored models
|
|
435
|
-
|
|
436
|
-
Primitive placement convention:
|
|
437
|
-
|
|
438
|
-
- `box()` and `cylinder()` are centered in X/Y and sit on `z=0`.
|
|
439
|
-
- `sphere()` and `torus()` are centered in X/Y/Z.
|
|
440
|
-
- Use `.placeReference('center', [0, 0, 0])` when a box or cylinder should be centered around the origin.
|
|
441
|
-
- Do not pass `center: true` or a positional `true` to primitives; that is stale OpenSCAD-style guidance.
|
|
442
|
-
|
|
443
|
-
Key composition tools:
|
|
444
|
-
|
|
445
|
-
- Connectors + `matchTo()` for parts that should touch in the final model
|
|
446
|
-
- `assembly()` link graphs, frames, and connector joints for moving mechanisms
|
|
447
|
-
- `group()` for local-coordinate subassemblies
|
|
448
|
-
- `attachTo()` for quick bounding-box placement
|
|
449
|
-
- `.translate()` / `.rotate()` for free offsets or bridging computed locations, not as the default assembly contract
|
|
450
|
-
|
|
451
|
-
### Managing Complexity: Build Bottom-Up
|
|
452
|
-
|
|
453
|
-
You cannot target a complex model directly. A chess set, a mechanical assembly, an articulated figure — if you try to write the whole thing in one pass, you will get lost in coordinate math, produce subtle geometry bugs, and waste cycles debugging a tangled script.
|
|
454
|
-
|
|
455
|
-
Instead, do what engineers do: decompose, solve the smallest piece, verify, then compose upward.
|
|
456
|
-
|
|
457
|
-
#### The process
|
|
458
|
-
|
|
459
|
-
1. Decompose — Break the model into the smallest independent parts you can reason about confidently. A "gear" is not a small part — a single tooth profile is. A "house" is not small — a wall panel with a window cutout is.
|
|
460
|
-
|
|
461
|
-
2. Solve the smallest piece — Write the geometry for one part. Keep it isolated: its own variables, its own return statement. Don't think about how it connects to the rest yet.
|
|
462
|
-
|
|
463
|
-
3. Verify — Run `forgecad run` to check for errors, then `forgecad render` to actually see the shape. Read the rendered PNG. Does it match your intent? Are holes where they should be? Are walls thick enough? Fix it now while the scope is tiny. `forgecad run` passing does not mean the geometry is correct — it only means the code didn't crash.
|
|
464
|
-
|
|
465
|
-
4. Compose upward — Once a piece is verified, combine it with the next piece. Verify again. Each level of assembly should be independently checkable.
|
|
466
|
-
|
|
467
|
-
5. Repeat — Keep climbing. Each step adds one layer of complexity on top of verified foundations. If something breaks, you know it's in the new layer, not buried three levels deep.
|
|
468
|
-
|
|
469
|
-
#### Why this matters
|
|
470
|
-
|
|
471
|
-
- Debugging is local. When a verified piece breaks after composition, the bug is at the seam, not inside the piece.
|
|
472
|
-
- You avoid coordinate chaos. Small pieces use simple local coordinates. Transforms and placements happen at composition time, one layer at a time.
|
|
473
|
-
- Iteration is cheap. Changing a tooth profile doesn't require re-reading 200 lines of gear assembly code.
|
|
474
|
-
|
|
475
|
-
#### In practice
|
|
476
|
-
|
|
477
|
-
For a model with more than ~3 distinct geometric features, explicitly plan the decomposition before writing any geometry. Write each piece as a function or variable block, verify it, then combine. Do not skip verification steps to "save time" — it costs more time in the end.
|
|
175
|
+
For any model with more than ~3 distinct geometric features, plan the decomposition explicitly before writing geometry.
|
|
478
176
|
|
|
479
177
|
### Scene Presentation
|
|
480
178
|
|
|
481
|
-
Always set up
|
|
482
|
-
|
|
483
|
-
#### Minimum scene setup
|
|
484
|
-
|
|
485
|
-
Every model should have at least:
|
|
486
|
-
|
|
487
|
-
```js
|
|
488
|
-
scene({
|
|
489
|
-
background: { top: '#1a1a2e', bottom: '#0a0a14' },
|
|
490
|
-
camera: { position: [x, y, z], target: [0, 0, 0], fov: 42 },
|
|
491
|
-
environment: { preset: 'studio', intensity: 0.6 },
|
|
492
|
-
lights: [
|
|
493
|
-
{ type: 'ambient', color: '#c8cdd4', intensity: 0.15 },
|
|
494
|
-
{ type: 'directional', position: [80, -60, 120], target: [0, 0, 0], color: '#fff4e0', intensity: 1.8, castShadow: true },
|
|
495
|
-
{ type: 'directional', position: [-60, 40, 80], target: [0, 0, 0], color: '#b0c4de', intensity: 0.7 },
|
|
496
|
-
],
|
|
497
|
-
ground: { visible: true, color: '#111118', height: -10, receiveShadow: true },
|
|
498
|
-
postProcessing: {
|
|
499
|
-
bloom: { intensity: 0.3, threshold: 0.85, radius: 0.3 },
|
|
500
|
-
vignette: { darkness: 0.5, offset: 0.4 },
|
|
501
|
-
toneMappingExposure: 1.3,
|
|
502
|
-
},
|
|
503
|
-
});
|
|
504
|
-
```
|
|
505
|
-
|
|
506
|
-
#### Named render views
|
|
507
|
-
|
|
508
|
-
For models that need repeatable review, docs, or hero renders, declare named views inside
|
|
509
|
-
`scene({ views })`. The canonical form wraps each camera in `{ camera: ... }`; direct camera
|
|
510
|
-
shorthand is accepted by the runtime, but the wrapped form is the clearest prompt/example shape.
|
|
511
|
-
|
|
512
|
-
```js
|
|
513
|
-
scene({
|
|
514
|
-
camera: { position: [430, -540, 340], target: [0, 30, 125], fov: 38 },
|
|
515
|
-
views: {
|
|
516
|
-
hero: {
|
|
517
|
-
camera: { position: [430, -540, 340], target: [0, 30, 125], up: [0, 0, 1], fov: 38 },
|
|
518
|
-
},
|
|
519
|
-
side: {
|
|
520
|
-
camera: { position: [700, 0, 180], target: [0, 30, 100], up: [0, 0, 1], fov: 32 },
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
});
|
|
524
|
-
```
|
|
525
|
-
|
|
526
|
-
Render one later with:
|
|
527
|
-
|
|
528
|
-
```bash
|
|
529
|
-
forgecad render 3d model.forge.js --view hero
|
|
530
|
-
```
|
|
531
|
-
|
|
532
|
-
#### Lighting principles
|
|
533
|
-
|
|
534
|
-
- When `lights` is set, all defaults are replaced, so always include an ambient light or the scene goes black.
|
|
535
|
-
- Use a 3-point setup at minimum: ambient fill + warm key light (with `castShadow: true`) + cool rim/back light for edge separation.
|
|
536
|
-
- Add accent point lights near focal features (e.g. a gold crown, a polished surface) for highlights.
|
|
537
|
-
- Use `distance` and `decay` on point lights to keep them localized.
|
|
538
|
-
|
|
539
|
-
#### Adapt to the model
|
|
540
|
-
|
|
541
|
-
- Metallic/jewelry models: `studio` environment, higher `toneMappingExposure` (1.2–1.5), subtle bloom for specular highlights.
|
|
542
|
-
- Organic/wood/matte models: `warehouse` or `apartment` environment, lower bloom, warmer ambient.
|
|
543
|
-
- Mechanical/industrial models: `warehouse` environment, stronger directional lights, minimal bloom.
|
|
544
|
-
- Dark/dramatic models: dark gradient background, `night` environment, bloom + vignette for mood.
|
|
545
|
-
|
|
546
|
-
#### Matte industrial hero-shot recipe
|
|
547
|
-
|
|
548
|
-
For mechanisms, tools, product prototypes, vehicles, and other industrial showpieces, prefer a matte studio look over glossy or atmospheric drama:
|
|
549
|
-
|
|
550
|
-
```js
|
|
551
|
-
scene({
|
|
552
|
-
background: { top: '#c3ccd7', bottom: '#566474' },
|
|
553
|
-
camera: { position: [430, -540, 340], target: [0, 30, 125], fov: 38 },
|
|
554
|
-
environment: { preset: 'studio', intensity: 0.15 - 0.25, background: false },
|
|
555
|
-
lights: [
|
|
556
|
-
{ type: 'ambient', color: '#efe7dc', intensity: 0.12 - 0.2 },
|
|
557
|
-
{ type: 'directional', position: [260, -320, 420], color: '#ffe2bf', intensity: 2.6 - 3.2, castShadow: true },
|
|
558
|
-
{ type: 'directional', position: [-260, 210, 220], color: '#d4e6fb', intensity: 0.7 - 1.0 },
|
|
559
|
-
{ type: 'hemisphere', skyColor: '#c7d3df', groundColor: '#495463', intensity: 0.1 - 0.2 },
|
|
560
|
-
],
|
|
561
|
-
postProcessing: {
|
|
562
|
-
bloom: { intensity: 0.0 - 0.06, threshold: 0.92 - 0.96, radius: 0.25 - 0.3 },
|
|
563
|
-
vignette: { darkness: 0.35 - 0.45, offset: 0.3 - 0.35 },
|
|
564
|
-
toneMappingExposure: 1.05 - 1.18,
|
|
565
|
-
},
|
|
566
|
-
});
|
|
567
|
-
```
|
|
568
|
-
|
|
569
|
-
Use a simple plinth or stage under the model, and make it intentionally matte too:
|
|
570
|
-
|
|
571
|
-
```js
|
|
572
|
-
const stage = cylinder(16, 226)
|
|
573
|
-
.translate(0, 0, -26)
|
|
574
|
-
.color('#8b97a4')
|
|
575
|
-
.material({ metalness: 0.04, roughness: 0.78 });
|
|
576
|
-
|
|
577
|
-
mock(stage, 'StudioPlinth');
|
|
578
|
-
```
|
|
579
|
-
|
|
580
|
-
What worked well in practice:
|
|
581
|
-
|
|
582
|
-
- Keep `environment.intensity` low. High environment fill kills shadows and makes everything look washed out.
|
|
583
|
-
- Let one warm directional key light do most of the shaping. Add only a weaker cool fill/rim for separation.
|
|
584
|
-
- Prefer roughness over fog for softness. Fog flattens the model and hides form; matte materials preserve shadow definition.
|
|
585
|
-
- Keep bloom extremely low for mechanical scenes. A little is fine; too much makes manufactured parts feel toy-like or overly glossy.
|
|
586
|
-
- If the render is close but not perfect, change `toneMappingExposure` by about `0.05` first before redoing the whole lighting rig.
|
|
587
|
-
- Avoid large ambient-light jumps. They brighten fast and remove contrast faster than expected.
|
|
588
|
-
|
|
589
|
-
#### Ground plane
|
|
590
|
-
|
|
591
|
-
Enable `ground` with `receiveShadow: true` for models that benefit from visual grounding (furniture, vehicles, standalone objects). Skip it for floating/abstract geometry.
|
|
592
|
-
|
|
593
|
-
#### Camera
|
|
594
|
-
|
|
595
|
-
- Position the camera at a 3/4 angle (not dead-on axis) for natural perspective.
|
|
596
|
-
- Use `fov` 35–50 for most models. Lower FOV = more telephoto/flatter, higher = more dramatic perspective.
|
|
597
|
-
- Set `target` to the visual center of mass, not necessarily `[0,0,0]`.
|
|
598
|
-
|
|
599
|
-
### Tips
|
|
179
|
+
Always set up `scene()` — default lighting looks flat. Worked recipes (studio and matte-industrial setups, named views, plinth) live in `guides/scene-presentation.md` via the `forgecad` skill; the schema is in the viewport docs. Hard-won cliffs:
|
|
600
180
|
|
|
601
|
-
-
|
|
602
|
-
-
|
|
603
|
-
-
|
|
604
|
-
-
|
|
605
|
-
-
|
|
606
|
-
-
|
|
181
|
+
- Setting `lights` replaces ALL defaults — always include an ambient light or the scene goes black.
|
|
182
|
+
- Minimum rig: ambient fill + one warm key (`castShadow: true`) + weaker cool fill/rim. Keep `environment.intensity` low — environment fill kills shadows.
|
|
183
|
+
- Prefer roughness over fog for softness; keep bloom near zero for mechanical parts or they read toy-like.
|
|
184
|
+
- If a render is close, nudge `toneMappingExposure` by ~0.05 before redoing the rig; avoid big ambient jumps.
|
|
185
|
+
- Camera: 3/4 angle, `fov` 35–50, `target` at the visual center of mass. Ground plane with shadows for grounded objects.
|
|
186
|
+
- Environment by type: `studio` for metallic/jewelry, `warehouse`/`apartment` for organic/matte, `warehouse` + strong directionals for mechanical, `night` + bloom/vignette for dramatic.
|