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.
- package/README.md +3 -2
- package/bin/commands/init.js +55 -0
- package/bin/commands/mcp.js +33 -0
- package/bin/commands/serve.js +77 -0
- package/bin/fluidcad.js +15 -107
- package/lib/dist/common/scene-object.d.ts +4 -1
- package/lib/dist/common/scene-object.js +9 -2
- package/lib/dist/common/solid.d.ts +4 -1
- package/lib/dist/common/solid.js +13 -0
- package/lib/dist/core/2d/tarc.d.ts +20 -2
- package/lib/dist/core/2d/tarc.js +24 -0
- package/lib/dist/core/index.d.ts +2 -1
- package/lib/dist/core/index.js +1 -0
- package/lib/dist/core/interfaces.d.ts +107 -2
- package/lib/dist/core/load.d.ts +2 -2
- package/lib/dist/core/repeat.js +62 -46
- package/lib/dist/core/rib.d.ts +18 -0
- package/lib/dist/core/rib.js +37 -0
- package/lib/dist/features/2d/arc.d.ts +8 -2
- package/lib/dist/features/2d/arc.js +94 -17
- package/lib/dist/features/2d/back.js +3 -2
- package/lib/dist/features/2d/sketch.d.ts +4 -0
- package/lib/dist/features/2d/sketch.js +21 -0
- package/lib/dist/features/2d/tarc-constrained.d.ts +2 -0
- package/lib/dist/features/2d/tarc-constrained.js +8 -0
- package/lib/dist/features/2d/tarc-radius-to-object.d.ts +16 -0
- package/lib/dist/features/2d/tarc-radius-to-object.js +58 -0
- package/lib/dist/features/2d/tarc-to-object.d.ts +18 -0
- package/lib/dist/features/2d/tarc-to-object.js +66 -0
- package/lib/dist/features/2d/tarc-to-point-tangent.d.ts +2 -0
- package/lib/dist/features/2d/tarc-to-point-tangent.js +3 -0
- package/lib/dist/features/2d/tarc-to-point.d.ts +2 -0
- package/lib/dist/features/2d/tarc-to-point.js +3 -0
- package/lib/dist/features/2d/tarc-with-tangent.d.ts +2 -0
- package/lib/dist/features/2d/tarc-with-tangent.js +3 -0
- package/lib/dist/features/2d/tarc.d.ts +2 -0
- package/lib/dist/features/2d/tarc.js +3 -0
- package/lib/dist/features/extrude-base.d.ts +9 -0
- package/lib/dist/features/extrude-base.js +22 -0
- package/lib/dist/features/extrude-to-face.js +1 -5
- package/lib/dist/features/extrude-two-distances.js +1 -2
- package/lib/dist/features/extrude.js +1 -2
- package/lib/dist/features/load.d.ts +6 -0
- package/lib/dist/features/load.js +53 -1
- package/lib/dist/features/mirror-feature.d.ts +3 -2
- package/lib/dist/features/mirror-feature.js +1 -1
- package/lib/dist/features/repeat-circular.d.ts +3 -3
- package/lib/dist/features/repeat-circular.js +8 -1
- package/lib/dist/features/repeat-linear.d.ts +4 -2
- package/lib/dist/features/repeat-linear.js +10 -1
- package/lib/dist/features/repeat-matrix.d.ts +3 -1
- package/lib/dist/features/repeat-matrix.js +7 -2
- package/lib/dist/features/rib.d.ts +31 -0
- package/lib/dist/features/rib.js +321 -0
- package/lib/dist/features/select.d.ts +1 -0
- package/lib/dist/features/select.js +81 -10
- package/lib/dist/features/shell.d.ts +4 -1
- package/lib/dist/features/shell.js +14 -3
- package/lib/dist/filters/edge/belongs-to-face.d.ts +12 -9
- package/lib/dist/filters/edge/belongs-to-face.js +64 -15
- package/lib/dist/filters/filter-builder-base.d.ts +25 -0
- package/lib/dist/filters/filter-builder-base.js +47 -0
- package/lib/dist/filters/filter.js +39 -14
- package/lib/dist/filters/from-object.d.ts +4 -0
- package/lib/dist/filters/from-object.js +10 -0
- package/lib/dist/helpers/clone-transform.d.ts +2 -1
- package/lib/dist/helpers/scene-helpers.d.ts +1 -1
- package/lib/dist/helpers/scene-helpers.js +146 -12
- package/lib/dist/index.d.ts +7 -1
- package/lib/dist/index.js +3 -3
- package/lib/dist/io/file-import.d.ts +5 -1
- package/lib/dist/io/file-import.js +29 -18
- package/lib/dist/math/lazy-matrix.d.ts +31 -0
- package/lib/dist/math/lazy-matrix.js +66 -0
- package/lib/dist/oc/color-transfer.d.ts +19 -8
- package/lib/dist/oc/color-transfer.js +70 -12
- package/lib/dist/oc/constraints/constraint-solver-adaptor.d.ts +5 -0
- package/lib/dist/oc/constraints/constraint-solver-adaptor.js +16 -0
- package/lib/dist/oc/constraints/constraint-solver.d.ts +4 -0
- package/lib/dist/oc/constraints/curve/curve-constraint-solver.d.ts +4 -0
- package/lib/dist/oc/constraints/curve/curve-constraint-solver.js +3 -0
- package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.d.ts +6 -1
- package/lib/dist/oc/constraints/geometric/geometric-constraint-solver.js +4 -0
- package/lib/dist/oc/constraints/geometric/tangent-arc-from-point-tangent.d.ts +8 -0
- package/lib/dist/oc/constraints/geometric/tangent-arc-from-point-tangent.js +111 -0
- package/lib/dist/oc/constraints/geometric/tangent-arc-radius-to-object.d.ts +8 -0
- package/lib/dist/oc/constraints/geometric/tangent-arc-radius-to-object.js +161 -0
- package/lib/dist/oc/extrude-ops.d.ts +2 -1
- package/lib/dist/oc/extrude-ops.js +51 -2
- package/lib/dist/oc/mesh.d.ts +9 -4
- package/lib/dist/oc/mesh.js +14 -13
- package/lib/dist/oc/rib-ops.d.ts +35 -0
- package/lib/dist/oc/rib-ops.js +619 -0
- package/lib/dist/oc/shell-ops.d.ts +2 -1
- package/lib/dist/oc/shell-ops.js +5 -2
- package/lib/dist/oc/topology-index.d.ts +6 -0
- package/lib/dist/oc/topology-index.js +36 -0
- package/lib/dist/rendering/mesh-builder.d.ts +3 -0
- package/lib/dist/rendering/mesh-builder.js +8 -4
- package/lib/dist/rendering/render-edge.d.ts +2 -1
- package/lib/dist/rendering/render-edge.js +2 -2
- package/lib/dist/rendering/render-face.d.ts +2 -1
- package/lib/dist/rendering/render-face.js +2 -2
- package/lib/dist/rendering/render-solid.d.ts +2 -1
- package/lib/dist/rendering/render-solid.js +3 -5
- package/lib/dist/rendering/render-wire.d.ts +2 -1
- package/lib/dist/rendering/render-wire.js +2 -2
- package/lib/dist/rendering/render.d.ts +4 -0
- package/lib/dist/rendering/render.js +50 -2
- package/lib/dist/rendering/scene-compare.js +3 -0
- package/lib/dist/rendering/scene.d.ts +1 -0
- package/lib/dist/rendering/scene.js +4 -0
- package/lib/dist/scene-manager.d.ts +4 -2
- package/lib/dist/scene-manager.js +12 -4
- package/lib/dist/tests/features/2d/arc.test.js +64 -0
- package/lib/dist/tests/features/2d/back.test.js +17 -1
- package/lib/dist/tests/features/2d/tarc.test.js +157 -0
- package/lib/dist/tests/features/color-lineage.test.js +18 -0
- package/lib/dist/tests/features/filter-positional.test.d.ts +1 -0
- package/lib/dist/tests/features/filter-positional.test.js +129 -0
- package/lib/dist/tests/features/repeat-user-repro.test.d.ts +1 -0
- package/lib/dist/tests/features/repeat-user-repro.test.js +60 -0
- package/lib/dist/tests/features/rib.test.d.ts +1 -0
- package/lib/dist/tests/features/rib.test.js +598 -0
- package/lib/dist/tests/features/shell.test.js +36 -0
- package/lib/dist/tests/global-setup.js +2 -1
- package/lib/dist/tests/helpers/extract-blocks.d.ts +9 -0
- package/lib/dist/tests/helpers/extract-blocks.js +56 -0
- package/lib/dist/tests/llm-docs-examples.test.d.ts +1 -0
- package/lib/dist/tests/llm-docs-examples.test.js +62 -0
- package/lib/dist/tests/scene-compare.test.d.ts +1 -0
- package/lib/dist/tests/scene-compare.test.js +77 -0
- package/lib/dist/tests/setup.js +2 -1
- package/lib/dist/tsconfig.tsbuildinfo +1 -1
- package/llm-docs/.coverage-allowlist.txt +9 -0
- package/llm-docs/api/arc.md +48 -0
- package/llm-docs/api/axis.md +42 -0
- package/llm-docs/api/bezier.md +42 -0
- package/llm-docs/api/booleans.md +44 -0
- package/llm-docs/api/chamfer.md +40 -0
- package/llm-docs/api/circle.md +36 -0
- package/llm-docs/api/color.md +34 -0
- package/llm-docs/api/connect.md +41 -0
- package/llm-docs/api/constraint-qualifiers.md +48 -0
- package/llm-docs/api/copy.md +63 -0
- package/llm-docs/api/cursor-lines.md +50 -0
- package/llm-docs/api/cursor-move.md +61 -0
- package/llm-docs/api/cut.md +55 -0
- package/llm-docs/api/draft.md +36 -0
- package/llm-docs/api/edge-filter.md +57 -0
- package/llm-docs/api/ellipse.md +34 -0
- package/llm-docs/api/extrude.md +74 -0
- package/llm-docs/api/face-filter.md +61 -0
- package/llm-docs/api/fillet.md +51 -0
- package/llm-docs/api/index.json +139 -0
- package/llm-docs/api/line.md +42 -0
- package/llm-docs/api/load.md +37 -0
- package/llm-docs/api/local.md +38 -0
- package/llm-docs/api/loft.md +37 -0
- package/llm-docs/api/mirror.md +44 -0
- package/llm-docs/api/offset.md +36 -0
- package/llm-docs/api/part.md +40 -0
- package/llm-docs/api/plane.md +44 -0
- package/llm-docs/api/polygon.md +37 -0
- package/llm-docs/api/primitive-solids.md +39 -0
- package/llm-docs/api/project-intersect.md +48 -0
- package/llm-docs/api/rect.md +48 -0
- package/llm-docs/api/remove.md +32 -0
- package/llm-docs/api/repeat.md +79 -0
- package/llm-docs/api/revolve.md +38 -0
- package/llm-docs/api/rib.md +40 -0
- package/llm-docs/api/rotate.md +37 -0
- package/llm-docs/api/select.md +41 -0
- package/llm-docs/api/shell.md +41 -0
- package/llm-docs/api/sketch.md +76 -0
- package/llm-docs/api/slot.md +36 -0
- package/llm-docs/api/split-trim.md +42 -0
- package/llm-docs/api/sweep.md +43 -0
- package/llm-docs/api/tarc.md +45 -0
- package/llm-docs/api/tcircle.md +38 -0
- package/llm-docs/api/tline.md +42 -0
- package/llm-docs/api/translate.md +40 -0
- package/llm-docs/api/types/aline.md +35 -0
- package/llm-docs/api/types/arc-angles.md +29 -0
- package/llm-docs/api/types/arc-points.md +48 -0
- package/llm-docs/api/types/axis-like.md +38 -0
- package/llm-docs/api/types/axis.md +21 -0
- package/llm-docs/api/types/boolean-operation.md +50 -0
- package/llm-docs/api/types/circular-repeat-options.md +31 -0
- package/llm-docs/api/types/common.md +32 -0
- package/llm-docs/api/types/cut.md +125 -0
- package/llm-docs/api/types/draft.md +21 -0
- package/llm-docs/api/types/extrudable-geometry.md +23 -0
- package/llm-docs/api/types/extrude.md +194 -0
- package/llm-docs/api/types/geometry.md +51 -0
- package/llm-docs/api/types/hline.md +35 -0
- package/llm-docs/api/types/linear-repeat-options.md +31 -0
- package/llm-docs/api/types/loft.md +154 -0
- package/llm-docs/api/types/mirror.md +35 -0
- package/llm-docs/api/types/offset.md +31 -0
- package/llm-docs/api/types/plane-like.md +35 -0
- package/llm-docs/api/types/plane-transform-options.md +29 -0
- package/llm-docs/api/types/plane.md +21 -0
- package/llm-docs/api/types/point-like.md +22 -0
- package/llm-docs/api/types/point2dlike.md +26 -0
- package/llm-docs/api/types/polygon.md +46 -0
- package/llm-docs/api/types/rect.md +128 -0
- package/llm-docs/api/types/revolve.md +102 -0
- package/llm-docs/api/types/rib.md +133 -0
- package/llm-docs/api/types/scene-object.md +33 -0
- package/llm-docs/api/types/select.md +21 -0
- package/llm-docs/api/types/shell.md +54 -0
- package/llm-docs/api/types/slot.md +43 -0
- package/llm-docs/api/types/sweep.md +189 -0
- package/llm-docs/api/types/tangent-arc-two-objects.md +46 -0
- package/llm-docs/api/types/transformable.md +93 -0
- package/llm-docs/api/types/trim.md +27 -0
- package/llm-docs/api/types/two-objects-tangent-line.md +46 -0
- package/llm-docs/api/types/vertex.md +17 -0
- package/llm-docs/api/types/vline.md +35 -0
- package/llm-docs/concepts/coordinate-system.md +45 -0
- package/llm-docs/concepts/history-and-rollback.md +40 -0
- package/llm-docs/concepts/last-selection.md +49 -0
- package/llm-docs/concepts/scene-graph.md +37 -0
- package/llm-docs/index.json +1750 -0
- package/mcp/dist/client.d.ts +64 -0
- package/mcp/dist/client.js +248 -0
- package/mcp/dist/discovery.d.ts +11 -0
- package/mcp/dist/discovery.js +78 -0
- package/mcp/dist/docs-index.d.ts +81 -0
- package/mcp/dist/docs-index.js +261 -0
- package/mcp/dist/resources.d.ts +4 -0
- package/mcp/dist/resources.js +115 -0
- package/mcp/dist/server.d.ts +12 -0
- package/mcp/dist/server.js +489 -0
- package/mcp/dist/tools/coordination.d.ts +9 -0
- package/mcp/dist/tools/coordination.js +46 -0
- package/mcp/dist/tools/docs.d.ts +66 -0
- package/mcp/dist/tools/docs.js +122 -0
- package/mcp/dist/tools/engine.d.ts +56 -0
- package/mcp/dist/tools/engine.js +145 -0
- package/mcp/dist/tools/inspection.d.ts +75 -0
- package/mcp/dist/tools/inspection.js +121 -0
- package/mcp/dist/tools/screenshot.d.ts +63 -0
- package/mcp/dist/tools/screenshot.js +263 -0
- package/mcp/dist/tools/source.d.ts +84 -0
- package/mcp/dist/tools/source.js +434 -0
- package/mcp/dist/tools/workspaces.d.ts +13 -0
- package/mcp/dist/tools/workspaces.js +33 -0
- package/mcp/dist/types.d.ts +18 -0
- package/mcp/dist/types.js +11 -0
- package/package.json +19 -5
- package/server/dist/code-editor.d.ts +36 -0
- package/server/dist/code-editor.js +8 -0
- package/server/dist/fluidcad-server.d.ts +50 -0
- package/server/dist/fluidcad-server.js +153 -1
- package/server/dist/global-registry.d.ts +30 -0
- package/server/dist/global-registry.js +126 -0
- package/server/dist/index.js +171 -26
- package/server/dist/instance-file.d.ts +31 -0
- package/server/dist/instance-file.js +73 -0
- package/server/dist/lint-fluid-js.d.ts +15 -0
- package/server/dist/lint-fluid-js.js +271 -0
- package/server/dist/routes/editor.d.ts +24 -0
- package/server/dist/routes/editor.js +44 -0
- package/server/dist/routes/export.d.ts +1 -1
- package/server/dist/routes/export.js +45 -8
- package/server/dist/routes/health.d.ts +7 -0
- package/server/dist/routes/health.js +14 -0
- package/server/dist/routes/lint.d.ts +10 -0
- package/server/dist/routes/lint.js +28 -0
- package/server/dist/routes/render.d.ts +33 -0
- package/server/dist/routes/render.js +34 -0
- package/server/dist/routes/scene.d.ts +5 -0
- package/server/dist/routes/scene.js +48 -0
- package/server/dist/routes/screenshot.js +68 -1
- package/server/dist/ws-protocol.d.ts +56 -2
- package/ui/dist/assets/{index-DMw0OYCF.js → index-BdqrMDRu.js} +30 -30
- package/ui/dist/index.html +1 -1
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/polygon
|
|
3
|
+
title: Polygon
|
|
4
|
+
summary: "The Polygon type. Extends ExtrudableGeometry; adds 2 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Polygon, IPolygon]
|
|
7
|
+
seeAlso: [api/polygon, api/types/extrudable-geometry]
|
|
8
|
+
---
|
|
9
|
+
# Polygon
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Polygon extends ExtrudableGeometry {
|
|
13
|
+
getEdge(index: number): SceneObject;
|
|
14
|
+
getVertex(index: number): Vertex;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Extends [[api/types/extrudable-geometry]].
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `getEdge()`
|
|
23
|
+
|
|
24
|
+
Returns a specific edge of the polygon by index.
|
|
25
|
+
|
|
26
|
+
**Returns**: [[api/types/scene-object]].
|
|
27
|
+
|
|
28
|
+
| Parameter | Type | Description |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `index` | `number` | Zero-based edge index. |
|
|
31
|
+
|
|
32
|
+
### `getVertex()`
|
|
33
|
+
|
|
34
|
+
Returns a lazy-evaluated vertex at a specific corner of the polygon.
|
|
35
|
+
|
|
36
|
+
**Returns**: [[api/types/vertex]].
|
|
37
|
+
|
|
38
|
+
| Parameter | Type | Description |
|
|
39
|
+
| --- | --- | --- |
|
|
40
|
+
| `index` | `number` | Zero-based vertex index. |
|
|
41
|
+
|
|
42
|
+
## Inherited
|
|
43
|
+
|
|
44
|
+
From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
|
|
45
|
+
|
|
46
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/rect
|
|
3
|
+
title: Rect
|
|
4
|
+
summary: "The Rect type. Extends ExtrudableGeometry; adds 14 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Rect, IRect]
|
|
7
|
+
seeAlso: [api/rect, api/types/extrudable-geometry]
|
|
8
|
+
---
|
|
9
|
+
# Rect
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Rect extends ExtrudableGeometry {
|
|
13
|
+
radius(...r: number[]): this;
|
|
14
|
+
centered(value?: boolean | "horizontal" | "vertical"): this;
|
|
15
|
+
topEdge(): SceneObject;
|
|
16
|
+
bottomEdge(): SceneObject;
|
|
17
|
+
leftEdge(): SceneObject;
|
|
18
|
+
rightEdge(): SceneObject;
|
|
19
|
+
topLeftArcEdge(): SceneObject;
|
|
20
|
+
topRightArcEdge(): SceneObject;
|
|
21
|
+
bottomLeftArcEdge(): SceneObject;
|
|
22
|
+
bottomRightArcEdge(): SceneObject;
|
|
23
|
+
topLeft(): Vertex;
|
|
24
|
+
topRight(): Vertex;
|
|
25
|
+
bottomLeft(): Vertex;
|
|
26
|
+
bottomRight(): Vertex;
|
|
27
|
+
}
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
Extends [[api/types/extrudable-geometry]].
|
|
31
|
+
|
|
32
|
+
## Methods
|
|
33
|
+
|
|
34
|
+
### `radius()`
|
|
35
|
+
|
|
36
|
+
Sets corner radii for a rounded rectangle. Accepts 1–4 values
|
|
37
|
+
in order: `[bottomLeft, bottomRight, topRight, topLeft]`.
|
|
38
|
+
A single value applies to all corners.
|
|
39
|
+
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `...r` | `number`[] | One or more radius values. *(optional)* |
|
|
43
|
+
|
|
44
|
+
### `centered()`
|
|
45
|
+
|
|
46
|
+
Controls how the rectangle is positioned relative to the current point.
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Description |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `value` | `boolean` \| `"horizontal"` \| `"vertical"` | `true` centers on both axes, `'horizontal'` or `'vertical'` centers on one axis, `false` (default) keeps the current point as the origin corner. *(optional)* |
|
|
51
|
+
|
|
52
|
+
### `topEdge()`
|
|
53
|
+
|
|
54
|
+
Returns the top straight edge of the rectangle.
|
|
55
|
+
|
|
56
|
+
**Returns**: [[api/types/scene-object]].
|
|
57
|
+
|
|
58
|
+
### `bottomEdge()`
|
|
59
|
+
|
|
60
|
+
Returns the bottom straight edge of the rectangle.
|
|
61
|
+
|
|
62
|
+
**Returns**: [[api/types/scene-object]].
|
|
63
|
+
|
|
64
|
+
### `leftEdge()`
|
|
65
|
+
|
|
66
|
+
Returns the left straight edge of the rectangle.
|
|
67
|
+
|
|
68
|
+
**Returns**: [[api/types/scene-object]].
|
|
69
|
+
|
|
70
|
+
### `rightEdge()`
|
|
71
|
+
|
|
72
|
+
Returns the right straight edge of the rectangle.
|
|
73
|
+
|
|
74
|
+
**Returns**: [[api/types/scene-object]].
|
|
75
|
+
|
|
76
|
+
### `topLeftArcEdge()`
|
|
77
|
+
|
|
78
|
+
Returns the arc edge at the top-left corner. Only present when a radius is applied.
|
|
79
|
+
|
|
80
|
+
**Returns**: [[api/types/scene-object]].
|
|
81
|
+
|
|
82
|
+
### `topRightArcEdge()`
|
|
83
|
+
|
|
84
|
+
Returns the arc edge at the top-right corner. Only present when a radius is applied.
|
|
85
|
+
|
|
86
|
+
**Returns**: [[api/types/scene-object]].
|
|
87
|
+
|
|
88
|
+
### `bottomLeftArcEdge()`
|
|
89
|
+
|
|
90
|
+
Returns the arc edge at the bottom-left corner. Only present when a radius is applied.
|
|
91
|
+
|
|
92
|
+
**Returns**: [[api/types/scene-object]].
|
|
93
|
+
|
|
94
|
+
### `bottomRightArcEdge()`
|
|
95
|
+
|
|
96
|
+
Returns the arc edge at the bottom-right corner. Only present when a radius is applied.
|
|
97
|
+
|
|
98
|
+
**Returns**: [[api/types/scene-object]].
|
|
99
|
+
|
|
100
|
+
### `topLeft()`
|
|
101
|
+
|
|
102
|
+
Returns a lazy-evaluated vertex at the top-left corner.
|
|
103
|
+
|
|
104
|
+
**Returns**: [[api/types/vertex]].
|
|
105
|
+
|
|
106
|
+
### `topRight()`
|
|
107
|
+
|
|
108
|
+
Returns a lazy-evaluated vertex at the top-right corner.
|
|
109
|
+
|
|
110
|
+
**Returns**: [[api/types/vertex]].
|
|
111
|
+
|
|
112
|
+
### `bottomLeft()`
|
|
113
|
+
|
|
114
|
+
Returns a lazy-evaluated vertex at the bottom-left corner.
|
|
115
|
+
|
|
116
|
+
**Returns**: [[api/types/vertex]].
|
|
117
|
+
|
|
118
|
+
### `bottomRight()`
|
|
119
|
+
|
|
120
|
+
Returns a lazy-evaluated vertex at the bottom-right corner.
|
|
121
|
+
|
|
122
|
+
**Returns**: [[api/types/vertex]].
|
|
123
|
+
|
|
124
|
+
## Inherited
|
|
125
|
+
|
|
126
|
+
From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
|
|
127
|
+
|
|
128
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/revolve
|
|
3
|
+
title: Revolve
|
|
4
|
+
summary: "The Revolve type. Extends BooleanOperation; adds 7 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Revolve, IRevolve]
|
|
7
|
+
seeAlso: [api/revolve, api/types/boolean-operation]
|
|
8
|
+
---
|
|
9
|
+
# Revolve
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Revolve extends BooleanOperation {
|
|
13
|
+
symmetric(): this;
|
|
14
|
+
pick(...points: Point2DLike[]): this;
|
|
15
|
+
thin(offset: number): this;
|
|
16
|
+
thin(offset1: number, offset2: number): this;
|
|
17
|
+
internalFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
18
|
+
internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
19
|
+
capFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
20
|
+
capEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
21
|
+
}
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Extends [[api/types/boolean-operation]].
|
|
25
|
+
|
|
26
|
+
## Methods
|
|
27
|
+
|
|
28
|
+
### `symmetric()`
|
|
29
|
+
|
|
30
|
+
Enables symmetric mode — revolves equally in both directions from the sketch plane.
|
|
31
|
+
|
|
32
|
+
### `pick()`
|
|
33
|
+
|
|
34
|
+
Restricts the revolve to only the sketch regions containing the given points.
|
|
35
|
+
|
|
36
|
+
| Parameter | Type | Description |
|
|
37
|
+
| --- | --- | --- |
|
|
38
|
+
| `...points` | [[api/types/point2dlike]][] | 2D points in the sketch plane identifying regions to revolve. *(optional)* |
|
|
39
|
+
|
|
40
|
+
### `thin()`
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
thin(offset: number): this
|
|
44
|
+
thin(offset1: number, offset2: number): this
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Enables thin revolve mode — offsets the profile edges to create a thin-walled
|
|
48
|
+
solid of revolution instead of revolving filled faces. Positive values offset
|
|
49
|
+
outward, negative values offset inward.
|
|
50
|
+
|
|
51
|
+
| Parameter | Type | Description |
|
|
52
|
+
| --- | --- | --- |
|
|
53
|
+
| `offset1` | `number` | The first wall offset distance. Positive = outward, negative = inward. |
|
|
54
|
+
| `offset2` | `number` | The second wall offset distance, in the opposite direction of offset1. |
|
|
55
|
+
|
|
56
|
+
### `internalFaces()`
|
|
57
|
+
|
|
58
|
+
Selects faces created inside the solid during revolution (e.g., the inner
|
|
59
|
+
wall of a thin-walled revolve from a closed profile).
|
|
60
|
+
|
|
61
|
+
**Returns**: [[api/types/scene-object]].
|
|
62
|
+
|
|
63
|
+
| Parameter | Type | Description |
|
|
64
|
+
| --- | --- | --- |
|
|
65
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
66
|
+
|
|
67
|
+
### `internalEdges()`
|
|
68
|
+
|
|
69
|
+
Selects edges bounding the internal geometry created during revolution.
|
|
70
|
+
|
|
71
|
+
**Returns**: [[api/types/scene-object]].
|
|
72
|
+
|
|
73
|
+
| Parameter | Type | Description |
|
|
74
|
+
| --- | --- | --- |
|
|
75
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
76
|
+
|
|
77
|
+
### `capFaces()`
|
|
78
|
+
|
|
79
|
+
Selects the cap faces at the open ends of a thin-walled revolve from an open profile.
|
|
80
|
+
These are the small faces connecting the inner and outer walls at the profile endpoints.
|
|
81
|
+
|
|
82
|
+
**Returns**: [[api/types/scene-object]].
|
|
83
|
+
|
|
84
|
+
| Parameter | Type | Description |
|
|
85
|
+
| --- | --- | --- |
|
|
86
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
87
|
+
|
|
88
|
+
### `capEdges()`
|
|
89
|
+
|
|
90
|
+
Selects edges on the cap faces of a thin-walled revolve from an open profile.
|
|
91
|
+
|
|
92
|
+
**Returns**: [[api/types/scene-object]].
|
|
93
|
+
|
|
94
|
+
| Parameter | Type | Description |
|
|
95
|
+
| --- | --- | --- |
|
|
96
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
97
|
+
|
|
98
|
+
## Inherited
|
|
99
|
+
|
|
100
|
+
From [[api/types/boolean-operation]]: `add()`, `'new'()`, `remove()`, `scope()`
|
|
101
|
+
|
|
102
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/rib
|
|
3
|
+
title: Rib
|
|
4
|
+
summary: "The Rib type. Extends BooleanOperation; adds 11 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Rib, IRib]
|
|
7
|
+
seeAlso: [api/rib, api/types/boolean-operation]
|
|
8
|
+
---
|
|
9
|
+
# Rib
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Rib extends BooleanOperation {
|
|
13
|
+
startFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
14
|
+
endFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
15
|
+
sideFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
16
|
+
capFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
17
|
+
startEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
18
|
+
endEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
19
|
+
sideEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
20
|
+
capEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
21
|
+
draft(value: number | [number, number]): this;
|
|
22
|
+
parallel(): this;
|
|
23
|
+
extend(): this;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Extends [[api/types/boolean-operation]].
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
### `startFaces()`
|
|
32
|
+
|
|
33
|
+
Selects faces at the start (base) of the rib — the profile face at the sketch plane.
|
|
34
|
+
|
|
35
|
+
**Returns**: [[api/types/scene-object]].
|
|
36
|
+
|
|
37
|
+
| Parameter | Type | Description |
|
|
38
|
+
| --- | --- | --- |
|
|
39
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
40
|
+
|
|
41
|
+
### `endFaces()`
|
|
42
|
+
|
|
43
|
+
Selects faces at the end (top) of the rib — where the rib meets the boundary.
|
|
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
|
+
### `sideFaces()`
|
|
52
|
+
|
|
53
|
+
Selects the lateral wall faces of the rib.
|
|
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
|
+
### `capFaces()`
|
|
62
|
+
|
|
63
|
+
Selects the small cap faces at the spine endpoints.
|
|
64
|
+
|
|
65
|
+
**Returns**: [[api/types/scene-object]].
|
|
66
|
+
|
|
67
|
+
| Parameter | Type | Description |
|
|
68
|
+
| --- | --- | --- |
|
|
69
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
70
|
+
|
|
71
|
+
### `startEdges()`
|
|
72
|
+
|
|
73
|
+
Selects edges on the start faces.
|
|
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
|
+
### `endEdges()`
|
|
82
|
+
|
|
83
|
+
Selects edges on the end faces.
|
|
84
|
+
|
|
85
|
+
**Returns**: [[api/types/scene-object]].
|
|
86
|
+
|
|
87
|
+
| Parameter | Type | Description |
|
|
88
|
+
| --- | --- | --- |
|
|
89
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder 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
|
+
### `capEdges()`
|
|
102
|
+
|
|
103
|
+
Selects edges on the cap faces.
|
|
104
|
+
|
|
105
|
+
**Returns**: [[api/types/scene-object]].
|
|
106
|
+
|
|
107
|
+
| Parameter | Type | Description |
|
|
108
|
+
| --- | --- | --- |
|
|
109
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
110
|
+
|
|
111
|
+
### `draft()`
|
|
112
|
+
|
|
113
|
+
Applies a draft (taper) angle to the rib walls.
|
|
114
|
+
|
|
115
|
+
| Parameter | Type | Description |
|
|
116
|
+
| --- | --- | --- |
|
|
117
|
+
| `value` | `number` \| `[number, number]` | A single angle for uniform draft, or a `[start, end]` tuple for asymmetric draft. |
|
|
118
|
+
|
|
119
|
+
### `parallel()`
|
|
120
|
+
|
|
121
|
+
Switches the extrusion direction to parallel to the sketch plane
|
|
122
|
+
(perpendicular to the spine within the plane) instead of normal to it.
|
|
123
|
+
|
|
124
|
+
### `extend()`
|
|
125
|
+
|
|
126
|
+
Extends the rib's side faces at the spine endpoints outward to blend
|
|
127
|
+
with the target solids' walls.
|
|
128
|
+
|
|
129
|
+
## Inherited
|
|
130
|
+
|
|
131
|
+
From [[api/types/boolean-operation]]: `add()`, `'new'()`, `remove()`, `scope()`
|
|
132
|
+
|
|
133
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/scene-object
|
|
3
|
+
title: SceneObject
|
|
4
|
+
summary: "The SceneObject type. Defines 2 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [SceneObject, ISceneObject]
|
|
7
|
+
seeAlso: [api/select, concepts/scene-graph]
|
|
8
|
+
---
|
|
9
|
+
# SceneObject
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface SceneObject {
|
|
13
|
+
name(value: string): this;
|
|
14
|
+
reusable(): this;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Methods
|
|
19
|
+
|
|
20
|
+
### `name()`
|
|
21
|
+
|
|
22
|
+
Sets a custom display name for this object, overriding the default type-based name.
|
|
23
|
+
|
|
24
|
+
| Parameter | Type | Description |
|
|
25
|
+
| --- | --- | --- |
|
|
26
|
+
| `value` | `string` | The display name to assign. |
|
|
27
|
+
|
|
28
|
+
### `reusable()`
|
|
29
|
+
|
|
30
|
+
Marks this object as reusable. Reusable objects retain their shapes when
|
|
31
|
+
consumed by features (e.g., extrude, revolve), allowing multiple features
|
|
32
|
+
to reference the same source geometry. Use `remove(obj)` to force-remove
|
|
33
|
+
shapes from a reusable object.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/select
|
|
3
|
+
title: Select
|
|
4
|
+
summary: "The Select type. Extends SceneObject."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Select, ISelect]
|
|
7
|
+
seeAlso: [api/select, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Select
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Select 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,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/shell
|
|
3
|
+
title: Shell
|
|
4
|
+
summary: "The Shell type. Extends SceneObject; adds 3 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Shell, IShell]
|
|
7
|
+
seeAlso: [api/shell, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Shell
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Shell extends SceneObject {
|
|
13
|
+
internalFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
14
|
+
internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
15
|
+
join(type: ShellJoinType): this;
|
|
16
|
+
}
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Extends [[api/types/scene-object]].
|
|
20
|
+
|
|
21
|
+
## Methods
|
|
22
|
+
|
|
23
|
+
### `internalFaces()`
|
|
24
|
+
|
|
25
|
+
Selects the inner wall faces created by the shell operation (from thickness removal).
|
|
26
|
+
|
|
27
|
+
**Returns**: [[api/types/scene-object]].
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
32
|
+
|
|
33
|
+
### `internalEdges()`
|
|
34
|
+
|
|
35
|
+
Selects edges created by the shell operation that are not from the original solid
|
|
36
|
+
or on the opening rim.
|
|
37
|
+
|
|
38
|
+
**Returns**: [[api/types/scene-object]].
|
|
39
|
+
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
43
|
+
|
|
44
|
+
### `join()`
|
|
45
|
+
|
|
46
|
+
Sets the join type used at inner-wall corners.
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Description |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `type` | `ShellJoinType` | `'arc'` (default) for rounded blends, `'intersection'` for sharp corners, or `'tangent'` for tangent-continuous blends. |
|
|
51
|
+
|
|
52
|
+
## Inherited
|
|
53
|
+
|
|
54
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/slot
|
|
3
|
+
title: Slot
|
|
4
|
+
summary: "The Slot type. Extends ExtrudableGeometry; adds 2 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Slot, ISlot]
|
|
7
|
+
seeAlso: [api/slot, api/types/extrudable-geometry]
|
|
8
|
+
---
|
|
9
|
+
# Slot
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Slot extends ExtrudableGeometry {
|
|
13
|
+
centered(value?: boolean): this;
|
|
14
|
+
rotate(angle: number): this;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Extends [[api/types/extrudable-geometry]].
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `centered()`
|
|
23
|
+
|
|
24
|
+
Controls whether the slot is centered on the current position.
|
|
25
|
+
When `true`, the slot is offset backward by half its length.
|
|
26
|
+
|
|
27
|
+
| Parameter | Type | Description |
|
|
28
|
+
| --- | --- | --- |
|
|
29
|
+
| `value` | `boolean` | `true` to center, `false` (default) to start from the current position. *(optional)* |
|
|
30
|
+
|
|
31
|
+
### `rotate()`
|
|
32
|
+
|
|
33
|
+
Sets the rotation angle of the slot's primary axis.
|
|
34
|
+
|
|
35
|
+
| Parameter | Type | Description |
|
|
36
|
+
| --- | --- | --- |
|
|
37
|
+
| `angle` | `number` | Rotation in degrees. |
|
|
38
|
+
|
|
39
|
+
## Inherited
|
|
40
|
+
|
|
41
|
+
From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
|
|
42
|
+
|
|
43
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|