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,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/split-trim
|
|
3
|
+
title: split / trim
|
|
4
|
+
summary: Sketch-level cleanup. `split` breaks intersecting geometries at their crossings; `trim` discards the unwanted segments.
|
|
5
|
+
tags: [api, 2d, modifier]
|
|
6
|
+
symbols: [split, trim]
|
|
7
|
+
seeAlso: [api/sketch, api/edge-filter]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# split / trim
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
split() // split all intersecting geometries
|
|
16
|
+
split(...objects)
|
|
17
|
+
|
|
18
|
+
trim() // trim all segments at crossings
|
|
19
|
+
trim(...filters: EdgeFilter[]) // trim segments matching the filters
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Both run inside a sketch context. `split` keeps every piece around so
|
|
23
|
+
you can reference them individually; `trim` keeps only the segments you
|
|
24
|
+
want, discarding the others. Pair `trim(...)` with an
|
|
25
|
+
[[api/edge-filter]] to target specific segments by length, orientation,
|
|
26
|
+
or parent.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```fluid.js
|
|
31
|
+
import { circle, extrude, hLine, sketch, trim } from "fluidcad/core";
|
|
32
|
+
import { edge } from "fluidcad/filters";
|
|
33
|
+
|
|
34
|
+
sketch("xy", () => {
|
|
35
|
+
circle(50);
|
|
36
|
+
hLine([50, 0], 100); // cuts the circle in half
|
|
37
|
+
trim(edge().line()); // drop the line, keep the circle halves
|
|
38
|
+
});
|
|
39
|
+
extrude(2);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
See [[api/edge-filter]] for the filter language `trim` uses.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/sweep
|
|
3
|
+
title: sweep(path)
|
|
4
|
+
summary: Sweeps the active sketch (profile) along a path sketch. The profile is consumed implicitly; the path is passed explicitly.
|
|
5
|
+
tags: [api, 3d, solid]
|
|
6
|
+
symbols: [sweep]
|
|
7
|
+
seeAlso: [api/sketch, api/extrude, api/loft, api/revolve]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# sweep
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
sweep(path: SceneObject) // sweep last sketch along path
|
|
16
|
+
sweep(path: SceneObject, target?: SceneObject)
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Returns `Sweep` (extends `BooleanOperation`). Chain: `.draft()`,
|
|
20
|
+
`.endOffset()`, `.drill()`, `.pick()`, `.thin()`, plus boolean scope
|
|
21
|
+
methods. Direct accessors mirror `extrude`: `startFaces`, `endFaces`,
|
|
22
|
+
`sideFaces`, etc.
|
|
23
|
+
|
|
24
|
+
The path is typically a reusable sketch (open or closed wire) or an
|
|
25
|
+
edge selection. The profile is whatever sketch was last opened — usually
|
|
26
|
+
on a plane perpendicular to the path's start tangent.
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```fluid.js
|
|
31
|
+
import { arc, circle, line, sketch, sweep } from "fluidcad/core";
|
|
32
|
+
|
|
33
|
+
const path = sketch("xy", () => {
|
|
34
|
+
line([0, 0], [100, 0]);
|
|
35
|
+
arc([200, 100]).radius(150);
|
|
36
|
+
}).reusable();
|
|
37
|
+
|
|
38
|
+
sketch("yz", () => circle(8));
|
|
39
|
+
sweep(path);
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
See [[api/loft]] for blending between distinct profiles and
|
|
43
|
+
[[api/revolve]] for axis-driven sweeps.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/tarc
|
|
3
|
+
title: tArc — tangent arc
|
|
4
|
+
summary: The most flexible constrained primitive. Tangent-continues from the previous geometry; can target a point, a curve, or thread between two curves.
|
|
5
|
+
tags: [api, 2d, constrained, curve]
|
|
6
|
+
symbols: [tArc]
|
|
7
|
+
seeAlso: [api/tline, api/tcircle, api/arc]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# tArc
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
tArc(target: SceneObject | QualifiedGeometry) // ends tangent to target curve
|
|
16
|
+
tArc(radius, target) // arc of given radius to target
|
|
17
|
+
tArc(radius?, endAngle?) // defaults: radius 100, sweep 90°
|
|
18
|
+
tArc(radius, angle, tangent: Point2D) // explicit start tangent
|
|
19
|
+
tArc(endPoint: Point2D) // tangent arc to a point
|
|
20
|
+
tArc(endPoint, tangent) // with end tangent
|
|
21
|
+
tArc(startPoint, endPoint, tangent)
|
|
22
|
+
tArc(c1: SceneObject, c2: SceneObject, radius, mustTouch?)
|
|
23
|
+
tArc(c1: Point2D, c2: Point2D, radius, mustTouch?)
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Defaults: radius `100`, end angle `90°`. Negative radius flips sweep
|
|
27
|
+
direction. Chain `.flip()` to curve to the right of the start tangent
|
|
28
|
+
instead of the left.
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```fluid.js
|
|
33
|
+
import { connect, extrude, hLine, sketch, tArc } from "fluidcad/core";
|
|
34
|
+
|
|
35
|
+
sketch("xy", () => {
|
|
36
|
+
hLine(40);
|
|
37
|
+
tArc(20, 180); // half-circle of radius 20, tangent to the hLine
|
|
38
|
+
hLine(-40);
|
|
39
|
+
connect();
|
|
40
|
+
});
|
|
41
|
+
extrude(3);
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
See [[api/tline]] for tangent lines and [[api/arc]] for unconstrained
|
|
45
|
+
arcs.
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/tcircle
|
|
3
|
+
title: tCircle — tangent circle
|
|
4
|
+
summary: Full circle of given diameter tangent to two objects (or threading two points). Use qualifiers to disambiguate among the up-to-8 valid solutions.
|
|
5
|
+
tags: [api, 2d, constrained, curve]
|
|
6
|
+
symbols: [tCircle]
|
|
7
|
+
seeAlso: [api/tline, api/tarc, api/circle]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# tCircle
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
tCircle(c1, c2, diameter, mustTouch?)
|
|
16
|
+
tCircle(c1: QualifiedGeometry, c2: QualifiedGeometry, diameter, mustTouch?)
|
|
17
|
+
tCircle(c1: Point2D, c2: Point2D, diameter, mustTouch?)
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Returns a full circle (`ExtrudableGeometry`) of the given diameter
|
|
21
|
+
tangent to both targets. Up to 8 solutions exist for two circles —
|
|
22
|
+
narrow with `outside` / `enclosing` / `enclosed` qualifiers and/or
|
|
23
|
+
`mustTouch: true`.
|
|
24
|
+
|
|
25
|
+
## Example
|
|
26
|
+
|
|
27
|
+
```fluid.js
|
|
28
|
+
import { outside } from "fluidcad/constraints";
|
|
29
|
+
|
|
30
|
+
sketch("xy", () => {
|
|
31
|
+
const c1 = circle([0, 0], 40).reusable();
|
|
32
|
+
const c2 = circle([100, 0], 40).reusable();
|
|
33
|
+
tCircle(outside(c1), outside(c2), 20);
|
|
34
|
+
});
|
|
35
|
+
extrude(2);
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
See [[api/tline]] and [[api/tarc]] for tangent lines and arcs.
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/tline
|
|
3
|
+
title: tLine — tangent line
|
|
4
|
+
summary: Constrained tangent line — between two curves, from the cursor to one curve, or continuing the previous geometry's tangent.
|
|
5
|
+
tags: [api, 2d, constrained, curve]
|
|
6
|
+
symbols: [tLine]
|
|
7
|
+
seeAlso: [api/tarc, api/tcircle, api/cursor-lines]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# tLine
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
tLine(distance) // continue tangent to previous geometry
|
|
16
|
+
tLine(c1: SceneObject, c2: SceneObject, mustTouch?) // between two objects
|
|
17
|
+
tLine(c1: QualifiedGeometry, c2: QualifiedGeometry, mustTouch?)
|
|
18
|
+
tLine(c1, mustTouch?) // tangent to one object from cursor
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Returns `Geometry` (one-arg form) or `TwoObjectsTangentLine` with
|
|
22
|
+
`.start()`, `.end()`, and `.tangent()` vertices.
|
|
23
|
+
|
|
24
|
+
Multiple tangent lines exist between two curves — disambiguate with
|
|
25
|
+
`outside()`, `enclosing()`, or `enclosed()` qualifiers (see Phase 11
|
|
26
|
+
slice 4 once they land).
|
|
27
|
+
|
|
28
|
+
## Example
|
|
29
|
+
|
|
30
|
+
```fluid.js
|
|
31
|
+
import { circle, extrude, sketch, tLine } from "fluidcad/core";
|
|
32
|
+
|
|
33
|
+
sketch("xy", () => {
|
|
34
|
+
const c1 = circle([0, 0], 30).reusable();
|
|
35
|
+
const c2 = circle([100, 0], 20).reusable();
|
|
36
|
+
tLine(c1, c2);
|
|
37
|
+
});
|
|
38
|
+
extrude(2);
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
See [[api/tarc]] for tangent arcs and [[api/tcircle]] for tangent
|
|
42
|
+
circles.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/translate
|
|
3
|
+
title: translate(x, y?, z?, ...targets?)
|
|
4
|
+
summary: "Moves one or more objects by a vector. With no targets, operates on the last object. Pass `copy: true` to clone instead of moving."
|
|
5
|
+
tags: [api, 3d, transform]
|
|
6
|
+
symbols: [translate]
|
|
7
|
+
seeAlso: [api/rotate, api/mirror, api/copy]
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# translate
|
|
11
|
+
|
|
12
|
+
Imported from `fluidcad/core`.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
translate(x, ...targets)
|
|
16
|
+
translate(x, y, ...targets)
|
|
17
|
+
translate(x, y, z, ...targets)
|
|
18
|
+
translate(point: PointLike, ...targets)
|
|
19
|
+
translate(x, y, z, copy: boolean, ...targets) // copy flag at any arity
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Returns the translated `SceneObject`. With no explicit target it operates
|
|
23
|
+
on the last object — the same implicit-context model as the rest of the
|
|
24
|
+
API.
|
|
25
|
+
|
|
26
|
+
The `copy: true` overload duplicates the source rather than moving it,
|
|
27
|
+
producing a new independent object. Use it for one-off duplicates; for
|
|
28
|
+
patterns use [[api/copy]] or [[api/repeat]].
|
|
29
|
+
|
|
30
|
+
## Example
|
|
31
|
+
|
|
32
|
+
```fluid.js
|
|
33
|
+
import { sphere, translate } from "fluidcad/core";
|
|
34
|
+
|
|
35
|
+
const s = sphere(15);
|
|
36
|
+
translate(0, 0, 60, s); // lift the sphere by 60
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See [[api/rotate]] for rotations and [[api/copy]] for snapshot
|
|
40
|
+
duplication patterns.
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/aline
|
|
3
|
+
title: ALine
|
|
4
|
+
summary: "The ALine type. Extends Geometry; adds 1 method."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [ALine, IALine]
|
|
7
|
+
seeAlso: [api/line, api/types/geometry]
|
|
8
|
+
---
|
|
9
|
+
# ALine
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface ALine 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,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/arc-angles
|
|
3
|
+
title: ArcAngles
|
|
4
|
+
summary: "The ArcAngles type. Extends ExtrudableGeometry; adds 1 method."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [ArcAngles, IArcAngles]
|
|
7
|
+
seeAlso: [api/arc, api/types/extrudable-geometry]
|
|
8
|
+
---
|
|
9
|
+
# ArcAngles
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface ArcAngles extends ExtrudableGeometry {
|
|
13
|
+
centered(): this;
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Extends [[api/types/extrudable-geometry]].
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### `centered()`
|
|
22
|
+
|
|
23
|
+
Centers the arc symmetrically around the start angle.
|
|
24
|
+
|
|
25
|
+
## Inherited
|
|
26
|
+
|
|
27
|
+
From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
|
|
28
|
+
|
|
29
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/arc-points
|
|
3
|
+
title: ArcPoints
|
|
4
|
+
summary: "The ArcPoints type. Extends ExtrudableGeometry; adds 2 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [ArcPoints, IArcPoints]
|
|
7
|
+
seeAlso: [api/arc, api/types/extrudable-geometry]
|
|
8
|
+
---
|
|
9
|
+
# ArcPoints
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface ArcPoints extends ExtrudableGeometry {
|
|
13
|
+
radius(value: number): IArcRadius;
|
|
14
|
+
center(value: Point2DLike): IArcCenter;
|
|
15
|
+
}
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Extends [[api/types/extrudable-geometry]].
|
|
19
|
+
|
|
20
|
+
## Methods
|
|
21
|
+
|
|
22
|
+
### `radius()`
|
|
23
|
+
|
|
24
|
+
Sets the bulge radius for point-to-point arcs.
|
|
25
|
+
Positive = CCW, negative = CW.
|
|
26
|
+
|
|
27
|
+
**Returns**: `IArcRadius`.
|
|
28
|
+
|
|
29
|
+
| Parameter | Type | Description |
|
|
30
|
+
| --- | --- | --- |
|
|
31
|
+
| `value` | `number` | The bulge radius. |
|
|
32
|
+
|
|
33
|
+
### `center()`
|
|
34
|
+
|
|
35
|
+
Specifies the circle center point for the arc.
|
|
36
|
+
Mutually exclusive with `.radius()`.
|
|
37
|
+
|
|
38
|
+
**Returns**: `IArcCenter`.
|
|
39
|
+
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `value` | [[api/types/point2dlike]] | The center point of the arc's circle. |
|
|
43
|
+
|
|
44
|
+
## Inherited
|
|
45
|
+
|
|
46
|
+
From [[api/types/geometry]]: `guide()`, `start()`, `end()`, `tangent()`
|
|
47
|
+
|
|
48
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/axis-like
|
|
3
|
+
title: AxisLike
|
|
4
|
+
summary: "An axis reference accepted by revolve(), repeat(), and other axis-based operations."
|
|
5
|
+
tags: [api, type, union]
|
|
6
|
+
symbols: [AxisLike, AxisObjectBase]
|
|
7
|
+
seeAlso: [api/revolve, api/axis, api/types/axis]
|
|
8
|
+
---
|
|
9
|
+
# AxisLike
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
type AxisLike = StandardAxis | Axis | IAxis | AxisObjectBase;
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
An axis reference used by `revolve()` and other axis-based operations. Any of the following formats are accepted:
|
|
16
|
+
|
|
17
|
+
| Format | Example | Description |
|
|
18
|
+
| --- | --- | --- |
|
|
19
|
+
| Standard axis string | `"x"`, `"y"`, `"z"` | The three principal axes. |
|
|
20
|
+
| [[api/types/axis]] | `axis("x", [0, 10])` | An axis object created with `axis()`. |
|
|
21
|
+
|
|
22
|
+
## Example
|
|
23
|
+
|
|
24
|
+
```fluid.js
|
|
25
|
+
import { sketch, rect, move, revolve, axis } from "fluidcad/core";
|
|
26
|
+
|
|
27
|
+
sketch("xz", () => {
|
|
28
|
+
move([20, 0]);
|
|
29
|
+
rect(10, 30);
|
|
30
|
+
});
|
|
31
|
+
revolve("z", 360); // string form
|
|
32
|
+
|
|
33
|
+
sketch("xz", () => {
|
|
34
|
+
move([30, 0]);
|
|
35
|
+
rect(5, 5);
|
|
36
|
+
});
|
|
37
|
+
revolve(axis("z"), 180); // Axis form
|
|
38
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/axis
|
|
3
|
+
title: Axis
|
|
4
|
+
summary: "The Axis type. Extends SceneObject."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Axis, IAxis]
|
|
7
|
+
seeAlso: [api/axis, api/types/axis-like, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Axis
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Axis 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,50 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/boolean-operation
|
|
3
|
+
title: BooleanOperation
|
|
4
|
+
summary: "The BooleanOperation type. Extends SceneObject; adds 4 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [BooleanOperation, IBooleanOperation]
|
|
7
|
+
seeAlso: [api/types/scene-object, concepts/scene-graph]
|
|
8
|
+
---
|
|
9
|
+
# BooleanOperation
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface BooleanOperation extends SceneObject {
|
|
13
|
+
add(): this;
|
|
14
|
+
'new'(): this;
|
|
15
|
+
remove(): this;
|
|
16
|
+
scope(...objects: SceneObject[]): this;
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Extends [[api/types/scene-object]].
|
|
21
|
+
|
|
22
|
+
## Methods
|
|
23
|
+
|
|
24
|
+
### `add()`
|
|
25
|
+
|
|
26
|
+
Additive boolean operation — fuses the result with all intersecting scene objects.
|
|
27
|
+
Use `.scope()` to target specific objects.
|
|
28
|
+
|
|
29
|
+
### `'new'()`
|
|
30
|
+
|
|
31
|
+
No boolean operation — keeps the result as a standalone shape,
|
|
32
|
+
separate from all other scene objects.
|
|
33
|
+
|
|
34
|
+
### `remove()`
|
|
35
|
+
|
|
36
|
+
Subtractive boolean operation — cuts the result from all intersecting scene objects.
|
|
37
|
+
Use `.scope()` to target specific objects.
|
|
38
|
+
|
|
39
|
+
### `scope()`
|
|
40
|
+
|
|
41
|
+
Narrows the boolean operation scope to specific target objects.
|
|
42
|
+
Must be chained after `.add()` or `.remove()`.
|
|
43
|
+
|
|
44
|
+
| Parameter | Type | Description |
|
|
45
|
+
| --- | --- | --- |
|
|
46
|
+
| `...objects` | [[api/types/scene-object]][] | The target objects to operate on. *(optional)* |
|
|
47
|
+
|
|
48
|
+
## Inherited
|
|
49
|
+
|
|
50
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/circular-repeat-options
|
|
3
|
+
title: CircularRepeatOptions
|
|
4
|
+
summary: "Options for `repeat(\"circular\", ...)`."
|
|
5
|
+
tags: [api, type, options]
|
|
6
|
+
symbols: [CircularRepeatOptions]
|
|
7
|
+
seeAlso: [api/repeat]
|
|
8
|
+
---
|
|
9
|
+
# CircularRepeatOptions
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
type CircularRepeatOptions = {
|
|
13
|
+
count: number;
|
|
14
|
+
angle?: number;
|
|
15
|
+
offset?: number;
|
|
16
|
+
centered?: boolean;
|
|
17
|
+
skip?: number[];
|
|
18
|
+
};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Options accepted by the circular variant of `repeat()`. Controls how many copies are placed and how they sweep around the chosen axis.
|
|
22
|
+
|
|
23
|
+
## Properties
|
|
24
|
+
|
|
25
|
+
| Property | Type | Description |
|
|
26
|
+
| --- | --- | --- |
|
|
27
|
+
| `count` | `number` | Number of instances (including the original) |
|
|
28
|
+
| `angle` | `number` | Total angle to spread across. Cannot be used with `offset`. *(optional)* |
|
|
29
|
+
| `offset` | `number` | Angle between each instance. Cannot be used with `angle`. *(optional)* |
|
|
30
|
+
| `centered` | `boolean` | When `true`, centers the pattern around the original object's position *(optional)* |
|
|
31
|
+
| `skip` | `number`[] | Indices to skip (e.g. `[2, 4]` to skip the 3rd and 5th instances) *(optional)* |
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/common
|
|
3
|
+
title: Common
|
|
4
|
+
summary: "The Common type. Extends SceneObject; adds 1 method."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Common, ICommon]
|
|
7
|
+
seeAlso: [api/booleans, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Common
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Common extends SceneObject {
|
|
13
|
+
keepOriginal(value?: boolean): this;
|
|
14
|
+
}
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Extends [[api/types/scene-object]].
|
|
18
|
+
|
|
19
|
+
## Methods
|
|
20
|
+
|
|
21
|
+
### `keepOriginal()`
|
|
22
|
+
|
|
23
|
+
Controls whether the original objects involved in the boolean intersection
|
|
24
|
+
are retained or removed after the operation.
|
|
25
|
+
|
|
26
|
+
| Parameter | Type | Description |
|
|
27
|
+
| --- | --- | --- |
|
|
28
|
+
| `value` | `boolean` | `true` to keep originals, `false` (default) to remove them. *(optional)* |
|
|
29
|
+
|
|
30
|
+
## Inherited
|
|
31
|
+
|
|
32
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/cut
|
|
3
|
+
title: Cut
|
|
4
|
+
summary: "The Cut type. Extends SceneObject; adds 10 methods."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Cut, ICut]
|
|
7
|
+
seeAlso: [api/cut, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Cut
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Cut extends SceneObject {
|
|
13
|
+
symmetric(): this;
|
|
14
|
+
scope(...objects: SceneObject[]): this;
|
|
15
|
+
draft(value: number | [number, number]): this;
|
|
16
|
+
endOffset(value: number): this;
|
|
17
|
+
startEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
18
|
+
endEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
19
|
+
internalEdges(...args: (number | EdgeFilter)[]): SceneObject;
|
|
20
|
+
internalFaces(...args: (number | FaceFilter)[]): SceneObject;
|
|
21
|
+
pick(...points: Point2DLike[]): this;
|
|
22
|
+
thin(offset: number): this;
|
|
23
|
+
thin(offset1: number, offset2: number): this;
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Extends [[api/types/scene-object]].
|
|
28
|
+
|
|
29
|
+
## Methods
|
|
30
|
+
|
|
31
|
+
### `symmetric()`
|
|
32
|
+
|
|
33
|
+
Enables symmetric mode — cuts equally in both directions from the sketch plane.
|
|
34
|
+
|
|
35
|
+
### `scope()`
|
|
36
|
+
|
|
37
|
+
Narrows the cut scope to specific target objects.
|
|
38
|
+
Must be chained after `.remove()`.
|
|
39
|
+
|
|
40
|
+
| Parameter | Type | Description |
|
|
41
|
+
| --- | --- | --- |
|
|
42
|
+
| `...objects` | [[api/types/scene-object]][] | The target objects to cut from. *(optional)* |
|
|
43
|
+
|
|
44
|
+
### `draft()`
|
|
45
|
+
|
|
46
|
+
Applies a draft (taper) angle to the cut walls.
|
|
47
|
+
|
|
48
|
+
| Parameter | Type | Description |
|
|
49
|
+
| --- | --- | --- |
|
|
50
|
+
| `value` | `number` \| `[number, number]` | A single angle for uniform draft, or a `[start, end]` tuple for asymmetric draft. |
|
|
51
|
+
|
|
52
|
+
### `endOffset()`
|
|
53
|
+
|
|
54
|
+
Offsets the cut end face by a specified distance along the cut direction.
|
|
55
|
+
|
|
56
|
+
| Parameter | Type | Description |
|
|
57
|
+
| --- | --- | --- |
|
|
58
|
+
| `value` | `number` | The offset distance. |
|
|
59
|
+
|
|
60
|
+
### `startEdges()`
|
|
61
|
+
|
|
62
|
+
Selects edges at the start of the cut path, classified by signed distance from the cut plane.
|
|
63
|
+
|
|
64
|
+
**Returns**: [[api/types/scene-object]].
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Description |
|
|
67
|
+
| --- | --- | --- |
|
|
68
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
69
|
+
|
|
70
|
+
### `endEdges()`
|
|
71
|
+
|
|
72
|
+
Selects edges at the end of the cut path, classified by signed distance from the cut plane.
|
|
73
|
+
|
|
74
|
+
**Returns**: [[api/types/scene-object]].
|
|
75
|
+
|
|
76
|
+
| Parameter | Type | Description |
|
|
77
|
+
| --- | --- | --- |
|
|
78
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
79
|
+
|
|
80
|
+
### `internalEdges()`
|
|
81
|
+
|
|
82
|
+
Selects internal edges created by the cut that are not on the cut plane boundary.
|
|
83
|
+
|
|
84
|
+
**Returns**: [[api/types/scene-object]].
|
|
85
|
+
|
|
86
|
+
| Parameter | Type | Description |
|
|
87
|
+
| --- | --- | --- |
|
|
88
|
+
| `...args` | (`number` \| `EdgeFilter`)[] | Numeric indices or EdgeFilterBuilder instances to filter the selection. *(optional)* |
|
|
89
|
+
|
|
90
|
+
### `internalFaces()`
|
|
91
|
+
|
|
92
|
+
Selects internal faces exposed by the cut — newly created surfaces not from the original stock.
|
|
93
|
+
|
|
94
|
+
**Returns**: [[api/types/scene-object]].
|
|
95
|
+
|
|
96
|
+
| Parameter | Type | Description |
|
|
97
|
+
| --- | --- | --- |
|
|
98
|
+
| `...args` | (`number` \| `FaceFilter`)[] | Numeric indices or FaceFilterBuilder instances to filter the selection. *(optional)* |
|
|
99
|
+
|
|
100
|
+
### `pick()`
|
|
101
|
+
|
|
102
|
+
Restricts the cut to only the sketch regions containing the given points.
|
|
103
|
+
|
|
104
|
+
| Parameter | Type | Description |
|
|
105
|
+
| --- | --- | --- |
|
|
106
|
+
| `...points` | [[api/types/point2dlike]][] | 2D points in the sketch plane identifying regions to cut. *(optional)* |
|
|
107
|
+
|
|
108
|
+
### `thin()`
|
|
109
|
+
|
|
110
|
+
```ts
|
|
111
|
+
thin(offset: number): this
|
|
112
|
+
thin(offset1: number, offset2: number): this
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Enables thin cut mode — offsets the profile edges to cut a thin-walled shape
|
|
116
|
+
instead of cutting filled faces. Positive values offset outward, negative values offset inward.
|
|
117
|
+
|
|
118
|
+
| Parameter | Type | Description |
|
|
119
|
+
| --- | --- | --- |
|
|
120
|
+
| `offset1` | `number` | The first wall offset distance. Positive = outward, negative = inward. |
|
|
121
|
+
| `offset2` | `number` | The second wall offset distance, in the opposite direction of offset1. |
|
|
122
|
+
|
|
123
|
+
## Inherited
|
|
124
|
+
|
|
125
|
+
From [[api/types/scene-object]]: `name()`, `reusable()`
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: api/types/draft
|
|
3
|
+
title: Draft
|
|
4
|
+
summary: "The Draft type. Extends SceneObject."
|
|
5
|
+
tags: [api, type, interface]
|
|
6
|
+
symbols: [Draft, IDraft]
|
|
7
|
+
seeAlso: [api/draft, api/types/scene-object]
|
|
8
|
+
---
|
|
9
|
+
# Draft
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
interface Draft 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()`
|