GiD - The personal pre and post processor

List of examples

The plug-in examples provided by GiD also include some little models of the provided import format.
These are the import plug-ins provided by GiD so far:

OBJ: Wavefront OBJ format
This is a starter example which includes the create_demo_triangs function which creates a very simple mesh.
The obj format is a very simple ascii format and this plug-in:
reads the file,
creates a GiD mesh with the read triangles and quadrilaterals,
and, if the information about the vertex normals is present, then this information is passed to GiD as nodal vector results.


OFF: Object file format
This example is very similar to the previous one.
The off format is a very simple ascii format but including n-agons and color on vertices and faces. So, this plug-in:
reads the file,
creates a GiD mesh with the read triangles and quadrilaterals and triangulates the read pentagons and hexagons (and discards bigger n-agons),
if color information is present in the off file, which can be present on the nodes or on the elements, then this information is passed to GiD as nodal or elemental results.


PLY: Polygon file format
This example is a little bit more complex.
Ply files can be ascii or binary, and the code of this plug-in is based in Greg Turk's code, developed in 1998, to read ply files. This format allows the presence of several properties on nodes and faces, too. This plug-in:
reads the file,
creates a GiD mesh with the read lines, triangles and quadrilaterals,
if information about the vertex normals is found, then this information is passed to GiD as nodal vector results,
all the properties defined in the ply file are passed to GiD. This properties can be defined on the nodes of on the faces of the model, and so are they transferred to GiD.
Here the complexity also resides in the liberation of the reserved memory, which is wildly allocated in the ply code.


PLY + Tcl : Polygon file format
This plug-in is the same as the previous PLY plug-in but a Tcl script is added inside the code to show a progress bar in Tcl to keep the user entertained while big files are read.

COPYRIGHT © 2022 · GID · CIMNE