JuliaGeometry / Meshes.jl

Computational geometry in Julia
https://juliageometry.github.io/MeshesDocs/stable
Other
398 stars 85 forks source link

Revert the orientation of the faces in a topolgy #347

Closed stla closed 1 year ago

stla commented 1 year ago

Hello,

The Dupin cyclide can be obtained by applying a geometric inversion to a torus. So, starting with a mesh of a torus, I applied the geometric inversion to the vertices of this mesh to obtain the vertices of the cyclide, and I made a mesh of the cyclide by using the same topology as the one of the torus mesh. Unfortunately, the orientation of the faces obtained in this way is not the good one: when I plot the mesh, I can see that the normals should be negated. Is there a convenient way to inverse the orientation of the faces of a topolgy? Or maybe I am in a wrong way?

stla commented 1 year ago

Otherwise, the simplest way I can see is to reverse the range of one of the two parameters in the construction of the vertices of the torus (i.e. going from pi to -pi instead of going from -pi to pi).

juliohm commented 1 year ago

Is there a convenient way to inverse the orientation of the faces of a topolgy? Or maybe I am in a wrong way?

Please use the Zulip channel to ask user questions. If a feature is missing, we can then write an appropriate issue to track work.