GiD - The personal pre and post processor

Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 17 Next »

  
GiD_Geometry -v2 ?-no_model? create|delete|get|list|edit point|line|surface|volume <num>|append <data>
To create, delete, get data or list the identifiers of geometric entities:

  • <num>|append: <num> is the entity identifier (integer > 0). You can use the word 'append' to set a new number automatically.
  • <data>: is all the geometric definition data (create) or a selection specification (delete, get or list):


-v2 mean version 2 of this command (deprecated version 1 documentation must be seen in help of old versions of the program), the flag really is optional and if missing version 1 is assumed.


If -no_model flag is specified then entities are stored in a special container, it doesn't belong to the model


create: to make new geometric entities (the parameters are explained in the get command, the result of get can be used to create)

  • GiD_Geometry create volume <num>|append volume|contactvolume <layer> {surface1...surfacen} {o1...on} ?<transformation_matrix>?

for contactvolume is necessary to specify the <transformation_matrix> : a vector of 16 reals representing a 4x4 transformation matrix that maps surface1 into surface2

  • GiD_Geometry create surface <num>|append planarsurface|nurbssurface|coonsurface|meshsurface|contactsurface <layer> {line1...linen} {o1...on} <geometrical_data>

<geometrical data> depends of each entity type (see get command)

  • GiD_Geometry create line <num>|append stline|nurbsline|arcline <layer> <inipoint> <endpoint> <geometrical_data>

Instead the NURBS parameters is possible to create a curve that interpolates a list of points (also tangents at start and end can be specified)

  • GiD_Geometry -v2 create line <num> | append nurbsline <layer> <inipoint> <endpoint> {-interpolate {p1_x p1_y p1_z ... pn_x pn_y pn_z} ?-tangents {t0_x t0_y t0_z} {t1_x t1_y t1_z}?}
  • GiD_Geometry create line <num>|append stline <layer> <inipoint> <endpoint>
  • GiD_Geometry create point <num>|append <layer> <point_x> <point_y> <point_z>


delete: to erase model entities

  • GiD_Geometry delete point|line|surface|volume <args>

with <args>: num numa:numb numa: layer:layer_name


get: to obtain all the geometrical data to define a single entity

  • GiD_Geometry -v2 get point|line|surface|volume <args>

with <args>: num ?line_uv <line_index> | index_boundaries | has_holes | render_mesh | mesh | material?


line_uv <line_index> extra arguments must be only used in case of nurbs surfaces, to get the information of the <line_index> curve (integer from 1 to the number of trimming curves) on the surface, defined in its uv space parameter.


index_boundaries extra argument to get an objarray of integers with the index of the list of curves where each boundary start.
If the surface doesn't has any hole, it return 0 (the start index of the outer loop)
It the surface has holes it return an index by hole (the start index or the hole inner loop)


has_holes: it return 0 if the surface doesn't has any hole, 1 else


-v2 mean version 2 of this command and then return this data (deprecated version 1 documentation must be seen in help of old versions of the program)

  • GiD_Geometry get point <num>

will return:
<layer> <geometrical data>
<layer> is the layer name
<geometrical data> the coordinates x y z

  • GiD_Geometry get line <num>

will return:
<type> <layer> <p1> <p2> <geometrical data>
<type> can be: stline, nurbsline, arcline, polyline
<layer> is the layer name
<p1> identifier of start point
<p2> identifier of end point
<geometrical data> item depends of each entity type
stline: nothing


nurbsline: <d> <n> {x y z ... x y z} {w ... w} {k ... k}
<d>degree of the polynomials
<n> number of control points
<xi yi zi> control points coordinates (objarray of 3*n double values)
<wi> are the weights associated to each control point (objarray of double values. Empty array if is non-rational)
<ki> knots (the amount of knots = amount of control points+degree+1


arcline: <xc> <yc> <r> <sa> <ea> {m11 ... m44}
<xc> <yc> 2D center
<r> radius
<sa> <ea> start and end angle (rad)
{m11 ... m44} transformation 4x4 matrix (the identity for a 2D case)
m11 ...m33 is a rotation 3x3 matrix
m14 ...m34 is a translation 3x1 vector
m44 is an scale factor
m41 ... m43 must be 0


polyline: <line .... line> <orientation ... orientation>
<line ...> is a list with the data of each sub-line of the polyline
<orientation ... orientation> is an objarray of values 0 or 1 (0==natural orientation, along tangent, 1== opposite direction)

  • GiD_Geometry get line <line_id> render_mesh

Will return the information of the render mesh of the line <line_id> as a list: {element_type element_num_nodes coordinates connectivities ts}
element_type: line
element_num_nodes: 2
coordinates: objarray with 3*num_nodes items of float with x y z of the render mesh nodes.
connectivities: objarray with element_num_nodes*num_elements of int with the connectivities of the elements (zero-based)
ts: optional objarray with num_nodes items of float with t space parameters (from 0.0 to 1.0) of each node. (it is optional, the array could have zero length)

  • GiD_Geometry get surface <num>

will return:
<type> <layer> <trimmed> {l1 ... ln} {o1 ... on} <geometrical data>
<type> can be: nurbssurface planarsurface coonsurface meshsurface
<layer> is the layer name
<trimmed> 1 if the surface valid part is a trim of a bigger underlying shape, 0 else
{li...} objarray of integer identifiers of the surface lines (outer and inner boundaries)
{o1 ... on} orientation of the lines for the surface (0==natural orientation, along tangent, 1== opposite direction)
Note: turning left of a line with orientation 0 must points inside the surface.
<geometrical data> depends of each entity type
planarsurface: nothing


coonsurface: nothing


nurbssurface <du> <dv> <nu> <nv> {x y z ... x y z} {w ... w} {ku ... ku} {kv ... kv}
<du> <dv>degree in u, v direction
<nu> <nv>number of control points in each direction
{xi yi zi} control points coordinates. (objarray of 3*nu*nv double values)
<wi> are the weights associated to each control point (objarray of double values. Empty array if is non-rational)
<kui> <kvi> knots in each direction


meshsurface: <nnode> {x1 y1 z1 ... xnn ynn znn} {a1 b1 c1 ?d1? ... ane bne cne ?dne?}
nnode: number of nodes by element: 3 or 4 (triangles or quadrilaterals)
xi yi zi: coordinates
ai bi ci di: connectivities (di only for quadrilaterals)

  • GiD_Geometry get surface <surface_id> line_uv <line_index>

will return the information of the curve in uv space of the surface <surface_id>, with similar format as GiD_Geometry get line <num> in case of a nurbs curve.

  • GiD_Geometry get surface <surface_id> has_holes

Return a boolean 1 or 0 indicating if the surface is trimmed with inner holes.

  • GiD_Geometry get surface <surface_id> index_boundaries

Return an objarray of int of num_holes+1 items with the index in the list of boundary curves where each loop starts (the first is the outer loop and then the inner loops)

  • GiD_Geometry get surface <surface_id> ?-force? render_mesh

Will return the information of the render mesh of the surface <surface_id> as a list: {element_type element_num_nodes coordinates connectivities normals uvs}


use -force flag to create the render mesh if it was not created.


element_type: triangle or quadrilateral
element_num_nodes: 3 or 4
coordinates: objarray with 3*num_nodes items of float with x y z of the render mesh nodes.
connectivities: objarray with element_num_nodes*num_elements of int with the connectivities of the elements (starting by zero)
normals: optional objarray with 3*num_nodes items of float with x y z of the render mesh normals. (it is optional, the array could have zero length)
uvs: optional objarray with 2*num_nodes items of float with u v space parameters of each node. (it is optional, the array could have zero length)

  • GiD_Geometry get volume <num>

will return:
<type> <layer> {s1 sn} {o1 ... on}
<type> can be: volume or contactvolume
<layer> is the layer name
{si} identifier of surfaces bounding the volume (including holes. the first must be the outer boundary)
{oi} are its orientation for the volume ( 0 along to the surface normal, 1 opposite)

Note: the normal of a surface with orientation 0 points inside the volume

  • GiD_Geometry get volume <volume_id> has_holes

Return a boolean 1 or 0 indicating if the volume has inner holes.

  • GiD_Geometry get volume <volume_id> index_boundaries

Return an objarray of int of num_holes+1 items with the index in the list of boundary surfaces where each shell starts (the first is the outer shell and then the inner shells)

  • GiD_Geometry get point|line|surface|volume <id> mesh

Will return the information of the mesh of the geometric entity <id> as a list: {element_type element_num_nodes node_ids coordinates element_ids connectivities ?radius_and_normals?}
element_type: string
element_num_nodes: integer with the amount of nodes of an element (all mesh elements are of same type)
node_ids: objarray of integers with num_nodes items, where num_nodes is the amount of nodes of the elements of this mesh (node id one-based)
coordinates: objarray with 3*num_nodes items of double with x y z of the mesh nodes.
element_ids: objarray of integers with num_elements items (element id one-based)
connectivities: objarray with element_num_nodes*num_elements of int with the connectivities of the elements (one-based)
radius_and_normals: only for sphere and circle elements. objarray with num_elements items of double with the radius of each element or num_elements*4 items for circles, with the radius and the normal 3D vector (normal to the plane of the circle).


  • GiD_Geometry get point <id> node

Will return the information of the mesh nod of this point, if any.

Can return "" is there is not any node, the integer node num if it has a node (but the number could be 0 in case of an 'internal' node, not visible)


  • GiD_Geometry get point|line|surface|volume <id> material

Will return an integer with its material index


  • GiD_Geometry get point|line|surface|volume <id> label_on

Will return 1 if the label flag is set to on (to be shown), 0 otherwise

  • GiD_Geometry get point|line|surface|volume <id> selected

Will return 1 if the selected flag is set to on (to be drawn in red), 0 otherwise

  • GiD_Geometry get point|line|surface <id> higherentity

Will return an integer >=0 with the counter of parent entities using this entity.

It is not defined for volume because this is the top category and doesn't has any parent.


list: to get a list of entity identifiers of a range or inside some layer

  • GiD_Geometry list ?<filter_flags>? point|line|surface|volume ?<args>?

<filter_flags> could be: ?-unrendered? ?-higherentity <num_higher>? ?-material <id_material>? ?-layer <layer_name>? ?-plane {a b c d r}? ?-avoid_frozen_layers?
-unrendered flag is only valid for surface
-higherentity <num_higher> to filter the selection and list only the entities with the amount of parents equal to <num_higher> (integer >=0)
-material <id_material>to filter the selection and list only the entities with material id equal to <id_material> (integer >=0)

-layer <layer_name> to filter the selection and list only the entities with layer equal to <layer_name>
-plane <a b c d r> to list only the entities with center that match the plane equation a*x+b*y+c*z+d<=r
-entity_type <types_allowed> to list only the entities of a type contained in <types_allowed>, that must be a list of allowed types ("STLINE | ARCLINE |POLYLINE | NURBLINE | NURBSURFACE PLSURFACE COONSURFACE MESHSURFACE CONTACTSURFACE VOLUME CONTACTVOLUME")

-avoid_frozen_layers to ignore the entities on layers frozen


<args>: <num>|<num_min>:<num_max>


<num_max> could be 'end' to mean the last index
if <args> is not provided it is considered as 1:end, and then all ids are returned


edit: to modify some option

  • GiD_Geometry edit point|line|surface|volume <num> material|label_on|selected <value>

<num> the entity id

<material> to set the material number (value>=0)

<label_on> to set the label flat (value 0 or 1)

<selected> to set the selection flag (value 0 or 1)



Examples:

Creation of a new NURBS surface:

GiD_Geometry create surface 1 nurbssurface Layer0 0 {1 4 3 2} {1 1 1 1} \
{1 1 2 2 {0.17799 6.860841 0.0 -8.43042200 6.86084199 0.0 0.17799400 0.938510 0.0 -8.43042 0.938510 0.0} \
 {} {0.0 0.0 1.0 1.0} {0.0 0.0 1.0 1.0}}


Get the list of points of the layer named 'Layer0':

GiD_Geometry list -layer Layer0 point


Get the list of surfaces that not belong to any volume:

GiD_Geometry list -higherentity 0 surface

Get the list of problematic surfaces that couldn't be rendered:

GiD_Geometry list -unrendered surface


Get the list of lines of type nurbline or arcline

GiD_Geometry list -entity_type {nurbline arcline} line
  • No labels