Class: EdgeFinder
With an EdgeFinder you can apply a set of filters to find specific edges within a shape.
Hierarchy
Finder<Edge>↳
EdgeFinder
Constructors
constructor
• new EdgeFinder()
Inherited from
Finder<Edge>.constructor
Defined in
Filter Methods
atAngleWith
▸ atAngleWith(direction?, angle?): EdgeFinder
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
| Name | Type | Default value |
|---|---|---|
direction | Point | Direction | "Z" |
angle | number | 0 |
Returns
Inherited from
Finder.atAngleWith
Defined in
atDistance
▸ atDistance(distance, point?): EdgeFinder
Filter to find elements that are at a specified distance from a point.
Parameters
| Name | Type |
|---|---|
distance | number |
point | Point |
Returns
Inherited from
Finder.atDistance
Defined in
containsPoint
▸ containsPoint(point): EdgeFinder
Filter to find elements that contain a certain point
Parameters
| Name | Type |
|---|---|
point | Point |
Returns
Inherited from
Finder.containsPoint
Defined in
inBox
▸ inBox(corner1, corner2): EdgeFinder
Filter to find elements that are within a box
The elements that are not fully contained in the box are also found.
Parameters
| Name | Type |
|---|---|
corner1 | Point |
corner2 | Point |
Returns
Inherited from
Finder.inBox
Defined in
inDirection
▸ inDirection(direction): EdgeFinder
Filter to find edges that are in a certain direction
Parameters
| Name | Type |
|---|---|
direction | Point | Direction |
Returns
Defined in
inList
▸ inList(elementList): EdgeFinder
Filter to find elements that are in the list.
This deletes the elements in the list as the filter deletion.
Parameters
| Name | Type |
|---|---|
elementList | Edge[] |
Returns
Inherited from
Finder.inList
Defined in
inPlane
▸ inPlane(inputPlane, origin?): EdgeFinder
Filter to find edges that within a plane.
Note that this will work only in lines (but the method does not check this assumption).
Parameters
| Name | Type |
|---|---|
inputPlane | Plane | PlaneName |
origin? | number | Point |
Returns
Defined in
ofCurveType
▸ ofCurveType(curveType): EdgeFinder
Filter to find edges that are of a cetain curve type.
Parameters
| Name | Type |
|---|---|
curveType | CurveType |
Returns
Defined in
ofLength
▸ ofLength(length): EdgeFinder
Filter to find edges of a certain length
Parameters
| Name | Type |
|---|---|
length | number | (l: number) => boolean |
Returns
Defined in
parallelTo
▸ parallelTo(plane): EdgeFinder
Filter to find edges that are parallel to a plane.
Note that this will work only in lines (but the method does not check this assumption).
Parameters
| Name | Type |
|---|---|
plane | Plane | Face | StandardPlane |
Returns
Defined in
Filter Combination Methods
and
▸ and(findersList): EdgeFinder
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
| Name | Type |
|---|---|
findersList | (f: EdgeFinder) => EdgeFinder[] |
Returns
Inherited from
Finder.and
Defined in
either
▸ either(findersList): EdgeFinder
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
| Name | Type |
|---|---|
findersList | (f: EdgeFinder) => EdgeFinder[] |
Returns
Inherited from
Finder.either
Defined in
not
▸ not(finderFun): EdgeFinder
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
| Name | Type |
|---|---|
finderFun | (f: EdgeFinder) => EdgeFinder |
Returns
Inherited from
Finder.not
Defined in
Other Methods
clone
▸ clone(): EdgeFinder
Returns
Defined in
delete
▸ delete(): void
Returns
void
Inherited from
Finder.delete
Defined in
find
▸ find(shape, options): Edge
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
| Name | Type |
|---|---|
shape | AnyShape |
options | Object |
options.unique | true |
Returns
Inherited from
Finder.find
Defined in
▸ find(shape): Edge[]
Parameters
| Name | Type |
|---|---|
shape | AnyShape |
Returns
Edge[]
Inherited from
Finder.find
Defined in
▸ find(shape, options): Edge[]
Parameters
| Name | Type |
|---|---|
shape | AnyShape |
options | Object |
options.unique? | false |
Returns
Edge[]
Inherited from
Finder.find
Defined in
shouldKeep
▸ shouldKeep(element): boolean
Parameters
| Name | Type |
|---|---|
element | Edge |
Returns
boolean
Overrides
Finder.shouldKeep