0
$\begingroup$

I need to, starting from one face, iterate over the rest of the faces until I reach the first facet. For this I can use twin, start, end or other info of halfedges, faces, vertex. That is, I need to switch to another face at each iteration until I go through all the faces.

Please, help

$\endgroup$

1 Answer 1

1
$\begingroup$

Observe that you can construct another graph by connecting the centroids of faces with centroids of adjacent faces. This is known as the dual. The edges of the graph between the centroids can be represented as the twin relation between halfedges. Then you can use something like Depth First Search to visit all the faces:

function visit(f) mark f as visited for(edge e in f) if(!e->twin->face->visited) faces.append(e->twin->face) visit(f) 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.