Skip to main content

EdgeFilter

Creates a new edge filter builder for selecting edges by geometric properties.

import { edge } from 'fluidcad/filters';

Methods

.atIndex()

.atIndex(index: number): this

Selects the edge at the given index.

ParameterTypeDescription
indexnumberZero-based edge index.

.notAtIndex()

.notAtIndex(index: number): this

Excludes the edge at the given index.

ParameterTypeDescription
indexnumberZero-based edge index to exclude.

.onPlane()

.onPlane(plane: PlaneLike, offset?: number, bothDirections?: boolean): this

Selects edges that lie on the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetnumberOptional distance to offset the plane before matching. (optional)
bothDirectionsbooleanWhen true, also matches the plane offset in the opposite direction. (optional)

.notOnPlane()

.notOnPlane(plane: PlaneLike, offset?: number, bothDirections?: boolean): this

Excludes edges that lie on the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetnumberOptional distance to offset the plane before matching. (optional)
bothDirectionsbooleanWhen true, also excludes the plane offset in the opposite direction. (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)