[Gmsh] Reversing mesh normals

DILASSER Guillaume Guillaume.DILASSER at cea.fr
Tue Jan 24 13:15:00 CET 2017


Hello Mark,

Not sure about this, but the reverse all normal command could just be post-processing. This would explain why it is not saved in you mesh file once you update it. I would suggest using the Reverse Line { line_id } / Surface { surface_id } / “*” command. What it does is reverse the node ordering within a given line, surface, or globally. Since node ordering dictates normal orientations, you should get what you want.

Additionally, there is to my knowledge no way of generating Physical Groups of directly on meshes. Yet, I see two work-arounds. Solution one, is to re-process your msh file outside of Gmsh.  A msh file has a $PhysicalNames section that you can add by hand to define your groups but then you would have to tag each element belonging to the group individually in the $Element section. That could work but that is certainly not practical, see documentation on MSH file format<http://gmsh.info/doc/texinfo/gmsh.html#MSH-ASCII-file-format> for more information.

Second possibility, have a look at STL remeshing example on the wiki<https://onelab.info/svn/gmsh/trunk/tutorial/t13.geo> (user: gmsh, password: gmsh). This could be a way to re-create a geometry based on your mesh, apply the Physical group and finally re-save the geometry with the groups.

Hoping this was useful,

Guillaume Dilasser

De : gmsh [mailto:gmsh-bounces at ace20.montefiore.ulg.ac.be] De la part de Mark Smith
Envoyé : lundi 23 janvier 2017 16:52
À : gmsh at onelab.info
Objet : [Gmsh] Reversing mesh normals

Hi Gmsh users,
I have a gmsh format mesh produced in pointwise which I load into gmsh. I wish to reverse the direction of the surface normals on the mesh which I do by options>mesh>color>Reverse all normal, if I set mesh.normals to some non zero value the normal vector is displayed on the surface mesh and reverse all normal does indeed reverse the vectors direction BUT if I save the mesh out to gmsh msh format with the normals reversed then load it back into gmsh the normal direction is the same as the original, am I doing something wrong or is what I want to do not possible?

Also Is it possible to only reverse the normals on certain mesh surfaces rather than all?

Is there a way to define Physical groups on a mesh rather than on Geometry if one only has a mesh?

Thanks in advance
Best regards
Mark


___________________________________________________________________________

Xaar is a market-leading manufacturer of innovative digital inkjet printing technology.

Note: The information contained in this e-mail is intended for the named recipient(s) only. It may also be privileged and confidential. If you are not an intended recipient, you must not copy, distribute or take any action in reliance upon it. No warranties or assurances are made in relation to safety, content and/or any attachments. No liability is accepted for any consequences arising from it. No warranties are given by Xaar, and no liability is accepted by Xaar, in relation to any loss arising from reliance placed on the information supplied in this email and attachments, other than those warranties expressly stated in Xaar's Standard Terms and Conditions of Sale. Xaar's Standard Terms and Conditions of Sale apply at all times. Xaar plc, registered in England no.3320972, XaarJet ltd, registered in England no.3375961, Xaar Technology ltd, registered in England no.2469592, Science Park, Cambridge, CB4 0XR, Tel +44(0)1223423663, Fax +44(0)1223423590

This email has been scanned for viruses and malware by Mimecast Ltd.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20170124/a12f831b/attachment.html>


More information about the gmsh mailing list