forgecad 0.9.15 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AdminPage-CDyGUinA.js → AdminPage-DwYHz72L.js} +1 -1
- package/dist/assets/{BenchmarkPage-DfPMY_-d.js → BenchmarkPage-a9_f-1US.js} +1 -1
- package/dist/assets/{BlogPage-kF0fkdJT.js → BlogPage-DodHpvmf.js} +1 -1
- package/dist/assets/{DocsPage-B954L3YN.js → DocsPage-B5LePEuj.js} +8 -858
- package/dist/assets/{EditorApp-CuDLxKqL.css → EditorApp-BpjZgzk0.css} +148 -0
- package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
- package/dist/assets/{EmbedViewer-C77B-TrF.js → EmbedViewer-DdEHGUMU.js} +2 -2
- package/dist/assets/{LandingPageProofDriven-Cr6fXMDj.js → LandingPageProofDriven-yhhOodbf.js} +2 -2
- package/dist/assets/{LegalPage-Dzklqmmg.js → LegalPage-5RbKRGYK.js} +1 -1
- package/dist/assets/{PricingPage-zWXkvlwl.js → PricingPage-E3Rma7aV.js} +1 -1
- package/dist/assets/{SettingsPage-Bz0of4KQ.js → SettingsPage-BJZcM97j.js} +1 -1
- package/dist/assets/{app-D3kDkggg.js → app-DSYrDg0V.js} +1846 -352
- package/dist/assets/cli/{render-DSY3mMQa.js → render-ZMHR9HkV.js} +161 -70
- package/dist/assets/{constructionHistoryWorker-gpDo-uH2.js → constructionHistoryWorker-AwMMWSxg.js} +1104 -349
- package/dist/assets/{evalWorker-CU0Ke6DP.js → evalWorker-DbNs7Dkp.js} +5155 -3772
- package/dist/assets/{inspectWorker-COyp8XXA.js → inspectWorker-CZsCFtQT.js} +1415 -439
- package/dist/assets/{targets-B9sGB5nB.js → jointPose-DO6mnXn_.js} +71 -3
- package/dist/assets/{manifold-DNkrUWpA.js → manifold-BGlQBBH9.js} +1 -1
- package/dist/assets/{manifold-BRI5prcH.js → manifold-BU-tJwQh.js} +1 -1
- package/dist/assets/{manifold-C-3h2M7p.js → manifold-fy2MV7K1.js} +2 -2
- package/dist/assets/{reportWorker-CdBz5bNg.js → reportWorker-DO6hcQbh.js} +8474 -4549
- package/dist/assets/{scalar-sampling-budget-wJF98aY9.js → scalar-sampling-budget-o90NSNmF.js} +5347 -3906
- package/dist/assets/{scanProxyWorker-B-9VbLIs.js → scanProxyWorker-2GtDLk-R.js} +19 -6
- 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 +3 -1
- package/dist/docs-raw/CLI.md +65 -239
- package/dist/docs-raw/README.md +6 -0
- package/dist/docs-raw/component-model.md +17 -150
- package/dist/docs-raw/generated/assembly.md +159 -520
- package/dist/docs-raw/generated/concepts.md +245 -3491
- package/dist/docs-raw/generated/core.md +277 -1251
- package/dist/docs-raw/generated/curves.md +387 -1608
- package/dist/docs-raw/generated/legacy.md +162 -0
- package/dist/docs-raw/generated/lib.md +238 -112
- package/dist/docs-raw/generated/output.md +51 -76
- package/dist/docs-raw/generated/runtime-names.md +30 -22
- package/dist/docs-raw/generated/sdf.md +68 -284
- package/dist/docs-raw/generated/sheet-metal.md +68 -335
- package/dist/docs-raw/generated/sketch.md +240 -1161
- package/dist/docs-raw/generated/viewport.md +75 -316
- package/dist/docs-raw/generated/wood.md +21 -49
- package/dist/docs-raw/guides/coordinate-system.md +4 -42
- package/dist/docs-raw/guides/inspection-bundles.md +44 -442
- package/dist/docs-raw/guides/joint-design.md +18 -79
- package/dist/docs-raw/guides/positioning.md +21 -143
- package/dist/docs-raw/guides/scene-presentation.md +89 -0
- package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
- package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
- package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
- package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
- package/dist/docs-raw/skills/forgecad-lld.md +19 -113
- package/dist/docs-raw/skills/forgecad-make-a-model.md +113 -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 -129
- 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 +4 -2
- package/dist/index.html +1 -1
- package/dist/llms.txt +1 -2
- package/dist/sitemap.xml +13 -13
- package/dist-cli/{check-compiler-SDX5QIXI.js → check-compiler-JTVBITCR.js} +1 -1
- package/dist-cli/{check-query-propagation-EAYEFT77.js → check-query-propagation-3FFLSMVN.js} +1 -1
- package/dist-cli/{chunk-N4O47JLF.js → chunk-OAN5T4XD.js} +5722 -4287
- package/dist-cli/forgecad.js +2195 -656
- package/dist-skill/CONTEXT.md +1778 -7912
- package/dist-skill/SKILL.md +15 -15
- package/dist-skill/docs/API/core/concepts.md +27 -157
- package/dist-skill/docs/CLI.md +65 -239
- package/dist-skill/docs/generated/assembly.md +160 -493
- package/dist-skill/docs/generated/core.md +277 -1251
- package/dist-skill/docs/generated/curves.md +387 -1609
- package/dist-skill/docs/generated/lib.md +238 -112
- package/dist-skill/docs/generated/output.md +51 -76
- package/dist-skill/docs/generated/runtime-names.md +16 -22
- 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 +111 -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 -131
- 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/helix-basics.forge.js +2 -2
- 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/route3d-elbow.forge.js +3 -0
- 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 +4 -2
- package/examples/mechanical/airplane-propeller.forge.js +74 -39
- package/examples/nurbs-surface.forge.js +1 -1
- package/examples/products/iphone.forge.js +1 -1
- package/package.json +4 -1
- package/dist/assets/EditorApp-Beb-IZ0y.js +0 -14014
- 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
- package/examples/api/bolted-service-cover.forge.js +0 -17
- package/examples/api/cable-gland-anchor.forge.js +0 -14
- package/examples/api/captured-cartridge-guide.forge.js +0 -14
- package/examples/api/captured-linear-slide.forge.js +0 -13
- package/examples/api/clevis-pin-joint.forge.js +0 -13
- package/examples/api/datum-enclosure.forge.js +0 -16
- package/examples/api/hose-barb-port.forge.js +0 -14
- package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
- package/examples/api/living-hinge-cover.forge.js +0 -14
- package/examples/api/pcb-terminal-block.forge.js +0 -22
- package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
- package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
- package/examples/api/routed-tube-clip.forge.js +0 -15
- package/examples/api/seated-bearing-stack.forge.js +0 -30
- package/examples/api/snap-latch-cover.forge.js +0 -14
- package/examples/api/thumb-screw-clamp.forge.js +0 -15
|
@@ -6,164 +6,45 @@ forgecad-public: true
|
|
|
6
6
|
|
|
7
7
|
# ForgeCAD Image Replicator
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
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).
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
## Companion Skills
|
|
12
12
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Required Companion Skills
|
|
18
|
-
|
|
19
|
-
- Use `forgecad` for API docs, model authoring, and renderer behavior.
|
|
20
|
-
- Use `forgecad-prepare-prompt` when the image does not fully determine the artifact family, process posture, scale, operating story, or validation boundary.
|
|
21
|
-
- Use `forgecad-make-a-model` for file placement, decomposition, parametric modeling, and definition of done.
|
|
22
|
-
- Use `forgecad-render-inspect` before final delivery when the object has multiple parts, internal geometry, mechanisms, thin walls, or fit-sensitive features.
|
|
13
|
+
- `forgecad` — API docs, model authoring, renderer behavior.
|
|
14
|
+
- `forgecad-prepare-prompt` — when the images underdetermine artifact family, process posture, scale, operating story, or validation boundary.
|
|
15
|
+
- `forgecad-make-a-model` — file placement, project structure, decomposition, definition of done.
|
|
16
|
+
- `forgecad-render-inspect` — pre-delivery inspection for multi-part, internal, mechanical, thin-wall, or fit-sensitive objects.
|
|
23
17
|
|
|
24
18
|
## Core Rule
|
|
25
19
|
|
|
26
|
-
Infer the real object before matching
|
|
27
|
-
|
|
28
|
-
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.
|
|
29
|
-
|
|
30
|
-
Reference matching is a validation step after the object exists.
|
|
20
|
+
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.
|
|
31
21
|
|
|
32
22
|
## Workflow
|
|
33
23
|
|
|
34
|
-
1.
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
- conflicts: details that disagree across images or appear stylized, distorted, cropped, or shadow-hidden
|
|
44
|
-
|
|
45
|
-
3. Write a Real Object Brief.
|
|
46
|
-
This is a hard gate before modeling. Include:
|
|
47
|
-
- artifact identity and family
|
|
48
|
-
- likely purpose or operating story
|
|
49
|
-
- assumed scale and units
|
|
50
|
-
- manufacturing/process posture and material cues
|
|
51
|
-
- part and BOM boundary: what is modeled as real geometry, purchased hardware, ghost geometry, or omitted context
|
|
52
|
-
- visible facts from the reference set
|
|
53
|
-
- inferred hidden-side geometry
|
|
54
|
-
- expected canonical front, back, left, right, top, and bottom forms
|
|
55
|
-
- required internal, interface, or fit geometry
|
|
56
|
-
- validation views and inspection evidence
|
|
57
|
-
|
|
58
|
-
4. Choose the modeling structure.
|
|
59
|
-
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.
|
|
60
|
-
|
|
61
|
-
5. Build a coarse 3D blockout.
|
|
62
|
-
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.
|
|
24
|
+
1. Stage references in `/tmp/<slug>-replicate/refs`, keeping originals and adding view names where possible (`front`, `side`, `rear-iso`, `top`, `detail`).
|
|
25
|
+
2. Read each image as evidence, recording: visible facts; scale cues; camera cues; unknowns (hidden/occluded geometry); conflicts across images or stylization.
|
|
26
|
+
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.
|
|
27
|
+
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.
|
|
28
|
+
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.
|
|
29
|
+
6. Render comparison boards: render the model from each calibrated reference camera and place it next to the original. Never compare from memory.
|
|
30
|
+
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.
|
|
31
|
+
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.
|
|
32
|
+
9. Validate the final object: `forgecad run`, reference comparison boards, canonical renders, and targeted inspections via `forgecad-render-inspect`.
|
|
63
33
|
|
|
64
|
-
|
|
65
|
-
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.
|
|
34
|
+
## Comparison Boards
|
|
66
35
|
|
|
67
|
-
|
|
68
|
-
Render the model from each calibrated reference camera and place the result next to the original image. Do not compare from memory.
|
|
36
|
+
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.
|
|
69
37
|
|
|
70
|
-
|
|
71
|
-
Change one class of thing at a time:
|
|
72
|
-
- object hypothesis: identity, scale, symmetry, hidden-side assumptions, process logic
|
|
73
|
-
- major proportions: width, depth, height, taper, curvature, radius families
|
|
74
|
-
- canonical geometry: rear, underside, side depth, internal clearances, part interfaces
|
|
75
|
-
- camera: azimuth, elevation, target, distance, FOV, orthographic zoom
|
|
76
|
-
- details: holes, seams, fasteners, labels, vents, edge treatments, small hardware
|
|
77
|
-
- presentation: colors, materials, lighting, background, edge style
|
|
78
|
-
|
|
79
|
-
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.
|
|
80
|
-
|
|
81
|
-
9. Use every image as a constraint.
|
|
82
|
-
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.
|
|
83
|
-
|
|
84
|
-
10. Inspect the final object.
|
|
85
|
-
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.
|
|
86
|
-
|
|
87
|
-
## Renderer Camera Support
|
|
88
|
-
|
|
89
|
-
ForgeCAD `render 3d` supports explicit camera control:
|
|
38
|
+
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:
|
|
90
39
|
|
|
91
40
|
```bash
|
|
92
|
-
|
|
93
|
-
--camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
|
|
94
|
-
--size 1000
|
|
41
|
+
uv run <skill-dir>/scripts/compare_images.py refs/front.png render-front.png compare-front.png
|
|
95
42
|
```
|
|
96
43
|
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- `--camera front`, `top`, `side`, `right`, `iso`
|
|
100
|
-
- `--camera 45:25` for azimuth/elevation in degrees
|
|
101
|
-
- `--camera 45:25:260` for azimuth/elevation/distance
|
|
102
|
-
- `--camera "proj=perspective;pos=x,y,z;target=x,y,z;up=0,0,1;fov=42"`
|
|
103
|
-
- `--camera "proj=orthographic;pos=x,y,z;target=x,y,z;up=0,0,1;zoom=4"`
|
|
104
|
-
|
|
105
|
-
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.
|
|
106
|
-
|
|
107
|
-
## Rendering And Comparison
|
|
108
|
-
|
|
109
|
-
Prefer the built CLI from the repo checkout when available:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
node dist-cli/forgecad.js render 3d path/to/model.forge.js /tmp/<slug>-replicate/render-front.png \
|
|
113
|
-
--camera "proj=perspective;pos=200,-160,120;target=0,0,20;up=0,0,1;fov=38" \
|
|
114
|
-
--size 1000 --edges thin
|
|
115
|
-
```
|
|
116
|
-
|
|
117
|
-
Build side-by-side boards with the bundled helper. It is a self-contained `uv` script that installs Pillow on demand and does not require Chrome. The examples use the ForgeCAD source-checkout path; if the skill is installed elsewhere, resolve `scripts/compare_images.py` relative to the `forgecad-image-replicator` skill directory.
|
|
118
|
-
|
|
119
|
-
```bash
|
|
120
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py \
|
|
121
|
-
/tmp/<slug>-replicate/refs/front.png \
|
|
122
|
-
/tmp/<slug>-replicate/render-front.png \
|
|
123
|
-
/tmp/<slug>-replicate/compare-front.png \
|
|
124
|
-
--height 900 --labels "Reference,ForgeCAD"
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
Common helper options:
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png
|
|
131
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.jpg render.png compare.png --height 1200 --fit contain
|
|
132
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --fit cover --labels "Target,Current"
|
|
133
|
-
uv run agent-skill-library/forgecad-image-replicator/scripts/compare_images.py ref.png render.png compare.png --no-labels
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Use `--fit contain` by default. Use `--fit cover` only when both images already share the same crop and aspect.
|
|
137
|
-
|
|
138
|
-
## Acceptance Standard
|
|
139
|
-
|
|
140
|
-
A successful result:
|
|
141
|
-
|
|
142
|
-
- has a written Real Object Brief
|
|
143
|
-
- has parametric ForgeCAD geometry, not a billboard, facade, pasted texture, or one-view shell
|
|
144
|
-
- makes sense from canonical views before reference matching
|
|
145
|
-
- matches each usable reference image as closely as the evidence allows
|
|
146
|
-
- includes honest hidden-side assumptions where the images are silent
|
|
147
|
-
- includes internal, interface, purchased, or hardware geometry when the artifact calls for it
|
|
148
|
-
- passes `forgecad run`
|
|
149
|
-
- includes final reference comparison boards and canonical renders
|
|
150
|
-
- includes inspection results for the risk evidence that matters
|
|
151
|
-
|
|
152
|
-
A result fails if it only works from the original camera.
|
|
153
|
-
|
|
154
|
-
## Output Contract
|
|
44
|
+
Use `--fit contain` (default); use `--fit cover` only when both images already share the same crop and aspect. Run with `--help` for other options.
|
|
155
45
|
|
|
156
|
-
|
|
46
|
+
## Done and Report
|
|
157
47
|
|
|
158
|
-
-
|
|
159
|
-
- reference images used
|
|
160
|
-
- Real Object Brief summary
|
|
161
|
-
- hidden-side and scale assumptions
|
|
162
|
-
- final camera spec for each reference image
|
|
163
|
-
- comparison board path for each usable reference image
|
|
164
|
-
- canonical render paths
|
|
165
|
-
- inspection bundle path, when used
|
|
166
|
-
- validation commands run
|
|
167
|
-
- remaining mismatches, unknowns, or downgraded confidence
|
|
48
|
+
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.
|
|
168
49
|
|
|
169
|
-
|
|
50
|
+
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.
|
|
@@ -6,125 +6,29 @@ forgecad-public: true
|
|
|
6
6
|
|
|
7
7
|
# Low-Level Design (LLD)
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
## When and prerequisites
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- An HLD (`/forgecad-high-level-spec`) with a filled Decisions table must exist. The LLD implements those decisions — it never revisits them.
|
|
12
|
+
- Simple parts (single body, no alternatives to explore) skip the HLD and go straight to the LLD.
|
|
13
|
+
- Output: `<name>-lld.md` next to the model files. Complex assemblies split into a numbered directory: overview, global constraints, per-component files, assembly, verification.
|
|
12
14
|
|
|
13
|
-
|
|
15
|
+
## What an LLD is
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
- **Narrative first** — reads like describing the object over the phone: shape, behavior, purpose, proportions, feel.
|
|
18
|
+
- **Authoritative** — the single source of truth that code implements.
|
|
19
|
+
- **Implementation-blind** — the LLD knows nothing about ForgeCAD's capabilities; never let API convenience shape the design.
|
|
20
|
+
- **Every number has a rationale** — each constraint and each parameter default/range gets an explicit reason; show the math (e.g. `wallThickness = 2.4mm = 6 × 0.4mm nozzle`).
|
|
16
21
|
|
|
17
|
-
##
|
|
22
|
+
## Required structure
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
1. **Narrative** — what it is, how it behaves and interacts, why it exists. Concrete comparisons ("about the size of a deck of cards"); no vague terms without grounding.
|
|
25
|
+
2. **Technical** — typed parameter table (length / angle / count / boolean / choice / ratio / clearance — this is design-document vocabulary, not the runtime `Param.*` API), always with units (mm and degrees are the defaults) and a rationale for every default and range; derived dimensions shown as math; geometry and constraints, each constraint with rationale.
|
|
26
|
+
3. **Verification** — mandatory checklist: dimensional checks, functional checks, printability checks.
|
|
20
27
|
|
|
21
|
-
|
|
22
|
-
- **Story-first**: Lead with the "what it is" narrative before technical details
|
|
23
|
-
- **Sensory richness**: Describe appearance, proportions, materials, feel
|
|
24
|
-
- **Behavioral clarity**: How it functions, moves, interacts
|
|
25
|
-
- **Technical precision**: Exact constraints, dimensions, and relationships
|
|
26
|
-
- **No implementation assumptions**: The LLD knows nothing about ForgeCAD's capabilities
|
|
28
|
+
Don'ts: never open with a parameter list (story before numbers), never leave a constraint implicit, never skip verification.
|
|
27
29
|
|
|
28
|
-
##
|
|
30
|
+
## Process
|
|
29
31
|
|
|
30
|
-
|
|
32
|
+
Iterate via git exactly as in `/forgecad-high-level-spec`: commit every version; the diff, not the conversation, is the review artifact.
|
|
31
33
|
|
|
32
|
-
|
|
33
|
-
<project>-lld/
|
|
34
|
-
├── 00-overview.md
|
|
35
|
-
├── 01-global-constraints.md
|
|
36
|
-
├── 02-components/
|
|
37
|
-
│ ├── base.md
|
|
38
|
-
│ └── bracket.md
|
|
39
|
-
├── 03-assembly.md
|
|
40
|
-
└── 04-verification.md
|
|
41
|
-
```
|
|
42
|
-
|
|
43
|
-
## Document Template
|
|
44
|
-
|
|
45
|
-
### 1. Narrative Section
|
|
46
|
-
|
|
47
|
-
Lead with vivid description — what it is, purpose, visual character, how it behaves.
|
|
48
|
-
|
|
49
|
-
### 2. Technical Section
|
|
50
|
-
|
|
51
|
-
Parameters table, derived dimensions, geometry description, constraints with rationale.
|
|
52
|
-
|
|
53
|
-
### 3. Verification
|
|
54
|
-
|
|
55
|
-
Dimensional checks, functional checks, printability checks — as a checklist.
|
|
56
|
-
|
|
57
|
-
(See examples in the sections below.)
|
|
58
|
-
|
|
59
|
-
## Workflow
|
|
60
|
-
|
|
61
|
-
### Phase 1: Verify HLD decisions are locked
|
|
62
|
-
|
|
63
|
-
If an HLD exists, check that its Decisions table is filled. The LLD implements the decisions — it doesn't revisit them.
|
|
64
|
-
|
|
65
|
-
### Phase 2: Write the document
|
|
66
|
-
|
|
67
|
-
1. Capture the narrative (what it is, how it works)
|
|
68
|
-
2. Extract parameters and constraints
|
|
69
|
-
3. Define verification criteria
|
|
70
|
-
|
|
71
|
-
### Phase 3: Commit and present for review
|
|
72
|
-
|
|
73
|
-
Commit the LLD to git. Tell the user it's ready for review.
|
|
74
|
-
|
|
75
|
-
### Phase 4: Iterate via git
|
|
76
|
-
|
|
77
|
-
Same as HLD: user reviews the file (edits or verbal feedback), agent reads the diff, updates, commits, repeats.
|
|
78
|
-
|
|
79
|
-
```
|
|
80
|
-
Agent writes LLD → git commit → User reviews
|
|
81
|
-
→ Agent reads diff → updates LLD → git commit → repeat until approved
|
|
82
|
-
```
|
|
83
|
-
|
|
84
|
-
### Phase 5: Review for completeness
|
|
85
|
-
|
|
86
|
-
- Can someone build from this alone?
|
|
87
|
-
- Does it implement every HLD decision?
|
|
88
|
-
- Are all constraints explicit with rationale?
|
|
89
|
-
|
|
90
|
-
## Git Workflow
|
|
91
|
-
|
|
92
|
-
LLDs iterate through git, not conversation. The document is the single source of truth.
|
|
93
|
-
|
|
94
|
-
- **Every version gets committed.** No unsaved drafts in conversation.
|
|
95
|
-
- **User feedback goes in the file** (inline comments, strikethroughs) or in chat — agent checks both.
|
|
96
|
-
- **The diff is the review artifact.**
|
|
97
|
-
|
|
98
|
-
## Writing Guidelines
|
|
99
|
-
|
|
100
|
-
**Do:**
|
|
101
|
-
- Use concrete comparisons ("about the size of a deck of cards")
|
|
102
|
-
- Show the math: `wallThickness = 2.4mm`
|
|
103
|
-
- Provide rationale for every constraint
|
|
104
|
-
- Start with the story, then the numbers
|
|
105
|
-
|
|
106
|
-
**Don't:**
|
|
107
|
-
- Start with a parameter list
|
|
108
|
-
- Leave constraints implicit
|
|
109
|
-
- Skip verification criteria
|
|
110
|
-
- Use vague terms without grounding
|
|
111
|
-
|
|
112
|
-
## Parameter Types
|
|
113
|
-
|
|
114
|
-
- `length` — mm default
|
|
115
|
-
- `angle` — degrees default
|
|
116
|
-
- `count` — integer
|
|
117
|
-
- `boolean` — true/false
|
|
118
|
-
- `choice` — enumerated options
|
|
119
|
-
- `ratio` — dimensionless
|
|
120
|
-
- `clearance` — fit tolerances, mm default
|
|
121
|
-
|
|
122
|
-
Always specify units. Always provide rationale for defaults and ranges.
|
|
123
|
-
|
|
124
|
-
## Relationship to Other Skills
|
|
125
|
-
|
|
126
|
-
| Stage | Skill | Output |
|
|
127
|
-
|-------|-------|--------|
|
|
128
|
-
| 1. Explore the problem space | `/forgecad-high-level-spec` | `*-hld.md` |
|
|
129
|
-
| 2. Detailed design | `/forgecad-lld` (this skill) | `*-lld.md` |
|
|
130
|
-
| 3. Implementation | `/forgecad-make-a-model` + `/forgecad` | `.forge.js` files |
|
|
34
|
+
Completeness gate before presenting: Can someone build from this alone? Does it implement every HLD decision? Is every constraint explicit with rationale?
|