GiD_Mesh create|delete|edit|get|list

To create, delete, modify, list or know information about mesh nodes or elements of the preprocess:

create: to create a new node or element

GiD_Mesh create node <num>|append <x y z>

  • <num>|append: <num> is the identifier (integer > 0) for the node. You can use the word 'append' to set a new number automatically. The number of the created entity is returned as the result.
  • <x y z> are the node coordinates. If the z coordinate is missing, it is set to z=0.0.

GiD_Mesh create element <num>|append <elemtype> <nnode> <N1 ... Nnnode> <radius> <nx> <ny> <nz> ?<matname>?

  • <num>|append: <num> is the identifier (integer > 0) for the node. You can use the word 'append' to set a new number automatically. The number of the created entity is returned as the result.
  • <elemtype>: must be one of "Point | Line | Triangle | Quadrilateral | Tetrahedra | Hexahedra | Prism | Pyramid | Sphere | Circle"
  • <nnode> is the number of nodes an element has
  • <N1 ... Nnnode> is a Tcl list with the element connectivities
  • <radius> is the element radius, only for sphere and circle elements
  • <nx> <ny> <nz> is the normal of the plane that contain the circle, must be specified for circle elements only
  • <matname> is the optional element material name

delete: to delete one or more nodes or elements

GiD_Mesh delete node|element <num_1 ... num_n>

<num> is the identifier (integer > 0) for the node or element to be deleted. It is possible to use a list of multiple ids.

edit: to modify a node or element

GiD_Mesh edit node <num> <x y z>

GiD_Mesh edit element <num> <elemtype> <nnode> <N1 ... Nnnode> <radius> <nx> <ny> <nz> ?<matname>?

Same syntax as create

get: to get the information of a node or element

GiD_Mesh get node <num> ?coordinates?

It return the list: <node_layer> <x> <y> <z>

with the coordinates word only the <x> <y> <z> coordinates are returned

GiD_Mesh get element <num|from_face|from_edge> ?face|face_linear|num_faces|edge_linear|num_edges|normal|tangent|center|connectivities ?<face_id>|<edge_id>??

  • <num> is the identifier (integer > 0) for the element to be asked
  • face optional, instead of the element nodes it returns the nodes of the face, first the linear corner nodes and then the quadratic nodes
  • face_linear optional, instead of the element nodes it returns only the linear corner nodes, also is the element is quadratic
  • num_faces returns the amount of faces of the element (for surface elements its edges act as faces)
  • <face_id> is the local face index from 1 to the number of faces of the element. If <face_id> is missing then a list with all faces is returned
  • edge_linear optional, instead of the element nodes it returns only the linear edge nodes, also is the element is quadratic
  • <edge_id> is the local edge index from 1 to the number of edges of the element. If <edge_id> is missing then a list with all edges is returned
  • num_edges returns the amount of edges of the element

get element return the list: <element_layer> <elemtype> <nnode> <N1> ... <Nnnode>

get element face|face_linear: <N1_face> ... <Nnnode_face>

get element edge_linear: <N1_edge> <N2_edge>

If from_face is specified then the command has this syntax

GiD_Mesh get element from_face <face_nodes> ?-ordered?

it find and return the list of element ids that have a face with these nodes

  • <face_nodes> is the list of integer ids of the face nodes {<face_node_1> ... <face_node_n>} (only corner lineal nodes must be specified in the list)
  • if -ordered is specified then only faces with the same orientation of the nodes will be taken into account (else the ordenation of the face nodes doesn't matter)

If from_edge is specified then the command has this syntax

GiD_Mesh get element from_edge <edge_nodes>

it find and return the list of element ids that have an edge with these nodes

  • <edge_nodes> is the list of integer ids of the edge nodes {<edge_node_1> <edge_node_2>} (only corner lineal nodes must be specified in the list)

Note: get element from_face or from_edge could be an expensive operation because the whole mesh is traversed to find them.

GiD_Mesh get nodesdistance <num1> <num2>

returns the distance between two mesh nodes, specified by its numbers

list: to get a list of entity identifiers of a range, filtered with some conditionals

  • GiD_Mesh list ?<filter_flags>? node|element ?<num>|<num_min:num_max>?

<filter_flags> could be: ?-higherentity <num_higher>? ?-material <id_material>? ?-layer <layer_name>? ?-plane {a b c d r}? ?-element_type <types_allowed>?

-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 wigth center that match the plane equation a*x+b*y+c*z+d<=r (r>=0.0)

-element_type <types_allowed> to list only the elements of a type contained in <types_allowed>, that must be a list of allowed types ("Point | Line | Triangle | Quadrilateral | Tetrahedra | Hexahedra | Prism | Pyramid | Sphere | Circle")

if <num> or <num_min:num_max> are not provided it is considered as 1:end, and then all ids are returned

Examples:

GiD_Mesh create node append {1.5 3.4e2 6.0}

GiD_Mesh create element 58 triangle 3 {7 15 2} steel

GiD_Mesh delete element {58 60}

set triangles_and_quads [GiD_Mesh list -element_type {triangle quadrilateral} element]