This tutorial shows a very useful mapping available in SOFA. As its name suggests, this mapping enables you to get a tetrahedral topology from a hexadral one.
Therefore, this mapping divides each hexahedron into 6 tetrahedra. This can be very useful to get tetrahedra if you are working with a RegularGrid geometry.
By using the Hexa2TetraTopologicalMapping, you will collect all the data concerning the tetrahedra in the following components:
- TetrahedronSetTopologyContainer,
- TetrahedronSetTopologyModifier,
- TetrahedronSetTopologyAlgorithms,
- TetrahedronSetGeometryAlgorithms.
It must be stressed that the default division of each hexahedron is always made in the same way, so that it can lead to mesh orientation.
To avoid this bias effect, a swapping method is proposed just by activating a flag "swapping" in order to perform the better division.
And do not forget that topological changes are not handled in this mapping.