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 <[email protected]>
Gesendet: Donnerstag, 11. Oktober 2018 08:56
An: Herzig Ivo (herziivo); [email protected]
Betreff: RE: Write individual physical surfaces, preferably from Python API

Dear Ivo,

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.

Sincerely yours,

Guillaume Dilasser

De : gmsh <[email protected]> De la part de Herzig Ivo 
(herziivo)
Envoyé : mercredi 10 octobre 2018 19:09
À : [email protected]
Objet : [Gmsh] Write individual physical surfaces, preferably from Python API


Hello,



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!

Ivo
_______________________________________________
gmsh mailing list
[email protected]
http://onelab.info/mailman/listinfo/gmsh

Reply via email to