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


1 Answer 1


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) 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.