forgecad 0.9.14 → 0.9.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +6 -4
- package/README.md +8 -4
- package/dist/assets/{AdminPage-eWGs2K6H.js → AdminPage-CXvls4-J.js} +2 -2
- package/dist/assets/{BenchmarkPage-CTrLKfpo.js → BenchmarkPage-B27zk8xL.js} +4 -15
- package/dist/assets/{BlogPage-5nPesyds.js → BlogPage-CMAVvgQL.js} +2 -2
- package/dist/assets/{DocsPage-C4Y3nbYc.js → DocsPage-knf4I4h7.js} +9 -3
- package/dist/assets/EditorApp-BHMQlJ-D.js +14686 -0
- package/dist/assets/{EditorApp-BAnckbsk.css → EditorApp-BpjZgzk0.css} +846 -0
- package/dist/assets/{EmbedViewer-C8fB4n5U.js → EmbedViewer-D7ZGlFjx.js} +3 -3
- package/dist/assets/{LandingPageProofDriven-jSz0LaMM.js → LandingPageProofDriven-CnevhTE8.js} +36 -38
- package/dist/assets/LegalPage-BPTUmqeg.js +39 -0
- package/dist/assets/LegalPage-BRlScr9A.css +91 -0
- package/dist/assets/{PricingPage-B83B90zh.js → PricingPage-B0D4goG_.js} +19 -19
- package/dist/assets/{PricingPage-BMedqFef.css → PricingPage-BPF6HKyO.css} +25 -0
- package/dist/assets/{SettingsPage-DY889pcu.js → SettingsPage-CFF-UgjI.js} +2 -2
- package/dist/assets/app-CE3sYcV7.css +3890 -0
- package/dist/assets/{app-bEww1ic4.js → app-T0pDcSX4.js} +3382 -1069
- package/dist/assets/cli/{render-Cho2uKG_.js → render-C5pcIISc.js} +477 -29
- package/dist/assets/{constructionHistoryWorker-HYwzJY4m.js → constructionHistoryWorker-Ba2Hm58b.js} +928 -243
- package/dist/assets/{evalWorker-CjQwJSE-.js → evalWorker-vkx310U2.js} +8883 -6040
- package/dist/assets/{forgecad_geometry-CH2nvuLA.js → forgecad_geometry-Dgceylq9.js} +43 -1
- package/dist/assets/forgecad_geometry_bg-dD4RNQF1.wasm +0 -0
- package/dist/assets/{inspectWorker-DeRnMVv1.js → inspectWorker-BuTJDVX6.js} +1179 -273
- package/dist/assets/{javascript-70-4uGcz.js → javascript-1kQXfVaz.js} +1 -1
- package/dist/assets/{targets-D6PWsv6X.js → jointPose-B_Cgedn9.js} +71 -3
- package/dist/assets/landing-proof-driven-DiGqdtWa.js +18 -0
- package/dist/assets/{landing-proof-driven-oFYW6mjz.css → landing-proof-driven-ORyigZ6p.css} +13 -7
- package/dist/assets/legalContent-ZfFGMmi4.js +251 -0
- package/dist/assets/{manifold-rmfAcdwF.js → manifold-BWgsjmAM.js} +1 -1
- package/dist/assets/{manifold-uRzgk5O8.js → manifold-D6IFSkhH.js} +2 -2
- package/dist/assets/{manifold-CG9Fokx-.js → manifold-rZexZI0G.js} +1 -1
- package/dist/assets/{reportWorker-4cW_ZpoS.js → reportWorker-0AGij1Ru.js} +8659 -12771
- package/dist/assets/{scalar-sampling-budget-CfDiFvh7.js → scalar-sampling-budget-J5cuzxT1.js} +8050 -6203
- package/dist/assets/{scanProxyWorker-Bs2TDgLw.js → scanProxyWorker-Vl4Wxa1y.js} +50 -6
- package/dist/assets/{solver-DuJAO8S6.js → solver-BZ9LPTHs.js} +1 -1
- package/dist/assets/solver_bg-DAHZJ_rw.wasm +0 -0
- package/dist/assets/{vendor-react-Da3A2QmU.js → vendor-react-6j1Kke-Y.js} +6 -5
- package/dist/cli/render.html +1 -1
- package/dist/docs/index.html +2 -2
- package/dist/docs-raw/AI/ai-native-cad.md +50 -0
- package/dist/docs-raw/AI/usage.md +5 -12
- package/dist/docs-raw/CLI.md +34 -10
- package/dist/docs-raw/component-model.md +27 -11
- package/dist/docs-raw/generated/assembly.md +374 -187
- package/dist/docs-raw/generated/concepts.md +245 -237
- package/dist/docs-raw/generated/core.md +283 -6
- package/dist/docs-raw/generated/curves.md +274 -361
- package/dist/docs-raw/generated/lib.md +9 -19
- package/dist/docs-raw/generated/output.md +29 -4
- package/dist/docs-raw/generated/runtime-names.md +49 -0
- package/dist/docs-raw/generated/sdf.md +31 -0
- package/dist/docs-raw/generated/sheet-metal.md +9 -0
- package/dist/docs-raw/generated/sketch.md +44 -1
- package/dist/docs-raw/generated/viewport.md +11 -3
- package/dist/docs-raw/guides/coordinate-system.md +20 -16
- package/dist/docs-raw/guides/geometry-conventions.md +2 -2
- package/dist/docs-raw/guides/inspection-bundles.md +2 -1
- package/dist/docs-raw/guides/joint-design.md +24 -0
- package/dist/docs-raw/guides/positioning.md +13 -3
- package/dist/docs-raw/legal/privacy.md +63 -0
- package/dist/docs-raw/legal/software-license.md +55 -0
- package/dist/docs-raw/legal/terms.md +87 -0
- package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +1 -1
- package/dist/docs-raw/skills/forgecad-blockout-model.md +1 -1
- package/dist/docs-raw/skills/forgecad-component-model.md +11 -2
- package/dist/docs-raw/skills/forgecad-high-level-spec.md +1 -1
- package/dist/docs-raw/skills/forgecad-image-replicator.md +8 -8
- package/dist/docs-raw/skills/forgecad-lld.md +1 -1
- package/dist/docs-raw/skills/forgecad-make-a-model.md +40 -39
- package/dist/docs-raw/skills/forgecad-model-grader.md +2 -2
- package/dist/docs-raw/skills/forgecad-prepare-prompt.md +2 -2
- package/dist/docs-raw/skills/forgecad-project.md +3 -1
- package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +1 -1
- package/dist/docs-raw/skills/forgecad-render-inspect.md +4 -2
- package/dist/docs-raw/skills/forgecad-visual-spec.md +1 -1
- package/dist/docs-raw/skills/forgecad.md +4 -3
- package/dist/docs-raw/welcome.md +2 -0
- package/dist/index.html +40 -12
- package/dist/llms.txt +8 -0
- package/dist/site.webmanifest +1 -1
- package/dist/sitemap.xml +49 -13
- package/dist-cli/{check-compiler-U5SOPN7X.js → check-compiler-SYQ2PWOB.js} +1 -2
- package/dist-cli/{check-query-propagation-XOKNSSYU.js → check-query-propagation-HIAGV62W.js} +1 -2
- package/dist-cli/{chunk-EXWGNL6K.js → chunk-SPZE3DUY.js} +20659 -17930
- package/dist-cli/forgecad.js +3568 -1250
- package/dist-cli/{forgecad_geometry-GYVNKPIE.js → forgecad_geometry-QOQIIP53.js} +42 -1
- package/dist-cli/forgecad_geometry_bg.wasm +0 -0
- package/dist-cli/{solver-46FFSK2U.js → solver-OK4HECRH.js} +0 -1
- package/dist-cli/solver_bg.wasm +0 -0
- package/dist-skill/CONTEXT.md +1192 -725
- package/dist-skill/SKILL.md +3 -2
- package/dist-skill/docs/API/core/concepts.md +64 -1
- package/dist-skill/docs/CLI.md +34 -10
- package/dist-skill/docs/generated/assembly.md +339 -213
- package/dist-skill/docs/generated/core.md +283 -6
- package/dist-skill/docs/generated/curves.md +272 -362
- package/dist-skill/docs/generated/lib.md +9 -19
- package/dist-skill/docs/generated/output.md +29 -4
- package/dist-skill/docs/generated/runtime-names.md +40 -0
- package/dist-skill/docs/generated/sdf.md +31 -0
- package/dist-skill/docs/generated/sheet-metal.md +9 -0
- package/dist-skill/docs/generated/sketch.md +44 -2
- package/dist-skill/docs/generated/viewport.md +2 -87
- package/dist-skill/docs/guides/coordinate-system.md +20 -16
- package/dist-skill/docs/guides/geometry-conventions.md +2 -2
- package/dist-skill/docs/guides/inspection-bundles.md +2 -1
- package/dist-skill/docs/guides/joint-design.md +24 -0
- package/dist-skill/docs/guides/positioning.md +13 -3
- package/dist-skill/library/forgecad-component-model/SKILL.md +10 -1
- package/dist-skill/library/forgecad-image-replicator/SKILL.md +6 -6
- package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.py +166 -0
- package/dist-skill/library/forgecad-make-a-model/SKILL.md +39 -38
- package/dist-skill/library/forgecad-model-grader/SKILL.md +1 -1
- package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +1 -1
- package/dist-skill/library/forgecad-project/SKILL.md +2 -0
- package/dist-skill/library/forgecad-render-inspect/SKILL.md +3 -1
- package/examples/api/assembly-kinematics-foundation.forge.js +65 -0
- package/examples/api/assembly-kinematics-four-bar.forge.js +115 -0
- package/examples/api/assembly-kinematics-limb.forge.js +116 -0
- package/examples/api/connector-frame-rig-chain.forge.js +102 -0
- package/examples/api/exact-sheet-shell-assembly.forge.js +0 -2
- package/examples/api/exact-surface-studio.forge.js +6 -8
- package/examples/api/helix-basics.forge.js +8 -8
- package/examples/api/lean-foundations/README.md +12 -0
- package/examples/api/lean-foundations/curve-blend-exact.forge.js +22 -0
- package/examples/api/lean-foundations/curve-fit-interpolation.forge.js +18 -0
- package/examples/api/lean-foundations/curve-helix-canonicalization.forge.js +27 -0
- package/examples/api/lean-foundations/curve-route-canonicalization.forge.js +16 -0
- package/examples/api/lean-foundations/curve-trim-reverse.forge.js +24 -0
- package/examples/api/lean-foundations/exact-curve-arc.forge.js +36 -0
- package/examples/api/mixed-edge-finishes-proof.forge.js +8 -11
- package/examples/api/route3d-elbow.forge.js +71 -0
- package/examples/api/transition-curves.forge.js +44 -15
- package/examples/api/variable-sweep-test.forge.js +3 -1
- package/examples/api/y-blend-corner-showcase.forge.js +0 -2
- package/examples/generative/coral-vase.forge.js +1 -1
- package/examples/nurbs-tube.forge.js +1 -1
- package/package.json +17 -13
- package/dist/assets/EditorApp-lXv53A1m.js +0 -13610
- package/dist/assets/app-CsHnaBWt.css +0 -1789
- package/dist/assets/forgecad_geometry_bg-C5_E9Oa9.wasm +0 -0
- package/dist/assets/solver_bg-CWvv4lnN.wasm +0 -0
- package/dist/docs-raw/API/README.md +0 -16
- package/dist/docs-raw/API/core/concepts.md +0 -118
- package/dist/docs-raw/INDEX.md +0 -138
- package/dist/docs-raw/RELEASING.md +0 -87
- package/dist/docs-raw/agent-native-api.md +0 -27
- package/dist/docs-raw/beta-deployment.md +0 -304
- package/dist/docs-raw/beta-operations.md +0 -325
- package/dist/docs-raw/blueprint-first.md +0 -145
- package/dist/docs-raw/cli-monetization.md +0 -112
- package/dist/docs-raw/coding-best-practices.md +0 -120
- package/dist/docs-raw/coding.md +0 -340
- package/dist/docs-raw/deployment.md +0 -374
- package/dist/docs-raw/guides/skill-maintenance.md +0 -161
- package/dist/docs-raw/guides/surface-members.md +0 -82
- package/dist/docs-raw/harbor-cli.md +0 -854
- package/dist/docs-raw/internals/backend-vocabulary.md +0 -35
- package/dist/docs-raw/internals/compiler.md +0 -307
- package/dist/docs-raw/internals/constraint-solver-quality.md +0 -161
- package/dist/docs-raw/internals/constraint-solver.md +0 -176
- package/dist/docs-raw/internals/shape-from-slices.md +0 -152
- package/dist/docs-raw/internals/sketch-2d-pipeline.md +0 -108
- package/dist/docs-raw/platform/admin.md +0 -45
- package/dist/docs-raw/platform/architecture.md +0 -82
- package/dist/docs-raw/platform/auth.md +0 -139
- package/dist/docs-raw/platform/email.md +0 -67
- package/dist/docs-raw/platform/google-oauth-setup.md +0 -88
- package/dist/docs-raw/platform/observability.md +0 -197
- package/dist/docs-raw/platform/projects.md +0 -111
- package/dist/docs-raw/platform/sharing.md +0 -90
- package/dist/docs-raw/product/README.md +0 -39
- package/dist/docs-raw/product/api-as-product-language.md +0 -13
- package/dist/docs-raw/product/business-model.md +0 -15
- package/dist/docs-raw/product/competitive-positioning.md +0 -17
- package/dist/docs-raw/product/creative-manufacturing.md +0 -15
- package/dist/docs-raw/product/founder-story.md +0 -11
- package/dist/docs-raw/product/manufacturing-workflows.md +0 -15
- package/dist/docs-raw/product/onboarding-first-experience.md +0 -256
- package/dist/docs-raw/product/product-loop.md +0 -17
- package/dist/docs-raw/product/strategic-decisions.md +0 -22
- package/dist/docs-raw/product/user-outreach-email-templates.md +0 -161
- package/dist/docs-raw/product/user-segments.md +0 -15
- package/dist/docs-raw/product/vision.md +0 -26
- package/dist/docs-raw/rl-environments.md +0 -350
- package/dist/docs-raw/runbook.md +0 -611
- package/dist-cli/check-compiler-U5SOPN7X.js.map +0 -1
- package/dist-cli/check-query-propagation-XOKNSSYU.js.map +0 -1
- package/dist-cli/chunk-EXWGNL6K.js.map +0 -1
- package/dist-cli/forgecad.js.map +0 -1
- package/dist-cli/forgecad_geometry-GYVNKPIE.js.map +0 -1
- package/dist-cli/solver-46FFSK2U.js.map +0 -1
- package/dist-skill/SKILL-dev.md +0 -145
- package/dist-skill/docs-dev/API/core/concepts.md +0 -118
- package/dist-skill/docs-dev/CLI.md +0 -677
- package/dist-skill/docs-dev/agent-native-api.md +0 -27
- package/dist-skill/docs-dev/blueprint-first.md +0 -145
- package/dist-skill/docs-dev/coding-best-practices.md +0 -120
- package/dist-skill/docs-dev/coding.md +0 -340
- package/dist-skill/docs-dev/component-model.md +0 -164
- package/dist-skill/docs-dev/generated/assembly.md +0 -794
- package/dist-skill/docs-dev/generated/core.md +0 -2117
- package/dist-skill/docs-dev/generated/curves.md +0 -2583
- package/dist-skill/docs-dev/generated/lib.md +0 -169
- package/dist-skill/docs-dev/generated/output.md +0 -247
- package/dist-skill/docs-dev/generated/sdf.md +0 -446
- package/dist-skill/docs-dev/generated/sheet-metal.md +0 -504
- package/dist-skill/docs-dev/generated/sketch.md +0 -1811
- package/dist-skill/docs-dev/generated/viewport.md +0 -585
- package/dist-skill/docs-dev/generated/wood.md +0 -108
- package/dist-skill/docs-dev/guides/coordinate-system.md +0 -46
- package/dist-skill/docs-dev/guides/geometry-conventions.md +0 -52
- package/dist-skill/docs-dev/guides/inspection-bundles.md +0 -485
- package/dist-skill/docs-dev/guides/joint-design.md +0 -78
- package/dist-skill/docs-dev/guides/modeling-recipes.md +0 -78
- package/dist-skill/docs-dev/guides/positioning.md +0 -161
- package/dist-skill/docs-dev/guides/skill-maintenance.md +0 -161
- package/dist-skill/docs-dev/internals/backend-vocabulary.md +0 -35
- package/dist-skill/docs-dev/internals/compiler.md +0 -307
- package/dist-skill/docs-dev/internals/constraint-solver-quality.md +0 -161
- package/dist-skill/docs-dev/internals/constraint-solver.md +0 -176
- package/dist-skill/docs-dev/internals/sketch-2d-pipeline.md +0 -108
- package/dist-skill/library/forgecad-image-replicator/scripts/compare_images.mjs +0 -289
- package/examples/api/bolted-service-cover.forge.js +0 -17
- package/examples/api/cable-gland-anchor.forge.js +0 -14
- package/examples/api/captured-cartridge-guide.forge.js +0 -14
- package/examples/api/captured-linear-slide.forge.js +0 -13
- package/examples/api/clevis-pin-joint.forge.js +0 -13
- package/examples/api/datum-enclosure.forge.js +0 -16
- package/examples/api/hose-barb-port.forge.js +0 -14
- package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
- package/examples/api/living-hinge-cover.forge.js +0 -14
- package/examples/api/pcb-terminal-block.forge.js +0 -22
- package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
- package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
- package/examples/api/routed-tube-clip.forge.js +0 -15
- package/examples/api/seated-bearing-stack.forge.js +0 -30
- package/examples/api/snap-latch-cover.forge.js +0 -14
- package/examples/api/thumb-screw-clamp.forge.js +0 -15
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: dev-compiler
|
|
3
|
-
skill-order: 0
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Backend Vocabulary
|
|
7
|
-
|
|
8
|
-
Use Forge terms first. Mention concrete backend implementations only at real implementation boundaries.
|
|
9
|
-
|
|
10
|
-
## Canonical Terms
|
|
11
|
-
|
|
12
|
-
- **Forge semantic intent**: the meaning of a modeling operation in Forge terms.
|
|
13
|
-
- **Compile plan**: the serializable Forge IR that preserves that intent for later lowering.
|
|
14
|
-
- **Backend**: a geometry engine with its own strengths, limits, and implementation details.
|
|
15
|
-
- **Capability**: something a backend can or cannot do for a given flow.
|
|
16
|
-
- **Route**: the centralized decision about which backend path or fallback a scene/object will use.
|
|
17
|
-
- **Implementation boundary**: the narrow place where a concrete backend or adapter is named directly.
|
|
18
|
-
|
|
19
|
-
## Naming Rules
|
|
20
|
-
|
|
21
|
-
- In shared IR, scene routing, and contributor docs, prefer Forge terms such as `compile plan`, `backend`, `capability`, and `route`.
|
|
22
|
-
- Use backend names like `manifold` or `occt` only when the code or doc is truly about that implementation boundary.
|
|
23
|
-
- Use `CadQuery` only when discussing the current Python export executor or other real CadQuery-specific behavior.
|
|
24
|
-
- Use `BREP` and `STEP` for file formats and interchange behavior, not as the primary architecture names for shared compiler layers.
|
|
25
|
-
- Avoid `exact` as a substitute for backend identity. If the real concern is capability, say which capability is required or missing.
|
|
26
|
-
|
|
27
|
-
## Practical Test
|
|
28
|
-
|
|
29
|
-
When naming a shared type or document section, ask:
|
|
30
|
-
|
|
31
|
-
1. Is this describing Forge's meaning?
|
|
32
|
-
2. Is this describing a backend capability?
|
|
33
|
-
3. Or is this describing one backend implementation detail?
|
|
34
|
-
|
|
35
|
-
If the answer is 1 or 2, do not name it after a historical implementation.
|
|
@@ -1,307 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: dev-compiler
|
|
3
|
-
skill-order: 1
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Forge Compiler Architecture
|
|
7
|
-
|
|
8
|
-
This is the durable architecture record for ForgeCAD's multi-backend modeling system.
|
|
9
|
-
|
|
10
|
-
If you add or refactor geometry features, read this first.
|
|
11
|
-
|
|
12
|
-
Canonical naming for this area lives in [backend-vocabulary.md](backend-vocabulary.md).
|
|
13
|
-
|
|
14
|
-
## Core Position
|
|
15
|
-
|
|
16
|
-
Forge should not invent a new CAD language or a new geometry kernel.
|
|
17
|
-
|
|
18
|
-
Forge should:
|
|
19
|
-
|
|
20
|
-
- keep JS/TS as the host language
|
|
21
|
-
- keep Forge's semantic feature model as the source of truth
|
|
22
|
-
- lower that model into different geometry backends intentionally
|
|
23
|
-
- make capability gaps explicit in diagnostics and tests
|
|
24
|
-
|
|
25
|
-
The unique thing to protect is not backend code. It is Forge's code-first modeling layer:
|
|
26
|
-
|
|
27
|
-
- browser-first iteration
|
|
28
|
-
- parametric code as the authoring format
|
|
29
|
-
- composable multi-file projects
|
|
30
|
-
- AI-writable design code
|
|
31
|
-
- explicit provenance and backend visibility
|
|
32
|
-
|
|
33
|
-
## What To Steal
|
|
34
|
-
|
|
35
|
-
We should steal proven ideas aggressively.
|
|
36
|
-
|
|
37
|
-
Steal from Fusion 360 / Onshape / FeatureScript:
|
|
38
|
-
|
|
39
|
-
- semantic feature graphs
|
|
40
|
-
- workplanes and sketch planes as first-class modeling context
|
|
41
|
-
- query/reference systems for faces, edges, bodies, and feature results
|
|
42
|
-
- feature definitions that lower into kernels instead of directly calling them from UI/API code
|
|
43
|
-
|
|
44
|
-
Steal from CadQuery / build123d / replicad:
|
|
45
|
-
|
|
46
|
-
- OCCT execution patterns
|
|
47
|
-
- exact solid feature expectations
|
|
48
|
-
- practical scripting ergonomics around sketches, planes, and feature builders
|
|
49
|
-
|
|
50
|
-
Steal from OCAF-style document systems:
|
|
51
|
-
|
|
52
|
-
- durable reference identity
|
|
53
|
-
- explicit ownership of topology/reference propagation
|
|
54
|
-
|
|
55
|
-
Do not steal:
|
|
56
|
-
|
|
57
|
-
- a separate Forge DSL
|
|
58
|
-
- backend object models as the user-facing API
|
|
59
|
-
- exporter-only side systems that bypass the compiler
|
|
60
|
-
|
|
61
|
-
## The Make-Or-Break Layer
|
|
62
|
-
|
|
63
|
-
This is where Forge will likely succeed or fail:
|
|
64
|
-
|
|
65
|
-
- the semantic feature graph
|
|
66
|
-
- the compiled-scene routing layer
|
|
67
|
-
- the reference / workplane / query system
|
|
68
|
-
|
|
69
|
-
Why:
|
|
70
|
-
|
|
71
|
-
- primitives, booleans, extrudes, and revolves are not the hard part
|
|
72
|
-
- real mechanical design depends on downstream face- and edge-driven features
|
|
73
|
-
- those features only stay usable if references survive feature chains predictably
|
|
74
|
-
|
|
75
|
-
If this layer is weak, the repo will accumulate:
|
|
76
|
-
|
|
77
|
-
- backend-specific feature code at callsites
|
|
78
|
-
- export-only implementations
|
|
79
|
-
- brittle face-name assumptions
|
|
80
|
-
- features that work in demos but collapse in real parts
|
|
81
|
-
|
|
82
|
-
If this layer is strong, future features stay additive.
|
|
83
|
-
|
|
84
|
-
## Success Criteria
|
|
85
|
-
|
|
86
|
-
We are succeeding only if all of these are true:
|
|
87
|
-
|
|
88
|
-
1. Forge compile intent is the source of truth for mainstream part-design features.
|
|
89
|
-
2. Scene-level routing is centralized, inspectable, and reused by export/debug/test flows.
|
|
90
|
-
3. New features do not need ad hoc backend decisions at callsites.
|
|
91
|
-
4. Workplane/reference/query semantics are stable enough for ordinary downstream feature chains.
|
|
92
|
-
5. Most normal Design-workspace features can be added by extending one semantic node family and two lowerers.
|
|
93
|
-
6. Tests catch plan drift, routing drift, and backend-output drift before release.
|
|
94
|
-
|
|
95
|
-
We are failing if any of these become normal:
|
|
96
|
-
|
|
97
|
-
- "this feature only works in export"
|
|
98
|
-
- "this feature only works in Manifold"
|
|
99
|
-
- "this feature only works if you know the right face name"
|
|
100
|
-
- "just add one more backend escape hatch"
|
|
101
|
-
- "the snapshot changed, probably fine"
|
|
102
|
-
|
|
103
|
-
## Contributor Contract
|
|
104
|
-
|
|
105
|
-
When adding a geometry feature:
|
|
106
|
-
|
|
107
|
-
1. Define the Forge semantic intent first.
|
|
108
|
-
2. Decide which domain owns it.
|
|
109
|
-
3. Add or extend the compile node.
|
|
110
|
-
4. Lower it through Manifold.
|
|
111
|
-
5. Lower it through the maintained export backend, or add explicit unsupported diagnostics.
|
|
112
|
-
6. Route it through the scene compiler.
|
|
113
|
-
7. Add invariants and snapshot coverage.
|
|
114
|
-
8. Update permanent docs and the living mission tracker.
|
|
115
|
-
|
|
116
|
-
Do not:
|
|
117
|
-
|
|
118
|
-
- call a concrete backend directly from user-facing feature APIs unless that code is the backend lowerer itself
|
|
119
|
-
- add exporter-only feature behavior that is invisible to the compiler
|
|
120
|
-
- silently widen or narrow exact coverage
|
|
121
|
-
|
|
122
|
-
## Implementation Path
|
|
123
|
-
|
|
124
|
-
### Phase 1: Compiler Ownership
|
|
125
|
-
|
|
126
|
-
Goal:
|
|
127
|
-
|
|
128
|
-
- every supported feature records Forge intent
|
|
129
|
-
- lowerers consume that intent
|
|
130
|
-
- scene routing is centralized
|
|
131
|
-
|
|
132
|
-
Deliverables:
|
|
133
|
-
|
|
134
|
-
- backend-neutral compile nodes
|
|
135
|
-
- compiled-scene routing and diagnostics
|
|
136
|
-
- snapshot and invariant coverage
|
|
137
|
-
|
|
138
|
-
### Phase 2: Reference / Workplane / Query Model
|
|
139
|
-
|
|
140
|
-
Goal:
|
|
141
|
-
|
|
142
|
-
- face-, edge-, and plane-driven features stop depending on brittle synthetic naming
|
|
143
|
-
|
|
144
|
-
Deliverables:
|
|
145
|
-
|
|
146
|
-
- first-class workplane representation
|
|
147
|
-
- query/reference API for "what this feature means"
|
|
148
|
-
- propagation rules for downstream feature ownership
|
|
149
|
-
|
|
150
|
-
This is the highest-leverage next layer. Without it, `shell`, fillet/chamfer, holes, projection, and sheet-metal-style features will all stay fragile.
|
|
151
|
-
|
|
152
|
-
Initial slice:
|
|
153
|
-
|
|
154
|
-
- sketches placed with `onFace()` should carry semantic workplane/query metadata, not just a resolved 4x4 matrix
|
|
155
|
-
- downstream feature code should be able to ask "which workplane/query produced this?" without reverse-engineering transforms
|
|
156
|
-
|
|
157
|
-
Current progress:
|
|
158
|
-
|
|
159
|
-
- `onFace()` placements now record semantic workplane models on sketches
|
|
160
|
-
- `extrude()` and `revolve()` now preserve that intent in the shape compile graph as a first-class workplane-placement transform instead of collapsing it to an anonymous rigid transform
|
|
161
|
-
- downstream compiler-aware code can now inspect that preserved workplane placement directly
|
|
162
|
-
- that compiler-visible workplane placement now propagates through later shape transforms, so provenance inspection stays aligned with the current transformed feature state
|
|
163
|
-
- both lowerers now execute that preserved workplane-placement intent, and export regression tests exercise the maintained export-backend path end-to-end
|
|
164
|
-
- compile-covered feature results now carry compiler-owned query-owner lineage, so parent-body ownership is no longer implicit runtime state
|
|
165
|
-
- `src/forge/queryModel.ts` now defines the shared query/reference contract for face provenance instead of letting workplane and topology code drift separately
|
|
166
|
-
- workplane sources and `FaceRef` values now share that face-query contract when compiler-owned provenance exists
|
|
167
|
-
- `src/forge/queryModel.ts` now also defines the shared edge-query contract for tracked edges and direct edge refs, including selector semantics for whole-edge vs. `start` / `end` / `midpoint` references
|
|
168
|
-
- tracked-topology flows now preserve that edge-query metadata through clone/translate/workplane-placement transforms, and placement invariants assert that tracked edge selectors stay aligned with the actual transformed edge geometry
|
|
169
|
-
- booleans, shell, split/trim flows, and downstream workplane-driven features now preserve that owner lineage through the compile graph instead of erasing it at each feature boundary
|
|
170
|
-
- mirrored results plus `linearPattern()` / `circularPattern()` helper copies now get fresh compiler-owned repeated-result owners when their source shapes stay compile-covered
|
|
171
|
-
- placement and exact-export invariants now check that owner lineage survives ordinary shell-plus-cut-plus-boolean style part workflows
|
|
172
|
-
- topology-changing compile nodes now also carry an explicit backend-neutral `queryPropagation` contract for preserved/created query meaning instead of leaving post-rewrite semantics implicit
|
|
173
|
-
- that shared propagation contract now models propagated face/edge queries, feature-created query slots, and explicit ambiguity/unsupported diagnostics on rewrite-producing results
|
|
174
|
-
- trim/split-by-plane, shell, hole, cut, boolean, and edge-finish rewrites now also declare descendant contracts on top of that propagation kernel
|
|
175
|
-
- the shared descendant-resolution layer turns those lineage inputs into defended singles, face regions/sets, edge chains, or explicit unsupported results instead of making each caller reverse-engineer rewrite heuristics
|
|
176
|
-
- trim/split-by-plane now expose their plane-cap face plus descendant-region contracts for preserved source surfaces, while hole/cut host-face splits and supported boolean difference/intersection descendants stay reviewable as defended regions instead of disappearing behind one generic ambiguity bucket
|
|
177
|
-
- boolean rewrites now consume that same contract: supported unions still preserve operand label/query lineage when the source owners stay distinct, and coplanar/multi-member descendants can now surface as defended face sets instead of only masked name conflicts
|
|
178
|
-
- shell, hole, and cut now layer defended created-face slots plus defended descendant regions on top of that propagation kernel instead of leaving all post-rewrite face meaning as placeholders
|
|
179
|
-
- compile-covered `Shape.face(name)` resolution now reads from the compile graph plus the descendant layer, so supported shell inner walls, blind-hole floors, cut-created walls, split host faces, and defended boolean face sets can produce real `FaceRef` values after topology rewrites
|
|
180
|
-
- label-based `onFace(shape, 'inner-side-right', ...)` placement now routes through the compiler-owned face resolver, while direct `FaceRef` placements preserve created-face/propagated-face provenance instead of collapsing everything back to anonymous refs
|
|
181
|
-
- `src/forge/kernel.ts` and the compiler inspection surface now expose collected topology-rewrite propagation plus descendant contracts directly, and the placement/compiler invariants assert that those contracts stay inspectable and deterministic through later transforms
|
|
182
|
-
- `forgecad check query-propagation` now snapshots both the propagation surface and the descendant contracts directly, so defended plane-cap faces, split-face regions, face sets, merged-edge chains, and explicit unsupported rewrite boundaries stay reviewable without wading through the full compiler-scene baseline
|
|
183
|
-
|
|
184
|
-
Still missing:
|
|
185
|
-
|
|
186
|
-
- universal durable face/edge identity across topology-changing operations
|
|
187
|
-
- mesh/SDF rewrite families still need their own explicit descendant contracts instead of borrowed BREP-style assumptions
|
|
188
|
-
- shared edge-query selectors exist for tracked topology, but topology-changing features still do not produce new single-edge ownership for most rewritten/created edges beyond today's defended preserved-edge and edge-chain subset
|
|
189
|
-
- stable downstream face/edge references beyond today's defended single/region/set/chain subset still need the follow-on work in tasks 180, 190, and 195
|
|
190
|
-
|
|
191
|
-
### Phase 3: Mainstream Feature Families
|
|
192
|
-
|
|
193
|
-
Goal:
|
|
194
|
-
|
|
195
|
-
- dual-lower the ordinary part-design stack
|
|
196
|
-
|
|
197
|
-
Priority order:
|
|
198
|
-
|
|
199
|
-
- `shell`
|
|
200
|
-
- fillet / chamfer
|
|
201
|
-
- holes / patterned cuts
|
|
202
|
-
- projection and sketch-on-face refinement
|
|
203
|
-
- mirror / pattern workflows driven by semantic references
|
|
204
|
-
|
|
205
|
-
Current progress:
|
|
206
|
-
|
|
207
|
-
- `shell()` is now compiler-owned as the first mainstream exact feature-family slice instead of being left for exporter-only logic
|
|
208
|
-
- both lowerers consume the same semantic `shell` node and rewrite supported cases into backend-native boolean/extrude/cylinder plans
|
|
209
|
-
- `shape.hole()` and `shape.cutout()` now form a compiler-owned hole/cut workflow slice anchored to the shared face-query/workplane model
|
|
210
|
-
- through holes, blind holes, counterbores, countersinks, and planar `upToFace` hole/cut extents now lower through both Manifold and the maintained export backend from that shared semantic node family
|
|
211
|
-
- shell, hole, and cut now expose defended named created-face subsets on top of the topology-rewrite kernel, so downstream features can target inner shell walls, blind-hole floors, and supported cut walls/floors without falling back to anonymous runtime placement
|
|
212
|
-
- richer hole variants now also expose defended `counterbore-floor`, `counterbore-wall`, and `countersink-wall` created-face slots where Forge can model them directly
|
|
213
|
-
- `filletEdge()` and `chamferEdge()` now form a first compiler-owned tracked-edge finishing slice for supported vertical edges on compile-covered `box()` and `rectangle(...).extrude(...)` bodies
|
|
214
|
-
- the post-rewrite edge-query layer now also defends untouched sibling vertical edges after those supported edge-finish rewrites, plus later supported boolean-union descendants when one preserved propagated-edge lineage stays explicit
|
|
215
|
-
- regression coverage now includes compiler snapshots plus exact-export invariants for `shell()`
|
|
216
|
-
- regression coverage now also includes exact/runtime/export checks for the supported hole/cut workflow subset
|
|
217
|
-
- regression coverage now also includes API, placement-owner, query-propagation, compiler-snapshot, exact-plan, corpus, and end-to-end export checks for the broadened tracked-edge fillet/chamfer subset
|
|
218
|
-
- the regression suite now also includes a file-backed ordinary-parts corpus under `examples/compiler-corpus/`, so shell, richer hole/cut workflows, projection replay, trim-created faces, repeated descendants, and finishing flows are exercised together instead of only as isolated unit slices
|
|
219
|
-
- the MLP closeout review surface now lives in that corpus plus `forgecad check compiler`, `forgecad check query-propagation`, and `forgecad check brep`, so the defended subset is reviewable from the repo instead of from tribal knowledge
|
|
220
|
-
- mirrored downstream features and helper-driven linear/circular repetition now preserve repeated-result ownership on top of the shared face-query backbone
|
|
221
|
-
- supported boolean unions now also preserve owner-scoped label queries from repeated descendants, and compiler regressions cover both explicit duplicate-owner merge ambiguity and later boolean chains that inherit those propagated queries
|
|
222
|
-
- exact export regression coverage now includes a repeated-feature part where a mirrored descendant drives a downstream workplane feature inside a boolean chain
|
|
223
|
-
- `projectToPlane()` sketches now keep an explicit projection node in the compiler graph instead of collapsing immediately to anonymous runtime geometry
|
|
224
|
-
- compile-covered `Sketch.onFace(shape, name)` resolution now prefers the defended face-query table on `Shape` targets, so supported boolean-preserved names and explicit repeated-descendant `FaceRef`s stay visible to later features instead of falling back to anonymous heuristics
|
|
225
|
-
- the supported exact subset can now replay projection-driven follow-on features when the source reduces to one defended planar projection basis: placed straight extrusions, compatible shell/hole/cut descendants, and boolean unions of compatible projected operands all stay aligned on matching parallel target planes
|
|
226
|
-
|
|
227
|
-
Current limits:
|
|
228
|
-
|
|
229
|
-
- `shell()` v1 only covers compile-covered `box()`, `cylinder()`, and straight `extrude()` bases with optional `top` / `bottom` openings, while defended named created faces currently cover the exact profile families Forge can model directly (`rect`, `roundedRect`, `circle`)
|
|
230
|
-
- `shape.hole()` still only covers circular holes, and `shape.cutout()` still only covers sketches already placed with `onFace(...)`
|
|
231
|
-
- `filletEdge()` / `chamferEdge()` v1 cover tracked vertical edges on compile-covered `box()` and `rectangle(...).extrude(...)` bodies plus preserved propagated sibling edges through supported edge-finish and boolean-union chains; the selected rewritten edge now resolves as an explicit descendant edge-chain for inspection/debug, but not yet as a new single finishable edge target
|
|
232
|
-
- two-sided extents, tapered cutouts, and thread metadata are now supported; combined counterbore+countersink heads, modeled helical threads, and broader durable identity beyond today's defended shell/hole/cut created-face subset are still missing
|
|
233
|
-
- `upToFace` currently requires a planar termination face parallel to the feature direction, but defended split termination faces can now stay queryable as descendant regions where Forge still owns the source plane
|
|
234
|
-
- boolean/pattern propagation currently defends owner-scoped face label lineage through supported unions, and the descendant layer can now expose some post-merge/post-difference results as face sets/regions, but broader durable per-face ownership after arbitrary merged topology changes is still incomplete
|
|
235
|
-
- repeated-feature ownership currently tracks repeated bodies and mirrored descendants, not durable per-face identity after merged pattern topology changes
|
|
236
|
-
- shell, hole/cut, tracked-edge finishing, and repeated-feature workflows now preserve parent-body ownership lineage, but stable downstream face/edge ownership after topology-changing edits is still not solved, which is why richer boolean-difference/intersection targets and broader fillet/chamfer workflows remain harder next layers
|
|
237
|
-
- projection replay still rejects boolean difference/intersection sources, trim/fillet/chamfer silhouette changes, and non-parallel projection bases with explicit compiler diagnostics instead of silently pretending those paths are exact-safe
|
|
238
|
-
|
|
239
|
-
### Phase 4: Higher-Order Workflows
|
|
240
|
-
|
|
241
|
-
Goal:
|
|
242
|
-
|
|
243
|
-
- features like sheet metal, advanced library helpers, and richer manufacturing flows build on the same semantic core
|
|
244
|
-
|
|
245
|
-
Current progress:
|
|
246
|
-
|
|
247
|
-
- `sheetMetal()` now exists as the first dedicated higher-order semantic family on top of the descendant-resolution layer
|
|
248
|
-
- one sheet-metal model now lowers to both a folded solid and a flat pattern instead of splitting folded/export logic across backend-specific codepaths
|
|
249
|
-
- named `panel`, `flange-*`, and `bend-*` descendants now flow through the shared face-descendant machinery, so downstream cutouts can still expose honest region/set semantics after topology rewrites
|
|
250
|
-
- the maintained `folded-service-panel-cover` proof part now lives in the API examples, compiler corpus, query-propagation snapshots, API invariants, and exact BREP checks
|
|
251
|
-
|
|
252
|
-
These higher-order families should keep arriving only after the shared reference/workplane/query layer is credible enough to defend them honestly.
|
|
253
|
-
|
|
254
|
-
## Current Architectural Boundary
|
|
255
|
-
|
|
256
|
-
Today, the intended compiler boundary is:
|
|
257
|
-
|
|
258
|
-
```text
|
|
259
|
-
Forge scripts
|
|
260
|
-
-> Forge semantic feature graph
|
|
261
|
-
-> compiled scene + capability routing
|
|
262
|
-
-> Manifold lowerer / export-backend lowerer / faceted fallback
|
|
263
|
-
```
|
|
264
|
-
|
|
265
|
-
Future feature work should strengthen this boundary, not route around it.
|
|
266
|
-
|
|
267
|
-
## Next Achievable CAD Families
|
|
268
|
-
|
|
269
|
-
Once the descendant-resolution layer is in place, the next credible expansion lanes are:
|
|
270
|
-
|
|
271
|
-
- richer hole and cut variants
|
|
272
|
-
- broader shell workflows
|
|
273
|
-
- broader fillet/chamfer workflows
|
|
274
|
-
- stronger projection and sketch-on-face flows
|
|
275
|
-
- richer sheet-metal corner and detail workflows on top of the new semantic family
|
|
276
|
-
- manufacturing outputs such as flat patterns and DXF/SVG profile export
|
|
277
|
-
- toolbox and library feature families
|
|
278
|
-
- stronger assembly metadata and exact/faceted route visibility
|
|
279
|
-
|
|
280
|
-
These are all good fits for the compiler architecture because they can be expressed as Forge-owned semantic intent and lowered intentionally into both backends.
|
|
281
|
-
|
|
282
|
-
## Bigger Leap Areas
|
|
283
|
-
|
|
284
|
-
Some CAD-adjacent areas are still important, but they are a bigger leap than the current compiler program:
|
|
285
|
-
|
|
286
|
-
- arbitrary direct editing over imported or heavily rewritten BReps
|
|
287
|
-
- advanced surfacing or subD/T-spline workflows
|
|
288
|
-
- CAM
|
|
289
|
-
- simulation / FEA
|
|
290
|
-
- full enterprise document/PDM systems
|
|
291
|
-
- full large-assembly and mate-solver parity with major desktop CAD tools
|
|
292
|
-
|
|
293
|
-
Keep these visible, but do not plan them as if they were just another feature module on the current part-design stack.
|
|
294
|
-
|
|
295
|
-
## Legacy Cleanup Rule
|
|
296
|
-
|
|
297
|
-
Yes, the old architecture needs cleanup.
|
|
298
|
-
|
|
299
|
-
No, that should not happen as a single flag-day rewrite.
|
|
300
|
-
|
|
301
|
-
The rule is:
|
|
302
|
-
|
|
303
|
-
1. add compiler-owned replacements first
|
|
304
|
-
2. fence old bypass paths so new work cannot extend them
|
|
305
|
-
3. retire legacy shims once supported features and examples no longer need them
|
|
306
|
-
|
|
307
|
-
That keeps the repo honest without destabilizing active work.
|
|
@@ -1,161 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: dev-solver
|
|
3
|
-
skill-order: 2
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Constraint Solver Quality — What's Tunable vs What's Architecture
|
|
7
|
-
|
|
8
|
-
> For engineers working on the constraint solver. Answers the question: "is the math
|
|
9
|
-
> settled, or do we have magic numbers we need to get right?"
|
|
10
|
-
|
|
11
|
-
---
|
|
12
|
-
|
|
13
|
-
## The short answer
|
|
14
|
-
|
|
15
|
-
**The math is settled. The craft is not.**
|
|
16
|
-
|
|
17
|
-
The core algorithms — LM, CG, the normal equations — are 50-year-old numerical analysis
|
|
18
|
-
with proofs. You cannot implement them wrongly in any meaningful sense. What IS hard:
|
|
19
|
-
|
|
20
|
-
- Choosing the right initial guess (determines which branch you land on)
|
|
21
|
-
- Handling the cases where the math breaks down (degenerate geometry, redundant constraints)
|
|
22
|
-
- Making solutions persistent across save/reload/sharing
|
|
23
|
-
|
|
24
|
-
These are not numerical parameters. They are architectural decisions.
|
|
25
|
-
|
|
26
|
-
---
|
|
27
|
-
|
|
28
|
-
## What you can tune (and what actually happens when you do)
|
|
29
|
-
|
|
30
|
-
| Parameter | Location | Current value | Effect of changing |
|
|
31
|
-
|---|---|---|---|
|
|
32
|
-
| `tolerance` | `registry.ts` | `1e-3` | Looser → faster but visibly imprecise. Tighter → more iterations, may miss interactive frame budget. |
|
|
33
|
-
| `lambda0` | `registry.ts` | `1e-3` | Starting trust region. Too high → slow. Too low → diverges on ill-conditioned sketches. Standard value. |
|
|
34
|
-
| `nu` (growth factor) | `registry.ts` | `2` | Standard. Changing this rarely helps. |
|
|
35
|
-
| GS escape rounds | `registry.ts` | `3` | More rounds → more expensive. Fewer → LM gets worse warm start. |
|
|
36
|
-
| `restarts` | `registry.ts` | `1` | One retry from scratch. More rarely helps unless null-space perturbation is implemented (task 410). |
|
|
37
|
-
|
|
38
|
-
**The only parameter with major quality impact is `tolerance`.** The others are in the
|
|
39
|
-
"reasonable defaults from the literature" category. `tolerance = 1e-3` is too loose for
|
|
40
|
-
mm-scale CAD — production solvers use `1e-6` to `1e-10`.
|
|
41
|
-
|
|
42
|
-
---
|
|
43
|
-
|
|
44
|
-
## What matters more than parameters
|
|
45
|
-
|
|
46
|
-
### 1. Initial guess quality
|
|
47
|
-
|
|
48
|
-
LM is a local optimizer. It finds the nearest solution to the starting point. Period.
|
|
49
|
-
If your starting geometry is far from the intended configuration, you get the wrong solution
|
|
50
|
-
even with `tolerance = 1e-10`.
|
|
51
|
-
|
|
52
|
-
This is why GS warm-up exists: to propagate positions forward from anchor constraints before
|
|
53
|
-
LM runs. It converts "all points at (0,1)" into something LM can work with.
|
|
54
|
-
|
|
55
|
-
**The limit**: GS warm-up only propagates along constraint chains. Circular sub-graphs
|
|
56
|
-
(closed loops) can't be bootstrapped this way. For these, the starting positions are
|
|
57
|
-
whatever was stored in the file or left over from the previous solve.
|
|
58
|
-
|
|
59
|
-
### 2. Branch selection
|
|
60
|
-
|
|
61
|
-
When a constraint system has multiple valid solutions (two circle intersections, mirror
|
|
62
|
-
image triangles, open vs. crossed linkages), the solver returns whichever is nearest to
|
|
63
|
-
the starting point. This is not a solver quality problem — it is a *correct* behavior.
|
|
64
|
-
The issue is that "nearest to starting point" is not the same as "what the user intended."
|
|
65
|
-
|
|
66
|
-
Production CAD systems (SolidWorks, Siemens NX) solve this via:
|
|
67
|
-
- **Explicit branch hints** stored with the sketch (e.g., signed area of each sub-triangle)
|
|
68
|
-
- **Solution continuity**: track the branch from the previous solve and bias the initial
|
|
69
|
-
guess toward it
|
|
70
|
-
|
|
71
|
-
ForgeCAD does solution continuity implicitly through warm-start. It breaks on file reload
|
|
72
|
-
because nothing in the serialization format encodes branch intent. See task 440.
|
|
73
|
-
|
|
74
|
-
### 3. Degenerate case handling
|
|
75
|
-
|
|
76
|
-
Several constraints return `residual = 0` (satisfied) when the input entities are degenerate
|
|
77
|
-
(zero-length lines, zero-radius circles, zero-sweep arcs). This is caused by the `len || 1`
|
|
78
|
-
pattern in `helpers.ts`. The result: invalid geometry that passes the constraint check.
|
|
79
|
-
|
|
80
|
-
This is not a numerical issue. It is a correctness issue: the solver is being asked to
|
|
81
|
-
evaluate a constraint that is mathematically undefined, and it returns a misleading answer
|
|
82
|
-
instead of an error.
|
|
83
|
-
|
|
84
|
-
### 4. Redundant constraint detection
|
|
85
|
-
|
|
86
|
-
Overconstrained sketches (more independent constraints than DOF) don't fail — LM minimizes
|
|
87
|
-
the sum of squares and returns a "best fit" that satisfies most constraints but silently
|
|
88
|
-
violates others. Without rank analysis (SVD of J at convergence), the user gets wrong
|
|
89
|
-
geometry with no indication of which constraint caused it.
|
|
90
|
-
|
|
91
|
-
The rank analysis infrastructure exists in `rigidity.ts` but is not wired into the solve path.
|
|
92
|
-
|
|
93
|
-
---
|
|
94
|
-
|
|
95
|
-
## The architectural hierarchy of constraint solver quality
|
|
96
|
-
|
|
97
|
-
```
|
|
98
|
-
1. Mathematical correctness of residuals and Jacobians
|
|
99
|
-
→ If these are wrong, nothing else matters
|
|
100
|
-
→ Status: Largely correct in TS; verify in Rust solver (task 430)
|
|
101
|
-
|
|
102
|
-
2. Degenerate case handling
|
|
103
|
-
→ Return errors, not silent wrong answers
|
|
104
|
-
→ Status: Known gap (len || 1 pattern). See task 442.
|
|
105
|
-
|
|
106
|
-
3. Tolerance
|
|
107
|
-
→ 1e-3 is too loose. Should be 1e-6.
|
|
108
|
-
→ Status: Quick win. See task 442.
|
|
109
|
-
|
|
110
|
-
4. Solution branch architecture
|
|
111
|
-
→ Need to encode branch intent in the file format
|
|
112
|
-
→ Status: Not done. Hard problem. See tasks 440, 441.
|
|
113
|
-
|
|
114
|
-
5. Initial guess quality (constructive first)
|
|
115
|
-
→ Eliminate cases where LM starts from a degenerate position
|
|
116
|
-
→ Status: In progress. See task 420.
|
|
117
|
-
|
|
118
|
-
6. Redundant constraint detection
|
|
119
|
-
→ Wire rigidity.ts into the solve path to report over/under-constrained status
|
|
120
|
-
→ Status: Infrastructure exists, not wired. See task 420 requirements section.
|
|
121
|
-
|
|
122
|
-
7. LM hardening (central diff, Nielsen update, null-space restarts)
|
|
123
|
-
→ Incremental improvements for pathological cases
|
|
124
|
-
→ Status: Task 410.
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
The most impactful work is at levels 2–4. Levels 5–7 are important but affect edge cases.
|
|
128
|
-
If you are chasing a specific user-visible quality complaint, start by identifying which
|
|
129
|
-
level it belongs to.
|
|
130
|
-
|
|
131
|
-
---
|
|
132
|
-
|
|
133
|
-
## What the constraint solver *cannot* do well
|
|
134
|
-
|
|
135
|
-
- **Solve globally overdetermined systems with conflicting constraints gracefully**: LM will
|
|
136
|
-
find a local minimum of ||r||², which is not necessarily a meaningful answer. The result
|
|
137
|
-
depends entirely on starting position and constraint ordering. Only solution: detect
|
|
138
|
-
over-constraint *before* running LM and report it to the user.
|
|
139
|
-
|
|
140
|
-
- **Guarantee the "correct" assembly branch**: there is no mathematical notion of the correct
|
|
141
|
-
branch. It is a user intent problem, not a solver problem. The solver can only minimize
|
|
142
|
-
distance from the initial guess.
|
|
143
|
-
|
|
144
|
-
- **Handle discontinuous constraint landscapes robustly**: when constraints have discontinuous
|
|
145
|
-
residual gradients (e.g., a "snap to nearest multiple of 45°" constraint), LM cannot
|
|
146
|
-
navigate them — GS projectors handle these better. This is why the hybrid LM+GS
|
|
147
|
-
architecture exists rather than pure LM.
|
|
148
|
-
|
|
149
|
-
---
|
|
150
|
-
|
|
151
|
-
## Connection to the constraint-solver-from-scratch course
|
|
152
|
-
|
|
153
|
-
| Quality concern | Chapter that explains the math |
|
|
154
|
-
|---|---|
|
|
155
|
-
| Why tolerance matters | 01 (residuals) — what "solved" means |
|
|
156
|
-
| Why initial guess matters | 03 (Newton-Raphson) — local convergence basin |
|
|
157
|
-
| Branch selection | No chapter yet — potential Chapter 16 |
|
|
158
|
-
| Redundant constraint detection | 11 (SVD/null space) — rank and DOF |
|
|
159
|
-
| Degenerate Jacobians | 11 (SVD) — condition number and near-singularity |
|
|
160
|
-
| GS vs LM trade-off | 05 (Gauss-Seidel) + 06 (LM) |
|
|
161
|
-
| Constructive solving | 12 (graph-based solving) |
|