Join GitHub today
GitHub is home to over 36 million developers working together to host and review code, manage projects, and build software together.Sign up
[SofaBaseTopology] Change triangles orientation in tetrahedron #878
Right now for a tetrahedron: [P0, P1, P2, P3] (see picture below)
This means the 4 triangles are clockwised oriented and thus their normals are going inside the tetrahedron. If there is a special reason for that I couldn't find it in the doc.
As Gmsh nice ascii picture (from gmsh full doc) and the 2nd picture suggest. I changed to have counter-clockwise orientation so triangles on borders are by default well oriented to have normals going out.
Then, T0 being the 2D plan [u,v], T1 sharing vector u and then T2 and T3 to close the tetrahedron
Reviewers will merge only if all these checks are true.
Oups sorry @hugtalbot , I didn't see the notification that you ping me in this thread.
I don't know why the triangles were oriented this way. For the breaking part, if someone was using them for BC or collisions, it will definitely break.
The next thing I can see is, you are not only changing the orientation of the triangle, but also the ordering of these triangles inside the tetrahedron. If I do
I guess it is ok to go forward with this, but have this PR in mind if you got "my pressure FF doesn't work anymore, what are you guys doing????" on the forum :-)
thx @jnbrunet for your answer.
Let see if it breaks something. At least people know on whom to shoot.