Skip to main content

Class: FaceFinder

Defined in: packages/replicad/src/finders/faceFinder.ts:13

With a FaceFinder you can apply a set of filters to find specific faces within a shape.

Extends​

Constructors​

Constructor​

new FaceFinder(): FaceFinder;

Defined in: packages/replicad/src/finders/definitions.ts:34

Returns​

FaceFinder

Inherited from​

Finder3d<Face>.constructor

Filter​

atAngleWith()​

atAngleWith(direction?, angle?): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:46

Filter to find elements that are at a specified angle (in degrees) with a direction.

The element direction corresponds to its normal in the case of a face.

Parameters​

direction?​

Direction = "Z"

angle?​

number = 0

Returns​

this

Inherited from​

Finder3d.atAngleWith

atDistance()​

atDistance(
distance,
point?,
tolerance?): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:68

Filter to find elements that are at a specified distance from a point, within the given tolerance.

Parameters​

distance​

number

point?​

Point = ...

tolerance?​

number = 1e-6

Returns​

this

Inherited from​

Finder3d.atDistance

containsPoint()​

containsPoint(point): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:89

Filter to find elements that contain a certain point

Parameters​

point​

Point

Returns​

this

Inherited from​

Finder3d.containsPoint

inBox()​

inBox(corner1, corner2): FaceFinder;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:127

Filter to find elements that are within a box

The elements that are not fully contained in the box are also found.

Parameters​

corner1​

Point

corner2​

Point

Returns​

FaceFinder

Inherited from​

Finder3d.inBox

inList()​

inList(elementList): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:30

Filter to find elements that are in the list.

This deletes the elements in the list as the filter deletion.

Parameters​

elementList​

Face[]

Returns​

this

Inherited from​

Finder3d.inList

inPlane()​

inPlane(inputPlane, origin?): this;

Defined in: packages/replicad/src/finders/faceFinder.ts:60

Filter to find faces that are contained in a plane.

Note that this will work only in planar faces (but the method does not check this assumption).

Parameters​

inputPlane​

Plane | PlaneName

origin?​

number | Point

Returns​

this


inShape()​

inShape(shape): FaceFinder;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:139

Filter to find elements that are within a generic shape

The elements that are not fully contained in the shape are also found.

Parameters​

shape​

AnyShape

Returns​

FaceFinder

Inherited from​

Finder3d.inShape

near()​

near(point, tolerance?): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:99

Filter to find elements that are near a certain point, within the given tolerance.

Parameters​

point​

Point

tolerance?​

number = 1e-6

Returns​

this

Inherited from​

Finder3d.near

ofSurfaceType()​

ofSurfaceType(surfaceType): this;

Defined in: packages/replicad/src/finders/faceFinder.ts:45

Filter to find faces that are of a cetain surface type.

Parameters​

surfaceType​

SurfaceType

Returns​

this


parallelTo()​

parallelTo(plane): this;

Defined in: packages/replicad/src/finders/faceFinder.ts:27

Filter to find faces that are parallel to plane or another face

Note that this will work only in planar faces (but the method does not check this assumption).

Parameters​

plane​

Plane | StandardPlane | Face

Returns​

this


when()​

when(filter): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:18

Filter to find elements following a custom function.

Parameters​

filter​

(filter) => boolean

Returns​

this

Inherited from​

Finder3d.when

withinDistance()​

withinDistance(distance, point?): this;

Defined in: packages/replicad/src/finders/generic3dfinder.ts:108

Filter to find elements that are within a certain distance from a point.

Parameters​

distance​

number

point?​

Point = ...

Returns​

this

Inherited from​

Finder3d.withinDistance

Filter Combination​

and()​

and(findersList): this;

Defined in: packages/replicad/src/finders/definitions.ts:53

Combine logically a set of filter with an AND operation.

You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.

Note that by default filters are applied with and AND operation, but in some case you might want to create them dynamically and use this method.

Parameters​

findersList​

(f) => this[]

Returns​

this

Inherited from​

Finder3d.and

either()​

either(findersList): this;

Defined in: packages/replicad/src/finders/definitions.ts:85

Combine logically a set of filter with an OR operation.

You need to pass an array of functions that take a finder as a argument and return the same finder with some filters applied to it.

Parameters​

findersList​

(f) => this[]

Returns​

this

Inherited from​

Finder3d.either

not()​

not(finderFun): this;

Defined in: packages/replicad/src/finders/definitions.ts:66

Invert the result of a particular finder

You need to pass a function that take a finder as a argument and return the same finder with some filters applied to it.

Parameters​

finderFun​

(f) => this

Returns​

this

Inherited from​

Finder3d.not

Other​

clone()​

clone(): FaceFinder;

Defined in: packages/replicad/src/finders/faceFinder.ts:14

Returns​

FaceFinder


delete()​

delete(): void;

Defined in: packages/replicad/src/finders/definitions.ts:38

Returns​

void

Inherited from​

Finder3d.delete

find()​

Call Signature​

find(shape, options): Face;

Defined in: packages/replicad/src/finders/definitions.ts:106

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters​
shape​

AnyShape

options​
unique​

true

Returns​

Face

Inherited from​
Finder3d.find

Call Signature​

find(shape): Face[];

Defined in: packages/replicad/src/finders/definitions.ts:107

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters​
shape​

AnyShape

Returns​

Face[]

Inherited from​
Finder3d.find

Call Signature​

find(shape, options): Face[];

Defined in: packages/replicad/src/finders/definitions.ts:108

Returns all the elements that fit the set of filters defined on this finder

If unique is configured as an option it will either return the unique element found or throw an error.

Parameters​
shape​

AnyShape

options​
unique?​

false

Returns​

Face[]

Inherited from​
Finder3d.find

shouldKeep()​

shouldKeep(element): boolean;

Defined in: packages/replicad/src/finders/faceFinder.ts:80

Check if a particular element should be filtered or not according to the current finder

Parameters​

element​

Face

Returns​

boolean

Overrides​

Finder3d.shouldKeep