Class: FaceFinder
Defined in: finders/faceFinder.ts:13
With a FaceFinder you can apply a set of filters to find specific faces within a shape.
Extends
Finder3d
<Face
>
Constructors
Constructor
new FaceFinder(): FaceFinder;
Defined in: finders/definitions.ts:36
Returns
FaceFinder
Inherited from
Finder3d<Face>.constructor
Filter
atAngleWith()
atAngleWith(direction, angle): this;
Defined in: finders/generic3dfinder.ts:52
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
Point
| Direction
angle
number
= 0
Returns
this
Inherited from
Finder3d.atAngleWith
atDistance()
atDistance(distance, point): this;
Defined in: finders/generic3dfinder.ts:78
Filter to find elements that are at a specified distance from a point.
Parameters
distance
number
point
Point
= ...
Returns
this
Inherited from
Finder3d.atDistance
containsPoint()
containsPoint(point): this;
Defined in: finders/generic3dfinder.ts:95
Filter to find elements that contain a certain point
Parameters
point
Returns
this
Inherited from
Finder3d.containsPoint
inBox()
inBox(corner1, corner2): FaceFinder;
Defined in: finders/generic3dfinder.ts:123
Filter to find elements that are within a box
The elements that are not fully contained in the box are also found.
Parameters
corner1
corner2
Returns
FaceFinder
Inherited from
Finder3d.inBox
inList()
inList(elementList): this;
Defined in: finders/generic3dfinder.ts:36
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: 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
origin?
number
| Point
Returns
this
inShape()
inShape(shape): FaceFinder;
Defined in: finders/generic3dfinder.ts:135
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
Returns
FaceFinder
Inherited from
Finder3d.inShape
ofSurfaceType()
ofSurfaceType(surfaceType): this;
Defined in: finders/faceFinder.ts:45
Filter to find faces that are of a cetain surface type.
Parameters
surfaceType
Returns
this
parallelTo()
parallelTo(plane): this;
Defined in: 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
Returns
this
when()
when(filter): this;
Defined in: finders/generic3dfinder.ts:24
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: finders/generic3dfinder.ts:104
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: finders/definitions.ts:55
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: finders/definitions.ts:87
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: finders/definitions.ts:68
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: finders/faceFinder.ts:14
Returns
FaceFinder
delete()
delete(): void;
Defined in: finders/definitions.ts:40
Returns
void
Inherited from
Finder3d.delete
find()
Call Signature
find(shape, options): Face;
Defined in: 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
options
unique
true
Returns
Inherited from
Finder3d.find
Call Signature
find(shape): Face[];
Defined in: finders/definitions.ts:109
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
Returns
Face
[]
Inherited from
Finder3d.find
Call Signature
find(shape, options): Face[];
Defined in: finders/definitions.ts:110
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
options
unique?
false
Returns
Face
[]
Inherited from
Finder3d.find
shouldKeep()
shouldKeep(element): boolean;
Defined in: finders/faceFinder.ts:80
Check if a particular element should be filtered or not according to the current finder
Parameters
element
Returns
boolean
Overrides
Finder3d.shouldKeep