Node ordering and volume computation

Hi all,

I have created a small unstructured grid with a tetrahedron (in red) and a wedge (in blue).

The node ordering for the tetrahedron is : 2 1 0 3
The node ordering for the wedge is : 0 1 2 4 5 6
I think this is the correct ordering looking at https://kitware.github.io/vtk-examples/site/VTKBook/05Chapter5/#Figure%205-2

However when I apply a “cell size” filter on it, I have a (nice) positive value for the tetrahedron but a (bad) negative volume for the wedge. See color bar in above screenshot

I cannot understand what I am missing. Could you help me please?

Remarks :

  • If I modify the node ordering of the wedge to 2, 0, 1, 6, 4, 5 its volume is correctly computed.
  • If I modify the node ordering of the wedge to 2, 1, 0, 6, 5, 4 its volume is correctly computed.

Hi @philippeVerney and welcome to ParaView discourse !

From the documentation you cited notice that using the right hand rule the normal of the first triangular face points outwards and the second points inwards.

In your case (012) points inwards and (456) outwards switching to your
second suggestion (210) and (654) follows the order above.

Thanks @Christos_Tsolakis for the answer.

I agree that 012 points inwards and 456 points outwards in my example.
However, to me, the VTK documentation states the same : 012 points inwards and 345 points outwards in the hereunder figure
image

Furthermore, in my example, 201 645 works which is the same orientation than 012 456 which does not work.

I still think that I unfortunately miss something…

This VTK documentation states exactly what @Christos_Tsolakis just answered :

The wedge is defined by the six points (0-5) where (0,1,2) is the base of the wedge which, using the right hand rule, forms a triangle whose normal points outward (away from the triangular face (3,4,5))

I might be wrong in my right hand rule application but, still to me, the figure ‘m’ in this VTK documentation shows the opposite : the face 0 1 2 points inwards (i.e. towards the triangular face 3,4,5) using right hand rule.

That seems like a bug to me.

That would be my interpretation as well. The 012 face points inwards.

You are right that figure looks wrong. Here is another example along with the code
https://kitware.github.io/vtk-examples/site/Cxx/GeometricObjects/LinearCellDemo/

Thanks for your answers.
I then report the bug on VTK side.

1 Like

Hello @Christos_Tsolakis @philippeVerney,

I saw that the reported bug was fixed and the figure of the linear wedge nodes’ ordering was updated accordingly. However, I was wondering if nodes’ ordering for quadratic wedges in the documentation also needed to be corrected ?

I faced same observationfir the quadratic wedge.

Thank you