Methods
(static) addEdgeModFace(topo, start, end, coordinates) → {module:edge~Edge}
Add a new edge and, if in doing so it splits a face, modify the original face and add a new face.
Parameters:
Name | Type | Description |
---|---|---|
topo |
module:topo~Topo | |
start |
module:node~Node | |
end |
module:node~Node | |
coordinates |
Array.<module:coordinate~Coordinate> |
Returns:
- Type
- module:edge~Edge
(static) addEdgeNewFaces(topo, start, end, coordinates) → {module:edge~Edge}
Add a new edge and, if in doing so it splits a face, delete the original face and replace it with two new faces.
Parameters:
Name | Type | Description |
---|---|---|
topo |
module:topo~Topo | |
start |
module:node~Node | |
end |
module:node~Node | |
coordinates |
Array.<module:coordinate~Coordinate> |
Returns:
- Type
- module:edge~Edge
(static) addIsoEdge(topo, start, end, coordinates) → {module:edge~Edge}
Adds an isolated edge defined by geometry alinestring to a topology connecting two existing isolated nodes anode and anothernode and returns the edge id of the new edge.
Parameters:
Name | Type | Description |
---|---|---|
topo |
module:topo~Topo | |
start |
module:node~Node | |
end |
module:node~Node | |
coordinates |
Array.<module:coordinate~Coordinate> |
Returns:
- Type
- module:edge~Edge
Type Definitions
Edge
Edge definition
Type:
- Object
Properties:
Name | Type | Description |
---|---|---|
id |
number | Edge ID |
start |
module:node~Node | |
end |
module:node~Node | |
coordinates |
Array.<module:coordinate~Coordinate> | Coordinates |
nextLeft |
module:edge~Edge | |
nextRight |
module:edge~Edge | |
leftFace |
module:face~Face | |
rightFace |
module:face~Face | |
minX |
number | Minimum X of bounds |
maxY |
number | Maximum Y of bounds |
minX |
number | Minimum X of bounds |
maxY |
number | Maximum Y of bounds |