I have a STL mesh file with a complicated geometry obtained from CT scan. This is something like this:
I want to do some simulations on the model using FEniCS. In this regards, I want to put a pressure load on the front face of the model. To this end, I need to define a physical surface in gmsh and then import it into FEniCS but the problem is that I have to select a lot of small triangular surfaces to select the whole front face which is cumbersome.
I was able to convert the STL mesh file to STEP or IGES formats but it is not useful because the elements in the STL file will appear again as small triangular surfaces and the same problem!
I guess firstly, I will have to retrieve the geometry from the mesh file (STL file) and then mesh it again but I could not find an efficient way to do it.
I was wondering if somebody could help me with this.
Indeed, importing a STL mesh in a geo file (using the
Merge command) translates each mesh entities into geometric entities (so each triangle of your mesh becomes a surface).
If your original geometry files (STEP) contains face markers, you might be able to import them in your geo file. I haven’t tried it but in case that could help, I have recently read that GMSH has now support for automatic import of labels and colors from STEP files (https://twitter.com/OnelabModels/status/1102994217247404039)
Thanks for your response.
If your original geometry files (STEP) contains face markers, you might be able to import them in your geo file.
I wrote a Python script and convert all of the points, lines, surfaces and the volumes in geo format. Now the issue is resolved.
Could u please share your python script?
Please can you please shared your python script?
Thanks in advance