# vtkHexahedron node ordering question

Hi all,

I am looking at VTK conventions for node ordering especially for vtkHexahedron.
I am also looking at the VTK documentation stating : The hexahedron is defined by the eight points (0-7) where (0,1,2,3) is the base of the hexahedron which, using the right hand rule, forms a quadrilaterial whose normal points in the direction of the opposite face (4,5,6,7).

My question : what does “base” means? Is it the bottom face? I don’t really think it makes sens since it can be hard in some cases to define what is the bottom face (i.e. diamond orientation).

If “base” means “whatever face”, I guess that these two below hexahedra are valid from a VTK point of view. Could you confirm please?
vs

The same question may apply to vtkTetrahedron (and to all kinds of polyhedra which have not a single particular face based on its node count).

If “base” means “whatever face”, I guess that these two below hexahedra are valid from a VTK point of view. Could you confirm please?

Yes, those 2 hexahedra are correct. “Base” might not be the correct geometric term to describe hexahedron’s topology. All the documentation is trying to say is that to build an hexahedron, you need to have the normal of quadrilaterals 0-1-2-3 and 4-5-6-7 points outside of the hexahedron. Edges 0-4, 1-5, 2-6, 3-7 are actually not explicitly defined, we would need to at least define one of them to remove any ambiguity regarding topology.

As for tetrahedra, the whole point is to define face orientations as well. You can connect any 4 points and get a “correct tetrahedron”, however you need to force one face orientation in order to consistently infer the orientation of the whole tetrahedron, which discards any spatial combination making the tetrahedron normals “inside-out”.

Thanks a lot for your quick and detailed answer.

First, an illustration as a reminder

Second, just some few remarks:

Following Right hand rule, I think that :

• the normal of quadrilaterals 0-1-2-3 is pointing inside.
• the normal of quadrilaterals 4-5-6-7 is pointing outside.

Totally agree, that was another wonder on my thought which you have answered before I ask. Thanks!

My mistake, your figure was actually incorrect. Quadrilateral 0-1-2-3 is not correctly oriented. If you are not sure about other `vtk3DCell` topology, you can look in the `.cxx` files where the topology of each cell is drawn in ASCII art. Just Ctrl-Find topology in the files.

I got confused. Your figures were actually correct, and looking closer, the normal of 0-1-2-3 points inside, as well as normal of 7-6-5-4.

1 Like

Perfect, everything is now clear! Thanks again!