Skip to main content

CornerFinder

Hierarchy

Constructors

constructor

new CornerFinder()

Inherited from

Finder<Corner, Blueprint>.constructor

Defined in

finders/definitions.ts:37

Filter Methods

atDistance

atDistance(distance, point?): CornerFinder

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

Parameters

NameType
distancenumber
pointPoint2D

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:57


atPoint

atPoint(point): CornerFinder

Filter to find elements that contain a certain point

Parameters

NameType
pointPoint2D

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:70


inBox

inBox(corner1, corner2): CornerFinder

Filter to find elements that are within a box

Parameters

NameType
corner1Point2D
corner2Point2D

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:83


inList

inList(elementList): CornerFinder

Filter to find corner that have their point are in the list.

Parameters

NameType
elementListPoint2D[]

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:44


ofAngle

ofAngle(angle): CornerFinder

Filter to find corner that a certain angle between them - only between 0 and 180.

Parameters

NameType
anglenumber

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:107


Filter Combination Methods

and

and(findersList): CornerFinder

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: CornerFinder) => CornerFinder[]

Returns

CornerFinder

Inherited from

Finder.and

Defined in

finders/definitions.ts:56


either

either(findersList): CornerFinder

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: CornerFinder) => CornerFinder[]

Returns

CornerFinder

Inherited from

Finder.either

Defined in

finders/definitions.ts:88


not

not(finderFun): CornerFinder

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: CornerFinder) => CornerFinder

Returns

CornerFinder

Inherited from

Finder.not

Defined in

finders/definitions.ts:69


Other Methods

clone

clone(): CornerFinder

Returns

CornerFinder

Defined in

finders/cornerFinder.ts:33


delete

delete(): void

Returns

void

Inherited from

Finder.delete

Defined in

finders/definitions.ts:41


find

find(shape, options): Corner

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
shapeBlueprint
optionsObject
options.uniquetrue

Returns

Corner

Inherited from

Finder.find

Defined in

finders/definitions.ts:109

find(shape): Corner[]

Parameters

NameType
shapeBlueprint

Returns

Corner[]

Inherited from

Finder.find

Defined in

finders/definitions.ts:110

find(shape, options): Corner[]

Parameters

NameType
shapeBlueprint
optionsObject
options.unique?false

Returns

Corner[]

Inherited from

Finder.find

Defined in

finders/definitions.ts:111


shouldKeep

shouldKeep(element): boolean

Parameters

NameType
elementCorner

Returns

boolean

Overrides

Finder.shouldKeep

Defined in

finders/cornerFinder.ts:124