geom.edge.next.index
Syntax
- ir = geom.edge.next.index(e,i)
Get the edge index connected to a node. The node is specified by the index i with 1 \(\le\) i \(\le\) 2. This can be used to iterate through all edges connected to a node with the
geom.edge.next.edge
function.Returns: ir - edge index
Arguments: e - edge pointer
Get local index ir of a point within the next edge attached to this point (note: the same point has local index i within the source edge e). This can be used to iterate through all edges connected to a node with the geom.edge.next.edge
function.
Returns: | |
---|---|
Arguments: | e - edge pointer |
Usage Example
The following example illustrates how geom.edge.next.index
can be used to iterate through all edges attached to a node, counting the number of edges.
; Test node to edge loop
global test23 = 0
local node_pnt = geom.node.find(setpnt,1)
local edge_pnt = geom.node.start.edge(node_pnt)
local node_ind = geom.node.start.index(node_pnt)
io.out(edge_pnt)
io.out(node_ind)
loop while edge_pnt # null
test23 = test23 + 1
local next_pnt = geom.edge.next.edge(edge_pnt,node_ind)
node_ind = geom.edge.next.index(edge_pnt,node_ind)
edge_pnt = next_pnt
io.out(edge_pnt)
io.out(node_ind)
end_loop
Was this helpful? ... | PFC 6.0 © 2019, Itasca | Updated: Nov 19, 2021 |