[Gmsh] Write individual physical surfaces, preferably from Python API
Herzig Ivo (herziivo)
herziivo at students.zhaw.ch
Thu Oct 11 09:44:45 CEST 2018
Thanks for your reply.
Yes that does work, but as you said it's not very practical for many surfaces.
Is there a way to remove physical tags from surfaces (using the python API)?
My problem is that I have potentially many surfaces, the plan is to create a watertight 2d surface mesh in gmsh and then export the individual surfaces to individual files (or individual solids in a single file) to remesh it using snappyHexMesh.
I know I could just write the .msh file and code a relatively simple converter from .msh to individual .stl files, but if there is a way to do it with built-in tools, that would be great.
Von: DILASSER Guillaume <Guillaume.DILASSER at cea.fr>
Gesendet: Donnerstag, 11. Oktober 2018 08:56
An: Herzig Ivo (herziivo); gmsh at onelab.info
Betreff: RE: Write individual physical surfaces, preferably from Python API
Have you tried applying a physical tag to only one surface at a time and then exporting the model as STL ? I just tried it and it seems to work. Simply comment out all the lines where you define the physical tags except the one defining the inlet surface ; then open your model and export it as an STL. Rinse and repeat with every other surface you want to export. It might not be the most practical option if you have a large number of them but for only two that should to the trick.
De : gmsh <gmsh-bounces at ace20.montefiore.ulg.ac.be> De la part de Herzig Ivo (herziivo)
Envoyé : mercredi 10 octobre 2018 19:09
À : gmsh at onelab.info
Objet : [Gmsh] Write individual physical surfaces, preferably from Python API
Is there an option to write physical surfaces to individual files (preferably STL)? e.g. if I have physical surfaces "inlet" and "outlet" and I want to write them to "inlet.stl" and "outlet.stl" files.
Another option would be to write them to a single STL file but in separate solids named after the Physical surfaces, but I don't think gmsh can do that either?
Is there an Option I missed that does this? Or a command line switch??
Thanks for your help!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gmsh