forgecad 0.9.13 → 0.9.15
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-DramHHDf.js → AdminPage-CDyGUinA.js} +2 -2
- package/dist/assets/{BenchmarkPage-Bjgkh5m9.js → BenchmarkPage-DfPMY_-d.js} +4 -15
- package/dist/assets/{BlogPage-n_HGP3Qm.js → BlogPage-kF0fkdJT.js} +2 -2
- package/dist/assets/{DocsPage-WCIkPmzC.js → DocsPage-B954L3YN.js} +9 -3
- package/dist/assets/EditorApp-Beb-IZ0y.js +14014 -0
- package/dist/assets/{EditorApp-BAnckbsk.css → EditorApp-CuDLxKqL.css} +698 -0
- package/dist/assets/{EmbedViewer-DEZKqdfW.js → EmbedViewer-C77B-TrF.js} +3 -3
- package/dist/assets/{LandingPageProofDriven-CeRIctuj.js → LandingPageProofDriven-Cr6fXMDj.js} +35 -37
- package/dist/assets/LegalPage-BRlScr9A.css +91 -0
- package/dist/assets/LegalPage-Dzklqmmg.js +39 -0
- package/dist/assets/{PricingPage-BMedqFef.css → PricingPage-BPF6HKyO.css} +25 -0
- package/dist/assets/{PricingPage-rIRa8p4Y.js → PricingPage-zWXkvlwl.js} +19 -19
- package/dist/assets/{SettingsPage-BqCUvEXM.js → SettingsPage-Bz0of4KQ.js} +2 -2
- package/dist/assets/app-CE3sYcV7.css +3890 -0
- package/dist/assets/{app-BUZqJvSO.js → app-D3kDkggg.js} +2305 -960
- package/dist/assets/cli/{render-lhGxj50Y.js → render-DSY3mMQa.js} +423 -30
- package/dist/assets/{constructionHistoryWorker-ipD1jcIv.js → constructionHistoryWorker-gpDo-uH2.js} +927 -243
- package/dist/assets/{evalWorker-CHXSe_-u.js → evalWorker-CU0Ke6DP.js} +7799 -4163
- package/dist/assets/{forgecad_geometry-BVnIeXMG.js → forgecad_geometry-Dgceylq9.js} +43 -1
- package/dist/assets/{forgecad_geometry_bg-DufhhCBV.wasm → forgecad_geometry_bg-dD4RNQF1.wasm} +0 -0
- package/dist/assets/{inspectWorker-DeRnMVv1.js → inspectWorker-COyp8XXA.js} +927 -243
- package/dist/assets/{javascript-70-4uGcz.js → javascript-1kQXfVaz.js} +1 -1
- 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-D1LZIHqn.js → manifold-BRI5prcH.js} +1 -1
- package/dist/assets/{manifold-C2fwoTgd.js → manifold-C-3h2M7p.js} +2 -2
- package/dist/assets/{manifold-BTkzxi9V.js → manifold-DNkrUWpA.js} +1 -1
- package/dist/assets/{reportWorker-Cq1qGmg0.js → reportWorker-CdBz5bNg.js} +7537 -10856
- package/dist/assets/{scalar-sampling-budget-D9Qv_UlJ.js → scalar-sampling-budget-wJF98aY9.js} +6943 -4345
- package/dist/assets/{scanProxyWorker-Bs2TDgLw.js → scanProxyWorker-B-9VbLIs.js} +32 -1
- package/dist/assets/{renderSceneState-Dr0xPq1A.js → targets-B9sGB5nB.js} +27 -1
- 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 +9 -17
- package/dist/docs-raw/CLI.md +71 -21
- package/dist/docs-raw/component-model.md +27 -11
- package/dist/docs-raw/generated/assembly.md +301 -212
- package/dist/docs-raw/generated/concepts.md +238 -240
- 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 +7 -1
- package/dist/docs-raw/generated/output.md +19 -4
- package/dist/docs-raw/generated/runtime-names.md +41 -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 +14 -6
- 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 +3 -3
- 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 +4 -4
- 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 +1 -1
- package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +4 -4
- 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/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-LOXCPEOI.js → check-compiler-SDX5QIXI.js} +1 -2
- package/dist-cli/{check-query-propagation-BAKNVWXR.js → check-query-propagation-EAYEFT77.js} +1 -2
- package/dist-cli/{chunk-RY43WF46.js → chunk-N4O47JLF.js} +13772 -9938
- package/dist-cli/forgecad.js +2387 -899
- 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-skill/CONTEXT.md +1120 -724
- package/dist-skill/SKILL.md +3 -2
- package/dist-skill/docs/API/core/concepts.md +64 -1
- package/dist-skill/docs/CLI.md +71 -21
- package/dist-skill/docs/generated/assembly.md +277 -229
- 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 +7 -1
- package/dist-skill/docs/generated/output.md +19 -4
- package/dist-skill/docs/generated/runtime-names.md +41 -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 +5 -90
- 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-3d-reconstruction/SKILL.md +2 -2
- 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 +3 -3
- 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-reconstruction-benchmark/SKILL.md +3 -3
- 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 +6 -6
- 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 +68 -0
- package/examples/api/transition-curves.forge.js +44 -15
- 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 +14 -18
- package/dist/assets/EditorApp-CP9Za6tm.js +0 -13630
- package/dist/assets/app-CsHnaBWt.css +0 -1789
- 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/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 -508
- package/dist/docs-raw/runbook.md +0 -611
- package/dist-cli/check-compiler-LOXCPEOI.js.map +0 -1
- package/dist-cli/check-query-propagation-BAKNVWXR.js.map +0 -1
- package/dist-cli/chunk-RY43WF46.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 -647
- 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
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
# ForgeCAD API Documentation
|
|
2
|
-
|
|
3
|
-
API documentation lives in **JSDoc on source methods** (the single source of truth). The auto-generated docs in [`generated/`](../generated/) are extracted from JSDoc by `npm run gen:docs`.
|
|
4
|
-
|
|
5
|
-
## What's here
|
|
6
|
-
|
|
7
|
-
| Path | Purpose |
|
|
8
|
-
|------|---------|
|
|
9
|
-
| `core/concepts.md` | Cross-cutting mental model: execution model, coordinate system, color behavior, face label lifecycle |
|
|
10
|
-
| `core/sdf-*.md` | SDF modeling (dev-only) |
|
|
11
|
-
| `generated/*.md` | Auto-generated API reference per module — do not edit by hand |
|
|
12
|
-
|
|
13
|
-
## Adjacent Documentation
|
|
14
|
-
|
|
15
|
-
- **[`../guides/`](../guides/)** — Conceptual orientation: coordinate system, conventions, recipes
|
|
16
|
-
- **[`../internals/`](../internals/)** — Engine internals for ForgeCAD contributors (dev-only)
|
|
@@ -1,118 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: core
|
|
3
|
-
skill-order: 1
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# ForgeCAD Core Concepts
|
|
7
|
-
|
|
8
|
-
ForgeCAD scripts are JavaScript that returns geometry. The forge API is globally available — no imports needed.
|
|
9
|
-
|
|
10
|
-
```javascript
|
|
11
|
-
const width = param("Width", 50, { min: 20, max: 100, unit: "mm" });
|
|
12
|
-
return box(width, 30, 10);
|
|
13
|
-
```
|
|
14
|
-
|
|
15
|
-
## Injected Runtime Names
|
|
16
|
-
|
|
17
|
-
ForgeCAD API functions and classes are injected into every `.forge.js` script. Use them directly; do not import or destructure ForgeCAD API names from helper files.
|
|
18
|
-
|
|
19
|
-
```javascript
|
|
20
|
-
// BAD — `bom` and `bomToCsv` are already built-in runtime names.
|
|
21
|
-
const { bom, bomToCsv } = require("./bom.js");
|
|
22
|
-
|
|
23
|
-
// GOOD — use the built-in directly.
|
|
24
|
-
bom(4, "M4 bolt");
|
|
25
|
-
|
|
26
|
-
// GOOD — keep project helpers under their own local name.
|
|
27
|
-
const bomHelpers = require("./bom.js");
|
|
28
|
-
bomHelpers.addFasteners(...);
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
Top-level declarations such as `const bom = ...`, `let scene = ...`, or `class Shape {}` collide with the injected runtime names. If you need a local helper, choose a project-specific name like `projectBom`, `sceneConfig`, or `makeShape`.
|
|
32
|
-
|
|
33
|
-
## Execution Model
|
|
34
|
-
|
|
35
|
-
- Scripts re-execute on every parameter change (400ms debounce)
|
|
36
|
-
- Geometry operations are **immutable** — shapes, sketches, groups, imported assemblies, and wood boards return new values instead of modifying in place
|
|
37
|
-
- Must return one of: `Shape`, `Sketch`, `ShapeGroup`, `Assembly`, `SolvedAssembly`, `SdfShape`, `Array` of renderables, `Array` of `{ name, tags?, shape?, sketch?, group?, color? }`, or a **metadata object** (see below)
|
|
38
|
-
|
|
39
|
-
Top-level assembly scripts can return an unsolved `Assembly` directly; ForgeCAD solves it at default joint values for display. Return `assembly.solve(state)` when you want a specific pose. Do not call `.toGroup()` just to make an assembly render — use `.toGroup()` only when you specifically need `ShapeGroup` composition, group-style transforms, or named-child lookup.
|
|
40
|
-
|
|
41
|
-
### Metadata Object Return
|
|
42
|
-
|
|
43
|
-
A script can return a plain object whose values include renderable geometry alongside non-renderable metadata. All renderable entries (Shape, Sketch, ShapeGroup, Assembly, SolvedAssembly, SdfShape, or Array of named objects) are rendered; non-renderable entries are silently skipped. This is useful for multi-file projects where a part needs to publish interface data (bolt positions, dimensions) to other files:
|
|
44
|
-
|
|
45
|
-
When importing project files, include the full extension in every relative path: `require('./motor-mount.forge.js')` for model files and `require('./helpers.js')` for plain helper modules. ForgeCAD resolves project imports by exact path and does not infer `.forge.js` or `.js` from `require('./motor-mount')`.
|
|
46
|
-
|
|
47
|
-
```javascript
|
|
48
|
-
// motor-mount.forge.js — renders standalone, exports metadata via require()
|
|
49
|
-
const holePositions = [[17, 15], [-29, 15], [17, -15], [-29, -15]];
|
|
50
|
-
return {
|
|
51
|
-
shape: mount.color('#556B2F'), // rendered
|
|
52
|
-
bolts: { dia: 5.3, pos: holePositions }, // metadata — skipped in render, available via require()
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
// base-body.forge.js — imports mount, accesses .bolts
|
|
56
|
-
const mount = require('./motor-mount.forge.js');
|
|
57
|
-
for (const [x, y] of mount.bolts.pos) { ... } // use metadata
|
|
58
|
-
// mount.shape is the Shape if you need it in an assembly
|
|
59
|
-
```
|
|
60
|
-
|
|
61
|
-
Arrays inside the object are also rendered:
|
|
62
|
-
|
|
63
|
-
```javascript
|
|
64
|
-
return {
|
|
65
|
-
parts: [{ name: 'Left', shape: leftShape }, { name: 'Right', shape: rightShape }],
|
|
66
|
-
armWidth: 6, // metadata
|
|
67
|
-
};
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Named return objects and named `group(...)` children can include `tags`. Tags are viewport metadata: they do not affect geometry, exports, face labels, or BOM rows, but the command palette can hide, show only, or focus every object with a selected tag.
|
|
71
|
-
|
|
72
|
-
```javascript
|
|
73
|
-
return [
|
|
74
|
-
{ name: 'Base Plate', tags: ['printed', 'structural'], shape: base },
|
|
75
|
-
{ name: 'M4 Bolt A', tags: 'fastener', shape: boltA },
|
|
76
|
-
{ name: 'M4 Bolt B', tags: 'fastener', shape: boltB },
|
|
77
|
-
];
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
## Coordinate System
|
|
81
|
-
|
|
82
|
-
Z-up right-handed: X = left/right, Y = forward/back, Z = up/down.
|
|
83
|
-
|
|
84
|
-
## Colors
|
|
85
|
-
|
|
86
|
-
`.color(hex)` works on `Shape` and `Sketch`. Colors survive transforms. Boolean operations return a single result shape, so only the first operand's color survives.
|
|
87
|
-
|
|
88
|
-
**`union()` merges shapes into one solid mesh** — later operands do not keep separate colors or identities. Use `group(...)` or return named objects instead when you want separate parts:
|
|
89
|
-
|
|
90
|
-
```javascript
|
|
91
|
-
return [
|
|
92
|
-
{ name: "Base", shape: box(100, 100, 5), color: "#888888" },
|
|
93
|
-
{ name: "Column", shape: cylinder(50, 10).translate(50, 50, 5), color: "#4488cc" },
|
|
94
|
-
];
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
## Face Operations
|
|
98
|
-
|
|
99
|
-
Shapes carry semantic face labels through their lifecycle. The flow is:
|
|
100
|
-
|
|
101
|
-
1. **Primitives** assign canonical names — `box()` gives you `top`, `bottom`, `side-left`, etc.; `cylinder()` gives `top`, `bottom`, `side`.
|
|
102
|
-
2. **Extrusions** inherit labels from the sketch and add `top`/`bottom`.
|
|
103
|
-
3. **Transforms** (translate, rotate, scale, mirror) preserve all labels.
|
|
104
|
-
4. **Booleans** preserve labels from the first operand where geometry survives.
|
|
105
|
-
|
|
106
|
-
You resolve labels to geometry with `.face(name)` or `.face(query)` — see the Shape class docs for the full query API. Operations like `.pocket()`, `.boss()`, `.hole()`, and `faceProfile()` all consume face references.
|
|
107
|
-
|
|
108
|
-
## Text vs Viewport Labels
|
|
109
|
-
|
|
110
|
-
Default to no explanatory text inside CAD geometry. A ForgeCAD model should represent the physical artifact, not a labeled teaching diagram. Explain the design through file names, named return objects, comments, BOM entries, inspection bundles, and companion docs.
|
|
111
|
-
|
|
112
|
-
Use `text2d()` only when the letters are part of the real object: raised branding, engraving, serial plates, keyboard legends, gauge ticks, connector labels, service arrows, scale markings, or exported manufacturing markings. `text2d()` builds filled sketch geometry from font outlines, so it can make exact/OCCT workflows slower.
|
|
113
|
-
|
|
114
|
-
Use `Viewport.label(text, [x, y, z], options)` only for temporary review, debug, tutorial, or explicitly requested presentation views. Render labels are annotations only: they do not create meshes, do not export, do not enter the B-rep path, and do not add face labels. Do not use viewport labels to compensate for unclear geometry in the final model.
|
|
115
|
-
|
|
116
|
-
## SDF Modeling
|
|
117
|
-
|
|
118
|
-
For organic shapes, smooth blending, TPMS lattices, and surface deformations. Return `SdfShape` values directly, or return a plain object/array tree of SDF leaves, for native raymarch preview. Use `.toShape()` or `toShape(...)` only when you need mesh-backed CAD/export behavior. See [sdf-primitives.md](sdf-primitives.md).
|
package/dist/docs-raw/INDEX.md
DELETED
|
@@ -1,138 +0,0 @@
|
|
|
1
|
-
# ForgeCAD Documentation
|
|
2
|
-
|
|
3
|
-
Start here if you are new to ForgeCAD, setting up the CLI, or giving a project to an AI coding agent.
|
|
4
|
-
|
|
5
|
-
## The Happy Path
|
|
6
|
-
|
|
7
|
-
ForgeCAD works best when every model lives in a real project folder:
|
|
8
|
-
|
|
9
|
-
```bash
|
|
10
|
-
npm install -g forgecad
|
|
11
|
-
forgecad login
|
|
12
|
-
mkdir spool-adapter
|
|
13
|
-
cd spool-adapter
|
|
14
|
-
forgecad project init "Spool Adapter"
|
|
15
|
-
forgecad new adapter --template part
|
|
16
|
-
forgecad studio .
|
|
17
|
-
```
|
|
18
|
-
|
|
19
|
-
Then let your AI agent work inside that same folder, validate the model from the terminal, and push the result back to the browser:
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
forgecad run adapter.forge.js
|
|
23
|
-
forgecad inspect fit interference adapter.forge.js --camera iso
|
|
24
|
-
forgecad check print adapter.forge.js --json
|
|
25
|
-
forgecad project push
|
|
26
|
-
forgecad project open
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
`forgecad studio` always needs an explicit project path. Use `.` for the current project. Do not point it at `~`, your whole desktop, downloads, or a huge source tree; ForgeCAD and AI agents need a small folder containing only the model, helper files, references, and generated evidence for that project.
|
|
30
|
-
|
|
31
|
-
## Start Here
|
|
32
|
-
|
|
33
|
-
- **[Welcome](welcome.md)** - First model, project setup, local editor, browser sync, and the AI-assisted loop.
|
|
34
|
-
- **[AI Usage](AI/usage.md)** - Approved models, project-first agent setup, skill installation, quality prompts, validation evidence, and media ideas.
|
|
35
|
-
- **[CLI Reference](CLI.md)** - Install, login, create projects, open local studios, run scripts, render, inspect, export, publish, and sync.
|
|
36
|
-
|
|
37
|
-
## Project Workflow
|
|
38
|
-
|
|
39
|
-
Use this section when the question is "how do I actually start?"
|
|
40
|
-
|
|
41
|
-
- **Create a new hosted project locally**: `forgecad project init "Project Name"` creates the remote project, writes `forgecad.json`, and uploads any existing local `.forge.js`, `.js`, and `.svg` files.
|
|
42
|
-
- **Clone an existing hosted project**: `forgecad project clone <slug>` downloads files and writes `forgecad.json`.
|
|
43
|
-
- **Open the local editor**: `forgecad studio .` opens the installed local editor around the current project folder.
|
|
44
|
-
- **Sync back to the browser**: `forgecad project push` uploads local changes for an initialized project. It does not create a remote project from a random folder; run `project init` first.
|
|
45
|
-
|
|
46
|
-
## Product Strategy
|
|
47
|
-
|
|
48
|
-
Product-first context for PM judgement, future bets, markets, workflows, and business direction. These docs intentionally avoid coding nuance; use the API reference and ForgeCAD skills for exact modeling APIs.
|
|
49
|
-
|
|
50
|
-
- **[Product Docs Map](product/README.md)** - Theme index for product-first docs
|
|
51
|
-
- **[Vision](product/vision.md)** - ForgeCAD as an AI-native interface layer for physical design
|
|
52
|
-
- **[Founder Story](product/founder-story.md)** - Origin story and why AI needs an expressive CAD interface
|
|
53
|
-
- **[API As Product Language](product/api-as-product-language.md)** - Why API vocabulary is product strategy
|
|
54
|
-
- **[Product Loop](product/product-loop.md)** - Human goal, AI-authored code, validation, inspection, export
|
|
55
|
-
- **[User Segments](product/user-segments.md)** - Makers, daily users, technical evaluators, partners, and enterprise AI-CAD users
|
|
56
|
-
- **[Creative Manufacturing](product/creative-manufacturing.md)** - First wedge around useful custom physical objects
|
|
57
|
-
- **[Manufacturing Workflows](product/manufacturing-workflows.md)** - 3D printing, laser cutting, CNC, furniture, robotics, and output routes
|
|
58
|
-
- **[Competitive Positioning](product/competitive-positioning.md)** - How ForgeCAD differs from CAD-as-code, traditional CAD, Zoo/KCL, and prompt-to-CAD
|
|
59
|
-
- **[Business Model](product/business-model.md)** - Pro, embedded commerce, OEM/partner, and enterprise pilot paths
|
|
60
|
-
- **[Strategic Decisions](product/strategic-decisions.md)** - Product decision filters for future ideas
|
|
61
|
-
- **[First Account Onboarding](product/onboarding-first-experience.md)** - Tactical source of truth for new-account first-run behavior
|
|
62
|
-
- **[User Outreach Email Templates](product/user-outreach-email-templates.md)** - Founder-style user discovery and onboarding outreach
|
|
63
|
-
|
|
64
|
-
## API Reference
|
|
65
|
-
|
|
66
|
-
For users writing `.forge.js` scripts.
|
|
67
|
-
|
|
68
|
-
- **[API Overview](API/README.md)** - Reading plan and orientation
|
|
69
|
-
- **[Core](generated/core.md)** - Primitives, booleans, transforms, colors, materials, patterns, and shape operations
|
|
70
|
-
- **[Sketches](generated/sketch.md)** - 2D geometry, constraints, profiles, extrusion, offsets, and sketch-driven modeling
|
|
71
|
-
- **[Curves & Surfaces](generated/curves.md)** - Splines, lofts, sweeps, ruled surfaces, and exact surface workflows
|
|
72
|
-
- **[Assembly](generated/assembly.md)** - Parts, connectors, joints, kinematics, collision checks, and exploded views
|
|
73
|
-
- **[Output](generated/output.md)** - Exports, reports, BOMs, dimensions, robot packages, G-code, and manufacturing outputs
|
|
74
|
-
- **[Library](generated/lib.md)** - Gears, fasteners, pipes, pulleys, belts, springs, and reusable helpers
|
|
75
|
-
- **[Sheet Metal](generated/sheet-metal.md)** - Bends, flanges, flat patterns, reliefs, and sheet workflows
|
|
76
|
-
- **[Viewport](generated/viewport.md)** - Cameras, animations, labels, views, and scene controls
|
|
77
|
-
- **[SDF](generated/sdf.md)** - Organic fields, TPMS structures, smooth booleans, and implicit geometry
|
|
78
|
-
- **[Concepts](generated/concepts.md)** - Semantic data structures and conceptual building blocks
|
|
79
|
-
- **[Core Concepts](API/core/concepts.md)** - Permanent notes for core modeling concepts
|
|
80
|
-
|
|
81
|
-
## Guides
|
|
82
|
-
|
|
83
|
-
Techniques and conventions for model authors.
|
|
84
|
-
|
|
85
|
-
- **[Coordinate System](guides/coordinate-system.md)** - Z-up convention, axis orientation
|
|
86
|
-
- **[Geometry Conventions](guides/geometry-conventions.md)** - Winding order, depth, normals
|
|
87
|
-
- **[Positioning](guides/positioning.md)** - Connectors, `matchTo()`, and placement strategies
|
|
88
|
-
- **[Modeling Recipes](guides/modeling-recipes.md)** - Common patterns, iteration, multi-file composition
|
|
89
|
-
- **[Joint Design](guides/joint-design.md)** - Connectors, joints, and mechanisms
|
|
90
|
-
- **[Inspection Bundles](guides/inspection-bundles.md)** - `inspect <family> <mode>` bundle layout, evidence encodings, manifest semantics, and agent workflow
|
|
91
|
-
- **[Component Model](component-model.md)** - Recommended assembly structure for multi-part projects
|
|
92
|
-
- **[Skill Maintenance](guides/skill-maintenance.md)** - AI skill build process, `npm run refresh`
|
|
93
|
-
|
|
94
|
-
## Platform
|
|
95
|
-
|
|
96
|
-
Technical documentation for the hosted service at forgecad.io.
|
|
97
|
-
|
|
98
|
-
- **[System Architecture](platform/architecture.md)** - Stack overview, URL routes, Docker topology, security
|
|
99
|
-
- **[Authentication](platform/auth.md)** - JWT tokens, OAuth, registration, password reset, session management
|
|
100
|
-
- **[Projects & Files](platform/projects.md)** - Project CRUD, member roles, file storage, storage quotas, SSE watching
|
|
101
|
-
- **[Model Sharing](platform/sharing.md)** - Publishing, public URLs, embeds, gist/URL/inline sharing
|
|
102
|
-
- **[Admin Dashboard](platform/admin.md)** - Admin panel, audit log, user management
|
|
103
|
-
- **[Email Delivery](platform/email.md)** - Resend setup, verification emails, password reset emails
|
|
104
|
-
|
|
105
|
-
## Development And Operations
|
|
106
|
-
|
|
107
|
-
For contributors developing, deploying, or operating ForgeCAD.
|
|
108
|
-
|
|
109
|
-
- **[Runbook](runbook.md)** - Dev server commands, local stack setup, health checks, production SSH, incident workflow, troubleshooting
|
|
110
|
-
- **[Deployment & Environment](deployment.md)** - Kamal architecture, environment variables, deploy/rollback flow, database migrations
|
|
111
|
-
- **[Observability](platform/observability.md)** - Grafana, Loki, Prometheus, Uptime Kuma, dashboards, logs, metrics, incident debugging
|
|
112
|
-
- **[Releasing](RELEASING.md)** - npm version, publish workflow, GitHub Releases
|
|
113
|
-
- **[RL Environments](rl-environments.md)** - AI-lab reconstruction gym contract, scoring payload, Docker workflow, and maintenance checklist
|
|
114
|
-
- **[CLI Monetization & Licensing](cli-monetization.md)** - Free vs Pro tiers, license activation, feature gating strategy
|
|
115
|
-
- **[Coding Guidelines](coding.md)** - Project structure, workflow, adding new features
|
|
116
|
-
- **[Coding Best Practices](coding-best-practices.md)** - TypeScript, React, performance, self-review
|
|
117
|
-
- **[Agent-Native API Design](agent-native-api.md)** - Why ForgeCAD solves AI-authored CAD with stronger domain APIs, not prompt-only specialization
|
|
118
|
-
- **[Blueprint-First Design](blueprint-first.md)** - Intent-driven API design
|
|
119
|
-
|
|
120
|
-
## Engine Internals
|
|
121
|
-
|
|
122
|
-
For contributors working on ForgeCAD's core engine.
|
|
123
|
-
|
|
124
|
-
- **[Backend Vocabulary](internals/backend-vocabulary.md)** - Canonical terms for compile plans, backends, capabilities, and routes
|
|
125
|
-
- **[Compiler](internals/compiler.md)** - Multi-backend architecture, compile plans, lowering
|
|
126
|
-
- **[Constraint Solver](internals/constraint-solver.md)** - Solver pipeline, architecture, Levenberg-Marquardt
|
|
127
|
-
- **[Solver Quality](internals/constraint-solver-quality.md)** - Tunable vs architectural parameters
|
|
128
|
-
- **[2D Sketch Pipeline](internals/sketch-2d-pipeline.md)** - Two-track export, ProfileCompilePlan
|
|
129
|
-
|
|
130
|
-
## Processes
|
|
131
|
-
|
|
132
|
-
Operational procedures for multi-agent development and investigations.
|
|
133
|
-
|
|
134
|
-
- **[GitHub Issue Triage](../processes/GITHUB_ISSUE_TRIAGE.md)**
|
|
135
|
-
- **[Multi-Agent Development](../processes/MULTI_AGENT_DEVELOPMENT.md)**
|
|
136
|
-
- **[Program Lead](../processes/PROGRAM-LEAD.md)**
|
|
137
|
-
- **[AI Investigation Projects](../processes/AI_INVESTIGATION_PROJECTS.md)**
|
|
138
|
-
- **[Benchmark SOP](../processes/README_BENCHMARK_SOP.md)**
|
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
---
|
|
3
|
-
|
|
4
|
-
# Releasing ForgeCAD
|
|
5
|
-
|
|
6
|
-
## Quick Release
|
|
7
|
-
|
|
8
|
-
```bash
|
|
9
|
-
npm version patch # or minor / major
|
|
10
|
-
git push && git push --tags
|
|
11
|
-
```
|
|
12
|
-
|
|
13
|
-
That's it. GitHub Actions handles the rest:
|
|
14
|
-
- Builds everything (solver WASM + TypeScript + Vite + CLI + skills)
|
|
15
|
-
- Runs the full test suite
|
|
16
|
-
- Publishes to npm
|
|
17
|
-
- Creates a GitHub Release with auto-generated notes
|
|
18
|
-
- Production (forgecad.io) deploys automatically via GitHub Actions + Kamal on push to `mainline`
|
|
19
|
-
|
|
20
|
-
## Version Levels
|
|
21
|
-
|
|
22
|
-
| Command | When | Example |
|
|
23
|
-
|---------|------|---------|
|
|
24
|
-
| `npm version patch` | Bug fixes, small changes | 0.1.5 → 0.1.6 |
|
|
25
|
-
| `npm version minor` | New features | 0.1.5 → 0.2.0 |
|
|
26
|
-
| `npm version major` | Breaking changes | 0.1.5 → 1.0.0 |
|
|
27
|
-
|
|
28
|
-
`npm version` automatically:
|
|
29
|
-
1. Updates `version` in `package.json`
|
|
30
|
-
2. Creates a git commit (`v0.1.6`)
|
|
31
|
-
3. Creates a git tag (`v0.1.6`)
|
|
32
|
-
|
|
33
|
-
## Dry Run
|
|
34
|
-
|
|
35
|
-
To test the publish workflow without actually releasing:
|
|
36
|
-
|
|
37
|
-
1. Go to **Actions → Publish to npm & GitHub Release → Run workflow**
|
|
38
|
-
2. Check "Dry run" and run
|
|
39
|
-
|
|
40
|
-
## Local Docker Publish Sanity Check
|
|
41
|
-
|
|
42
|
-
For the full operational checklist, see [runbook.md](./runbook.md#npm-release-docker-verification).
|
|
43
|
-
|
|
44
|
-
Before publishing manually, test the exact npm tarball in a clean Node container:
|
|
45
|
-
|
|
46
|
-
```bash
|
|
47
|
-
npm run release:pack
|
|
48
|
-
npm run release:docker:create
|
|
49
|
-
npm run release:docker:copy
|
|
50
|
-
npm run release:docker:install
|
|
51
|
-
npm run release:docker:run
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
Or run the whole lane:
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
npm run release:docker:all
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
Defaults:
|
|
61
|
-
- Container: `forgecad-release-check`
|
|
62
|
-
- Image: `node:22-slim`
|
|
63
|
-
- Browser URL: `http://localhost:4173`
|
|
64
|
-
- Studio port mapping: host `4173` -> container `5173`
|
|
65
|
-
- Tarball output: `dist-bundles/npm-release-check/forgecad-<version>.tgz`
|
|
66
|
-
- Smoke model: `examples/api/verification-demo.forge.js`
|
|
67
|
-
|
|
68
|
-
Override the model or container with environment variables:
|
|
69
|
-
|
|
70
|
-
```bash
|
|
71
|
-
FORGECAD_RELEASE_MODEL=/path/to/model.forge.js npm run release:docker:all
|
|
72
|
-
FORGECAD_RELEASE_CONTAINER=forgecad-debug npm run release:docker:all
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Prerequisites
|
|
76
|
-
|
|
77
|
-
- `NPM_TOKEN` must be set as a GitHub repo secret (Settings → Secrets → Actions)
|
|
78
|
-
- Create a **Granular Access Token** at npmjs.com → Account → Access Tokens
|
|
79
|
-
- Scope it to read+write on the `forgecad` package only
|
|
80
|
-
|
|
81
|
-
## What Gets Published
|
|
82
|
-
|
|
83
|
-
- `dist-cli/forgecad.js` — CLI binary
|
|
84
|
-
- `dist/` — web app bundles
|
|
85
|
-
- `dist-skill/` — AI skill documentation and context
|
|
86
|
-
- `examples/` — sample models
|
|
87
|
-
- `README.md`, `LICENSE`
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
skill-group: dev-conventions
|
|
3
|
-
skill-order: 3
|
|
4
|
-
---
|
|
5
|
-
|
|
6
|
-
# Agent-Native API Design
|
|
7
|
-
|
|
8
|
-
ForgeCAD assumes that much of its model code will be written by AI coding agents. That is a strength of code-first CAD: the artifact is plain source, the API is documented, and the CLI gives the agent a feedback loop. A strong agent can read domain documentation and temporarily become useful in almost any specialty.
|
|
9
|
-
|
|
10
|
-
But "make the agent more specialized through documentation" is not the core problem ForgeCAD should solve. If the agent needs pages of instructions to hand-derive standard mechanical behavior, manually tune magic numbers, compute trigonometry, or reconstruct common CAD operations from primitives, the missing capability belongs in the API. Documentation can teach the vocabulary, but it should not compensate for a weak vocabulary.
|
|
11
|
-
|
|
12
|
-
The goal is an API specific and powerful enough to cover most serious modeling needs directly. Instead of asking agents to become gear experts, sheet-metal experts, fixture experts, or assembly-kinematics experts from scratch on every task, ForgeCAD should give them first-class concepts with names, contracts, diagnostics, and examples. The agent should read the docs to discover `lib.spurGear()`, `SheetMetal.flange()`, connector-based assemblies, inspection bundles, and exact export workflows, then compose those concepts with confidence.
|
|
13
|
-
|
|
14
|
-
Docs are leverage, not product substitute. They should explain what exists, when to use it, what guarantees it provides, what limitations remain, and how to validate the result. They should not become long recipes for reimplementing missing algorithms in user code. When a doc repeatedly explains how to work around an API gap, that is a design signal: promote the intent into the API, add diagnostics, and keep the recipe as orientation rather than obligation.
|
|
15
|
-
|
|
16
|
-
This is also why API specificity matters. Generic geometry escape hatches are valuable for unusual work, but the common path should preserve domain intent. A belt drive is not just a loop of tangent lines. A countersunk hole is not just three boolean cylinders. A multi-part assembly is not just a collection of translates. When ForgeCAD encodes those concepts directly, AI agents produce code that is shorter, more inspectable, easier to repair, and closer to what a mechanical designer meant.
|
|
17
|
-
|
|
18
|
-
## Design Gate
|
|
19
|
-
|
|
20
|
-
When improving docs or adding API surface, ask:
|
|
21
|
-
|
|
22
|
-
- Are we teaching the agent an existing ForgeCAD concept, or teaching it to reimplement a concept ForgeCAD should own?
|
|
23
|
-
- Would three different agents likely write three different fragile versions of this from the same docs?
|
|
24
|
-
- Does the current solution require hand-tuned constants, manual trigonometry, raw coordinate derivation, or silent fallback behavior?
|
|
25
|
-
- Could a domain-specific function, builder, namespace, diagnostic, or verification primitive make the intended model obvious?
|
|
26
|
-
|
|
27
|
-
If the answer points to missing vocabulary, prefer an API improvement over longer instructions. Let documentation make agents fluent in ForgeCAD; do not make documentation carry the weight of the CAD system.
|