Header menu logo Euclid

Topology Module

Functions and values

Function or value Description

join2D (getLine, splitDistance, xs)

Full Usage: join2D (getLine, splitDistance, xs)

Parameters:
    getLine : 'T -> Line2D
    splitDistance : float
    xs : ResizeArray<'T>

Returns: ResizeArray<ResizeArray<'T>>

Returns the groups of consecutive elements, loops or polylines. They are split where the distance between the end point of one element and the start point of the next element is greater than 'splitDistance'. For each element it will compute a line given the 'getLine' function. The Line2D is used as an abstraction to hold start and end of arbitrary object. Then for each line start and end point it finds the next closest line end or start point respectively. Only start with end or end with start points are considered. If the distance between two points is greater than the 'splitDistance' it will be considered as a new group.

getLine : 'T -> Line2D
splitDistance : float
xs : ResizeArray<'T>
Returns: ResizeArray<ResizeArray<'T>>

join3D (getLine, splitDistance, xs)

Full Usage: join3D (getLine, splitDistance, xs)

Parameters:
    getLine : 'T -> Line3D
    splitDistance : float
    xs : ResizeArray<'T>

Returns: ResizeArray<ResizeArray<'T>>

Returns the groups of consecutive elements, loops or polylines. They are split where the distance between the end point of one element and the start point of the next element is greater than 'splitDistance'. For each element it will compute a line given the 'getLine' function. The Line3D is used as an abstraction to hold start and end of arbitrary object. Then for each line start and end point it finds the next closest line end or start point respectively. Only start with end or end with start points are considered. If the distance between two points is greater than the 'splitDistance' it will be considered as a new group.

getLine : 'T -> Line3D
splitDistance : float
xs : ResizeArray<'T>
Returns: ResizeArray<ResizeArray<'T>>

joinReversing2D (getLine, splitDistance, xs)

Full Usage: joinReversing2D (getLine, splitDistance, xs)

Parameters:
    getLine : 'T -> Line2D
    splitDistance : float
    xs : ResizeArray<'T>

Returns: ResizeArray<ResizeArray<'T * bool>>

Returns the groups of consecutive elements, loops or polylines. They are split where the distance between the end point of one element and the start point of the next element is greater than 'splitDistance'. For each element it will compute a line given the 'getLine' function. The Line2D is used as an abstraction to hold start and end of arbitrary object. Then for each line start and end point it finds the next closest line end or start point respectively. Start points can match with start points and end points can match with end points too. If the distance between two points is greater than the 'splitDistance' it will be considered as a new group. The result will be a list of lists of 'T and a Boolean values indicating if the element was reversed.

getLine : 'T -> Line2D
splitDistance : float
xs : ResizeArray<'T>
Returns: ResizeArray<ResizeArray<'T * bool>>

joinReversing3D (getLine, splitDistance, xs)

Full Usage: joinReversing3D (getLine, splitDistance, xs)

Parameters:
    getLine : 'T -> Line3D
    splitDistance : float
    xs : ResizeArray<'T>

Returns: ResizeArray<ResizeArray<'T * bool>>

Returns the groups of consecutive elements, loops or polylines. They are split where the distance between the end point of one element and the start point of the next element is greater than 'splitDistance'. For each element it will compute a line given the 'getLine' function. The Line3D is used as an abstraction to hold start and end of arbitrary object. Then for each line start and end point it finds the next closest line end or start point respectively. Start points can match with start points and end points can match with end points too. If the distance between two points is greater than the 'splitDistance' it will be considered as a new group. The result will be a list of lists of 'T and a Boolean values indicating if the element was reversed.

getLine : 'T -> Line3D
splitDistance : float
xs : ResizeArray<'T>
Returns: ResizeArray<ResizeArray<'T * bool>>

sortToLoop2D (getLine, xs)

Full Usage: sortToLoop2D (getLine, xs)

Parameters:
    getLine : 'T -> Line2D
    xs : ResizeArray<'T>

Sorts elements in place to be in a circular structure. This does not recognize if there are actually two loops, not just one. /// Use Topology.join3D instead. for each line end point it finds the next closest line start point. (Does not check other line end points that might be closer) Line2D is used as an abstraction to hold start and end of arbitrary object.

getLine : 'T -> Line2D
xs : ResizeArray<'T>

sortToLoop3D (getLine, xs)

Full Usage: sortToLoop3D (getLine, xs)

Parameters:
    getLine : 'T -> Line3D
    xs : ResizeArray<'T>

Sorts elements in place to be in a circular structure. This does not recognize if there are actually two loops, not just one. Use Topology.join2D instead. for each line end point it finds the next closest line start point. (Does not check other line end points that might be closer) Line3D is used as an abstraction to hold start and end of arbitrary object.

getLine : 'T -> Line3D
xs : ResizeArray<'T>

sortToLoopWithReversing2D (getLine, reverseInPlace, xs)

Full Usage: sortToLoopWithReversing2D (getLine, reverseInPlace, xs)

Parameters:
    getLine : 'T -> Line2D
    reverseInPlace : int -> 'T -> unit
    xs : ResizeArray<'T>

Sorts elements in place to be in a circular structure. This does not recognize if there are actually two loops, not just one. Use Topology.joinReversing3D instead. For each line end it finds the next closest start point or end point. Line2D is used as an abstraction to hold start and end of arbitrary object. Reverses the input in place where required. e.g. the reverseInPlace function might just update an item at the given index in the array. Depending on the structure of 'T the index might not be need to reverse an element in place.

getLine : 'T -> Line2D
reverseInPlace : int -> 'T -> unit
xs : ResizeArray<'T>

sortToLoopWithReversing3D (getLine, reverseInPlace, xs)

Full Usage: sortToLoopWithReversing3D (getLine, reverseInPlace, xs)

Parameters:
    getLine : 'T -> Line3D
    reverseInPlace : int -> 'T -> unit
    xs : ResizeArray<'T>

Sorts elements in place to be in a circular structure. This does not recognize if there are actually two loops, not just one. Use Topology.joinReversing3D instead. For each line end it finds the next closest start point or end point. Line3D is used as an abstraction to hold start and end of arbitrary object. Reverses the input in place where required. To reverse a 'T in place it uses the reverseInPlace function that takes the index of the element and the element itself as parameter. e.g. the reverseInPlace function might just update an item at the given index in the array. Depending on the structure of 'T the index might not be need to reverse an element in place.

getLine : 'T -> Line3D
reverseInPlace : int -> 'T -> unit
xs : ResizeArray<'T>

Type something to start searching.