Element/ node interaction
Once you structures will get more and more complex, it will become harder to keep count of element id and node ids.
The SystemElements class therefore has several methods that help you:
- Find a node id based on a x- and y-coordinate
- Find the nearest node id based on a x- and y-coordinate
- Get all the coordinates of all nodes.
Find node id based on coordinates
-
SystemElements.
find_node_id
(vertex)[source]
Retrieve the ID of a certain location.
Parameters: | vertex – (Vertex/ list/ tpl) Vertex_xz, [x, y], (x, y) |
Returns: | (int/ None) id of the node at the location of the vertex |
Find nearest node id based on coordinates
-
SystemElements.
nearest_node
(dimension, val)[source]
Retrieve the nearest node ID.
Parameters: |
- dimension – (str) “both”, ‘x’, ‘y’ or ‘z’
- val – (flt) Value of the dimension.
|
Returns: | (int) ID of the node.
|
Query node coordinates
-
SystemElements.
nodes_range
(dimension)[source]
Retrieve a list with coordinates x or z (y).
Parameters: | dimension – (str) “both”, ‘x’, ‘y’ or ‘z’ |
Returns: | (list) |