geom.edge.next.edge

Syntax

er = geom.edge.next.edge(e,i)

Get the edge 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.index function.

Returns:

er - edge pointer

Arguments:

e - edge pointer

i - node index with 1 \(\le\) i \(\le\) 2

Get the next edge connected to the node with local index i within the source edge e. This can be used to iterate through all edges connected to a node using the geom.edge.next.index function.

Returns:

er - next edge pointer

Arguments:

e - source edge pointer

i - node index with 1 \(\le\) i \(\le\) 2

Usage Example

The following example illustrates how geom.edge.next.edge 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)