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.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane. |
offset | number | Optional distance to offset the plane before matching. (optional) |
.notOnPlane()
.notOnPlane(plane: PlaneLike, offset?: number): this
Excludes faces that lie on the given plane.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane. |
offset | number | Optional distance to offset the plane before matching. (optional) |
.circle()
.circle(diameter?: number): this
Selects circular (flat, disc-shaped) faces, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to match. (optional) |
.notCircle()
.notCircle(diameter?: number): this
Excludes circular (flat, disc-shaped) faces, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to exclude. (optional) |
.cylinder()
.cylinder(diameter?: number): this
Selects cylindrical faces, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to match. (optional) |
.notCylinder()
.notCylinder(diameter?: number): this
Excludes cylindrical faces, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to exclude. (optional) |
.cylinderCurve()
.cylinderCurve(diameter?: number): this
Selects faces bounded by cylindrical curves, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to match. (optional) |
.notCylinderCurve()
.notCylinderCurve(diameter?: number): this
Excludes faces bounded by cylindrical curves, optionally matching a specific diameter.
| Parameter | Type | Description |
|---|---|---|
diameter | number | Optional diameter to exclude. (optional) |
.parallelTo()
.parallelTo(plane: PlaneLike): this
Selects faces whose normal is parallel to the given plane.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane. |
.notParallelTo()
.notParallelTo(plane: PlaneLike): this
Excludes faces whose normal is parallel to the given plane.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane. |
.torus()
.torus(majorRadius?: number, minorRadius?: number): this
Selects toroidal faces, optionally matching major and/or minor radius.
| Parameter | Type | Description |
|---|---|---|
majorRadius | number | Optional radius from the torus axis to the tube center. (optional) |
minorRadius | number | Optional radius of the tube itself. (optional) |
.notTorus()
.notTorus(majorRadius?: number, minorRadius?: number): this
Excludes toroidal faces, optionally matching major and/or minor radius.
| Parameter | Type | Description |
|---|---|---|
majorRadius | number | Optional radius from the torus axis to the tube center. (optional) |
minorRadius | number | Optional radius of the tube itself. (optional) |
.planar()
.planar(): this
Selects planar (flat) faces.
.notPlanar()
.notPlanar(): this
Excludes planar (flat) faces.
.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.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane to test intersection against. |
.notIntersectsWith()
.notIntersectsWith(plane: PlaneLike): this
Excludes faces that intersect with the given plane.
| Parameter | Type | Description |
|---|---|---|
plane | PlaneLike | The reference plane to test intersection against. |
.hasEdge()
.hasEdge(...args: any[][]): this
| Parameter | Type | Description |
|---|---|---|
...args | any[] | (optional) |
.notHasEdge()
.notHasEdge(...args: any[][]): this
| Parameter | Type | Description |
|---|---|---|
...args | any[] | (optional) |
.edgeCount()
.edgeCount(count: number): this
Selects faces with exactly the given number of edges.
| Parameter | Type | Description |
|---|---|---|
count | number | The exact number of edges to match. |
.notEdgeCount()
.notEdgeCount(count: number): this
Excludes faces with the given number of edges.
| Parameter | Type | Description |
|---|---|---|
count | number | The number of edges to exclude. |
.above()
.above(plane: PlaneLike, offsetOrOptions?: number | { offset?: number; partial?: boolean; }): this
Selects faces 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 faces 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 faces originating from the given scene objects. Recursive: passing a container picks up faces from its descendants.
| Parameter | Type | Description |
|---|---|---|
...sceneObjects | SceneObject[] | Scene objects whose faces (and faces of their sub-shapes) are matched against. (optional) |