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-component-model/SKILL.md instead. -->
|
|
2
|
+
|
|
1
3
|
# forgecad-component-model
|
|
2
4
|
|
|
3
5
|
Enforce the ForgeCAD Component Model when building multi-part assemblies. Parts build at origin, connectors position them, data flows down from parent. Use when building or reviewing any multi-file ForgeCAD project.
|
|
@@ -9,129 +11,43 @@ Enforce the ForgeCAD Component Model when building multi-part assemblies. Parts
|
|
|
9
11
|
|
|
10
12
|
---
|
|
11
13
|
|
|
12
|
-
## Component Model
|
|
13
|
-
|
|
14
|
-
You are building a ForgeCAD multi-part assembly. Follow the Component Model strictly.
|
|
15
|
-
|
|
16
|
-
### The Core Principle
|
|
17
|
-
|
|
18
|
-
**Parts never position themselves. The assembly positions them via connectors.**
|
|
19
|
-
|
|
20
|
-
A part is a function from props to `{ shape, connectors, metadata }`. It builds at origin in local space. It doesn't know where it sits in the world.
|
|
21
|
-
|
|
22
|
-
### Rules (Non-Negotiable)
|
|
23
|
-
|
|
24
|
-
#### 1. Parts Build at Origin
|
|
25
|
-
- Geometry starts at `[0, 0, 0]` in local coordinates
|
|
26
|
-
- No assembly-space offsets (no `translate(pinionPitchR, 0, layout.pinionZ)`)
|
|
27
|
-
- Internal structure computed from the part's own props only
|
|
28
|
-
|
|
29
|
-
#### 2. Connectors Are the Interface
|
|
30
|
-
- Every part that joins an assembly declares connectors via `.withConnectors({})`
|
|
31
|
-
- A connector = origin + axis (outward from the part)
|
|
32
|
-
- Connectors meet **face-to-face**: both axes point outward, system brings them together
|
|
33
|
-
- For prismatic joints: axes point along the shared slide direction
|
|
34
|
-
- Mirrored revolute axes need negated physical joint values for the same mirrored pose
|
|
35
|
-
|
|
36
|
-
#### 3. Assembly Is Pure Composition
|
|
37
|
-
- Use `addPart()` + `connect()` for frame-aware serial assemblies
|
|
38
|
-
- Use `link()` + `edgeBetweenLinks()` + `addAngleBetweenLinks()` for solved point skeletons
|
|
39
|
-
- Zero `translate()` calls for structural parts
|
|
40
|
-
- Zero coordinate math
|
|
41
|
-
- The assembly passes props down and reads metadata up
|
|
42
|
-
|
|
43
|
-
#### 4. Data Flows Down, Never Sideways
|
|
44
|
-
- **Props down:** Assembly passes dimensions to parts via `require('./part.forge.js', { Height: 20 })`
|
|
45
|
-
- **Metadata up:** Parts return `{ shape, boltPattern, pinionZ, ... }` — computed values the parent might pass to siblings
|
|
46
|
-
- **Siblings never import each other.** The assembly mediates ALL sibling communication
|
|
47
|
-
|
|
48
|
-
#### 5. Verify, Don't console.log
|
|
49
|
-
- Use `verify.that("name", () => condition)` for spatial checks
|
|
50
|
-
- Use `verify.equal()`, `verify.inRange()`, `verify.notColliding()` for specific assertions
|
|
51
|
-
- Never `console.log` + `if` for validation
|
|
52
|
-
|
|
53
|
-
### Connector Convention
|
|
54
|
-
|
|
55
|
-
```js
|
|
56
|
-
// Face-to-face: both point outward, system opposes them
|
|
57
|
-
base.withConnectors({
|
|
58
|
-
mount_face: connector("bolt-face", { origin: [0, 0, 0], axis: [0, 0, -1] }),
|
|
59
|
-
// ↑ bottom face ↑ faces downward
|
|
60
|
-
});
|
|
61
|
-
mount.withConnectors({
|
|
62
|
-
flange: connector("bolt-face", { origin: [0, 0, 0], axis: [0, 0, 1] }),
|
|
63
|
-
// ↑ top face ↑ faces upward
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
// Assembly — no flip, no coordinate math
|
|
67
|
-
assembly.connect("Base.mount_face", "Mount.flange", { as: "mount-fix" });
|
|
68
|
-
```
|
|
14
|
+
## Component Model
|
|
69
15
|
|
|
70
|
-
|
|
71
|
-
`axis: [1, 0, 0]` on the right side and `axis: [-1, 0, 0]` on the left side are
|
|
72
|
-
exact mirrors at rest, but the same `+theta` value rotates them in opposite
|
|
73
|
-
fore/aft senses. Use `Right: +theta`, `Left: -theta`, and mirror physical limits
|
|
74
|
-
as `[min, max] -> [-max, -min]`, or drive both sides from a side-neutral link
|
|
75
|
-
graph/control layer.
|
|
16
|
+
The React of CAD: a part is a function from props to `{ shape, connectors, metadata }`, built at origin in local space. Parts never position themselves — the assembly positions them via connectors.
|
|
76
17
|
|
|
77
|
-
###
|
|
18
|
+
### Rules
|
|
78
19
|
|
|
79
|
-
|
|
20
|
+
1. **Parts build at origin.** Geometry starts at `[0,0,0]` in local coordinates; no assembly-space offsets; internal structure derives from the part's own props only.
|
|
21
|
+
2. **Connectors are the only interface.** Declare via `.withConnectors({})`; axes point outward, mating is face-to-face (exception: prismatic joints share a co-directional slide axis). Mechanics: the forgecad skill's `docs/guides/positioning.md` and `docs/generated/assembly.md`.
|
|
22
|
+
3. **Assembly is pure composition.** Zero `translate()` to position structural parts, zero coordinate math — connect connectors, pass props down, read metadata up.
|
|
23
|
+
4. **Data flows down, never sideways.** Props down via `require('./part.forge.js', { Height: 20 })` overrides; metadata up via the part's return object; siblings NEVER import each other — the assembly mediates all sibling communication.
|
|
24
|
+
5. **Validate with `verify.*`, never `console.log` + `if`.**
|
|
80
25
|
|
|
81
|
-
|
|
82
|
-
return {
|
|
83
|
-
shape: body.color('#708090').withConnectors({ ... }),
|
|
84
|
-
// Public metadata — parent may pass to siblings:
|
|
85
|
-
boltPattern, // bolt positions for sibling parts
|
|
86
|
-
pinionZ, // Z center for gear alignment
|
|
87
|
-
armWidth, // arm cross-section for cover plate slots
|
|
88
|
-
};
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
### File Structure
|
|
92
|
-
|
|
93
|
-
**Default: one file for project-specific assemblies.** Parts are sections within the file. Shared data is variables. Split into separate files only when parts are reusable or the file exceeds ~300 lines.
|
|
26
|
+
### Part return shape
|
|
94
27
|
|
|
95
28
|
```js
|
|
96
|
-
//
|
|
97
|
-
const mount = buildMount({ servo, wall, clearance });
|
|
98
|
-
|
|
99
|
-
// ─── Base Body ──────────────────────────────
|
|
100
|
-
const base = buildBase({ gears, depth, height, boltPattern: mount.boltPattern });
|
|
101
|
-
|
|
102
|
-
// ─── Assembly ───────────────────────────────
|
|
103
|
-
assembly("Gripper")
|
|
104
|
-
.addPart("Base", base.shape)
|
|
105
|
-
.addPart("Mount", mount.shape)
|
|
106
|
-
.connect("Base.mount_face", "Mount.flange", { as: "fix" })
|
|
29
|
+
return { shape, boltPattern, pinionZ }; // shape + metadata the parent may route to siblings
|
|
107
30
|
```
|
|
108
31
|
|
|
109
|
-
###
|
|
110
|
-
|
|
111
|
-
❌ **shared-dims.js** — A file whose only job is computing derived dimensions. The assembly should derive and pass them.
|
|
112
|
-
|
|
113
|
-
❌ **Sibling imports** — `require('./motor-mount.forge.js')` inside `cover-plate.forge.js`. Data flows through the parent.
|
|
32
|
+
### File structure
|
|
114
33
|
|
|
115
|
-
|
|
34
|
+
Default: ONE file per project-specific assembly — parts as sections, shared data as variables. Split only for cross-project reuse or past ~300 lines. Never split for "organization".
|
|
116
35
|
|
|
117
|
-
|
|
36
|
+
### Anti-patterns (reject on review)
|
|
118
37
|
|
|
119
|
-
|
|
38
|
+
- `shared-dims.js` — a file that only computes derived dimensions; the assembly derives and passes them.
|
|
39
|
+
- Sibling `require()` — e.g. `require('./motor-mount.forge.js')` inside `cover-plate.forge.js`; route through the parent.
|
|
40
|
+
- Assembly-space coordinates inside a part — a part knowing `pinionZ = 14` from a sibling's geometry; receive it as a prop.
|
|
41
|
+
- `translate()` to position a structural part in an assembly — add a connector instead.
|
|
42
|
+
- `console.log` + `if` validation — use `verify.*`.
|
|
43
|
+
- Bare `connector.neutral()` outside a reusable component library with compatibility checking.
|
|
120
44
|
|
|
121
|
-
|
|
45
|
+
### Design gate
|
|
122
46
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
Before committing any multi-part assembly, verify:
|
|
47
|
+
Before committing any multi-part assembly:
|
|
126
48
|
|
|
127
49
|
1. Can you understand each part without reading other files?
|
|
128
50
|
2. Does the assembly contain zero coordinate math?
|
|
129
51
|
3. Do all inter-part relationships flow through connectors and props?
|
|
130
52
|
|
|
131
53
|
If any answer is no, refactor.
|
|
132
|
-
|
|
133
|
-
### Reference
|
|
134
|
-
|
|
135
|
-
Full philosophy: `docs/permanent/component-model.md`
|
|
136
|
-
Connector details: `docs/permanent/generated/assembly.md`
|
|
137
|
-
Blueprint-first: `docs/permanent/blueprint-first.md`
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-high-level-spec/SKILL.md instead. -->
|
|
2
|
+
|
|
1
3
|
# forgecad-high-level-spec
|
|
2
4
|
|
|
3
5
|
Write a high-level design document (HLD) for a model, mechanism, or assembly before detailed specification or coding. Use when starting a new design, rethinking an existing one, or when the user asks to spec out, plan, or think through a model at a high level. Works backwards from requirements — defines the problem, explores alternatives, records decisions. Produces a right-sized design document for review and iteration.
|
|
@@ -11,199 +13,89 @@ Write a high-level design document (HLD) for a model, mechanism, or assembly bef
|
|
|
11
13
|
|
|
12
14
|
## High-Level Design (HLD)
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
### Philosophy
|
|
17
|
-
|
|
18
|
-
An HLD is a thinking tool, not a construction document. It should be:
|
|
19
|
-
|
|
20
|
-
- **Quality-first and right-sized.** Use whatever detail, evidence, diagrams, dimensions, and examples are needed for a good decision.
|
|
21
|
-
- **Honest about what's unknown.** Open questions are features, not bugs.
|
|
22
|
-
- **Opinionated about alternatives.** Don't just list options — recommend one and say why.
|
|
23
|
-
- **Stable under iteration.** Easy to update after a round of feedback without rewriting everything.
|
|
24
|
-
|
|
25
|
-
Brevity is a readability tool, not a success metric. Do not omit visible evidence, image-derived features, assumptions, interfaces, risks, or decision-driving dimensions just to keep the document short.
|
|
26
|
-
|
|
27
|
-
The HLD exists so that the user and the agent can align on *what* to build before anyone thinks about *how* to build it. All design concerns, risks, and tradeoffs live here — not in conversation, not in the agent's head.
|
|
28
|
-
|
|
29
|
-
Manufacturing process is part of the design problem, not a default.
|
|
30
|
-
If the user has not specified a process, compare plausible approaches and recommend the one that fits the artifact, load path, scale, material needs, safety expectations, and intended use.
|
|
31
|
-
Do not default to 3D printing, FDM, or "printable" unless the user asked for it or the chosen concept genuinely calls for printed parts.
|
|
16
|
+
The HLD aligns the user and the agent on *what* to build before anyone thinks about *how*. Every design concern, risk, and tradeoff lives in the document — not in conversation, not in the agent's head. Brevity is a readability tool, not a success metric: there is no page limit; include whatever evidence, diagrams, and dimensions a good decision needs. Decision-driving dimensions belong here; exhaustive construction dimensions belong in the LLD.
|
|
32
17
|
|
|
33
|
-
|
|
18
|
+
Manufacturing process is a design decision, not a default — never assume 3D printing/FDM. If the user didn't specify a process, treat process choice as an HLD alternative (full posture taxonomy: `/forgecad-prepare-prompt`).
|
|
34
19
|
|
|
35
|
-
|
|
36
|
-
- When an existing design has fundamental problems (wrong approach, not just wrong numbers)
|
|
37
|
-
- When the user says "spec this out", "think this through", "what should we build"
|
|
38
|
-
- Before writing an LLD
|
|
39
|
-
|
|
40
|
-
### Output Location
|
|
41
|
-
|
|
42
|
-
HLDs go next to the model files. Name: `<name>-hld.md` or for a project: `hld.md` in the project folder.
|
|
20
|
+
Write an HLD before any LLD, and whenever an existing design is wrong in approach, not just in numbers. Output: `<name>-hld.md` beside the model files, or `hld.md` for a whole project.
|
|
43
21
|
|
|
44
22
|
### Document Structure
|
|
45
23
|
|
|
24
|
+
The section order is the workflow — write it top to bottom, following the embedded instructions.
|
|
25
|
+
|
|
46
26
|
```markdown
|
|
47
27
|
# [Name] — High-Level Design
|
|
48
28
|
|
|
49
29
|
## Problem
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
sheet metal, must be CNC-machinable, must be printable, must use purchased
|
|
54
|
-
bearings)?
|
|
55
|
-
|
|
56
|
-
State the problem without implying a solution.
|
|
30
|
+
What must this do? Hard requirements (must grip objects, fit a 60mm
|
|
31
|
+
housing, use purchased bearings). State the problem without implying
|
|
32
|
+
a solution. Unspecified process choice is an open design dimension.
|
|
57
33
|
|
|
58
34
|
## Approach
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Keep this at the architecture level, but include enough spatial and behavioral
|
|
64
|
-
detail that someone unfamiliar with the project understands the concept.
|
|
35
|
+
How it works at a conceptual level. ASCII diagram of the key elements
|
|
36
|
+
and their spatial relationships — diagram labels stay in this markdown;
|
|
37
|
+
never carry them into CAD geometry unless the real artifact needs
|
|
38
|
+
markings.
|
|
65
39
|
|
|
66
40
|
## Key Interfaces
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
41
|
+
Every point where this touches another part or the outside world:
|
|
42
|
+
mating surfaces, shared dimensions, coordination points. These are the
|
|
43
|
+
contracts that constrain the design.
|
|
70
44
|
|
|
71
45
|
## Dictionary
|
|
72
|
-
|
|
73
|
-
Define every domain-specific term used in this document. Don't assume
|
|
74
|
-
engineering terminology is widely known — write for a developer who
|
|
75
|
-
doesn't have a mechanical engineering background.
|
|
76
|
-
|
|
77
46
|
| Term | What it is |
|
|
78
47
|
|------|-----------|
|
|
79
|
-
|
|
48
|
+
Define every domain term in plain words, with dimensions where relevant.
|
|
49
|
+
Write for a developer without a mechanical-engineering background.
|
|
80
50
|
|
|
81
51
|
## Alternatives
|
|
82
|
-
|
|
83
52
|
| Option | Description | Tradeoff |
|
|
84
53
|
|--------|-------------|----------|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
For each alternative, include enough detail to understand why it fits or loses.
|
|
90
|
-
One sentence is fine only when one sentence is enough. Mark the recommended option.
|
|
54
|
+
2-3 genuinely different strategies, not minor variations. Enough detail
|
|
55
|
+
per row to see why it fits or loses. Mark one recommended and say why.
|
|
56
|
+
If there is honestly only one approach, say so and skip the table.
|
|
91
57
|
|
|
92
58
|
## Usage Guide
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
For a mechanism: how it moves, what the user does, what happens.
|
|
100
|
-
For a software component: how it's called, what it returns, error cases.
|
|
101
|
-
|
|
102
|
-
Flag issues inline with ⚠️.
|
|
59
|
+
The strongest validation: work backwards from how someone uses,
|
|
60
|
+
assembles, or operates the thing, step by step (physical product:
|
|
61
|
+
assembly steps, tools, what connects to what; mechanism: how it moves
|
|
62
|
+
and what the user does). If a step doesn't make sense ("how does the
|
|
63
|
+
servo get inside?"), the design has a gap — flag it inline with ⚠️ and
|
|
64
|
+
promote it to Concerns.
|
|
103
65
|
|
|
104
66
|
## Concerns
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
Include issues discovered while writing the Usage Guide.
|
|
111
|
-
|
|
112
|
-
1. ...
|
|
113
|
-
2. ...
|
|
67
|
+
1. Numbered, falsifiably specific — a reviewer must be able to say
|
|
68
|
+
"real problem" or "fine, because…". "Tolerances might be tight" is
|
|
69
|
+
useless; "the 12mm arm cantilevers under gripping load, may flex
|
|
70
|
+
>0.5mm" is useful.
|
|
114
71
|
|
|
115
72
|
## Decisions
|
|
116
|
-
|
|
117
|
-
Filled in after review. Each decision references which concern or
|
|
118
|
-
alternative it resolves.
|
|
119
|
-
|
|
120
73
|
| # | Decision | Rationale |
|
|
121
74
|
|---|----------|-----------|
|
|
122
|
-
|
|
75
|
+
Filled ONLY after user review — never pre-decide. Each row resolves a
|
|
76
|
+
concern or alternative.
|
|
123
77
|
```
|
|
124
78
|
|
|
125
|
-
###
|
|
126
|
-
|
|
127
|
-
#### 1. Define the problem
|
|
128
|
-
|
|
129
|
-
State what the part/assembly needs to accomplish. Include hard constraints (size envelope, specified manufacturing/process constraints, interfaces with other parts). Do not describe a solution yet.
|
|
130
|
-
If no process is specified, treat manufacturing/process choice as an HLD alternative rather than as a hidden assumption.
|
|
131
|
-
|
|
132
|
-
#### 2. Sketch the approach
|
|
133
|
-
|
|
134
|
-
Describe the recommended approach at a conceptual level. Draw an ASCII diagram showing the key elements and their spatial relationships. Label the markdown diagram, but do not carry those labels into CAD geometry unless the real artifact needs markings.
|
|
135
|
-
|
|
136
|
-
#### 3. Identify interfaces
|
|
137
|
-
|
|
138
|
-
List every point where this design touches another part or the outside world. These are the contracts that constrain the design.
|
|
139
|
-
|
|
140
|
-
#### 4. Explore alternatives
|
|
141
|
-
|
|
142
|
-
Show 2-3 meaningfully different approaches. Not minor variations — genuinely different strategies. For each, state the key tradeoff in one line. Recommend one.
|
|
143
|
-
|
|
144
|
-
#### 5. Write the usage guide
|
|
145
|
-
|
|
146
|
-
Work backwards: describe how someone uses/assembles/operates this thing step by step. This is the most powerful validation — it forces you to think through the physical reality before writing code. If a step doesn't make sense ("how does the servo get inside?"), the design has a gap.
|
|
147
|
-
|
|
148
|
-
Flag issues inline with ⚠️. These feed directly into the Concerns list.
|
|
149
|
-
|
|
150
|
-
#### 6. Surface concerns
|
|
79
|
+
### Review via git
|
|
151
80
|
|
|
152
|
-
|
|
81
|
+
HLDs and LLDs iterate through git, not conversation:
|
|
153
82
|
|
|
154
|
-
|
|
83
|
+
- **Commit every version.** No drafts floating in chat. After writing, commit and tell the user it's ready for review.
|
|
84
|
+
- **Feedback arrives as file edits** (inline comments, strikethroughs) **or chat — check both.** Read `git diff`: the diff is the review artifact.
|
|
85
|
+
- **Update, commit, repeat** until the Decisions table is filled and the user says "go."
|
|
155
86
|
|
|
156
|
-
|
|
87
|
+
### Rules
|
|
157
88
|
|
|
158
|
-
|
|
89
|
+
- If you're speccing every part, formula, tolerance, and fabrication step, you're writing an LLD — back up.
|
|
90
|
+
- If you can't draw it, you don't understand it yet.
|
|
91
|
+
- Tables are welcome where they clarify (interfaces, requirements, visible evidence); full parameter catalogs go to the LLD.
|
|
159
92
|
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
1. Read the git diff or the updated file to see the user's feedback
|
|
163
|
-
2. Update the HLD to address feedback
|
|
164
|
-
3. Commit the update
|
|
165
|
-
4. Present for another round if needed
|
|
166
|
-
|
|
167
|
-
Repeat until the Decisions table is filled and the user says "go."
|
|
168
|
-
|
|
169
|
-
### Git Workflow
|
|
170
|
-
|
|
171
|
-
HLDs and LLDs iterate through git, not conversation. This keeps the document as the single source of truth and gives both sides a clear diff to review.
|
|
172
|
-
|
|
173
|
-
```
|
|
174
|
-
Agent writes HLD → git commit → User reviews (edits file or gives feedback)
|
|
175
|
-
→ Agent reads diff → updates HLD → git commit → repeat until approved
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
- **Every version gets committed.** No unsaved drafts floating in conversation.
|
|
179
|
-
- **User feedback goes in the file** (inline comments, strikethroughs) or in chat — agent checks both.
|
|
180
|
-
- **The diff is the review artifact.** Agent reads `git diff` to see what changed.
|
|
181
|
-
|
|
182
|
-
### Writing Rules
|
|
183
|
-
|
|
184
|
-
- **Quality first.** There is no fixed page, time, or section-length limit. Write the HLD to the depth the design deserves.
|
|
185
|
-
- **Clear, not artificially terse.** If a reviewer has to re-read a paragraph to understand it, rewrite it; do not delete needed content just to make it shorter.
|
|
186
|
-
- **ASCII diagrams where useful.** A cross-section sketch can communicate layout better than paragraphs, but use whichever representation makes the design clearest.
|
|
187
|
-
- **Decision-driving dimensions are welcome.** Include dimensions, size envelopes, counts, interface dimensions, and proportional constraints when they clarify architecture, risks, image matching, or feasibility. Put exhaustive construction dimensions and formulas in the LLD.
|
|
188
|
-
- **Tables are allowed when they improve clarity.** Use compact tables for alternatives, interfaces, requirements, feature inventories, or visible evidence. Keep full parameter catalogs in the LLD.
|
|
189
|
-
- **Concerns are not rhetorical.** Every concern must be specific enough that someone can say "yes that's a real problem" or "no, here's why it's fine."
|
|
190
|
-
- **Alternatives are not padding.** If there's genuinely only one way to do it, say so and skip the table.
|
|
191
|
-
|
|
192
|
-
### Relationship to Other Skills
|
|
93
|
+
### Pipeline
|
|
193
94
|
|
|
194
95
|
| Stage | Skill | Output |
|
|
195
96
|
|-------|-------|--------|
|
|
196
|
-
| 1. Explore the problem space |
|
|
97
|
+
| 1. Explore the problem space | this skill | `*-hld.md` |
|
|
197
98
|
| 2. Detailed design | `/forgecad-lld` | `*-lld.md` |
|
|
198
|
-
| 3. Implementation | `/forgecad-make-a-model` + `/forgecad` | `.forge.js`
|
|
199
|
-
|
|
200
|
-
The HLD must have its Decisions table filled before writing an LLD. The LLD must exist before implementation (unless the model is simple enough to skip straight from HLD to code).
|
|
201
|
-
|
|
202
|
-
### Anti-Patterns
|
|
99
|
+
| 3. Implementation | `/forgecad-make-a-model` + `/forgecad` | `.forge.js` |
|
|
203
100
|
|
|
204
|
-
|
|
205
|
-
- **HLD with no alternatives.** You haven't explored the solution space. Even if the answer is obvious, name what you rejected and why.
|
|
206
|
-
- **Concerns that are vague worries.** "This might be hard to manufacture" — hard how? Tool access? Bending radius? Wall thickness? Tolerance stack? Support material? Be specific or don't list it.
|
|
207
|
-
- **Decisions made before review.** The whole point is to align with the user before committing. Present the HLD, discuss, then decide.
|
|
208
|
-
- **Skipping the diagram.** If you can't draw it, you don't understand it yet.
|
|
209
|
-
- **Iterating in conversation instead of in the file.** The document is the artifact. Update it, commit it, review the diff.
|
|
101
|
+
The Decisions table must be filled before writing the LLD. Simple models may skip straight from HLD to code.
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
<!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/forgecad-image-replicator/SKILL.md instead. -->
|
|
2
|
+
|
|
1
3
|
# forgecad-image-replicator
|
|
2
4
|
|
|
3
5
|
Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views.
|
|
@@ -11,167 +13,48 @@ Build real ForgeCAD geometry from one or more reference images by treating image
|
|
|
11
13
|
|
|
12
14
|
## ForgeCAD Image Replicator
|
|
13
15
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
The reference image is evidence. It is not the deliverable.
|
|
17
|
-
|
|
18
|
-
The deliverable is a real parametric object that remains believable from front, back, side, top, bottom, and reference camera views. A model that matches one image but falls apart from other angles has failed, even if the comparison board looks close.
|
|
16
|
+
The reference image is evidence, not the deliverable. The deliverable is a real parametric object that holds up from front, back, side, top, bottom, and reference camera views — a model that matches one image but falls apart from other angles has failed, even if the comparison board looks close. Cutaway, sectioned, exploded, or transparent references are evidence about the complete object: build the closed artifact and recreate explanatory views with viewer/inspection tools (the main `forgecad` skill's closed-artifact rule applies).
|
|
19
17
|
|
|
20
|
-
|
|
18
|
+
### Companion Skills
|
|
21
19
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
- Use `forgecad-make-a-model` for file placement, decomposition, parametric modeling, and definition of done.
|
|
27
|
-
- Use `forgecad-render-inspect` before final delivery when the object has multiple parts, internal geometry, mechanisms, thin walls, or fit-sensitive features.
|
|
20
|
+
- `forgecad` — API docs, model authoring, renderer behavior.
|
|
21
|
+
- `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
|
|
22
|
+
- `forgecad-make-a-model` — file placement, project structure, decomposition, definition of done.
|
|
23
|
+
- `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
28
24
|
|
|
29
25
|
### Core Rule
|
|
30
26
|
|
|
31
|
-
Infer the real object before matching
|
|
32
|
-
|
|
33
|
-
Do not begin by chasing pixels, silhouettes, or the prettiest view. First form a 3D object hypothesis: what the artifact is, how it is made, what hidden sides must contain, what scale it likely has, and what geometry must exist for it to be physically coherent.
|
|
34
|
-
|
|
35
|
-
Reference matching is a validation step after the object exists.
|
|
27
|
+
Infer the real object before matching any camera — identity, manufacture, scale, what hidden sides must contain, what geometry must exist for physical coherence. Reference matching is a validation step after the object exists; never start by chasing pixels or the prettiest view.
|
|
36
28
|
|
|
37
29
|
### Workflow
|
|
38
30
|
|
|
39
|
-
1.
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
- conflicts: details that disagree across images or appear stylized, distorted, cropped, or shadow-hidden
|
|
49
|
-
|
|
50
|
-
3. Write a Real Object Brief.
|
|
51
|
-
This is a hard gate before modeling. Include:
|
|
52
|
-
- artifact identity and family
|
|
53
|
-
- likely purpose or operating story
|
|
54
|
-
- assumed scale and units
|
|
55
|
-
- manufacturing/process posture and material cues
|
|
56
|
-
- part and BOM boundary: what is modeled as real geometry, purchased hardware, ghost geometry, or omitted context
|
|
57
|
-
- visible facts from the reference set
|
|
58
|
-
- inferred hidden-side geometry
|
|
59
|
-
- expected canonical front, back, left, right, top, and bottom forms
|
|
60
|
-
- required internal, interface, or fit geometry
|
|
61
|
-
- validation views and inspection evidence
|
|
62
|
-
|
|
63
|
-
4. Choose the modeling structure.
|
|
64
|
-
Use a multi-file `main.forge.js` project when the object has distinct parts, repeated feature families, internals, purchased hardware, variants, or meaningful manufacturing assumptions. Put renderable/importable parts and sub-assemblies in neighboring `.forge.js` files; keep only pure dimensions, materials, math helpers, and lookup tables in plain `.js` files.
|
|
65
|
-
|
|
66
|
-
5. Build a coarse 3D blockout.
|
|
67
|
-
Model the object, not the image. Start with the large volumes, axes, symmetry, side depth, rear form, underside, and hidden continuations. Render canonical views before doing reference-camera comparison.
|
|
68
|
-
|
|
69
|
-
6. Calibrate one camera per usable reference.
|
|
70
|
-
Match camera after the blockout makes sense from canonical views. Use the object center as `target`. Estimate azimuth, elevation, distance, and FOV from visible faces and perspective cues. Use orthographic when parallel edges stay parallel and there is no visible perspective convergence.
|
|
71
|
-
|
|
72
|
-
7. Render comparison boards.
|
|
73
|
-
Render the model from each calibrated reference camera and place the result next to the original image. Do not compare from memory.
|
|
74
|
-
|
|
75
|
-
8. Iterate in the right order.
|
|
76
|
-
Change one class of thing at a time:
|
|
77
|
-
- object hypothesis: identity, scale, symmetry, hidden-side assumptions, process logic
|
|
78
|
-
- major proportions: width, depth, height, taper, curvature, radius families
|
|
79
|
-
- canonical geometry: rear, underside, side depth, internal clearances, part interfaces
|
|
80
|
-
- camera: azimuth, elevation, target, distance, FOV, orthographic zoom
|
|
81
|
-
- details: holes, seams, fasteners, labels, vents, edge treatments, small hardware
|
|
82
|
-
- presentation: colors, materials, lighting, background, edge style
|
|
83
|
-
|
|
84
|
-
If improving one reference view makes another view or canonical render worse, the object hypothesis is probably wrong. Fix the model, not the camera illusion.
|
|
85
|
-
|
|
86
|
-
9. Use every image as a constraint.
|
|
87
|
-
When multiple images are attached, do not choose one as the target and ignore the rest. Assign each image a camera, evidence list, and confidence level. Optimize one shared geometry against the whole set. If an image is decorative, distorted, or contradictory, state how it was weighted.
|
|
88
|
-
|
|
89
|
-
10. Inspect the final object.
|
|
90
|
-
Run `forgecad run`, render the reference comparison boards, render canonical views, and use targeted `forgecad inspect <family> <mode>` commands. For multi-part, mechanical, internal, or fit-sensitive models, include `inspect fit interference` and the appropriate `inspect sections at|stack|sample` mode, but keep the delivered model as the complete closed artifact.
|
|
91
|
-
|
|
92
|
-
### Renderer Camera Support
|
|
93
|
-
|
|
94
|
-
ForgeCAD `render 3d` supports explicit camera control:
|
|
31
|
+
1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
|
|
32
|
+
2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
|
|
33
|
+
3. Write a Real Object Brief — a hard gate before modeling: (a) artifact identity + operating story; (b) assumed scale and units; (c) process posture + part/BOM boundary (real geometry vs purchased vs ghost vs omitted); (d) inferred hidden-side geometry + expected canonical front/back/left/right/top/bottom forms; (e) validation views and inspection evidence. Use `forgecad-prepare-prompt` when these are underdetermined.
|
|
34
|
+
4. Build a coarse 3D blockout — model the object, not the image: large volumes, axes, symmetry, side depth, rear form, underside, hidden continuations. Render canonical views before any reference-camera comparison. Follow `forgecad-make-a-model` for project structure.
|
|
35
|
+
5. Calibrate one camera per usable reference, only after the blockout makes sense from canonical views. Use the object center as `target`; estimate azimuth/elevation/distance/FOV from visible faces and perspective cues; use orthographic when parallel edges stay parallel with no perspective convergence.
|
|
36
|
+
6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
|
|
37
|
+
7. Iterate one class of change at a time, in order: object hypothesis → major proportions → canonical geometry → camera → details → presentation. If improving one reference view makes another view or a canonical render worse, the object hypothesis is wrong — fix the model, not the camera illusion.
|
|
38
|
+
8. Use every image as a constraint. Never pick one target image and ignore the rest: assign each image a camera, evidence list, and confidence; optimize one shared geometry against the whole set; state how distorted or decorative images were weighted.
|
|
39
|
+
9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
|
|
95
40
|
|
|
96
|
-
|
|
97
|
-
forgecad render 3d model.forge.js /tmp/render.png \
|
|
98
|
-
--camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
|
|
99
|
-
--size 1000
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
Supported camera forms:
|
|
103
|
-
|
|
104
|
-
- `--camera front`, `top`, `side`, `right`, `iso`
|
|
105
|
-
- `--camera 45:25` for azimuth/elevation in degrees
|
|
106
|
-
- `--camera 45:25:260` for azimuth/elevation/distance
|
|
107
|
-
- `--camera "proj=perspective;pos=x,y,z;target=x,y,z;up=0,0,1;fov=42"`
|
|
108
|
-
- `--camera "proj=orthographic;pos=x,y,z;target=x,y,z;up=0,0,1;zoom=4"`
|
|
109
|
-
|
|
110
|
-
If exact full camera specs do not render in the current checkout, fix the renderer before continuing. Do not work around missing camera control by guessing from default `iso` renders.
|
|
111
|
-
|
|
112
|
-
### Rendering And Comparison
|
|
113
|
-
|
|
114
|
-
Prefer the built CLI from the repo checkout when available:
|
|
115
|
-
|
|
116
|
-
```bash
|
|
117
|
-
node dist-cli/forgecad.js render 3d path/to/model.forge.js /tmp/<slug>-replicate/render-front.png \
|
|
118
|
-
--camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
|
|
119
|
-
--size 1000 --edges thin
|
|
120
|
-
```
|
|
41
|
+
### Comparison Boards
|
|
121
42
|
|
|
122
|
-
|
|
43
|
+
Render with exact `--camera` specs (see the forgecad CLI doc for supported forms). If exact full camera specs do not render, fix the renderer before continuing — never substitute guesses from default `iso` renders.
|
|
123
44
|
|
|
124
|
-
|
|
125
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py \
|
|
126
|
-
/tmp/<slug>-replicate/refs/front.png \
|
|
127
|
-
/tmp/<slug>-replicate/render-front.png \
|
|
128
|
-
/tmp/<slug>-replicate/compare-front.png \
|
|
129
|
-
--height 900 --labels "Reference,ForgeCAD"
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
Common helper options:
|
|
45
|
+
Build side-by-side boards with the bundled self-contained `uv` helper (installs Pillow on demand). Resolve `scripts/compare_images.py` relative to the installed `forgecad-image-replicator` skill directory:
|
|
133
46
|
|
|
134
47
|
```bash
|
|
135
|
-
uv run
|
|
136
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.jpg render.png compare.png --height 1200 --fit contain
|
|
137
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --fit cover --labels "Target,Current"
|
|
138
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --no-labels
|
|
48
|
+
uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
|
|
139
49
|
```
|
|
140
50
|
|
|
141
|
-
Use `--fit contain`
|
|
142
|
-
|
|
143
|
-
### Acceptance Standard
|
|
144
|
-
|
|
145
|
-
A successful result:
|
|
146
|
-
|
|
147
|
-
- has a written Real Object Brief
|
|
148
|
-
- has parametric ForgeCAD geometry, not a billboard, facade, pasted texture, or one-view shell
|
|
149
|
-
- makes sense from canonical views before reference matching
|
|
150
|
-
- matches each usable reference image as closely as the evidence allows
|
|
151
|
-
- includes honest hidden-side assumptions where the images are silent
|
|
152
|
-
- includes internal, interface, purchased, or hardware geometry when the artifact calls for it
|
|
153
|
-
- passes `forgecad run`
|
|
154
|
-
- includes final reference comparison boards and canonical renders
|
|
155
|
-
- includes inspection results for the risk evidence that matters
|
|
156
|
-
|
|
157
|
-
A result fails if it only works from the original camera.
|
|
158
|
-
|
|
159
|
-
### Output Contract
|
|
51
|
+
Use `--fit contain` (default); use `--fit cover` only when both images already share the same crop and aspect. Run with `--help` for other options.
|
|
160
52
|
|
|
161
|
-
|
|
53
|
+
### Done and Report
|
|
162
54
|
|
|
163
|
-
-
|
|
164
|
-
- reference images used
|
|
165
|
-
- Real Object Brief summary
|
|
166
|
-
- hidden-side and scale assumptions
|
|
167
|
-
- final camera spec for each reference image
|
|
168
|
-
- comparison board path for each usable reference image
|
|
169
|
-
- canonical render paths
|
|
170
|
-
- inspection bundle path, when used
|
|
171
|
-
- validation commands run
|
|
172
|
-
- remaining mismatches, unknowns, or downgraded confidence
|
|
55
|
+
Done means: a written Real Object Brief; real parametric geometry (not a billboard, facade, or one-view shell) that makes sense from all canonical views; honest hidden-side assumptions where images are silent; passes `forgecad run`; comparison boards plus canonical renders exist. The result fails if it only works from the original camera — one render is never enough; expect several render/compare/inspect iterations.
|
|
173
56
|
|
|
174
|
-
|
|
57
|
+
Report: model path; Real Object Brief summary + assumptions; per-reference camera spec, weighting, and board path; canonical render paths; inspection evidence; remaining mismatches or downgraded confidence.
|
|
175
58
|
|
|
176
59
|
|
|
177
60
|
## Bundled Files
|