Skip to main content

FaceFinder

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

Hierarchy

  • Finder3d<Face>

    FaceFinder

Constructors

constructor

new FaceFinder()

Inherited from

Finder3d<Face>.constructor

Defined in

finders/definitions.ts:36

Filter Methods

atAngleWith

atAngleWith(direction?, angle?): FaceFinder

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

NameTypeDefault value
directionPoint | Direction"Z"
anglenumber0

Returns

FaceFinder

Inherited from

Finder3d.atAngleWith

Defined in

finders/generic3dfinder.ts:52


atDistance

atDistance(distance, point?): FaceFinder

Filter to find elements that are at a specified distance from a point.

Parameters

NameType
distancenumber
pointPoint

Returns

FaceFinder

Inherited from

Finder3d.atDistance

Defined in

finders/generic3dfinder.ts:78


containsPoint

containsPoint(point): FaceFinder

Filter to find elements that contain a certain point

Parameters

NameType
pointPoint

Returns

FaceFinder

Inherited from

Finder3d.containsPoint

Defined in

finders/generic3dfinder.ts:95


inBox

inBox(corner1, corner2): FaceFinder

Filter to find elements that are within a box

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

Parameters

NameType
corner1Point
corner2Point

Returns

FaceFinder

Inherited from

Finder3d.inBox

Defined in

finders/generic3dfinder.ts:123


inList

inList(elementList): FaceFinder

Filter to find elements that are in the list.

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

Parameters

NameType
elementListFace[]

Returns

FaceFinder

Inherited from

Finder3d.inList

Defined in

finders/generic3dfinder.ts:36


inPlane

inPlane(inputPlane, origin?): FaceFinder

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

NameType
inputPlanePlane | PlaneName
origin?number | Point

Returns

FaceFinder

Defined in

finders/faceFinder.ts:60


inShape

inShape(shape): FaceFinder

Filter to find elements that are within a generic shape

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

Parameters

NameType
shapeAnyShape

Returns

FaceFinder

Inherited from

Finder3d.inShape

Defined in

finders/generic3dfinder.ts:135


ofSurfaceType

ofSurfaceType(surfaceType): FaceFinder

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

Parameters

NameType
surfaceTypeSurfaceType

Returns

FaceFinder

Defined in

finders/faceFinder.ts:45


parallelTo

parallelTo(plane): FaceFinder

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

NameType
planePlane | StandardPlane | Face

Returns

FaceFinder

Defined in

finders/faceFinder.ts:27


when

when(filter): FaceFinder

Filter to find elements following a custom function.

Parameters

NameType
filter(filter: FilterFcn<Face>) => boolean

Returns

FaceFinder

Inherited from

Finder3d.when

Defined in

finders/generic3dfinder.ts:24


withinDistance

withinDistance(distance, point?): FaceFinder

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

Parameters

NameType
distancenumber
pointPoint

Returns

FaceFinder

Inherited from

Finder3d.withinDistance

Defined in

finders/generic3dfinder.ts:104


Filter Combination Methods

and

and(findersList): FaceFinder

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

NameType
findersList(f: FaceFinder) => FaceFinder[]

Returns

FaceFinder

Inherited from

Finder3d.and

Defined in

finders/definitions.ts:55


either

either(findersList): FaceFinder

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

NameType
findersList(f: FaceFinder) => FaceFinder[]

Returns

FaceFinder

Inherited from

Finder3d.either

Defined in

finders/definitions.ts:87


not

not(finderFun): FaceFinder

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

NameType
finderFun(f: FaceFinder) => FaceFinder

Returns

FaceFinder

Inherited from

Finder3d.not

Defined in

finders/definitions.ts:68


Other Methods

clone

clone(): FaceFinder

Returns

FaceFinder

Defined in

finders/faceFinder.ts:14


delete

delete(): void

Returns

void

Inherited from

Finder3d.delete

Defined in

finders/definitions.ts:40


find

find(shape, options): Face

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

NameType
shapeAnyShape
optionsObject
options.uniquetrue

Returns

Face

Inherited from

Finder3d.find

Defined in

finders/definitions.ts:108

find(shape): Face[]

Parameters

NameType
shapeAnyShape

Returns

Face[]

Inherited from

Finder3d.find

Defined in

finders/definitions.ts:109

find(shape, options): Face[]

Parameters

NameType
shapeAnyShape
optionsObject
options.unique?false

Returns

Face[]

Inherited from

Finder3d.find

Defined in

finders/definitions.ts:110


shouldKeep

shouldKeep(element): boolean

Parameters

NameType
elementFace

Returns

boolean

Overrides

Finder3d.shouldKeep

Defined in

finders/faceFinder.ts:80