Skip to main content

EdgeFilter

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.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetOrOptionsnumber | { 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.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetOrOptionsnumber | { 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.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.notParallelTo()

.notParallelTo(plane: PlaneLike): this

Excludes edges that are parallel to the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.verticalTo()

.verticalTo(plane: PlaneLike): this

Selects edges that are perpendicular (vertical) to the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.notVerticalTo()

.notVerticalTo(plane: PlaneLike): this

Excludes edges that are perpendicular (vertical) to the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.circle()

.circle(diameter?: number): this

Selects circular edges, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to match. (optional)

.notCircle()

.notCircle(diameter?: number): this

Excludes circular edges, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to exclude. (optional)

.arc()

.arc(radius?: number): this

Selects arc edges, optionally matching a specific radius.

ParameterTypeDescription
radiusnumberOptional radius to match. (optional)

.notArc()

.notArc(radius?: number): this

Excludes arc edges, optionally matching a specific radius.

ParameterTypeDescription
radiusnumberOptional radius to exclude. (optional)

.line()

.line(length?: number): this

Selects straight-line edges, optionally matching a specific length.

ParameterTypeDescription
lengthnumberOptional length to match. (optional)

.notLine()

.notLine(length?: number): this

Excludes straight-line edges, optionally matching a specific length.

ParameterTypeDescription
lengthnumberOptional length to exclude. (optional)

.belongsToFace()

.belongsToFace(...args: any[][]): this
ParameterTypeDescription
...argsany[](optional)

.notBelongsToFace()

.notBelongsToFace(...args: any[][]): this
ParameterTypeDescription
...argsany[](optional)

.intersectsWith()

.intersectsWith(sceneObject: SceneObject): this

Selects edges that geometrically intersect with edges of the given scene object.

ParameterTypeDescription
sceneObjectSceneObjectA 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.

ParameterTypeDescription
sceneObjectSceneObjectA 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).

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetOrOptionsnumber | { 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).

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetOrOptionsnumber | { 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.

ParameterTypeDescription
...sceneObjectsSceneObject[]Scene objects whose edges (and edges of their sub-shapes) are matched against. (optional)