Skip to main content

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

finders.ts:42

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

NameTypeDefault value
directionPoint | Direction"Z"
anglenumber0

Returns

EdgeFinder

Inherited from

Finder.atAngleWith

Defined in

finders.ts:73


atDistance

atDistance(distance, point?): EdgeFinder

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

Parameters

NameType
distancenumber
pointPoint

Returns

EdgeFinder

Inherited from

Finder.atDistance

Defined in

finders.ts:99


containsPoint

containsPoint(point): EdgeFinder

Filter to find elements that contain a certain point

Parameters

NameType
pointPoint

Returns

EdgeFinder

Inherited from

Finder.containsPoint

Defined in

finders.ts:128


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

NameType
corner1Point
corner2Point

Returns

EdgeFinder

Inherited from

Finder.inBox

Defined in

finders.ts:139


inDirection

inDirection(direction): EdgeFinder

Filter to find edges that are in a certain direction

Parameters

NameType
directionPoint | Direction

Returns

EdgeFinder

Defined in

finders.ts:357


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

NameType
elementListEdge[]

Returns

EdgeFinder

Inherited from

Finder.inList

Defined in

finders.ts:57


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

NameType
inputPlanePlane | PlaneName
origin?number | Point

Returns

EdgeFinder

Defined in

finders.ts:418


ofCurveType

ofCurveType(curveType): EdgeFinder

Filter to find edges that are of a cetain curve type.

Parameters

NameType
curveTypeCurveType

Returns

EdgeFinder

Defined in

finders.ts:381


ofLength

ofLength(length): EdgeFinder

Filter to find edges of a certain length

Parameters

NameType
lengthnumber | (l: number) => boolean

Returns

EdgeFinder

Defined in

finders.ts:366


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

NameType
planePlane | Face | StandardPlane

Returns

EdgeFinder

Defined in

finders.ts:397


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

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

Returns

EdgeFinder

Inherited from

Finder.and

Defined in

finders.ts:201


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

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

Returns

EdgeFinder

Inherited from

Finder.either

Defined in

finders.ts:176


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

NameType
finderFun(f: EdgeFinder) => EdgeFinder

Returns

EdgeFinder

Inherited from

Finder.not

Defined in

finders.ts:214


Other Methods

clone

clone(): EdgeFinder

Returns

EdgeFinder

Defined in

finders.ts:346


delete

delete(): void

Returns

void

Inherited from

Finder.delete

Defined in

finders.ts:46


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

NameType
shapeAnyShape
optionsObject
options.uniquetrue

Returns

Edge

Inherited from

Finder.find

Defined in

finders.ts:232

find(shape): Edge[]

Parameters

NameType
shapeAnyShape

Returns

Edge[]

Inherited from

Finder.find

Defined in

finders.ts:233

find(shape, options): Edge[]

Parameters

NameType
shapeAnyShape
optionsObject
options.unique?false

Returns

Edge[]

Inherited from

Finder.find

Defined in

finders.ts:234


shouldKeep

shouldKeep(element): boolean

Parameters

NameType
elementEdge

Returns

boolean

Overrides

Finder.shouldKeep

Defined in

finders.ts:439