Creates a new edge filter builder for selecting edges by geometric properties.
import { edge } from 'fluidcad/filters';
Methods
.onPlane()
.onPlane(plane: PlaneLike, offsetOrOptions?: number | { offset?: number; bothDirections?: boolean; partial?: boolean; }): this
Selects edges that lie on the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
offsetOrOptions | number | { offset?: number; bothDirections?: boolean; partial?: boolean; } | Offset distance, or an options object with offset, bothDirections, and partial. (optional) |
.notOnPlane()
.notOnPlane(plane: PlaneLike, offsetOrOptions?: number | { offset?: number; bothDirections?: boolean; partial?: boolean; }): this
Excludes edges that lie on the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
offsetOrOptions | number | { offset?: number; bothDirections?: boolean; partial?: boolean; } | Offset distance, or an options object with offset, bothDirections, and partial. (optional) |
.parallelTo()
.parallelTo(plane: PlaneLike): this
Selects edges that are parallel to the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
.notParallelTo()
.notParallelTo(plane: PlaneLike): this
Excludes edges that are parallel to the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
.verticalTo()
.verticalTo(plane: PlaneLike): this
Selects edges that are perpendicular (vertical) to the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
.notVerticalTo()
.notVerticalTo(plane: PlaneLike): this
Excludes edges that are perpendicular (vertical) to the given plane.
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
.circle()
.circle(diameter?: number): this
Selects circular edges, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|
diameter | number | Optional diameter to match. (optional) |
.notCircle()
.notCircle(diameter?: number): this
Excludes circular edges, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|
diameter | number | Optional diameter to exclude. (optional) |
.arc()
.arc(radius?: number): this
Selects arc edges, optionally matching a specific radius.
| Parameter | Type | Description |
|---|
radius | number | Optional radius to match. (optional) |
.notArc()
.notArc(radius?: number): this
Excludes arc edges, optionally matching a specific radius.
| Parameter | Type | Description |
|---|
radius | number | Optional radius to exclude. (optional) |
.line()
.line(length?: number): this
Selects straight-line edges, optionally matching a specific length.
| Parameter | Type | Description |
|---|
length | number | Optional length to match. (optional) |
.notLine()
.notLine(length?: number): this
Excludes straight-line edges, optionally matching a specific length.
| Parameter | Type | Description |
|---|
length | number | Optional length to exclude. (optional) |
.belongsToFace()
.belongsToFace(...args: any[][]): this
| Parameter | Type | Description |
|---|
...args | any[] | (optional) |
.notBelongsToFace()
.notBelongsToFace(...args: any[][]): this
| Parameter | Type | Description |
|---|
...args | any[] | (optional) |
.intersectsWith()
.intersectsWith(sceneObject: SceneObject): this
Selects edges that geometrically intersect with edges of the given scene object.
| Parameter | Type | Description |
|---|
sceneObject | SceneObject | A scene object whose edges are tested for intersection. |
.notIntersectsWith()
.notIntersectsWith(sceneObject: SceneObject): this
Excludes edges that geometrically intersect with edges of the given scene object.
| Parameter | Type | Description |
|---|
sceneObject | SceneObject | A scene object whose edges are tested for intersection. |
.above()
.above(plane: PlaneLike, offsetOrOptions?: number | { offset?: number; partial?: boolean; }): this
Selects edges that are entirely above the given plane (in the direction of its normal).
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
offsetOrOptions | number | { offset?: number; partial?: boolean; } | Offset distance, or an options object with offset and partial. (optional) |
.below()
.below(plane: PlaneLike, offsetOrOptions?: number | { offset?: number; partial?: boolean; }): this
Selects edges that are entirely below the given plane (opposite to its normal direction).
| Parameter | Type | Description |
|---|
plane | PlaneLike | The reference plane. |
offsetOrOptions | number | { offset?: number; partial?: boolean; } | Offset distance, or an options object with offset and partial. (optional) |
.from()
.from(...sceneObjects: SceneObject[][]): this
Restricts the selection to edges originating from the given scene objects.
Recursive: passing a container picks up edges from its descendants.
| Parameter | Type | Description |
|---|
...sceneObjects | SceneObject[] | Scene objects whose edges (and edges of their sub-shapes) are matched against. (optional) |