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.
Files changed (166) hide show
  1. package/dist/assets/{AdminPage-CDyGUinA.js → AdminPage-DwYHz72L.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-DfPMY_-d.js → BenchmarkPage-a9_f-1US.js} +1 -1
  3. package/dist/assets/{BlogPage-kF0fkdJT.js → BlogPage-DodHpvmf.js} +1 -1
  4. package/dist/assets/{DocsPage-B954L3YN.js → DocsPage-B5LePEuj.js} +8 -858
  5. package/dist/assets/{EditorApp-CuDLxKqL.css → EditorApp-BpjZgzk0.css} +148 -0
  6. package/dist/assets/EditorApp-QXsAISLR.js +16307 -0
  7. package/dist/assets/{EmbedViewer-C77B-TrF.js → EmbedViewer-DdEHGUMU.js} +2 -2
  8. package/dist/assets/{LandingPageProofDriven-Cr6fXMDj.js → LandingPageProofDriven-yhhOodbf.js} +2 -2
  9. package/dist/assets/{LegalPage-Dzklqmmg.js → LegalPage-5RbKRGYK.js} +1 -1
  10. package/dist/assets/{PricingPage-zWXkvlwl.js → PricingPage-E3Rma7aV.js} +1 -1
  11. package/dist/assets/{SettingsPage-Bz0of4KQ.js → SettingsPage-BJZcM97j.js} +1 -1
  12. package/dist/assets/{app-D3kDkggg.js → app-DSYrDg0V.js} +1846 -352
  13. package/dist/assets/cli/{render-DSY3mMQa.js → render-ZMHR9HkV.js} +161 -70
  14. package/dist/assets/{constructionHistoryWorker-gpDo-uH2.js → constructionHistoryWorker-AwMMWSxg.js} +1104 -349
  15. package/dist/assets/{evalWorker-CU0Ke6DP.js → evalWorker-DbNs7Dkp.js} +5155 -3772
  16. package/dist/assets/{inspectWorker-COyp8XXA.js → inspectWorker-CZsCFtQT.js} +1415 -439
  17. package/dist/assets/{targets-B9sGB5nB.js → jointPose-DO6mnXn_.js} +71 -3
  18. package/dist/assets/{manifold-DNkrUWpA.js → manifold-BGlQBBH9.js} +1 -1
  19. package/dist/assets/{manifold-BRI5prcH.js → manifold-BU-tJwQh.js} +1 -1
  20. package/dist/assets/{manifold-C-3h2M7p.js → manifold-fy2MV7K1.js} +2 -2
  21. package/dist/assets/{reportWorker-CdBz5bNg.js → reportWorker-DO6hcQbh.js} +8474 -4549
  22. package/dist/assets/{scalar-sampling-budget-wJF98aY9.js → scalar-sampling-budget-o90NSNmF.js} +5347 -3906
  23. package/dist/assets/{scanProxyWorker-B-9VbLIs.js → scanProxyWorker-2GtDLk-R.js} +19 -6
  24. package/dist/assets/{javascript-1kQXfVaz.js → typescript-DBQ6RN5l.js} +874 -22
  25. package/dist/cli/render.html +1 -1
  26. package/dist/docs/index.html +3 -3
  27. package/dist/docs-raw/AI/usage.md +3 -1
  28. package/dist/docs-raw/CLI.md +65 -239
  29. package/dist/docs-raw/README.md +6 -0
  30. package/dist/docs-raw/component-model.md +17 -150
  31. package/dist/docs-raw/generated/assembly.md +159 -520
  32. package/dist/docs-raw/generated/concepts.md +245 -3491
  33. package/dist/docs-raw/generated/core.md +277 -1251
  34. package/dist/docs-raw/generated/curves.md +387 -1608
  35. package/dist/docs-raw/generated/legacy.md +162 -0
  36. package/dist/docs-raw/generated/lib.md +238 -112
  37. package/dist/docs-raw/generated/output.md +51 -76
  38. package/dist/docs-raw/generated/runtime-names.md +30 -22
  39. package/dist/docs-raw/generated/sdf.md +68 -284
  40. package/dist/docs-raw/generated/sheet-metal.md +68 -335
  41. package/dist/docs-raw/generated/sketch.md +240 -1161
  42. package/dist/docs-raw/generated/viewport.md +75 -316
  43. package/dist/docs-raw/generated/wood.md +21 -49
  44. package/dist/docs-raw/guides/coordinate-system.md +4 -42
  45. package/dist/docs-raw/guides/inspection-bundles.md +44 -442
  46. package/dist/docs-raw/guides/joint-design.md +18 -79
  47. package/dist/docs-raw/guides/positioning.md +21 -143
  48. package/dist/docs-raw/guides/scene-presentation.md +89 -0
  49. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
  50. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  51. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  52. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  53. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  54. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  55. package/dist/docs-raw/skills/forgecad-make-a-model.md +113 -532
  56. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  57. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  58. package/dist/docs-raw/skills/forgecad-project.md +13 -129
  59. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  60. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  61. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  62. package/dist/docs-raw/skills/forgecad.md +19 -18
  63. package/dist/docs-raw/skills/index.md +2 -0
  64. package/dist/docs-raw/welcome.md +4 -2
  65. package/dist/index.html +1 -1
  66. package/dist/llms.txt +1 -2
  67. package/dist/sitemap.xml +13 -13
  68. package/dist-cli/{check-compiler-SDX5QIXI.js → check-compiler-JTVBITCR.js} +1 -1
  69. package/dist-cli/{check-query-propagation-EAYEFT77.js → check-query-propagation-3FFLSMVN.js} +1 -1
  70. package/dist-cli/{chunk-N4O47JLF.js → chunk-OAN5T4XD.js} +5722 -4287
  71. package/dist-cli/forgecad.js +2195 -656
  72. package/dist-skill/CONTEXT.md +1778 -7912
  73. package/dist-skill/SKILL.md +15 -15
  74. package/dist-skill/docs/API/core/concepts.md +27 -157
  75. package/dist-skill/docs/CLI.md +65 -239
  76. package/dist-skill/docs/generated/assembly.md +160 -493
  77. package/dist-skill/docs/generated/core.md +277 -1251
  78. package/dist-skill/docs/generated/curves.md +387 -1609
  79. package/dist-skill/docs/generated/lib.md +238 -112
  80. package/dist-skill/docs/generated/output.md +51 -76
  81. package/dist-skill/docs/generated/runtime-names.md +16 -22
  82. package/dist-skill/docs/generated/sdf.md +68 -284
  83. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  84. package/dist-skill/docs/generated/sketch.md +240 -1160
  85. package/dist-skill/docs/generated/viewport.md +75 -223
  86. package/dist-skill/docs/generated/wood.md +21 -49
  87. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  88. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  89. package/dist-skill/docs/guides/joint-design.md +18 -79
  90. package/dist-skill/docs/guides/positioning.md +21 -143
  91. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  92. package/dist-skill/docs/guides/surface-members.md +26 -0
  93. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  94. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  95. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  96. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  97. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  98. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  99. package/dist-skill/library/forgecad-make-a-model/SKILL.md +111 -532
  100. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  101. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  102. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  103. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  104. package/dist-skill/library/forgecad-project/SKILL.md +13 -131
  105. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  106. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  107. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  108. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  109. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  110. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  111. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  112. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  113. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  114. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  115. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  116. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  117. package/dist-skill/website/skills/forgecad-project.md +26 -0
  118. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  119. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  120. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  121. package/dist-skill/website/skills/forgecad.md +122 -0
  122. package/dist-skill/website/skills/index.md +26 -0
  123. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  124. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  125. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  126. package/examples/api/extrude-options.forge.js +4 -2
  127. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  128. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  129. package/examples/api/helix-basics.forge.js +2 -2
  130. package/examples/api/highlight-debug.forge.js +10 -10
  131. package/examples/api/mesh-import-slats.forge.js +1 -1
  132. package/examples/api/real-product-curves.forge.js +1 -1
  133. package/examples/api/route3d-elbow.forge.js +3 -0
  134. package/examples/api/sculpt-box-circle-booleans.forge.js +1 -1
  135. package/examples/api/sdf-shapes.forge.js +2 -5
  136. package/examples/api/sketch-rounding-strategies.forge.js +6 -6
  137. package/examples/api/surface-member-bottle-cage.forge.js +3 -3
  138. package/examples/api/surface-member-conformal-product-ribbon.forge.js +3 -3
  139. package/examples/api/surface-member-razor-inlay.forge.js +1 -1
  140. package/examples/api/variable-sweep-test.forge.js +4 -2
  141. package/examples/mechanical/airplane-propeller.forge.js +74 -39
  142. package/examples/nurbs-surface.forge.js +1 -1
  143. package/examples/products/iphone.forge.js +1 -1
  144. package/package.json +4 -1
  145. package/dist/assets/EditorApp-Beb-IZ0y.js +0 -14014
  146. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  147. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  148. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  149. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  150. package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
  151. package/examples/api/bolted-service-cover.forge.js +0 -17
  152. package/examples/api/cable-gland-anchor.forge.js +0 -14
  153. package/examples/api/captured-cartridge-guide.forge.js +0 -14
  154. package/examples/api/captured-linear-slide.forge.js +0 -13
  155. package/examples/api/clevis-pin-joint.forge.js +0 -13
  156. package/examples/api/datum-enclosure.forge.js +0 -16
  157. package/examples/api/hose-barb-port.forge.js +0 -14
  158. package/examples/api/knuckled-hinge-assembly.forge.js +0 -15
  159. package/examples/api/living-hinge-cover.forge.js +0 -14
  160. package/examples/api/pcb-terminal-block.forge.js +0 -22
  161. package/examples/api/pinned-lever-pivot-stack.forge.js +0 -14
  162. package/examples/api/retained-shaft-knob-stack.forge.js +0 -15
  163. package/examples/api/routed-tube-clip.forge.js +0 -15
  164. package/examples/api/seated-bearing-stack.forge.js +0 -30
  165. package/examples/api/snap-latch-cover.forge.js +0 -14
  166. package/examples/api/thumb-screw-clamp.forge.js +0 -15
@@ -0,0 +1,122 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit docs/permanent/ instead. -->
2
+
3
+ # forgecad
4
+
5
+ ForgeCAD model authoring, editing, debugging, and execution guidance for .forge.js, SVG-import, assembly, and CLI workflows. Use when building or modifying ForgeCAD geometry, structuring multi-file projects, validating scripts, or using ForgeCAD export/render tooling.
6
+
7
+ | Field | Value |
8
+ | --- | --- |
9
+ | Installed by | `forgecad skill install` |
10
+ | Source | Generated from `docs/permanent/` by `scripts/build-forgecad-skill.mjs` |
11
+
12
+ ---
13
+
14
+ ## ForgeCAD
15
+
16
+ Author or modify ForgeCAD models, sketches, assemblies, and CLI workflows. Prefer documented primitives, import rules, placement strategies, and CLI commands over inventing new APIs.
17
+
18
+ ### Workflow
19
+
20
+ 1. Identify the artifact: `.forge.js`, SVG asset, or CLI/export task.
21
+ 2. **If the model has any moving parts, load the `assembly` group and `docs/permanent/guides/joint-design.md` upfront** — do not defer the kinematic structure to a refactor pass.
22
+ 3. Load only the docs the task needs (see Source Map below). Start from the top group, add others as needed, and prefer these docs and recipes over ad-hoc repo examples.
23
+ 4. If any two parts are intended to touch or mate in the final model, load `docs/permanent/guides/positioning.md` immediately and default to connectors + `matchTo()`.
24
+ 5. Default to a concrete first pass — easy iteration beats speculative design review.
25
+ 6. If an existing model is broken, replace the weak structure rather than preserving bad architecture.
26
+ 7. Validate with `forgecad run <file>` (add `--debug-imports` for import chain issues; pass `--backend manifold|occt|truck` when the backend matters).
27
+ 8. For moving assemblies, return the `Assembly` directly so runtime controls re-solve the link/edge kinematics model instead of stacking viewport-only transforms.
28
+ 9. Model the physical artifact, not an educational diagram. No explanatory labels, arrows, legends, or text plaques unless the user explicitly asks for a presentation or teaching view; product markings only where the real object would carry them.
29
+ 10. Build the real closed CAD first. Never bake cutaways, sectioned shells, permanently exploded layouts, or hidden-parts views into the default model just to show internals — use viewer-only cut planes, `explodeView`, object hiding, transparency, or `inspect sections` after the artifact exists.
30
+
31
+ #### Import and Composition
32
+
33
+ - Always include the extension in relative imports: `require("./file.forge.js", { Param: value })` for model files, `require("./helpers.js")` for plain helper modules. Extensionless imports such as `require("./file")` do not resolve; ForgeCAD resolves project imports by exact path.
34
+ - ForgeCAD APIs are injected globals in `.forge.js` files. Use `bom()`, `box()`, `scene()`, `Shape`, etc. directly; never destructure those names from helpers (`const { bom } = require("./bom.js")`). Import helper files under a project-specific name such as `const bomHelpers = require("./bom.js")`.
35
+ - For static multi-part models, connectors + `matchTo()` are the default way to assemble touching parts.
36
+ - Top-level scripts can return `Assembly` or `SolvedAssembly` directly. Do not call `.toGroup()` just to render an assembly; use it only when you need `ShapeGroup` composition, transforms, or named-child lookup.
37
+ - `Import.svgSketch()` loads SVG files (file format loader, not a module import).
38
+ - `.placeReference('bottom', [0,0,0])` aligns any built-in anchor to a world coordinate; also works with custom `.withReferences()`.
39
+ - Plain `.js` modules hold shared helpers/constants (not model imports).
40
+
41
+ ### Source Map
42
+
43
+ Load groups top-to-bottom, stopping when you have what the task needs.
44
+
45
+ #### 1. Core API (always read first)
46
+
47
+ Execution model, colors, coordinate system, primitives, booleans, patterns, imports, parameters, topology, edge queries.
48
+
49
+ - `docs/permanent/API/core/concepts.md`
50
+ - `docs/permanent/generated/runtime-names.md`
51
+ - `docs/permanent/generated/core.md`
52
+
53
+ #### 2. Static Assembly and Positioning (for any multi-part model)
54
+
55
+ Axis conventions, winding rules, and placement strategy. If parts should touch in the final model, read this group before writing placement code. Connectors + `matchTo()` are the default for mating interfaces; raw `translate()` and `rotate()` are for free offsets, not assembly contracts.
56
+
57
+ - `docs/permanent/guides/coordinate-system.md`
58
+ - `docs/permanent/guides/positioning.md`
59
+
60
+ #### 3. Sketch APIs
61
+
62
+ 2D construction, transforms, booleans, paths, on-face sketching, extrusion, anchors, text, regions.
63
+
64
+ - `docs/permanent/generated/sketch.md`
65
+
66
+ #### 4. Curves and Surfacing (for lofts, sweeps, splines)
67
+
68
+ Smooth curves, Hermite splines, lofted and swept solids. For straps, inlays, guards, brace members, vents, or physical bands that live on a carrier surface, use `Carrier` + `SurfaceBody` surface-member primitives before reaching for `variableSweep`, SDF sculpting, or manual boolean overlap recipes.
69
+
70
+ - `docs/permanent/guides/surface-members.md`
71
+ - `docs/permanent/generated/curves.md`
72
+
73
+ #### 5. Assemblies and Mechanisms (for joints or kinematics)
74
+
75
+ Assembly graph, joint types, couplings, validation, robot export.
76
+
77
+ - `docs/permanent/generated/assembly.md`
78
+
79
+ #### 6. Sheet Metal (for bent parts, K-factor, flat patterns)
80
+
81
+ Bend operations, flat pattern unfolding, K-factor configuration.
82
+
83
+ - `docs/permanent/generated/sheet-metal.md`
84
+
85
+ #### 7. Output and Export (for STL/3MF/STEP, BOM, dimensions)
86
+
87
+ Mesh export, exact geometry export, bill of materials, dimension annotations.
88
+
89
+ - `docs/permanent/generated/output.md`
90
+
91
+ #### 8. Toolbox (fasteners and standard parts)
92
+
93
+ Parametric bolts, nuts, washers, standard hardware, gears, pipes, and structural profiles.
94
+
95
+ - `docs/permanent/generated/lib.md`
96
+ - `docs/permanent/generated/wood.md`
97
+
98
+ #### 9. Runtime Viewport APIs (for cut planes, exploded views, hiding, and animation playback)
99
+
100
+ Viewer-only APIs such as cutPlane, explodeView, render labels, comparison references, and runtime display behavior.
101
+
102
+ - `docs/permanent/generated/viewport.md`
103
+
104
+ #### 10. Recipes and Debugging (for patterns and troubleshooting)
105
+
106
+ Modeling patterns, debugging tactics, copyable snippets.
107
+
108
+ - `docs/permanent/guides/scene-presentation.md`
109
+ - `docs/permanent/guides/joint-design.md`
110
+
111
+ #### 11. CLI (for validation/render/export tasks)
112
+
113
+ Test-run, export pipelines, debug flags.
114
+
115
+ - `docs/permanent/CLI.md`
116
+ - `docs/permanent/guides/inspection-bundles.md`
117
+
118
+ #### SDF Modeling (smooth booleans, TPMS, deformations, fromFunction)
119
+
120
+ Primitives, smooth booleans, TPMS lattices, twist/bend/displace, morph, custom functions, gotchas. The doc preamble's precision caution applies to every SDF workflow.
121
+
122
+ - `docs/permanent/generated/sdf.md`
@@ -0,0 +1,26 @@
1
+ <!-- Generated by scripts/build-forgecad-skill.mjs — do not edit. Edit agent-skill-library/*/SKILL.md instead. -->
2
+
3
+ # ForgeCAD Skills
4
+
5
+ These are the agent skills shipped in the ForgeCAD npm package. The default install path installs the core `forgecad` skill plus the companion workflow skills listed here.
6
+
7
+ ```bash
8
+ forgecad skill install
9
+ ```
10
+
11
+ | Skill | Installed by | Purpose |
12
+ | --- | --- | --- |
13
+ | [forgecad](/docs/skills/forgecad) | `forgecad skill install` | ForgeCAD model authoring, editing, debugging, and execution guidance for .forge.js, SVG-import, assembly, and CLI workflows. Use when building or modifying ForgeCAD geometry, structuring multi-file projects, validating scripts, or using ForgeCAD export/render tooling. |
14
+ | [forgecad-3d-reconstruction](/docs/skills/forgecad-3d-reconstruction) | `forgecad skill install` | Reconstruct a parametric ForgeCAD model from an existing 3D CAD or mesh file such as STL, OBJ, 3MF, STEP, or STP; inspect the source asset directly, author real ForgeCAD geometry, and iteratively compare the candidate with `forgecad compare 3d`. |
15
+ | [forgecad-blockout-model](/docs/skills/forgecad-blockout-model) | `forgecad skill install` | Create rough high-level ForgeCAD concept models from simple primitives to explore layout, proportions, motion, and part relationships without production detail. Use when asked for a quick model sketch, blockout, spatial mockup, or intuitive low-detail 3D concept. |
16
+ | [forgecad-component-model](/docs/skills/forgecad-component-model) | `forgecad skill install` | Enforce the ForgeCAD Component Model when building multi-part assemblies. Parts build at origin, connectors position them, data flows down from parent. Use when building or reviewing any multi-file ForgeCAD project. |
17
+ | [forgecad-high-level-spec](/docs/skills/forgecad-high-level-spec) | `forgecad skill install` | Write a high-level design document (HLD) for a model, mechanism, or assembly before detailed specification or coding. Use when starting a new design, rethinking an existing one, or when the user asks to spec out, plan, or think through a model at a high level. Works backwards from requirements — defines the problem, explores alternatives, records decisions. Produces a right-sized design document for review and iteration. |
18
+ | [forgecad-image-replicator](/docs/skills/forgecad-image-replicator) | `forgecad skill install` | Build real ForgeCAD geometry from one or more reference images by treating images as evidence, inferring the object, then validating against both reference-matched and canonical views. |
19
+ | [forgecad-lld](/docs/skills/forgecad-lld) | `forgecad skill install` | Write a Low-Level Design (LLD) for a CAD model — exact dimensions, constraints, parameters, and verification criteria. Use after a High-Level Design (HLD) exists and decisions are locked, or for simple parts that don't need an HLD. The detailed design document that code implements. |
20
+ | [forgecad-make-a-model](/docs/skills/forgecad-make-a-model) | `forgecad skill install` | Create manufacture-realistic prototype ForgeCAD (.forge.js) models in the active CAD project. Handles file placement, invokes the forgecad skill for API guidance, and validates the result. |
21
+ | [forgecad-model-grader](/docs/skills/forgecad-model-grader) | `forgecad skill install` | Analyze, verify, and grade ForgeCAD or CAD-as-code models against a user requirement, design brief, prompt, reference, or acceptance criteria. Use when asked to evaluate, judge, QA, benchmark, score, rate, or compare a CAD model; render it from multiple angles, run targeted inspections when needed, visually verify the evidence, and produce a 0-10 score with concise justification. |
22
+ | [forgecad-prepare-prompt](/docs/skills/forgecad-prepare-prompt) | `forgecad skill install` | Turn a fuzzy physical product, mechanism, or CAD artifact request into a concrete manufacture-realistic prototype ForgeCAD build brief and a single master prompt for the modeling pass. Use when the engineering brief is incomplete, manufacturing/process choice is underspecified, or the work needs a specific operating story to avoid generic toy solutions. |
23
+ | [forgecad-project](/docs/skills/forgecad-project) | `forgecad skill install` | ForgeCAD project CLI workflow — creating, managing, syncing projects and files on forgecad.io. Covers init, push, pull, file operations, member management, publishing, and sharing. |
24
+ | [forgecad-reconstruction-benchmark](/docs/skills/forgecad-reconstruction-benchmark) | `forgecad skill install` | Solve ForgeCAD CAD reconstruction benchmark or RL episodes in a prepared workspace by rebuilding a visible reference asset as readable parametric ForgeCAD in the fixed submission path, using visual and geometric self-checks while respecting sandbox limits. |
25
+ | [forgecad-render-inspect](/docs/skills/forgecad-render-inspect) | `forgecad skill install` | Run and interpret ForgeCAD inspection bundles for model verification. Use when asked to inspect a ForgeCAD model, analyze an inspection bundle, validate collisions, wall thickness, connectivity, floating bodies, sections, masks, depth, normals, or Zebra stripes. |
26
+ | [forgecad-visual-spec](/docs/skills/forgecad-visual-spec) | `forgecad skill install` | Turn a concrete ForgeCAD artifact, build brief, HLD, or existing model into builder-honest image prompts for AI image models. Use when the user wants visual-spec renders that show the final product while keeping mechanisms, seams, hardware, and build cues visible instead of drifting into concept art. |
@@ -11,7 +11,7 @@ compareWith("../assets/sphere.stl", {
11
11
  label: "Original STL Sphere",
12
12
  });
13
13
 
14
- const source = importMesh("../assets/sphere.stl");
14
+ const source = Import.mesh("../assets/sphere.stl");
15
15
  const bb = source.boundingBox();
16
16
  const width = bb.max[0] - bb.min[0];
17
17
  const depth = bb.max[1] - bb.min[1];
@@ -5,7 +5,7 @@
5
5
 
6
6
  Product.scenePreset('product');
7
7
 
8
- viewConfig({
8
+ scene({
9
9
  camera: { position: [78, -180, 88], target: [0, 0, 58], fov: 31 },
10
10
  });
11
11
 
@@ -1,7 +1,7 @@
1
1
  const width = param('Width', 112);
2
2
  const depth = param('Depth', 78);
3
3
  const height = param('Height', 44);
4
- const showConstruction = boolParam('Show Construction Sheets', false);
4
+ const showConstruction = Param.bool('Show Construction Sheets', false);
5
5
  const constructionOffset = param('Construction Offset', 22);
6
6
 
7
7
  const materials = {
@@ -23,8 +23,10 @@ const tapered = circle2d(r).extrude(h, { scaleTop: taper })
23
23
  .translate(2 * spacing, 0, 0)
24
24
  .color('#44cc88');
25
25
 
26
- // 4. Combined: twist + taper
27
- const combo = star(5, r, r * 0.5).extrude(h, {
26
+ // 4. Combined: twist + taper, on a five-pointed star built from layout primitives
27
+ const tips = polygonVertices(5, r, { startDeg: -90 });
28
+ const valleys = polygonVertices(5, r * 0.5, { startDeg: -90 + 180 / 5 });
29
+ const combo = polygon(tips.flatMap((tip, i) => [tip, valleys[i]])).extrude(h, {
28
30
  twist: twist,
29
31
  scaleTop: taper,
30
32
  divisions: 32,
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Field-interpolated loft for profiles that change character.
3
+ *
4
+ * Red uses the regular stitched loft. Green uses Loft.field(), which blends
5
+ * profile signed-distance fields and avoids boundary-point correspondence.
6
+ */
7
+
8
+ scene({
9
+ camera: { position: [80, -105, 55], target: [0, 0, 9], fov: 36 },
10
+ });
11
+
12
+ const heights = [0, 5, 11, 17];
13
+ const shank = circle2d(6, 80);
14
+
15
+ function crossProfile(radius, armWidth) {
16
+ return union2d(rect(radius * 2.05, armWidth), rect(armWidth, radius * 2.05));
17
+ }
18
+
19
+ const profiles = [
20
+ shank,
21
+ shank,
22
+ crossProfile(6, 3),
23
+ crossProfile(4.3, 2.1),
24
+ ];
25
+
26
+ const stitched = loft(profiles, heights, { edgeLength: 0.22 })
27
+ .translate(-12, 0, 0)
28
+ .color('#c2574b');
29
+
30
+ const field = Loft.field(profiles, heights, {
31
+ edgeLength: 0.14,
32
+ maxTriangles: 5000,
33
+ })
34
+ .translate(12, 0, 0)
35
+ .color('#4c8f73');
36
+
37
+ return [
38
+ { name: 'regular loft', shape: stitched },
39
+ { name: 'field loft', shape: field },
40
+ ];
@@ -7,7 +7,7 @@
7
7
 
8
8
  Product.scenePreset('product');
9
9
 
10
- viewConfig({
10
+ scene({
11
11
  camera: { position: [190, -250, 150], target: [8, 0, 88], fov: 34 },
12
12
  });
13
13
 
@@ -49,8 +49,8 @@ const sampledPathMarkers = union(
49
49
  ...guide.sample(9).map(([x, y, z]) => sphere(wireRadius * 0.5).translate(x + 120, y, z)),
50
50
  );
51
51
 
52
- console.info(`Helix height: ${guide.height.toFixed(2)}`);
53
- console.info(`Helix centerline length: ${guide.length().toFixed(2)}`);
52
+ console.info(`Curve.Helix height: ${guide.height.toFixed(2)}`);
53
+ console.info(`Curve.Helix centerline length: ${guide.length().toFixed(2)}`);
54
54
 
55
55
  return [
56
56
  { name: "Circular wire coil", shape: circularWireCoil },
@@ -1,36 +1,36 @@
1
1
  /**
2
2
  * Debug Highlight API — visual debugging for any geometry
3
3
  *
4
- * highlight() accepts points, edges, planes, faces, shapes, and sketch entities.
4
+ * Viewport.highlight() accepts points, edges, planes, faces, shapes, and sketch entities.
5
5
  * Each highlighted item renders as a colored overlay in the viewport.
6
6
  */
7
7
 
8
8
  const b = box(30, 20, 15);
9
9
 
10
10
  // Point highlight — rendered as a small sphere
11
- highlight([0, 0, 0], { color: 'cyan', label: 'origin' });
12
- highlight([30, 20, 15], { color: 'cyan', label: 'corner' });
11
+ Viewport.highlight([0, 0, 0], { color: 'cyan', label: 'origin' });
12
+ Viewport.highlight([30, 20, 15], { color: 'cyan', label: 'corner' });
13
13
 
14
14
  // Edge highlight — rendered as a line segment with endpoint spheres
15
- highlight([[0, 0, 0], [30, 20, 15]], { color: 'yellow', label: 'diagonal' });
15
+ Viewport.highlight([[0, 0, 0], [30, 20, 15]], { color: 'yellow', label: 'diagonal' });
16
16
 
17
17
  // Plane highlight — rendered as a semi-transparent disc with normal arrow
18
- highlight({ normal: [0, 0, 1], offset: 7.5 }, { color: 'lime', label: 'z=7.5', size: 30 });
18
+ Viewport.highlight({ normal: [0, 0, 1], offset: 7.5 }, { color: 'lime', label: 'z=7.5', size: 30 });
19
19
 
20
20
  // Plane from normal + point
21
- highlight({ normal: [1, 0, 0], point: [15, 0, 0] }, { color: 'orange', label: 'x=15' });
21
+ Viewport.highlight({ normal: [1, 0, 0], point: [15, 0, 0] }, { color: 'orange', label: 'x=15' });
22
22
 
23
23
  // Face reference — highlight a named face from a tracked shape
24
- highlight(b.face('top'), { color: 'red', label: 'top face' });
24
+ Viewport.highlight(b.face('top'), { color: 'red', label: 'top face' });
25
25
 
26
26
  // Edge reference — highlight a named edge
27
- highlight(b.edge('top-right'), { color: 'blue', label: 'top-right edge' });
27
+ Viewport.highlight(b.edge('top-right'), { color: 'blue', label: 'top-right edge' });
28
28
 
29
29
  // Shape highlight — transparent colored overlay on the entire shape
30
- highlight(b, { color: '#ff00ff' });
30
+ Viewport.highlight(b, { color: '#ff00ff' });
31
31
 
32
32
  // Intermediary shape highlight — snapshot a temporary shape that is not returned
33
33
  const temporary = b.translate(40, 0, 0);
34
- highlight(temporary, { color: '#00ffff', label: 'temporary snapshot' });
34
+ Viewport.highlight(temporary, { color: '#00ffff', label: 'temporary snapshot' });
35
35
 
36
36
  return b;
@@ -8,7 +8,7 @@ const slatThickness = Param.number("Slat thickness", 1.2, { min: 0.4, max: 3, un
8
8
  const gap = Param.number("Gap", 1.5, { min: 0.5, max: 5, unit: "mm" });
9
9
 
10
10
  // Import an external mesh file
11
- const mesh = importMesh("assets/sphere.stl");
11
+ const mesh = Import.mesh("assets/sphere.stl");
12
12
  const bb = mesh.boundingBox();
13
13
  const size = [bb.max[0] - bb.min[0], bb.max[1] - bb.min[1], bb.max[2] - bb.min[2]];
14
14
  const center = [(bb.min[0] + bb.max[0]) / 2, (bb.min[1] + bb.max[1]) / 2, (bb.min[2] + bb.max[2]) / 2];
@@ -8,7 +8,7 @@
8
8
 
9
9
  Product.scenePreset('product');
10
10
 
11
- viewConfig({
11
+ scene({
12
12
  camera: { position: [190, -265, 160], target: [0, -18, 70], fov: 34 },
13
13
  });
14
14
 
@@ -20,8 +20,11 @@ const neckLength = 26.645;
20
20
  const neckRadius = 55.6;
21
21
 
22
22
  const tubeProfile = difference2d(circle2d(outerRadius, 80), circle2d(innerRadius, 80));
23
+
23
24
  const pipe = sweep(tubeProfile, route, { samples: 72 });
24
25
 
26
+ return pipe;
27
+
25
28
  function placeAtPort(shape, port, offset) {
26
29
  return shape.pointAlong(port.axis).translate(
27
30
  port.origin[0] + port.axis[0] * offset,
@@ -22,7 +22,7 @@ const slab = Sculpt.box(86, 44, 20, { radius: 8 }).polish({
22
22
  reflectivity: 0.66,
23
23
  });
24
24
 
25
- const circularWindow = Sculpt.circle(13, 34).tilt(90, 'x').at(-22, 0, 0);
25
+ const circularWindow = Sculpt.disk(13, 34).tilt(90, 'x').at(-22, 0, 0);
26
26
  const ringGroove = Sculpt.torus(25, 2.8).tilt(90, 'x').at(20, 0, 0);
27
27
  const diagonalBite = Sculpt.curve(
28
28
  [
@@ -18,11 +18,8 @@ const smoothCarve = sdf.smoothDifference(
18
18
  .translate(40, 0, 0)
19
19
  .color('#cc4444');
20
20
 
21
- const morphed = sdf.morph(
22
- sdf.sphere(12),
23
- sdf.box(20, 20, 20),
24
- 0.5,
25
- )
21
+ const morphed = sdf.sphere(12)
22
+ .morph(sdf.box(20, 20, 20), 0.5)
26
23
  .translate(80, 0, 0)
27
24
  .color('#44cc88');
28
25
 
@@ -41,16 +41,16 @@ const mergedCircles = union2d(
41
41
  circle2d(radius).translate(bodyWidth - shoulderInset, bodyHeight + shoulderRise),
42
42
  ),
43
43
  ).color('#7f5af0');
44
- const selectiveFillet = filletCorners(roofPoints, [
45
- { index: 3, radius },
46
- { index: 4, radius },
47
- { index: 5, radius },
48
- ]).color('#e63946');
44
+ const selectiveFillet = polygon(roofPoints)
45
+ .filletCorner([bodyWidth - shoulderInset, bodyHeight + shoulderRise], radius)
46
+ .filletCorner([bodyWidth / 2, bodyHeight + peakRise], radius)
47
+ .filletCorner([shoulderInset, bodyHeight + shoulderRise], radius)
48
+ .color('#e63946');
49
49
 
50
50
  return [
51
51
  { name: "Raw polygon", sketch: rawProfile },
52
52
  { name: "offset(-r).offset(+r)", sketch: roundedAllCorners.translate(gap, 0) },
53
53
  { name: "stroke(..., 'Round')", sketch: strokedCenterline.translate(gap * 2, 0) },
54
54
  { name: "union2d() of circles", sketch: mergedCircles.translate(gap * 3, 0) },
55
- { name: "filletCorners()", sketch: selectiveFillet.translate(gap * 4, 0) },
55
+ { name: ".filletCorner([x, y], r)", sketch: selectiveFillet.translate(gap * 4, 0) },
56
56
  ];
@@ -7,8 +7,8 @@ const cage = SurfaceBody('road-bike-bottle-cage')
7
7
  .at(bottle.back({ offset: 7 }))
8
8
  .size(30, 118)
9
9
  .section({ thickness: 5.4, edgeRadius: 1 })
10
- .slot('upper-mount-slot', Slot.rounded({ length: 12, width: 5.7 }).verticalTravel(6).at({ z: 82 }))
11
- .slot('lower-mount-slot', Slot.rounded({ length: 12, width: 5.7 }).verticalTravel(6).at({ z: 18 }))
10
+ .slot('upper-mount-slot', SurfaceMembers.roundedSlot({ length: 12, width: 5.7 }).verticalTravel(6).at({ z: 82 }))
11
+ .slot('lower-mount-slot', SurfaceMembers.roundedSlot({ length: 12, width: 5.7 }).verticalTravel(6).at({ z: 18 }))
12
12
  .member('left-arm')
13
13
  .band()
14
14
  .path(bottle.path().from({ angle: -145, z: 18 }).through({ angle: -116, z: 42 }).through({ angle: -72, z: 78 }).to({ angle: -34, z: 112 }))
@@ -24,7 +24,7 @@ const cage = SurfaceBody('road-bike-bottle-cage')
24
24
  .band()
25
25
  .path(bottle.path().from({ angle: -135, z: 92 }).through({ angle: 180, z: 54 }).to({ angle: 135, z: 92 }))
26
26
  .section({ width: 12, thickness: 5, edgeRadius: 1.3 })
27
- .cutout('lightening-slot', Slot.rounded({ length: 54, width: 7 }))
27
+ .cutout('lightening-slot', SurfaceMembers.roundedSlot({ length: 54, width: 7 }))
28
28
  .join('left-arm', 'lower-cup').blend({ radius: 6, style: 'structural' })
29
29
  .join('right-arm', 'lower-cup').blend({ radius: 6, style: 'structural' })
30
30
  .join('front-sweep', ['left-arm', 'right-arm']).blend({ radius: 5 })
@@ -6,7 +6,7 @@
6
6
 
7
7
  Product.scenePreset('product');
8
8
 
9
- viewConfig({
9
+ scene({
10
10
  camera: { position: [78, -180, 88], target: [0, 0, 58], fov: 31 },
11
11
  });
12
12
 
@@ -39,12 +39,12 @@ const inserts = SurfaceBody('surface-member-conformal-inserts')
39
39
  .band()
40
40
  .path(handle.surface('left').path().from({ u: 0.3, v: 0.18 }).through({ u: 0.34, v: 0.48 }).to({ u: 0.32, v: 0.78 }))
41
41
  .section({ width: 5.8, thickness: 0.9, material: rubber })
42
- .features(Ribs.repeated({ count: 10, height: 0.28 }))
42
+ .features(SurfaceMembers.ribs({ count: 10, height: 0.28 }))
43
43
  .member('right-grip')
44
44
  .band()
45
45
  .path(handle.surface('right').path().from({ u: 0.7, v: 0.18 }).through({ u: 0.66, v: 0.48 }).to({ u: 0.68, v: 0.78 }))
46
46
  .section({ width: 5.8, thickness: 0.9, material: rubber })
47
- .features(Ribs.repeated({ count: 10, height: 0.28 }))
47
+ .features(SurfaceMembers.ribs({ count: 10, height: 0.28 }))
48
48
  .build();
49
49
 
50
50
  return group(
@@ -15,7 +15,7 @@ const inlay = SurfaceBody('razor-overmold')
15
15
  .band()
16
16
  .path(handle.surface('left').path().from({ u: 0.35, v: 0.12 }).through({ u: 0.22, v: 0.55 }).to({ u: 0.42, v: 0.9 }))
17
17
  .section({ width: 8, thickness: 0.9, edgeRadius: 0.45, material: Product.materials.softRubber({ color: '#22262a' }) })
18
- .features(Ribs.repeated({ count: 18, height: 0.35 }))
18
+ .features(SurfaceMembers.ribs({ count: 18, height: 0.35 }))
19
19
  .member('right-grip')
20
20
  .mirrorOf('left-grip')
21
21
  .join('left-grip', 'right-grip').blend({ radius: 2, style: 'separate-overmold' })
@@ -1,12 +1,12 @@
1
1
  // Variable Sweep test — tapered tube along a curved spine
2
2
  // Demonstrates variableSweep() with different cross-sections at different t values
3
3
 
4
- const spine = spline3d([
4
+ const spine = Curve.Fit([
5
5
  [0, 0, 0],
6
6
  [20, 0, 10],
7
7
  [40, 10, 20],
8
8
  [60, 10, 30],
9
- ], { tension: 0.4 });
9
+ ]);
10
10
 
11
11
  const smallCircle = circle2d(3);
12
12
  const largeCircle = circle2d(8);
@@ -20,4 +20,6 @@ const tapered = variableSweep(spine, [
20
20
  samples: 64,
21
21
  });
22
22
 
23
+ verify.boundingBoxSize('variableSweep along Curve.Fit keeps the tapered tube envelope', tapered, [66, 22, 36], 8);
24
+
23
25
  return tapered.color('#8899aa');