Import

GiD lets you import geometrical models or meshes in the following formats.

IGES

Menu: Files->Import->IGES...

With this option it is possible to import a file in IGES format (version 5.3); GiD is able to read most of the entities, which are:

Entity number and type (Notes)

100 Circular arc

102 Composite curve

104 Conic arc (ellipse, hyperbola and parabola)

106 Copious data (forms 1, 2, 12 and 63)

108 Plane (form1 bounded)

110 Line

112 Parametric spline curve

114 Parametric spline surface

116 Point

118 Ruled surface

120 Surface of revolution

122 Tabulated cylinder

124 Transformation matrix (form 0)

126 Rational B-spline curve

128 Rational B-spline surface

140 Offset surface entity

141 Bounded entity

142 Curve on a parametric surface

143 Bounded surface

144 Trimmed surface

186 Manifold solid B-rep object

308 Subfigure definition

402 Associativity instance

408 Singular subfigure instance

502 Vertex

504 Edge

508 Loop

510 Face

514 Shell

The variable ImportTolerance (see Preferences ) controls the creation of new points when an IGES file is read. Points are therefore defined as unique if they lie further away than this tolerance distance from another already defined point. Curves are considered identical if they have the same points at their extremes and the "mean proportional distance" between them is smaller than the tolerance. Surfaces can also be collapsed.

Entities that are read in and transformed are not necessarily identical to the original entity. For example, surfaces may be transformed into planes, Coons or NURBS surfaces defining their contours and shape.

DXF

Menu: Files->Import->DXF...

With this option it is possible to read a file in DXF format (AutoCAD 2002 version).

Almost all of the geometry in a DXF file can be read, with the exception of solid modeled entities.

A very important parameter to consider is how the points must be joined. This means that points that are close to each other must be converted to a single point. This is done by defining the variable ImportTolerance (see Preferences ). Points closer together than ImportTolerance will be considered as a single point. Straight lines that share both points are also converted to a single line.

You can use the Collapse function (see Collapse ) to join more entities.

Parasolid

Menu: Files->Import->Parasolid...

With this option it is possible to read a file in the Parasolid format (version 14000 - ASCII or binary).

The most usual Parasolid file extension is .x_t for ASCII and .x_b for binary format.

The variable ImportTolerance (see Preferences ) controls the creation of new points when a Parasolid file is read. Points are therefore defined as unique if they lie further away than this tolerance distance from another already defined point. Curves are considered identical if they have the same points at their extremes and the "mean proportional distance" between them is smaller than the tolerance. Surfaces can also be collapsed.

ACIS

Menu: Files->Import->ACIS...

With this option it is possible to read a file in ACIS format (version 7.0). GiD reads the ASCII version with the SAT Save File Format. ACIS files (in ASCII) have the .sat extension.

VDA

Menu: Files->Import->VDA...

With this option it is possible to read a file in VDA 2.0 format.

A very important parameter to consider is how the points must be joined. This means that points that are close to each other must be converted to a single point. This is done by defining the variable ImportTolerance (see Preferences ). Points closer together than ImportTolerance will be considered as a single point. Straight lines that share both points are also converted to a single line.

The Collapse function (see Collapse ) can be used to join more entities.

Rhino

Menu: Files->Import->Rhino...

With this option it is possible to read Rhino 4.0 CAD files.

Shapefile

Menu: Files->Import->Shapefile...

With this option it is possible to read a GIS file written in ESRI Shapefile format (version 1000). Shapefiles have the .shp extension.

NASTRAN mesh

Menu: Files->Import->NASTRAN mesh...

With this option it is possible to read a file in NASTRAN format (version 68), with GiD accepting most of its entities, which are:

Entity name ( Notes)

CBAR CBEAM CROD CCABLE CBUSH CELAS1 CELAS2 CELAS3 RBAR (translated as 2 node bars)

CQUAD4 CQUADR

CHEXA

CTETRA

CPENTA

CTRIA3 CTRIAR

CONM1 CONM2 (translated as 1 node element)

CORD1C CORD1R CORD1S

CORD2C CORD2R CORD2S

GRID

There are two options that can be used when reading a mesh if GiD already contains a mesh:

The properties and materials of elements are currently ignored, because of the difficulties in associating the NASTRAN file properties with the requirements of the analysis programs. Therefore, you have to assign the materials "a posteriori" accordingly. However, in order to make this easier, the elements will be partitioned in different layers, each with the name PIdn, where n is the property identity number associated with the elements as defined in the NASTRAN file. Note that CELAS2 elements do not have associated property identities so these will be created by default when the file is read.

STL mesh

Menu: Files->Import->STL mesh...

With this option it is possible to read a mesh in STL format. The STL binary format is also supported.

The variable ImportTolerance (see Preferences ) controls the creation of new points when the file is read.

VRML mesh

Menu: Files->Import->VRML mesh...

With this option it is possible to read a mesh in VRML 2.0 format. The compressed gzip format is also supported.

3DStudio mesh

Menu: Files->Import->3DStudio...

With this option it is possible to read a mesh in .3ds 3DStudio format.

CGNS mesh

Menu: Files->Import->CGNS...

With this option it is possible to read a .cgns mesh with CGNS binary format. CGNS is an standard format, specialized for the storage and retrieval of CFD (computational fluid dynamics) data.

GiD mesh

Menu: Files->Import->GiD mesh...

With this option it is possible to read a GiD ASCII mesh (saved with Export GiD Mesh) in order to visualize it within GiD.

It is also possible to read a new mesh and add it to the existing one. In this case, you are prompted to keep the former one or join it to the new mesh.

The format of the file describing the mesh must have the following structure:

mesh dimension = 3 elemtype tetrahedra nnode = 4

coordinates

1 0 0 0

2 3 0 0

3 6 0 0

4 3 3 0

5 3 1.5 4

6 3 1.5 -4

7 1.5 0 2

end coordinates

elements

1 1 2 4 5 1

2 2 3 4 5 1

3 1 4 2 6 1

4 2 4 3 6 1

5 1 2 5 7 1

end elements

The code nnode means the number of nodes per element and dimension can be either:

Where elemtype must be:

For sphere and circle elements after the connectivities the radius must be specified, and for circle elements also the three normal components could be written (z direction is considered by default)

Every element may have an optional number after the definition of the connectivity. This number usually defines the material type and it is useful to divide the mesh into layers to visualize it better. GiD offers the possibility of dividing the problem into different layers according to the different materials through the option Material (see Layers ). For sphere elements is necessary to additionally specify its radius.

Note: The = sign is optional, but if it is present it is necessary to leave a space.

If it is necessary to enter different types of elements, every type must belong to a different mesh. More than one mesh can be entered by writing one after the other, all of them in the same file. The only difference is that all meshes except the first one have nothing between coordinates and end coordinates. They share the first mesh's points. Example: to enter tetrahedron elements and triangle elements,

mesh dimension = 3 elemtype tetrahedra nnode = 4

coordinates

1 0 0 0

2 3 0 0

3 6 0 0

4 3 3 0

5 3 1.5 4

6 3 1.5 -4

7 1.5 0 2

end coordinates

elements

1 1 2 4 5 1

2 2 3 4 5 1

3 1 4 2 6 1

4 2 4 3 6 1

5 1 2 5 7 1

end elements

mesh dimension = 3 elemtype triangle nnode = 3

coordinates

end coordinates

elements

1 1 2 4 1

2 2 3 4 1

3 1 4 2 1

4 2 4 3 1

5 1 2 5 1

end elements

Surface mesh

Menu: Files->Import->Surface mesh...

With this option a mesh can be read from a file in GiD or STL format (see GiD mesh ). Elements of this mesh must be triangles or quadrilaterals. This mesh is converted by GiD into a set of surfaces, points and lines. The geometric definition of surfaces is the mesh itself, but GiD treats them as truly geometric entities. For example, these surfaces can be used as the boundary of a volume, and a new mesh can be generated over them.

You are asked for the value of an angle. An angle between elements bigger than this value is considered to be an edge, and lines are inserted over them. As a consequence, a set of boundary and interior lines are created and attached to the surfaces to mark their edges.

VTK Voxels

Menu: Files->Import->VTK Voxels...

GiD can import a mesh from a file with VTK structured data point format (http://www.vtk.org/pdf/file-formats.pdf ). This format represent a scalar field over a rectilinear 3D grid.

In the "VTK voxels read" dialog box we can specify the isosurface value for the boundary of the body we want to extract from the volume. Besides we can choose among 3 different methods:

Batch file

Menu: Files->Import->Batch file...

Sometimes, you may wish to organise a number of commands into a group outside GiD, ready to be implemented in one go. To do so, commands can be written in a file and GiD will read this file and execute the commands. These commands are the same ones as are used in GiD when entered in the command line or using the commands in the Right buttons menu.

Example: Many points have been digitalized and their coordinates saved in a file. These points are to be joined with straight lines to create the outline of the geometry. To do so, the file would look similar to this:

geometry create line

3.7 4.5 8

2 5 9

4,5,6

...

1 7 0.0

escape

A batch file can also be loaded into GiD by giving its name with the option -b when opening GiD (see INVOKING GiD ). Another way to read batch files to create dynamic presentations is with the Read batch window (see Read batch window ). One GiD session can be registered in a batch file. This can be useful for checking the batch commands or to repeat one session (see Preferences ).

BATCH FILE COMMANDS

There are some special commands to be added to a batch file that are treated differently from regular GiD commands. Their format is one or several words after the control string ***** (five asterisks) and everything in one line.

*****OUTPUTFILENAME filename

filename is substituted with a real file name where all the session warnings (those which appear in the GiD messages warning line) are written. This can be useful when running GiD in batch mode with the option -n (see INVOKING GiD ) and GiD output is desired.

*****TCL tcl_command

Note: If this command is used in a batch file and GiD is invoked with the option -n , it will not work. So that Tcl commands are executed when GiD is run without a window, you should use the -n2 option (see INVOKING GiD ).

geometry create line 1,2

*****COMMENTS -this is a comment-

2,3 escape

geometry create line 1,2

*****PRINT -This is a message that will appear in the messages line-

2,3 escape

geometry create line 1,2

*****PRINT1 -This is a message that will appear in a new window-

2,3 escape

Insert GiD geometry

Menu: Files->Import->Insert GiD geometry...

This command lets you insert one previously created GiD model inside another one. Entities from the old and the new model are not collapsed.

You can perform one Collapse operation (see Collapse ) to join the old and new models.