GiD plug-in ( Post import
DLL's) development manual
6. June 2011
version 1.4
Miguel Pasenau, GiD Team
06.06.2011 - 1.14
Changes:
v 1.0 12. November 2010 → Initial version
v 1.0.1 13. November 2010 → Small corrections
v 1.0.2 15. November 2010 → Added Mac OS X support
v 1.4 6. June 2010 → Same version as gid_plugin_import.h, added support
for complex scalars and complex vectors.
06.06.2011 - 2.14
Index
1. Introduction........................................................................................................................................4
2. In GiD..................................................................................................................................................5
3. Developing the plug-in........................................................................................................................8
3.1. Header inclusion.........................................................................................................................8
3.2. Functions to be defined by the plug-in.......................................................................................8
3.3. Functions provided by GiD..........................................................................................................9
3.4. List of examples........................................................................................................................12
3.4.1 OBJ: Wavefront OBJ format...............................................................................................12
3.4.2 OFF: Object file format......................................................................................................12
3.4.3 PLY: Polygon file format.....................................................................................................13
3.4.4 PLY + Tcl : Polygon file format...........................................................................................13
4. On-going work..................................................................................................................................14
06.06.2011 - 3.14
1. Introduction
As the variety of existent formats worldwide is too big to be implemented in GiD and, currently, the
number of supported formats for mesh and results information in GiD is limited, the GiD team has
implemented a new mechanism which enables third party libraries to transfer mesh and results to
GiD, so that GiD can be used to visualize simulation data written in whatever format this simulation
program is using.
This new mechanism is the well know mechanism of plug-ins. Particularly GiD supports the loading of
dynamic libraries to read any simulation data and transfer the mesh and results information to GiD.
Viewing GiD as a platform of products, this feature allows a further level of integration of the
simulation code in GiD by means of transferring the results of the simulation to GiD in any format
specified by this simulation code thus avoiding the use of a foreign format.
A manual loading mechanism was already available since GiD version 9.3.0-beta but since GiD version
10.1.1e the recognized plug-ins are automatically loaded in GiD and appear in the top menu bar in
the Files → Import → Plugins submenu.
Since GiD version 10.1.2d this mechanism not only works in Microsoft Windows and Linux, but also in
Apple's Mac OS X.
06.06.2011 - 4.14
2. In GiD
Since GiD 10.1.1e, the recognized import plug-ins appear in the top menu bar under the menu 'Files
→ Import → Plugins':
Figure 1: Import plug-ins menu showing the import plug-in examples included in GiD
But already since GiD version 9.3.0-beta these dynamic libraries can be manually loaded and called
via TCL scripts, in GiD post-process’s command line, or using the post-process’s right menu 'Files →
ImportDynamicLib' and the options LoadDynamicLib, UnloadDynamicLib, CallDynamicLib:
06.06.2011 - 5.14