Tetrahedron orientation I am developing a software that needs to interact with a mesh processing program, using tetrahedral meshes, however I am finding difficulties in this.
The program requires all tetrahedrons to have right handed orientation, and this is not the hard part, as given a list of vertices $\{ v_0, v_1, v_2, v_3 \}$, I need to check that
$h := ( \; (v_0 - v_1) \times (v_0 - v_2) \;) \cdot (v_0  - v_3) &gt; 0$
In case $h &lt; 0$, any odd permutation will be correct, as $\{ v_0, v_1, v_3, v_2 \}$.
The problem is that, as they told me, the program requires that all faces are oriented with the right hand rule.
This requirement puzzles me, and I do not understand it completely.
Can anyone point me in the right direction?
Code
class tetrahedron:
    def __init__(self, vertices):
        # compute handedness
        c = numpy.cross(vertices[0].coords-vertices[1].coords, vertices[0].coords-vertices[2].coords)
        h = numpy.inner( c, vertices[0].coords-vertices[3].coords )

        # vertex indices with correct right-handed orientation
        if h &gt; 0:
            self.vertices = vertices
        else:
            s = &quot;old h = %f&quot; % (h)
            # swap last two vertices
            self.vertices = [vertices[0], vertices[1], vertices[3], vertices[2]]
            vertices = self.vertices
            c = numpy.cross(vertices[0].coords-vertices[1].coords, vertices[0].coords-vertices[2].coords)
            h = numpy.inner( c, vertices[0].coords-vertices[3].coords )
            s = s + &quot; new h = %f&quot; % (h)
            print(s)

Updated Code
I have updated my code according to the suggestions, but apparently faces are still a problem, the error it gives is
Two elements connect to the same side of the shared element face. Coordinates: 12.3669, -61.573, 81.0725

My code is now as follows:
import numpy

def handedness(vertices):
    c = numpy.cross(vertices[1].coords-vertices[0].coords, \
                    vertices[2].coords-vertices[0].coords)
    h = numpy.inner( c, vertices[3].coords-vertices[0].coords )
    return h

class tetrahedron:
    def __init__(self, vertices):
        h = handedness(vertices)

        if h &gt; 0:
            self.vertices = vertices
        else:
            s = &quot;old h = %f&quot; % (h)
            # swap last two vertices
            self.vertices = [vertices[0], vertices[1], vertices[3], vertices[2]]
            vertices = self.vertices
            h = handedness(self.vertices)
            s = s + &quot; new h = %f&quot; % (h)
            print(s)
This refers to the order of vertices within a face. Typically in 3D graphics, faces are wound counterclockwise, so that if you're looking from outside of the tetrahedron/mesh, all the front faces will have their vertices in counterclockwise order. (See here and here for more explanation.) This is a &quot;right-hand rule&quot; in that if the fingers of your right hand curl in the winding direction of the vertices, then your thumb points toward the outside of the mesh.