forgecad 0.9.16 → 0.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (162) hide show
  1. package/dist/assets/{AdminPage-CXvls4-J.js → AdminPage-DcCnj0qo.js} +1 -1
  2. package/dist/assets/{BenchmarkPage-B27zk8xL.js → BenchmarkPage-BVEpJSVk.js} +1 -1
  3. package/dist/assets/{BlogPage-CMAVvgQL.js → BlogPage-DHaGP50_.js} +1 -1
  4. package/dist/assets/{DocsPage-knf4I4h7.js → DocsPage-CDoxHkz8.js} +40 -859
  5. package/dist/assets/EditorApp-BJ0Dloyh.js +16446 -0
  6. package/dist/assets/{EmbedViewer-D7ZGlFjx.js → EmbedViewer-CRKZbY0y.js} +2 -2
  7. package/dist/assets/{LandingPageProofDriven-CnevhTE8.js → LandingPageProofDriven-BxHkYRE7.js} +1 -1
  8. package/dist/assets/{LegalPage-BPTUmqeg.js → LegalPage-B-u6FrVv.js} +1 -1
  9. package/dist/assets/{PricingPage-B0D4goG_.js → PricingPage-CzpZ6-Ce.js} +1 -1
  10. package/dist/assets/{SettingsPage-CFF-UgjI.js → SettingsPage-CIZSSAd0.js} +1 -1
  11. package/dist/assets/{app-CE3sYcV7.css → app-CjsbDlb7.css} +143 -0
  12. package/dist/assets/{app-T0pDcSX4.js → app-DaTMg3nH.js} +1310 -290
  13. package/dist/assets/cli/{render-C5pcIISc.js → render-DPf4AYJK.js} +55 -60
  14. package/dist/assets/{constructionHistoryWorker-Ba2Hm58b.js → constructionHistoryWorker-AwMMWSxg.js} +1103 -349
  15. package/dist/assets/{evalWorker-vkx310U2.js → evalWorker-CjZZWRWW.js} +5209 -2643
  16. package/dist/assets/{inspectWorker-BuTJDVX6.js → inspectWorker-CZsCFtQT.js} +1163 -409
  17. package/dist/assets/{jointPose-B_Cgedn9.js → jointPose-DzQOViQH.js} +1 -1
  18. package/dist/assets/{manifold-BWgsjmAM.js → manifold-BYlzU521.js} +1 -1
  19. package/dist/assets/{manifold-D6IFSkhH.js → manifold-DgXo0T5P.js} +2 -2
  20. package/dist/assets/{manifold-rZexZI0G.js → manifold-K1SkarlQ.js} +1 -1
  21. package/dist/assets/{reportWorker-0AGij1Ru.js → reportWorker-B9nWwSrB.js} +8501 -3393
  22. package/dist/assets/{scalar-sampling-budget-J5cuzxT1.js → scalar-sampling-budget-prBw_s8t.js} +6067 -3479
  23. package/dist/assets/{scanProxyWorker-Vl4Wxa1y.js → scanProxyWorker-2GtDLk-R.js} +1 -1
  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 +1 -1
  28. package/dist/docs-raw/CLI.md +77 -240
  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 +188 -582
  32. package/dist/docs-raw/generated/concepts.md +259 -3501
  33. package/dist/docs-raw/generated/core.md +283 -1250
  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 +227 -85
  37. package/dist/docs-raw/generated/output.md +35 -99
  38. package/dist/docs-raw/generated/runtime-names.md +23 -23
  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/guides/simready-quickstart.md +171 -0
  50. package/dist/docs-raw/simulation-workflow.md +273 -0
  51. package/dist/docs-raw/skills/forgecad-3d-reconstruction.md +25 -111
  52. package/dist/docs-raw/skills/forgecad-blockout-model.md +20 -117
  53. package/dist/docs-raw/skills/forgecad-component-model.md +23 -107
  54. package/dist/docs-raw/skills/forgecad-high-level-spec.md +47 -155
  55. package/dist/docs-raw/skills/forgecad-image-replicator.md +26 -143
  56. package/dist/docs-raw/skills/forgecad-lld.md +19 -113
  57. package/dist/docs-raw/skills/forgecad-make-a-model.md +112 -532
  58. package/dist/docs-raw/skills/forgecad-model-grader.md +38 -108
  59. package/dist/docs-raw/skills/forgecad-prepare-prompt.md +24 -211
  60. package/dist/docs-raw/skills/forgecad-project.md +13 -131
  61. package/dist/docs-raw/skills/forgecad-reconstruction-benchmark.md +42 -134
  62. package/dist/docs-raw/skills/forgecad-render-inspect.md +27 -174
  63. package/dist/docs-raw/skills/forgecad-visual-spec.md +32 -112
  64. package/dist/docs-raw/skills/forgecad.md +19 -18
  65. package/dist/docs-raw/skills/index.md +2 -0
  66. package/dist/docs-raw/welcome.md +2 -2
  67. package/dist/index.html +2 -2
  68. package/dist/llms.txt +1 -2
  69. package/dist/sitemap.xml +25 -13
  70. package/dist-cli/{check-compiler-SYQ2PWOB.js → check-compiler-II7NLPAB.js} +1 -1
  71. package/dist-cli/{check-query-propagation-HIAGV62W.js → check-query-propagation-7462TR3R.js} +1 -1
  72. package/dist-cli/{chunk-SPZE3DUY.js → chunk-UWTJCGXF.js} +5848 -2915
  73. package/dist-cli/forgecad.js +3496 -703
  74. package/dist-skill/CONTEXT.md +1797 -7963
  75. package/dist-skill/SKILL.md +15 -15
  76. package/dist-skill/docs/API/core/concepts.md +27 -157
  77. package/dist-skill/docs/CLI.md +77 -240
  78. package/dist-skill/docs/generated/assembly.md +182 -532
  79. package/dist-skill/docs/generated/core.md +283 -1250
  80. package/dist-skill/docs/generated/curves.md +387 -1609
  81. package/dist-skill/docs/generated/lib.md +227 -85
  82. package/dist-skill/docs/generated/output.md +35 -99
  83. package/dist-skill/docs/generated/runtime-names.md +16 -21
  84. package/dist-skill/docs/generated/sdf.md +68 -284
  85. package/dist-skill/docs/generated/sheet-metal.md +68 -335
  86. package/dist-skill/docs/generated/sketch.md +240 -1160
  87. package/dist-skill/docs/generated/viewport.md +75 -223
  88. package/dist-skill/docs/generated/wood.md +21 -49
  89. package/dist-skill/docs/guides/coordinate-system.md +4 -42
  90. package/dist-skill/docs/guides/inspection-bundles.md +44 -442
  91. package/dist-skill/docs/guides/joint-design.md +18 -79
  92. package/dist-skill/docs/guides/positioning.md +21 -143
  93. package/dist-skill/docs/guides/scene-presentation.md +89 -0
  94. package/dist-skill/docs/guides/surface-members.md +26 -0
  95. package/dist-skill/library/forgecad-3d-reconstruction/SKILL.md +23 -111
  96. package/dist-skill/library/forgecad-blockout-model/SKILL.md +18 -117
  97. package/dist-skill/library/forgecad-component-model/SKILL.md +21 -107
  98. package/dist-skill/library/forgecad-high-level-spec/SKILL.md +45 -155
  99. package/dist-skill/library/forgecad-image-replicator/SKILL.md +24 -143
  100. package/dist-skill/library/forgecad-lld/SKILL.md +17 -113
  101. package/dist-skill/library/forgecad-make-a-model/SKILL.md +110 -532
  102. package/dist-skill/library/forgecad-model-grader/SKILL.md +36 -108
  103. package/dist-skill/library/forgecad-prepare-prompt/SKILL.md +35 -224
  104. package/dist-skill/library/forgecad-prepare-prompt/references/default-profiles.md +43 -271
  105. package/dist-skill/library/forgecad-prepare-prompt/references/master-prompt.md +30 -99
  106. package/dist-skill/library/forgecad-project/SKILL.md +13 -133
  107. package/dist-skill/library/forgecad-reconstruction-benchmark/SKILL.md +29 -123
  108. package/dist-skill/library/forgecad-render-inspect/SKILL.md +25 -174
  109. package/dist-skill/library/forgecad-visual-spec/SKILL.md +30 -111
  110. package/dist-skill/website/skills/forgecad-3d-reconstruction.md +58 -0
  111. package/dist-skill/website/skills/forgecad-blockout-model.md +49 -0
  112. package/dist-skill/website/skills/forgecad-component-model.md +53 -0
  113. package/dist-skill/website/skills/forgecad-high-level-spec.md +101 -0
  114. package/dist-skill/website/skills/forgecad-image-replicator.md +63 -0
  115. package/dist-skill/website/skills/forgecad-lld.md +41 -0
  116. package/dist-skill/website/skills/forgecad-make-a-model.md +186 -0
  117. package/dist-skill/website/skills/forgecad-model-grader.md +82 -0
  118. package/dist-skill/website/skills/forgecad-prepare-prompt.md +63 -0
  119. package/dist-skill/website/skills/forgecad-project.md +26 -0
  120. package/dist-skill/website/skills/forgecad-reconstruction-benchmark.md +60 -0
  121. package/dist-skill/website/skills/forgecad-render-inspect.md +80 -0
  122. package/dist-skill/website/skills/forgecad-visual-spec.md +71 -0
  123. package/dist-skill/website/skills/forgecad.md +122 -0
  124. package/dist-skill/website/skills/index.md +26 -0
  125. package/examples/api/comparison-imported-sphere-candidate.forge.js +1 -1
  126. package/examples/api/conformal-product-ribbon.forge.js +1 -1
  127. package/examples/api/exact-sheet-shell-assembly.forge.js +1 -1
  128. package/examples/api/extrude-options.forge.js +4 -2
  129. package/examples/api/field-loft-drive-tip.forge.js +40 -0
  130. package/examples/api/guided-loft-olive-oil-bottle.forge.js +1 -1
  131. package/examples/api/highlight-debug.forge.js +10 -10
  132. package/examples/api/mesh-import-slats.forge.js +1 -1
  133. package/examples/api/real-product-curves.forge.js +1 -1
  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 +3 -3
  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/examples/robotics/README.md +46 -0
  145. package/examples/robotics/scout-cam-rover-simready/README.md +119 -0
  146. package/examples/robotics/scout-cam-rover-simready/lib/dims.js +140 -0
  147. package/examples/robotics/scout-cam-rover-simready/main.forge.js +343 -0
  148. package/examples/robotics/scout-cam-rover-simready/parts/body.forge.js +304 -0
  149. package/examples/robotics/scout-cam-rover-simready/parts/chassis.forge.js +320 -0
  150. package/examples/robotics/scout-cam-rover-simready/parts/hardware.forge.js +21 -0
  151. package/examples/robotics/scout-cam-rover-simready/parts/turret.forge.js +70 -0
  152. package/examples/robotics/scout-cam-rover-simready/parts/wheel.forge.js +116 -0
  153. package/examples/robotics/simready-asset-crate.forge.js +79 -0
  154. package/examples/robotics/simready-diff-drive-rover.forge.js +141 -0
  155. package/examples/robotics/simready-parallel-gripper.forge.js +102 -0
  156. package/package.json +1 -1
  157. package/dist/assets/EditorApp-BHMQlJ-D.js +0 -14686
  158. package/dist/docs-raw/guides/geometry-conventions.md +0 -52
  159. package/dist/docs-raw/guides/modeling-recipes.md +0 -78
  160. package/dist-skill/docs/guides/geometry-conventions.md +0 -52
  161. package/dist-skill/docs/guides/modeling-recipes.md +0 -78
  162. package/dist-skill/library/forgecad-visual-spec/references/prompt-template.md +0 -79
@@ -1,52 +0,0 @@
1
- ---
2
- skill-group: geometry
3
- skill-order: 2
4
- ---
5
-
6
- # Geometry Conventions
7
-
8
- ForgeCAD wraps Manifold (mesh kernel) and Three.js (Y-up renderer). This doc captures convention mismatches and how ForgeCAD resolves them.
9
-
10
- ## Winding Order
11
-
12
- CCW = positive area, CW = empty in Manifold's `CrossSection`. ForgeCAD auto-fixes at all entry points:
13
- - `polygon(points)` — computes signed area (shoelace), reverses if CW
14
- - `path().close()` — same fix
15
-
16
- **Rule for new code:** Any function accepting user point arrays that creates a `CrossSection` MUST auto-fix winding.
17
-
18
- ## Coordinate System (Z-up vs Y-up)
19
-
20
- Three.js is Y-up; ForgeCAD is Z-up. Fix applied at camera level (`camera.up = (0,0,1)`) — geometry coordinates are native Z-up. Never swap Y/Z in geometry.
21
-
22
- ## Revolution Axis
23
-
24
- `Sketch.revolve()` produces a world Z-axis solid of revolution. Profile X = radial distance from the Z axis, Profile Y = world Z height after revolution. Profile should stay at X > 0 unless intentionally touching the axis.
25
-
26
- ## Boolean Winding (3D)
27
-
28
- Manifold requires consistent outward face normals. ForgeCAD only creates meshes through Manifold's own constructors, which guarantee correct normals.
29
-
30
- ## Transform Order
31
-
32
- Transforms apply left-to-right. `Sketch.rotate()`, `scale()`, and `mirror()` operate around bounding-box center. For 3D `Shape` / `ShapeGroup`, `scale()` and `mirror()` operate around bounding-box center, while `rotate()` remains origin-based unless you pass `options.pivot` or use `rotateAroundAxis(...)`.
33
-
34
- For explicit transform objects: `A.mul(B)` = apply A then B; `composeChain(A, B, C)` = A→B→C.
35
-
36
- ## Assembly Frame Composition
37
-
38
- ```ts
39
- childWorld = composeChain(childBase, jointMotion, jointFrame, parentWorld)
40
- ```
41
-
42
- Prefer `composeChain(...)` over manual `.mul(...).mul(...)` in kinematics code to avoid order mistakes.
43
-
44
- ## Summary
45
-
46
- | Convention | User sees | Kernel needs | Where we fix it |
47
- |---|---|---|---|
48
- | Winding | Any point order | CCW | `polygon()`, `path().close()` |
49
- | Up axis | Z-up | Y-up (Three.js) | `camera.up`, gizmo labels |
50
- | Revolution | "revolve this profile" | Profile X = radius, Profile Y = world Z height | Documented and regression-tested |
51
- | Face normals | Doesn't think about it | Outward-pointing | Manifold constructors |
52
- | Transform order | Left-to-right chain | Post-multiply | Native match |
@@ -1,78 +0,0 @@
1
- ---
2
- skill-group: recipes
3
- skill-order: 1
4
- ---
5
-
6
- # Modeling Recipes
7
-
8
- ## Iteration Bias
9
-
10
- - Default to a buildable first pass instead of a long proposal.
11
- - Replace a broken model wholesale when that is faster than incremental patching.
12
- - Validate early with `forgecad run <file>`.
13
-
14
- ## Common Patterns
15
-
16
- ### Hollow Shell
17
- ```javascript
18
- const innerSize = outer - 2 * wall;
19
- const outerBox = box(outer, outer, outer).placeReference('center', [0, 0, 0]);
20
- const innerBox = box(innerSize, innerSize, innerSize).placeReference('center', [0, 0, 0]);
21
- return outerBox.subtract(innerBox);
22
- ```
23
-
24
- ### Sketch-Based Twist
25
- ```javascript
26
- const outer = ngon(sides, radius);
27
- const inner = ngon(sides, radius - wall);
28
- return outer.subtract(inner).extrude(height, { twist: 45, divisions: 32 });
29
- ```
30
-
31
- ### Rounded Profiles
32
- ```javascript
33
- // All convex corners — offset trick
34
- const base = rect(50, 30).offset(-3, 'Round').offset(3, 'Round');
35
-
36
- // Selected corners only
37
- const roof = filletCorners(roofPoints, [
38
- { index: 3, radius: 19 },
39
- { index: 4, radius: 19 },
40
- { index: 5, radius: 19 },
41
- ]);
42
- ```
43
-
44
- ### Choosing the right sketch-rounding tool
45
-
46
- - `offset(-r).offset(+r)` — round every convex corner of a closed outline
47
- - `stroke(points, width, 'Round')` — centerline-based geometry (ribs, traces)
48
- - `filletCorners(points, ...)` — selective true-corner fillets on mixed profiles
49
-
50
- ## Best Practices
51
-
52
- - All dimensions in millimeters; angles in degrees.
53
- - Primitives are centered on XY, base at Z=0. Use `placeReference('center', [0,0,0])` to center on all axes.
54
- - Prefer named intermediate values over deeply nested one-liners.
55
- - `union2d`, `difference2d`, `intersection2d` batch faster than chained `.add()` / `.subtract()`.
56
-
57
- ## Debugging
58
-
59
- ```javascript
60
- console.log("Volume:", shape.volume());
61
- ```
62
-
63
- For sketch-heavy work, compare the raw profile and rounded profile side-by-side before extruding:
64
-
65
- ```javascript
66
- return [
67
- { name: "Raw", sketch: polygon(roofPoints) },
68
- { name: "Rounded", sketch: filletCorners(roofPoints, [...]).translate(120, 0) },
69
- ];
70
- ```
71
-
72
- ## Common Errors
73
-
74
- - `"Kernel not initialized"` — internal/runtime issue, reload the app
75
- - zero dimensions or self-intersecting sketches → invalid geometry
76
- - wrong variable name → `"Cannot read property of undefined"`
77
-
78
- For deeper API coverage, load the relevant generated doc group from the skill source map instead of reaching for repo examples by default.
@@ -1,52 +0,0 @@
1
- ---
2
- skill-group: geometry
3
- skill-order: 2
4
- ---
5
-
6
- # Geometry Conventions
7
-
8
- ForgeCAD wraps Manifold (mesh kernel) and Three.js (Y-up renderer). This doc captures convention mismatches and how ForgeCAD resolves them.
9
-
10
- ## Winding Order
11
-
12
- CCW = positive area, CW = empty in Manifold's `CrossSection`. ForgeCAD auto-fixes at all entry points:
13
- - `polygon(points)` — computes signed area (shoelace), reverses if CW
14
- - `path().close()` — same fix
15
-
16
- **Rule for new code:** Any function accepting user point arrays that creates a `CrossSection` MUST auto-fix winding.
17
-
18
- ## Coordinate System (Z-up vs Y-up)
19
-
20
- Three.js is Y-up; ForgeCAD is Z-up. Fix applied at camera level (`camera.up = (0,0,1)`) — geometry coordinates are native Z-up. Never swap Y/Z in geometry.
21
-
22
- ## Revolution Axis
23
-
24
- `Sketch.revolve()` produces a world Z-axis solid of revolution. Profile X = radial distance from the Z axis, Profile Y = world Z height after revolution. Profile should stay at X > 0 unless intentionally touching the axis.
25
-
26
- ## Boolean Winding (3D)
27
-
28
- Manifold requires consistent outward face normals. ForgeCAD only creates meshes through Manifold's own constructors, which guarantee correct normals.
29
-
30
- ## Transform Order
31
-
32
- Transforms apply left-to-right. `Sketch.rotate()`, `scale()`, and `mirror()` operate around bounding-box center. For 3D `Shape` / `ShapeGroup`, `scale()` and `mirror()` operate around bounding-box center, while `rotate()` remains origin-based unless you pass `options.pivot` or use `rotateAroundAxis(...)`.
33
-
34
- For explicit transform objects: `A.mul(B)` = apply A then B; `composeChain(A, B, C)` = A→B→C.
35
-
36
- ## Assembly Frame Composition
37
-
38
- ```ts
39
- childWorld = composeChain(childBase, jointMotion, jointFrame, parentWorld)
40
- ```
41
-
42
- Prefer `composeChain(...)` over manual `.mul(...).mul(...)` in kinematics code to avoid order mistakes.
43
-
44
- ## Summary
45
-
46
- | Convention | User sees | Kernel needs | Where we fix it |
47
- |---|---|---|---|
48
- | Winding | Any point order | CCW | `polygon()`, `path().close()` |
49
- | Up axis | Z-up | Y-up (Three.js) | `camera.up`, gizmo labels |
50
- | Revolution | "revolve this profile" | Profile X = radius, Profile Y = world Z height | Documented and regression-tested |
51
- | Face normals | Doesn't think about it | Outward-pointing | Manifold constructors |
52
- | Transform order | Left-to-right chain | Post-multiply | Native match |
@@ -1,78 +0,0 @@
1
- ---
2
- skill-group: recipes
3
- skill-order: 1
4
- ---
5
-
6
- # Modeling Recipes
7
-
8
- ## Iteration Bias
9
-
10
- - Default to a buildable first pass instead of a long proposal.
11
- - Replace a broken model wholesale when that is faster than incremental patching.
12
- - Validate early with `forgecad run <file>`.
13
-
14
- ## Common Patterns
15
-
16
- ### Hollow Shell
17
- ```javascript
18
- const innerSize = outer - 2 * wall;
19
- const outerBox = box(outer, outer, outer).placeReference('center', [0, 0, 0]);
20
- const innerBox = box(innerSize, innerSize, innerSize).placeReference('center', [0, 0, 0]);
21
- return outerBox.subtract(innerBox);
22
- ```
23
-
24
- ### Sketch-Based Twist
25
- ```javascript
26
- const outer = ngon(sides, radius);
27
- const inner = ngon(sides, radius - wall);
28
- return outer.subtract(inner).extrude(height, { twist: 45, divisions: 32 });
29
- ```
30
-
31
- ### Rounded Profiles
32
- ```javascript
33
- // All convex corners — offset trick
34
- const base = rect(50, 30).offset(-3, 'Round').offset(3, 'Round');
35
-
36
- // Selected corners only
37
- const roof = filletCorners(roofPoints, [
38
- { index: 3, radius: 19 },
39
- { index: 4, radius: 19 },
40
- { index: 5, radius: 19 },
41
- ]);
42
- ```
43
-
44
- ### Choosing the right sketch-rounding tool
45
-
46
- - `offset(-r).offset(+r)` — round every convex corner of a closed outline
47
- - `stroke(points, width, 'Round')` — centerline-based geometry (ribs, traces)
48
- - `filletCorners(points, ...)` — selective true-corner fillets on mixed profiles
49
-
50
- ## Best Practices
51
-
52
- - All dimensions in millimeters; angles in degrees.
53
- - Primitives are centered on XY, base at Z=0. Use `placeReference('center', [0,0,0])` to center on all axes.
54
- - Prefer named intermediate values over deeply nested one-liners.
55
- - `union2d`, `difference2d`, `intersection2d` batch faster than chained `.add()` / `.subtract()`.
56
-
57
- ## Debugging
58
-
59
- ```javascript
60
- console.log("Volume:", shape.volume());
61
- ```
62
-
63
- For sketch-heavy work, compare the raw profile and rounded profile side-by-side before extruding:
64
-
65
- ```javascript
66
- return [
67
- { name: "Raw", sketch: polygon(roofPoints) },
68
- { name: "Rounded", sketch: filletCorners(roofPoints, [...]).translate(120, 0) },
69
- ];
70
- ```
71
-
72
- ## Common Errors
73
-
74
- - `"Kernel not initialized"` — internal/runtime issue, reload the app
75
- - zero dimensions or self-intersecting sketches → invalid geometry
76
- - wrong variable name → `"Cannot read property of undefined"`
77
-
78
- For deeper API coverage, load the relevant generated doc group from the skill source map instead of reaching for repo examples by default.
@@ -1,79 +0,0 @@
1
- # Prompt Template
2
-
3
- Use this as a fill-in structure, not as fixed text.
4
-
5
- ## Block Order
6
-
7
- 1. Artifact identity
8
- 2. Mechanical / build truth
9
- 3. Material and color truth
10
- 4. Pose and shot
11
- 5. Render style
12
- 6. Negative constraints
13
-
14
- ## Skeleton
15
-
16
- ```text
17
- A [artifact identity and scale], designed as a real buildable CAD-driven object, not a fantasy concept. [Major subassemblies and mechanism truth]. [Materials, colors, finish, and visible hardware truth]. Show it in [pose / state]. [Shot, camera, background, and lighting]. It should look physically buildable and mechanically honest, with visible part boundaries and serviceable architecture. No [negative 1], no [negative 2], no [negative 3].
18
- ```
19
-
20
- ## Default Prompt Shape
21
-
22
- Use this for most first-pass prompts:
23
-
24
- - artifact identity:
25
- compact benchtop robot arm, printable gripper, modular fixture, shop tool, enclosure, etc.
26
- - mechanism truth:
27
- weighted base, exposed belt reductions, mounted motor, support shafts, guide rods, removable cover, jaw mechanism, hinge stack, etc.
28
- - materials:
29
- PETG, TPU, aluminum shaft, brass pinion, black belt, matte plastic, realistic metal
30
- - shot:
31
- front-left three-quarter view
32
- - render style:
33
- clean premium studio product render, neutral background, soft diffused lighting, crisp soft shadows
34
- - negatives:
35
- fake sleek shell, hidden mechanics, over-smoothed geometry, text, labels, humans
36
-
37
- ## Shot Suffixes
38
-
39
- Useful one-line suffixes:
40
-
41
- - `front-left three-quarter hero view, eye-level product camera`
42
- - `rear-right three-quarter view showing motor placement and belt routing`
43
- - `pure side view showing the reach silhouette and joint stack clearly`
44
- - `close-up on the wrist and end effector showing the mechanism clearly`
45
-
46
- ## Mode Swaps
47
-
48
- ### Honest Hero Render
49
-
50
- Add phrases like:
51
-
52
- - `clean premium studio product render`
53
- - `show the final artifact clearly`
54
- - `physically buildable and mechanically honest`
55
- - `visible part boundaries and serviceable architecture`
56
-
57
- ### Builder-First Mechanical Render
58
-
59
- Add phrases like:
60
-
61
- - `emphasizing how it would actually be built`
62
- - `clear visibility of interfaces, seams, and subsystem boundaries`
63
- - `serious prototype, not a polished consumer shell`
64
-
65
- ### Mild Exploded Assembly Render
66
-
67
- Add phrases like:
68
-
69
- - `major modules separated by small clean gaps`
70
- - `reveal the build logic without chaotic disassembly`
71
- - `no tiny floating fragments, no labels, no arrows`
72
-
73
- ### Workshop Prototype Realism
74
-
75
- Add phrases like:
76
-
77
- - `realistic workshop photo`
78
- - `visible print lines and honest surface texture`
79
- - `believable but uncluttered engineering bench background`