fluidcad 0.0.32 → 0.0.34

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 (279) hide show
  1. package/README.md +3 -2
  2. package/bin/commands/init.js +55 -0
  3. package/bin/commands/mcp.js +33 -0
  4. package/bin/commands/serve.js +77 -0
  5. package/bin/fluidcad.js +15 -107
  6. package/lib/dist/common/scene-object.d.ts +4 -1
  7. package/lib/dist/common/scene-object.js +9 -2
  8. package/lib/dist/common/solid.d.ts +4 -1
  9. package/lib/dist/common/solid.js +13 -0
  10. package/lib/dist/core/2d/tarc.d.ts +20 -2
  11. package/lib/dist/core/2d/tarc.js +24 -0
  12. package/lib/dist/core/index.d.ts +2 -1
  13. package/lib/dist/core/index.js +1 -0
  14. package/lib/dist/core/interfaces.d.ts +107 -2
  15. package/lib/dist/core/load.d.ts +2 -2
  16. package/lib/dist/core/repeat.js +62 -46
  17. package/lib/dist/core/rib.d.ts +18 -0
  18. package/lib/dist/core/rib.js +37 -0
  19. package/lib/dist/features/2d/arc.d.ts +8 -2
  20. package/lib/dist/features/2d/arc.js +94 -17
  21. package/lib/dist/features/2d/back.js +3 -2
  22. package/lib/dist/features/2d/sketch.d.ts +4 -0
  23. package/lib/dist/features/2d/sketch.js +21 -0
  24. package/lib/dist/features/2d/tarc-constrained.d.ts +2 -0
  25. package/lib/dist/features/2d/tarc-constrained.js +8 -0
  26. package/lib/dist/features/2d/tarc-radius-to-object.d.ts +16 -0
  27. package/lib/dist/features/2d/tarc-radius-to-object.js +58 -0
  28. package/lib/dist/features/2d/tarc-to-object.d.ts +18 -0
  29. package/lib/dist/features/2d/tarc-to-object.js +66 -0
  30. package/lib/dist/features/2d/tarc-to-point-tangent.d.ts +2 -0
  31. package/lib/dist/features/2d/tarc-to-point-tangent.js +3 -0
  32. package/lib/dist/features/2d/tarc-to-point.d.ts +2 -0
  33. package/lib/dist/features/2d/tarc-to-point.js +3 -0
  34. package/lib/dist/features/2d/tarc-with-tangent.d.ts +2 -0
  35. package/lib/dist/features/2d/tarc-with-tangent.js +3 -0
  36. package/lib/dist/features/2d/tarc.d.ts +2 -0
  37. package/lib/dist/features/2d/tarc.js +3 -0
  38. package/lib/dist/features/extrude-base.d.ts +9 -0
  39. package/lib/dist/features/extrude-base.js +22 -0
  40. package/lib/dist/features/extrude-to-face.js +1 -5
  41. package/lib/dist/features/extrude-two-distances.js +1 -2
  42. package/lib/dist/features/extrude.js +1 -2
  43. package/lib/dist/features/load.d.ts +6 -0
  44. package/lib/dist/features/load.js +53 -1
  45. package/lib/dist/features/mirror-feature.d.ts +3 -2
  46. package/lib/dist/features/mirror-feature.js +1 -1
  47. package/lib/dist/features/repeat-circular.d.ts +3 -3
  48. package/lib/dist/features/repeat-circular.js +8 -1
  49. package/lib/dist/features/repeat-linear.d.ts +4 -2
  50. package/lib/dist/features/repeat-linear.js +10 -1
  51. package/lib/dist/features/repeat-matrix.d.ts +3 -1
  52. package/lib/dist/features/repeat-matrix.js +7 -2
  53. package/lib/dist/features/rib.d.ts +31 -0
  54. package/lib/dist/features/rib.js +321 -0
  55. package/lib/dist/features/select.d.ts +1 -0
  56. package/lib/dist/features/select.js +81 -10
  57. package/lib/dist/features/shell.d.ts +4 -1
  58. package/lib/dist/features/shell.js +14 -3
  59. package/lib/dist/filters/edge/belongs-to-face.d.ts +12 -9
  60. package/lib/dist/filters/edge/belongs-to-face.js +64 -15
  61. package/lib/dist/filters/filter-builder-base.d.ts +25 -0
  62. package/lib/dist/filters/filter-builder-base.js +47 -0
  63. package/lib/dist/filters/filter.js +39 -14
  64. package/lib/dist/filters/from-object.d.ts +4 -0
  65. package/lib/dist/filters/from-object.js +10 -0
  66. package/lib/dist/helpers/clone-transform.d.ts +2 -1
  67. package/lib/dist/helpers/scene-helpers.d.ts +1 -1
  68. package/lib/dist/helpers/scene-helpers.js +146 -12
  69. package/lib/dist/index.d.ts +7 -1
  70. package/lib/dist/index.js +3 -3
  71. package/lib/dist/io/file-import.d.ts +5 -1
  72. package/lib/dist/io/file-import.js +29 -18
  73. package/lib/dist/math/lazy-matrix.d.ts +31 -0
  74. package/lib/dist/math/lazy-matrix.js +66 -0
  75. package/lib/dist/oc/color-transfer.d.ts +19 -8
  76. package/lib/dist/oc/color-transfer.js +70 -12
  77. package/lib/dist/oc/constraints/constraint-solver-adaptor.d.ts +5 -0
  78. package/lib/dist/oc/constraints/constraint-solver-adaptor.js +16 -0
  79. package/lib/dist/oc/constraints/constraint-solver.d.ts +4 -0
  80. package/lib/dist/oc/constraints/curve/curve-constraint-solver.d.ts +4 -0
  81. package/lib/dist/oc/constraints/curve/curve-constraint-solver.js +3 -0
  82. package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.d.ts +6 -1
  83. package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.js +4 -0
  84. package/lib/dist/oc/constraints/geometric/tangent-arc-from-point-tangent.d.ts +8 -0
  85. package/lib/dist/oc/constraints/geometric/tangent-arc-from-point-tangent.js +111 -0
  86. package/lib/dist/oc/constraints/geometric/tangent-arc-radius-to-object.d.ts +8 -0
  87. package/lib/dist/oc/constraints/geometric/tangent-arc-radius-to-object.js +161 -0
  88. package/lib/dist/oc/extrude-ops.d.ts +2 -1
  89. package/lib/dist/oc/extrude-ops.js +51 -2
  90. package/lib/dist/oc/mesh.d.ts +9 -4
  91. package/lib/dist/oc/mesh.js +14 -13
  92. package/lib/dist/oc/rib-ops.d.ts +35 -0
  93. package/lib/dist/oc/rib-ops.js +619 -0
  94. package/lib/dist/oc/shell-ops.d.ts +2 -1
  95. package/lib/dist/oc/shell-ops.js +5 -2
  96. package/lib/dist/oc/topology-index.d.ts +6 -0
  97. package/lib/dist/oc/topology-index.js +36 -0
  98. package/lib/dist/rendering/mesh-builder.d.ts +3 -0
  99. package/lib/dist/rendering/mesh-builder.js +8 -4
  100. package/lib/dist/rendering/render-edge.d.ts +2 -1
  101. package/lib/dist/rendering/render-edge.js +2 -2
  102. package/lib/dist/rendering/render-face.d.ts +2 -1
  103. package/lib/dist/rendering/render-face.js +2 -2
  104. package/lib/dist/rendering/render-solid.d.ts +2 -1
  105. package/lib/dist/rendering/render-solid.js +3 -5
  106. package/lib/dist/rendering/render-wire.d.ts +2 -1
  107. package/lib/dist/rendering/render-wire.js +2 -2
  108. package/lib/dist/rendering/render.d.ts +4 -0
  109. package/lib/dist/rendering/render.js +50 -2
  110. package/lib/dist/rendering/scene-compare.js +3 -0
  111. package/lib/dist/rendering/scene.d.ts +1 -0
  112. package/lib/dist/rendering/scene.js +4 -0
  113. package/lib/dist/scene-manager.d.ts +4 -2
  114. package/lib/dist/scene-manager.js +12 -4
  115. package/lib/dist/tests/features/2d/arc.test.js +64 -0
  116. package/lib/dist/tests/features/2d/back.test.js +17 -1
  117. package/lib/dist/tests/features/2d/tarc.test.js +157 -0
  118. package/lib/dist/tests/features/color-lineage.test.js +18 -0
  119. package/lib/dist/tests/features/filter-positional.test.d.ts +1 -0
  120. package/lib/dist/tests/features/filter-positional.test.js +129 -0
  121. package/lib/dist/tests/features/repeat-user-repro.test.d.ts +1 -0
  122. package/lib/dist/tests/features/repeat-user-repro.test.js +60 -0
  123. package/lib/dist/tests/features/rib.test.d.ts +1 -0
  124. package/lib/dist/tests/features/rib.test.js +598 -0
  125. package/lib/dist/tests/features/shell.test.js +36 -0
  126. package/lib/dist/tests/global-setup.js +2 -1
  127. package/lib/dist/tests/helpers/extract-blocks.d.ts +9 -0
  128. package/lib/dist/tests/helpers/extract-blocks.js +56 -0
  129. package/lib/dist/tests/llm-docs-examples.test.d.ts +1 -0
  130. package/lib/dist/tests/llm-docs-examples.test.js +62 -0
  131. package/lib/dist/tests/scene-compare.test.d.ts +1 -0
  132. package/lib/dist/tests/scene-compare.test.js +77 -0
  133. package/lib/dist/tests/setup.js +2 -1
  134. package/lib/dist/tsconfig.tsbuildinfo +1 -1
  135. package/llm-docs/.coverage-allowlist.txt +9 -0
  136. package/llm-docs/api/arc.md +48 -0
  137. package/llm-docs/api/axis.md +42 -0
  138. package/llm-docs/api/bezier.md +42 -0
  139. package/llm-docs/api/booleans.md +44 -0
  140. package/llm-docs/api/chamfer.md +40 -0
  141. package/llm-docs/api/circle.md +36 -0
  142. package/llm-docs/api/color.md +34 -0
  143. package/llm-docs/api/connect.md +41 -0
  144. package/llm-docs/api/constraint-qualifiers.md +48 -0
  145. package/llm-docs/api/copy.md +63 -0
  146. package/llm-docs/api/cursor-lines.md +50 -0
  147. package/llm-docs/api/cursor-move.md +61 -0
  148. package/llm-docs/api/cut.md +55 -0
  149. package/llm-docs/api/draft.md +36 -0
  150. package/llm-docs/api/edge-filter.md +57 -0
  151. package/llm-docs/api/ellipse.md +34 -0
  152. package/llm-docs/api/extrude.md +74 -0
  153. package/llm-docs/api/face-filter.md +61 -0
  154. package/llm-docs/api/fillet.md +51 -0
  155. package/llm-docs/api/index.json +139 -0
  156. package/llm-docs/api/line.md +42 -0
  157. package/llm-docs/api/load.md +37 -0
  158. package/llm-docs/api/local.md +38 -0
  159. package/llm-docs/api/loft.md +37 -0
  160. package/llm-docs/api/mirror.md +44 -0
  161. package/llm-docs/api/offset.md +36 -0
  162. package/llm-docs/api/part.md +40 -0
  163. package/llm-docs/api/plane.md +44 -0
  164. package/llm-docs/api/polygon.md +37 -0
  165. package/llm-docs/api/primitive-solids.md +39 -0
  166. package/llm-docs/api/project-intersect.md +48 -0
  167. package/llm-docs/api/rect.md +48 -0
  168. package/llm-docs/api/remove.md +32 -0
  169. package/llm-docs/api/repeat.md +79 -0
  170. package/llm-docs/api/revolve.md +38 -0
  171. package/llm-docs/api/rib.md +40 -0
  172. package/llm-docs/api/rotate.md +37 -0
  173. package/llm-docs/api/select.md +41 -0
  174. package/llm-docs/api/shell.md +41 -0
  175. package/llm-docs/api/sketch.md +76 -0
  176. package/llm-docs/api/slot.md +36 -0
  177. package/llm-docs/api/split-trim.md +42 -0
  178. package/llm-docs/api/sweep.md +43 -0
  179. package/llm-docs/api/tarc.md +45 -0
  180. package/llm-docs/api/tcircle.md +38 -0
  181. package/llm-docs/api/tline.md +42 -0
  182. package/llm-docs/api/translate.md +40 -0
  183. package/llm-docs/api/types/aline.md +35 -0
  184. package/llm-docs/api/types/arc-angles.md +29 -0
  185. package/llm-docs/api/types/arc-points.md +48 -0
  186. package/llm-docs/api/types/axis-like.md +38 -0
  187. package/llm-docs/api/types/axis.md +21 -0
  188. package/llm-docs/api/types/boolean-operation.md +50 -0
  189. package/llm-docs/api/types/circular-repeat-options.md +31 -0
  190. package/llm-docs/api/types/common.md +32 -0
  191. package/llm-docs/api/types/cut.md +125 -0
  192. package/llm-docs/api/types/draft.md +21 -0
  193. package/llm-docs/api/types/extrudable-geometry.md +23 -0
  194. package/llm-docs/api/types/extrude.md +194 -0
  195. package/llm-docs/api/types/geometry.md +51 -0
  196. package/llm-docs/api/types/hline.md +35 -0
  197. package/llm-docs/api/types/linear-repeat-options.md +31 -0
  198. package/llm-docs/api/types/loft.md +154 -0
  199. package/llm-docs/api/types/mirror.md +35 -0
  200. package/llm-docs/api/types/offset.md +31 -0
  201. package/llm-docs/api/types/plane-like.md +35 -0
  202. package/llm-docs/api/types/plane-transform-options.md +29 -0
  203. package/llm-docs/api/types/plane.md +21 -0
  204. package/llm-docs/api/types/point-like.md +22 -0
  205. package/llm-docs/api/types/point2dlike.md +26 -0
  206. package/llm-docs/api/types/polygon.md +46 -0
  207. package/llm-docs/api/types/rect.md +128 -0
  208. package/llm-docs/api/types/revolve.md +102 -0
  209. package/llm-docs/api/types/rib.md +133 -0
  210. package/llm-docs/api/types/scene-object.md +33 -0
  211. package/llm-docs/api/types/select.md +21 -0
  212. package/llm-docs/api/types/shell.md +54 -0
  213. package/llm-docs/api/types/slot.md +43 -0
  214. package/llm-docs/api/types/sweep.md +189 -0
  215. package/llm-docs/api/types/tangent-arc-two-objects.md +46 -0
  216. package/llm-docs/api/types/transformable.md +93 -0
  217. package/llm-docs/api/types/trim.md +27 -0
  218. package/llm-docs/api/types/two-objects-tangent-line.md +46 -0
  219. package/llm-docs/api/types/vertex.md +17 -0
  220. package/llm-docs/api/types/vline.md +35 -0
  221. package/llm-docs/concepts/coordinate-system.md +45 -0
  222. package/llm-docs/concepts/history-and-rollback.md +40 -0
  223. package/llm-docs/concepts/last-selection.md +49 -0
  224. package/llm-docs/concepts/scene-graph.md +37 -0
  225. package/llm-docs/index.json +1750 -0
  226. package/mcp/dist/client.d.ts +64 -0
  227. package/mcp/dist/client.js +248 -0
  228. package/mcp/dist/discovery.d.ts +11 -0
  229. package/mcp/dist/discovery.js +78 -0
  230. package/mcp/dist/docs-index.d.ts +81 -0
  231. package/mcp/dist/docs-index.js +261 -0
  232. package/mcp/dist/resources.d.ts +4 -0
  233. package/mcp/dist/resources.js +115 -0
  234. package/mcp/dist/server.d.ts +12 -0
  235. package/mcp/dist/server.js +489 -0
  236. package/mcp/dist/tools/coordination.d.ts +9 -0
  237. package/mcp/dist/tools/coordination.js +46 -0
  238. package/mcp/dist/tools/docs.d.ts +66 -0
  239. package/mcp/dist/tools/docs.js +122 -0
  240. package/mcp/dist/tools/engine.d.ts +56 -0
  241. package/mcp/dist/tools/engine.js +145 -0
  242. package/mcp/dist/tools/inspection.d.ts +75 -0
  243. package/mcp/dist/tools/inspection.js +121 -0
  244. package/mcp/dist/tools/screenshot.d.ts +63 -0
  245. package/mcp/dist/tools/screenshot.js +263 -0
  246. package/mcp/dist/tools/source.d.ts +84 -0
  247. package/mcp/dist/tools/source.js +434 -0
  248. package/mcp/dist/tools/workspaces.d.ts +13 -0
  249. package/mcp/dist/tools/workspaces.js +33 -0
  250. package/mcp/dist/types.d.ts +18 -0
  251. package/mcp/dist/types.js +11 -0
  252. package/package.json +19 -5
  253. package/server/dist/code-editor.d.ts +36 -0
  254. package/server/dist/code-editor.js +8 -0
  255. package/server/dist/fluidcad-server.d.ts +50 -0
  256. package/server/dist/fluidcad-server.js +153 -1
  257. package/server/dist/global-registry.d.ts +30 -0
  258. package/server/dist/global-registry.js +126 -0
  259. package/server/dist/index.js +171 -26
  260. package/server/dist/instance-file.d.ts +31 -0
  261. package/server/dist/instance-file.js +73 -0
  262. package/server/dist/lint-fluid-js.d.ts +15 -0
  263. package/server/dist/lint-fluid-js.js +271 -0
  264. package/server/dist/routes/editor.d.ts +24 -0
  265. package/server/dist/routes/editor.js +44 -0
  266. package/server/dist/routes/export.d.ts +1 -1
  267. package/server/dist/routes/export.js +45 -8
  268. package/server/dist/routes/health.d.ts +7 -0
  269. package/server/dist/routes/health.js +14 -0
  270. package/server/dist/routes/lint.d.ts +10 -0
  271. package/server/dist/routes/lint.js +28 -0
  272. package/server/dist/routes/render.d.ts +33 -0
  273. package/server/dist/routes/render.js +34 -0
  274. package/server/dist/routes/scene.d.ts +5 -0
  275. package/server/dist/routes/scene.js +48 -0
  276. package/server/dist/routes/screenshot.js +68 -1
  277. package/server/dist/ws-protocol.d.ts +56 -2
  278. package/ui/dist/assets/{index-DMw0OYCF.js → index-BdqrMDRu.js} +30 -30
  279. package/ui/dist/index.html +1 -1
@@ -0,0 +1,23 @@
1
+ ---
2
+ id: api/types/extrudable-geometry
3
+ title: ExtrudableGeometry
4
+ summary: "The ExtrudableGeometry type. Extends Geometry."
5
+ tags: [api, type, interface]
6
+ symbols: [ExtrudableGeometry, IExtrudableGeometry]
7
+ seeAlso: [api/types/geometry, api/extrude]
8
+ ---
9
+ # ExtrudableGeometry
10
+
11
+ ```ts
12
+ interface ExtrudableGeometry extends Geometry {
13
+ // No own methods — see Inherited below.
14
+ }
15
+ ```
16
+
17
+ Extends [[api/types/geometry]].
18
+
19
+ ## Inherited
20
+
21
+ From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
22
+
23
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,194 @@
1
+ ---
2
+ id: api/types/extrude
3
+ title: Extrude
4
+ summary: "The Extrude type. Extends BooleanOperation; adds 16 methods."
5
+ tags: [api, type, interface]
6
+ symbols: [Extrude, IExtrude]
7
+ seeAlso: [api/extrude, api/types/boolean-operation]
8
+ ---
9
+ # Extrude
10
+
11
+ ```ts
12
+ interface Extrude extends BooleanOperation {
13
+ symmetric(): this;
14
+ startFaces(...args: (number | FaceFilter)[]): SceneObject;
15
+ endFaces(...args: (number | FaceFilter)[]): SceneObject;
16
+ startEdges(...args: (number | EdgeFilter)[]): SceneObject;
17
+ endEdges(...args: (number | EdgeFilter)[]): SceneObject;
18
+ sideFaces(...args: (number | FaceFilter)[]): SceneObject;
19
+ sideEdges(...args: (number | EdgeFilter)[]): SceneObject;
20
+ internalFaces(...args: (number | FaceFilter)[]): SceneObject;
21
+ internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
22
+ capFaces(...args: (number | FaceFilter)[]): SceneObject;
23
+ capEdges(...args: (number | EdgeFilter)[]): SceneObject;
24
+ draft(value: number | [number, number]): this;
25
+ endOffset(value: number): this;
26
+ drill(value?: boolean): this;
27
+ pick(...points: Point2DLike[]): this;
28
+ thin(offset: number): this;
29
+ thin(offset1: number, offset2: number): this;
30
+ }
31
+ ```
32
+
33
+ Extends [[api/types/boolean-operation]].
34
+
35
+ ## Methods
36
+
37
+ ### `symmetric()`
38
+
39
+ Enables symmetric mode — extrudes equally in both directions from the sketch plane.
40
+
41
+ ### `startFaces()`
42
+
43
+ Selects faces at the start (base) of the extrusion.
44
+
45
+ **Returns**: [[api/types/scene-object]].
46
+
47
+ | Parameter | Type | Description |
48
+ | --- | --- | --- |
49
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
50
+
51
+ ### `endFaces()`
52
+
53
+ Selects faces at the end (cap) of the extrusion.
54
+
55
+ **Returns**: [[api/types/scene-object]].
56
+
57
+ | Parameter | Type | Description |
58
+ | --- | --- | --- |
59
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
60
+
61
+ ### `startEdges()`
62
+
63
+ Selects edges on the start (base) faces of the extrusion.
64
+
65
+ **Returns**: [[api/types/scene-object]].
66
+
67
+ | Parameter | Type | Description |
68
+ | --- | --- | --- |
69
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
70
+
71
+ ### `endEdges()`
72
+
73
+ Selects edges on the end (cap) faces of the extrusion.
74
+
75
+ **Returns**: [[api/types/scene-object]].
76
+
77
+ | Parameter | Type | Description |
78
+ | --- | --- | --- |
79
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
80
+
81
+ ### `sideFaces()`
82
+
83
+ Selects the lateral faces created by the extrusion.
84
+
85
+ **Returns**: [[api/types/scene-object]].
86
+
87
+ | Parameter | Type | Description |
88
+ | --- | --- | --- |
89
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
90
+
91
+ ### `sideEdges()`
92
+
93
+ Selects edges on the side faces, excluding edges shared with start/end faces.
94
+
95
+ **Returns**: [[api/types/scene-object]].
96
+
97
+ | Parameter | Type | Description |
98
+ | --- | --- | --- |
99
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
100
+
101
+ ### `internalFaces()`
102
+
103
+ Selects faces created inside the solid during extrusion (e.g., from holes or intersections).
104
+
105
+ **Returns**: [[api/types/scene-object]].
106
+
107
+ | Parameter | Type | Description |
108
+ | --- | --- | --- |
109
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
110
+
111
+ ### `internalEdges()`
112
+
113
+ Selects edges bounding the internal geometry created during extrusion.
114
+
115
+ **Returns**: [[api/types/scene-object]].
116
+
117
+ | Parameter | Type | Description |
118
+ | --- | --- | --- |
119
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
120
+
121
+ ### `capFaces()`
122
+
123
+ Selects the cap faces at the open ends of a thin-walled extrusion from an open profile.
124
+ These are the small faces connecting the inner and outer walls at the profile endpoints.
125
+
126
+ **Returns**: [[api/types/scene-object]].
127
+
128
+ | Parameter | Type | Description |
129
+ | --- | --- | --- |
130
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
131
+
132
+ ### `capEdges()`
133
+
134
+ Selects edges on the cap faces of a thin-walled extrusion from an open profile.
135
+
136
+ **Returns**: [[api/types/scene-object]].
137
+
138
+ | Parameter | Type | Description |
139
+ | --- | --- | --- |
140
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
141
+
142
+ ### `draft()`
143
+
144
+ Applies a draft (taper) angle to the extrusion walls.
145
+
146
+ | Parameter | Type | Description |
147
+ | --- | --- | --- |
148
+ | `value` | `number` \| `[number, number]` | A single angle for uniform draft, or a `[start, end]` tuple for asymmetric draft. |
149
+
150
+ ### `endOffset()`
151
+
152
+ Offsets the end face by a specified distance along the extrusion direction.
153
+
154
+ | Parameter | Type | Description |
155
+ | --- | --- | --- |
156
+ | `value` | `number` | The offset distance. |
157
+
158
+ ### `drill()`
159
+
160
+ Enables or disables drill mode, which partitions the sketch into face regions
161
+ before extruding.
162
+
163
+ | Parameter | Type | Description |
164
+ | --- | --- | --- |
165
+ | `value` | `boolean` | `true` to enable (default), `false` to disable. *(optional)* |
166
+
167
+ ### `pick()`
168
+
169
+ Restricts extrusion to only the sketch regions containing the given points.
170
+
171
+ | Parameter | Type | Description |
172
+ | --- | --- | --- |
173
+ | `...points` | [[api/types/point2dlike]][] | 2D points in the sketch plane identifying regions to extrude. *(optional)* |
174
+
175
+ ### `thin()`
176
+
177
+ ```ts
178
+ thin(offset: number): this
179
+ thin(offset1: number, offset2: number): this
180
+ ```
181
+
182
+ Enables thin extrude mode — offsets the profile edges to create a thin-walled solid
183
+ instead of extruding filled faces. Positive values offset outward, negative values offset inward.
184
+
185
+ | Parameter | Type | Description |
186
+ | --- | --- | --- |
187
+ | `offset1` | `number` | The first wall offset distance. Positive = outward, negative = inward. |
188
+ | `offset2` | `number` | The second wall offset distance, in the opposite direction of offset1. |
189
+
190
+ ## Inherited
191
+
192
+ From [[api/types/boolean-operation]]: `add()`, `'new'()`, `remove()`, `scope()`
193
+
194
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,51 @@
1
+ ---
2
+ id: api/types/geometry
3
+ title: Geometry
4
+ summary: "The Geometry type. Extends SceneObject; adds 4 methods."
5
+ tags: [api, type, interface]
6
+ symbols: [Geometry, IGeometry]
7
+ seeAlso: [api/types/scene-object]
8
+ ---
9
+ # Geometry
10
+
11
+ ```ts
12
+ interface Geometry extends SceneObject {
13
+ guide(): this;
14
+ start(): Vertex;
15
+ end(): Vertex;
16
+ tangent(): Vertex;
17
+ }
18
+ ```
19
+
20
+ Extends [[api/types/scene-object]].
21
+
22
+ ## Methods
23
+
24
+ ### `guide()`
25
+
26
+ Marks this sketch geometry as construction geometry. Guide geometries are
27
+ excluded from the final sketch output (e.g., extrude, revolve) unless
28
+ explicitly included.
29
+
30
+ ### `start()`
31
+
32
+ Returns a lazy-evaluated vertex at the start point of this geometry element.
33
+
34
+ **Returns**: [[api/types/vertex]].
35
+
36
+ ### `end()`
37
+
38
+ Returns a lazy-evaluated vertex at the end point of this geometry element.
39
+
40
+ **Returns**: [[api/types/vertex]].
41
+
42
+ ### `tangent()`
43
+
44
+ Returns a lazy-evaluated vertex representing the tangent direction at the end
45
+ of this geometry. Used to determine the direction of subsequent geometry elements.
46
+
47
+ **Returns**: [[api/types/vertex]].
48
+
49
+ ## Inherited
50
+
51
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,35 @@
1
+ ---
2
+ id: api/types/hline
3
+ title: HLine
4
+ summary: "The HLine type. Extends Geometry; adds 1 method."
5
+ tags: [api, type, interface]
6
+ symbols: [HLine, IHLine]
7
+ seeAlso: [api/line, api/types/geometry]
8
+ ---
9
+ # HLine
10
+
11
+ ```ts
12
+ interface HLine extends Geometry {
13
+ centered(value?: boolean): this;
14
+ }
15
+ ```
16
+
17
+ Extends [[api/types/geometry]].
18
+
19
+ ## Methods
20
+
21
+ ### `centered()`
22
+
23
+ Controls whether the line is centered on the current position.
24
+ When `true`, the line is offset backward by half its length so that the
25
+ current position falls at its midpoint.
26
+
27
+ | Parameter | Type | Description |
28
+ | --- | --- | --- |
29
+ | `value` | `boolean` | `true` to center, `false` (default) to start from the current position. *(optional)* |
30
+
31
+ ## Inherited
32
+
33
+ From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
34
+
35
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: api/types/linear-repeat-options
3
+ title: LinearRepeatOptions
4
+ summary: "Options for `repeat(\"linear\", ...)`."
5
+ tags: [api, type, options]
6
+ symbols: [LinearRepeatOptions]
7
+ seeAlso: [api/repeat]
8
+ ---
9
+ # LinearRepeatOptions
10
+
11
+ ```ts
12
+ type LinearRepeatOptions = {
13
+ count: number | number[];
14
+ offset?: number | number[];
15
+ length?: number | number[];
16
+ centered?: boolean;
17
+ skip?: number[][];
18
+ };
19
+ ```
20
+
21
+ Options accepted by the linear variant of `repeat()`. Controls how many copies are placed and how they are spaced along the chosen axes.
22
+
23
+ ## Properties
24
+
25
+ | Property | Type | Description |
26
+ | --- | --- | --- |
27
+ | `count` | `number` \| `number`[] | Number of instances per axis (including the original) |
28
+ | `offset` | `number` \| `number`[] | Spacing between each instance. Cannot be used with `length`. *(optional)* |
29
+ | `length` | `number` \| `number`[] | Total span to distribute instances across (evenly spaced). Cannot be used with `offset`. *(optional)* |
30
+ | `centered` | `boolean` | When `true`, centers the pattern around the original object's position *(optional)* |
31
+ | `skip` | `number`[][] | Index tuples to skip (e.g. `[[1], [3]]` for single axis, `[[1, 2]]` for multi-axis) *(optional)* |
@@ -0,0 +1,154 @@
1
+ ---
2
+ id: api/types/loft
3
+ title: Loft
4
+ summary: "The Loft type. Extends BooleanOperation; adds 11 methods."
5
+ tags: [api, type, interface]
6
+ symbols: [Loft, ILoft]
7
+ seeAlso: [api/loft, api/types/boolean-operation]
8
+ ---
9
+ # Loft
10
+
11
+ ```ts
12
+ interface Loft extends BooleanOperation {
13
+ startFaces(...args: (number | FaceFilter)[]): SceneObject;
14
+ endFaces(...args: (number | FaceFilter)[]): SceneObject;
15
+ sideFaces(...args: (number | FaceFilter)[]): SceneObject;
16
+ startEdges(...args: (number | EdgeFilter)[]): SceneObject;
17
+ endEdges(...args: (number | EdgeFilter)[]): SceneObject;
18
+ sideEdges(...args: (number | EdgeFilter)[]): SceneObject;
19
+ thin(offset: number): this;
20
+ thin(offset1: number, offset2: number): this;
21
+ internalFaces(...args: (number | FaceFilter)[]): SceneObject;
22
+ internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
23
+ capFaces(...args: (number | FaceFilter)[]): SceneObject;
24
+ capEdges(...args: (number | EdgeFilter)[]): SceneObject;
25
+ }
26
+ ```
27
+
28
+ Extends [[api/types/boolean-operation]].
29
+
30
+ ## Methods
31
+
32
+ ### `startFaces()`
33
+
34
+ Selects faces on the first profile plane of the loft.
35
+
36
+ **Returns**: [[api/types/scene-object]].
37
+
38
+ | Parameter | Type | Description |
39
+ | --- | --- | --- |
40
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
41
+
42
+ ### `endFaces()`
43
+
44
+ Selects faces on the last profile plane of the loft.
45
+
46
+ **Returns**: [[api/types/scene-object]].
47
+
48
+ | Parameter | Type | Description |
49
+ | --- | --- | --- |
50
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
51
+
52
+ ### `sideFaces()`
53
+
54
+ Selects the lateral faces generated between loft profiles.
55
+
56
+ **Returns**: [[api/types/scene-object]].
57
+
58
+ | Parameter | Type | Description |
59
+ | --- | --- | --- |
60
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
61
+
62
+ ### `startEdges()`
63
+
64
+ Selects edges on the first profile plane of the loft.
65
+
66
+ **Returns**: [[api/types/scene-object]].
67
+
68
+ | Parameter | Type | Description |
69
+ | --- | --- | --- |
70
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
71
+
72
+ ### `endEdges()`
73
+
74
+ Selects edges on the last profile plane of the loft.
75
+
76
+ **Returns**: [[api/types/scene-object]].
77
+
78
+ | Parameter | Type | Description |
79
+ | --- | --- | --- |
80
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
81
+
82
+ ### `sideEdges()`
83
+
84
+ Selects edges on the side faces, excluding edges shared with start/end faces.
85
+
86
+ **Returns**: [[api/types/scene-object]].
87
+
88
+ | Parameter | Type | Description |
89
+ | --- | --- | --- |
90
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
91
+
92
+ ### `thin()`
93
+
94
+ ```ts
95
+ thin(offset: number): this
96
+ thin(offset1: number, offset2: number): this
97
+ ```
98
+
99
+ Enables thin loft mode — offsets the profile edges of each section to create a
100
+ thin-walled shell instead of lofting filled faces. All profiles must be sketches
101
+ and share the same topology. Positive values offset outward, negative offsets inward.
102
+
103
+ | Parameter | Type | Description |
104
+ | --- | --- | --- |
105
+ | `offset1` | `number` | The first wall offset distance. Positive = outward, negative = inward. |
106
+ | `offset2` | `number` | The second wall offset distance, in the opposite direction of offset1. |
107
+
108
+ ### `internalFaces()`
109
+
110
+ Selects faces created inside the solid during loft (e.g., the inner
111
+ wall of a thin-walled loft from closed profiles).
112
+
113
+ **Returns**: [[api/types/scene-object]].
114
+
115
+ | Parameter | Type | Description |
116
+ | --- | --- | --- |
117
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
118
+
119
+ ### `internalEdges()`
120
+
121
+ Selects edges bounding the internal geometry created during loft.
122
+
123
+ **Returns**: [[api/types/scene-object]].
124
+
125
+ | Parameter | Type | Description |
126
+ | --- | --- | --- |
127
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
128
+
129
+ ### `capFaces()`
130
+
131
+ Selects the cap faces at the open ends of a thin-walled loft from open profiles.
132
+ These are the small faces connecting the inner and outer walls at the profile endpoints.
133
+
134
+ **Returns**: [[api/types/scene-object]].
135
+
136
+ | Parameter | Type | Description |
137
+ | --- | --- | --- |
138
+ | `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
139
+
140
+ ### `capEdges()`
141
+
142
+ Selects edges on the cap faces of a thin-walled loft from open profiles.
143
+
144
+ **Returns**: [[api/types/scene-object]].
145
+
146
+ | Parameter | Type | Description |
147
+ | --- | --- | --- |
148
+ | `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
149
+
150
+ ## Inherited
151
+
152
+ From [[api/types/boolean-operation]]: `add()`, `'new'()`, `remove()`, `scope()`
153
+
154
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,35 @@
1
+ ---
2
+ id: api/types/mirror
3
+ title: Mirror
4
+ summary: "The Mirror type. Extends BooleanOperation; adds 1 method."
5
+ tags: [api, type, interface]
6
+ symbols: [Mirror, IMirror]
7
+ seeAlso: [api/mirror, api/types/boolean-operation]
8
+ ---
9
+ # Mirror
10
+
11
+ ```ts
12
+ interface Mirror extends BooleanOperation {
13
+ exclude(...objects: SceneObject[]): this;
14
+ }
15
+ ```
16
+
17
+ Extends [[api/types/boolean-operation]].
18
+
19
+ ## Methods
20
+
21
+ ### `exclude()`
22
+
23
+ Excludes the given objects from the mirror operation. Useful when
24
+ mirroring "everything" but a few specific objects should be skipped,
25
+ or when narrowing an explicit target list.
26
+
27
+ | Parameter | Type | Description |
28
+ | --- | --- | --- |
29
+ | `...objects` | [[api/types/scene-object]][] | The objects to exclude from mirroring. *(optional)* |
30
+
31
+ ## Inherited
32
+
33
+ From [[api/types/boolean-operation]]: `add()`, `'new'()`, `remove()`, `scope()`
34
+
35
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: api/types/offset
3
+ title: Offset
4
+ summary: "The Offset type. Extends ExtrudableGeometry; adds 1 method."
5
+ tags: [api, type, interface]
6
+ symbols: [Offset, IOffset]
7
+ seeAlso: [api/offset, api/types/extrudable-geometry]
8
+ ---
9
+ # Offset
10
+
11
+ ```ts
12
+ interface Offset extends ExtrudableGeometry {
13
+ close(): this;
14
+ }
15
+ ```
16
+
17
+ Extends [[api/types/extrudable-geometry]].
18
+
19
+ ## Methods
20
+
21
+ ### `close()`
22
+
23
+ Closes an open offset by joining it back to the source wire with
24
+ straight cap edges at each endpoint. Has no effect when the offset
25
+ is already closed. Cannot be combined with `removeOriginal=true`.
26
+
27
+ ## Inherited
28
+
29
+ From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
30
+
31
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,35 @@
1
+ ---
2
+ id: api/types/plane-like
3
+ title: PlaneLike
4
+ summary: "A plane reference accepted by sketch(), filters, and other plane-aware operations."
5
+ tags: [api, type, union]
6
+ symbols: [PlaneLike, PlaneObjectBase]
7
+ seeAlso: [api/sketch, api/plane, api/types/plane, api/types/scene-object]
8
+ ---
9
+ # PlaneLike
10
+
11
+ ```ts
12
+ type PlaneLike = StandardPlane | Plane | IPlane | PlaneObjectBase;
13
+ ```
14
+
15
+ A plane reference used by `sketch()`, filters, and other operations. Any of the following formats are accepted:
16
+
17
+ | Format | Example | Description |
18
+ | --- | --- | --- |
19
+ | Standard plane string | `"xy"`, `"xz"`, `"yz"` | The three principal planes. |
20
+ | Negative plane string | `"-xy"`, `"-xz"`, `"-yz"` | Principal planes with flipped normals. |
21
+ | Named plane string | `"top"`, `"bottom"`, `"front"`, `"back"`, `"left"`, `"right"` | Descriptive aliases for the principal planes. |
22
+ | [[api/types/plane]] | `plane("xy", 10)` | A plane object created with `plane()`. |
23
+ | [[api/types/scene-object]] | A face selection | A planar face to use as reference. |
24
+
25
+ ## Example
26
+
27
+ ```fluid.js
28
+ import { sketch, rect, circle, extrude, plane } from "fluidcad/core";
29
+
30
+ sketch("xy", () => rect(100, 50).centered()); // string form
31
+ const e = extrude(20);
32
+ sketch(plane("xy", 30), () => rect(40, 40).centered()); // Plane form
33
+ sketch(e.endFaces(), () => circle(10)); // face form
34
+ extrude(5);
35
+ ```
@@ -0,0 +1,29 @@
1
+ ---
2
+ id: api/types/plane-transform-options
3
+ title: PlaneTransformOptions
4
+ summary: "Options accepted by `plane()` for offsetting and rotating a plane in its own frame."
5
+ tags: [api, type, options]
6
+ symbols: [PlaneTransformOptions, PlaneRenderableOptions]
7
+ seeAlso: [api/plane]
8
+ ---
9
+ # PlaneTransformOptions
10
+
11
+ ```ts
12
+ type PlaneTransformOptions = {
13
+ offset?: number;
14
+ rotateX?: number;
15
+ rotateY?: number;
16
+ rotateZ?: number;
17
+ };
18
+ ```
19
+
20
+ Options accepted by `plane()` to offset and rotate a plane relative to its own axes. Rotations are composed together and applied around the plane's origin (after the offset is applied), so the plane tilts in place rather than orbiting the world origin.
21
+
22
+ ## Properties
23
+
24
+ | Property | Type | Description |
25
+ | --- | --- | --- |
26
+ | `offset` | `number` | Distance to translate the plane along its normal *(optional)* |
27
+ | `rotateX` | `number` | Rotation around the plane's X axis (in degrees) *(optional)* |
28
+ | `rotateY` | `number` | Rotation around the plane's Y axis (in degrees) *(optional)* |
29
+ | `rotateZ` | `number` | Rotation around the plane's Z axis / normal (in degrees) *(optional)* |
@@ -0,0 +1,21 @@
1
+ ---
2
+ id: api/types/plane
3
+ title: Plane
4
+ summary: "The Plane type. Extends SceneObject."
5
+ tags: [api, type, interface]
6
+ symbols: [Plane, IPlane]
7
+ seeAlso: [api/plane, api/types/plane-like, api/types/scene-object]
8
+ ---
9
+ # Plane
10
+
11
+ ```ts
12
+ interface Plane extends SceneObject {
13
+ // No own methods — see Inherited below.
14
+ }
15
+ ```
16
+
17
+ Extends [[api/types/scene-object]].
18
+
19
+ ## Inherited
20
+
21
+ From [[api/types/scene-object]]: `name()`, `reusable()`
@@ -0,0 +1,22 @@
1
+ ---
2
+ id: api/types/point-like
3
+ title: PointLike
4
+ summary: "A 3D point accepted by translate() and other 3D operations."
5
+ tags: [api, type, union]
6
+ symbols: [PointLike]
7
+ seeAlso: [api/translate]
8
+ ---
9
+ # PointLike
10
+
11
+ ```ts
12
+ type PointLike = | Point
13
+ | [number, number, number]
14
+ | { x: number; y: number; z: number };
15
+ ```
16
+
17
+ A 3D point used by operations like `translate()`. Any of the following formats are accepted:
18
+
19
+ | Format | Example | Description |
20
+ | --- | --- | --- |
21
+ | `[number, number, number]` | `[10, 20, 30]` | Tuple of x, y, z coordinates. |
22
+ | `{ x, y, z }` | `{ x: 10, y: 20, z: 30 }` | Object with x, y, z properties. |
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: api/types/point2dlike
3
+ title: Point2DLike
4
+ summary: "A 2D point accepted by sketching functions."
5
+ tags: [api, type, union]
6
+ symbols: [Point2DLike]
7
+ seeAlso: [api/line, api/rect, api/types/vertex]
8
+ ---
9
+ # Point2DLike
10
+
11
+ ```ts
12
+ type Point2DLike = | Point2D
13
+ | [number, number]
14
+ | number[]
15
+ | { x: number; y: number }
16
+ | LazyVertex;
17
+ ```
18
+
19
+ A 2D point used by all sketching functions. Any of the following formats are accepted:
20
+
21
+ | Format | Example | Description |
22
+ | --- | --- | --- |
23
+ | `[number, number]` | `[10, 20]` | Tuple of x, y coordinates. |
24
+ | `number[]` | `[10, 20]` | Array of x, y coordinates. |
25
+ | `{ x, y }` | `{ x: 10, y: 20 }` | Object with x, y properties. |
26
+ | [[api/types/vertex]] | `line(...).end()` | A vertex returned by a geometry method. |