openmesh

OpenMesh skipping circulators


OpenMesh has its skipping iterators which skips elements marked for deletion. Is there an equivalent in circulators? I'm thinking circulators which treat mesh elements marked deleted as if they were not there any more. Note that this is not as simple as using the existing circulators and testing whether an element was marked for deletion because this does not take into account the changes in topology (neighboring elements, connected elements, etc) that would result from the deletion.


Solution

  • Circulators use the mesh connectivity (as described here) to walk around the neighborhood of an element. When mesh elements are deleted using the usual API (e.g. delete_vertex, delete_edge, delete_face), those elements are marked as deleted and the connectivity is updated such that deleted elements are no longer reachable. By construction, circulators cannot reach deleted elements and therefore no distinction between skipping / non-skipping circulators is necessary.

    Iterators, in contrast to circulators, don't use the mesh connectivity but simply iterate over a list of all elements (which can contain deleted elements until garbage_collection is called). Therefore, skipping / non-skipping variants of iterators exist, that either exclude or include deleted elements.