This node calculates the dual of the input mesh. This means that faces
get replaced with vertices and vertices with faces. In principle this only
makes sense when the mesh in manifold, but there is an option to keep
the (non-manifold) boundaries of the mesh intact.
Attributes are propagated:
- Point domain goes to face domain and vice versa
- Edge domain and Face corner domain gets mapped to itself
Because of the duality, when the mesh is manifold, the attributes get mapped
to themselves when applying the node twice.
Thanks to Leul Mulugeta (@Leul) for help with the
ascii diagrams in the code comments.
NOTE: Does not work well with some non-manifold geometry, like
an edge connected to more than 2 faces, or a vertex connected to only
two faces, while not being in the boundary.
This is because there is no good way to define the dual at some of those points.
In the following vertex you can't order the faces surrounding it in a way such that
adjacent faces remain adjacent. These types of non-manifold vertices are just removed
for this reason.
{F11467270}
Examples:
{F11336461}
With keep boundaries and without:
{F11336506} {F11336513}
This video explains the propagation of attributes:
{F12669759}
{F12669833}