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:37

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:36


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:62


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:93


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:104


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:20


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


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


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:56


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:88


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:69


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:41


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:109

▸ find(shape): Face[]

Parameters​

NameType
shapeAnyShape

Returns​

Face[]

Inherited from​

Finder3d.find

Defined in​

finders/definitions.ts:110

▸ find(shape, options): Face[]

Parameters​

NameType
shapeAnyShape
optionsObject
options.unique?false

Returns​

Face[]

Inherited from​

Finder3d.find

Defined in​

finders/definitions.ts:111


shouldKeep​

▸ shouldKeep(element): boolean

Parameters​

NameType
elementFace

Returns​

boolean

Overrides​

Finder3d.shouldKeep

Defined in​

finders/faceFinder.ts:80