Skip to main content

FaceFilter

Creates a new face filter builder for selecting faces by geometric properties.

import { face } from 'fluidcad/filters';

Methods

.onPlane()

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

Selects faces that lie on the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetnumberOptional distance to offset the plane before matching. (optional)

.notOnPlane()

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

Excludes faces that lie on the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.
offsetnumberOptional distance to offset the plane before matching. (optional)

.circle()

.circle(diameter?: number): this

Selects circular (flat, disc-shaped) faces, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to match. (optional)

.notCircle()

.notCircle(diameter?: number): this

Excludes circular (flat, disc-shaped) faces, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to exclude. (optional)

.cylinder()

.cylinder(diameter?: number): this

Selects cylindrical faces, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to match. (optional)

.notCylinder()

.notCylinder(diameter?: number): this

Excludes cylindrical faces, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to exclude. (optional)

.cylinderCurve()

.cylinderCurve(diameter?: number): this

Selects faces bounded by cylindrical curves, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to match. (optional)

.notCylinderCurve()

.notCylinderCurve(diameter?: number): this

Excludes faces bounded by cylindrical curves, optionally matching a specific diameter.

ParameterTypeDescription
diameternumberOptional diameter to exclude. (optional)

.parallelTo()

.parallelTo(plane: PlaneLike): this

Selects faces whose normal is parallel to the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.notParallelTo()

.notParallelTo(plane: PlaneLike): this

Excludes faces whose normal is parallel to the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane.

.cone()

.cone(): this

Selects conical faces.

.notCone()

.notCone(): this

Excludes conical faces.


.intersectsWith()

.intersectsWith(plane: PlaneLike): this

Selects faces that intersect with the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane to test intersection against.

.notIntersectsWith()

.notIntersectsWith(plane: PlaneLike): this

Excludes faces that intersect with the given plane.

ParameterTypeDescription
planePlaneLikeThe reference plane to test intersection against.

.hasEdge()

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

.notHasEdge()

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

.edgeCount()

.edgeCount(count: number): this

Selects faces with exactly the given number of edges.

ParameterTypeDescription
countnumberThe exact number of edges to match.

.notEdgeCount()

.notEdgeCount(count: number): this

Excludes faces with the given number of edges.

ParameterTypeDescription
countnumberThe number of edges to exclude.