Export .txt tetraedral elements (nodes and connectivity) grouped into sets.

Moderator: GiD Team

Post Reply
Rolando
Posts: 8
Joined: Fri Jan 14, 2022 12:18 am

Export .txt tetraedral elements (nodes and connectivity) grouped into sets.

Post by Rolando »

Dear all,

I'm meshing a building model consisting of 4 different materials (i.e., masonry, marble, wood and R/C). I have imported a 3D solid model from AutoCAD with the materials (and consequently the elements of each material) properly set into 4 layers. Then, I'm meshing in GiD. Now, I'd like to export the mesh into a .txt file to use it as input in another software.

However, when I'm converting into .txt, there are no information about which element is composed of each material. I'd like to get the sets of elements into each material for this. Is it possible to obtain a .txt file with this information?
User avatar
escolano
Posts: 1918
Joined: Sun Sep 05, 1982 10:51 pm

Re: Export .txt tetraedral elements (nodes and connectivity) grouped into sets.

Post by escolano »

Is your software able to read some standard or common format?
Check the import formats allowed by this software, maybe GiD can export in this format.

The export->GiD mesh... format is simple, but don't support extra information like layers, conditions, groups, ...
the only extra information that write for each element is its material index (if not 0)

You can load some classical problemtype that define some material, e.g. Examples/cmas2d and create 4 materials, and assign to the geometry the material (the properties or material names doesn't matter for this purpose), and generate again the mesh to transfer the material.
then the GiD ASCII mesh file will have an integer number with this material index that you can use in your software.

It is also possible to define your own .bas template or a Tcl scripting procedure that write in a file the exact information and format that you want.
Rolando
Posts: 8
Joined: Fri Jan 14, 2022 12:18 am

Re: Export .txt tetraedral elements (nodes and connectivity) grouped into sets.

Post by Rolando »

Thanks escolano,

I've found the index number for each material after defining problem very useful!
Post Reply