Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.


GiD_Sets EntitiesSets get|entity_sets
To handle the definition of entities that belong to postprocess sets (similar to preprocess layers)

...

  • GiD_Sets EntitiesSets get color|visible|type|num_entities|id <set_name>

To obtain the current value of some property:

type: set type. could be 0==unknown, 1==mesh, 2==set, 3==cut

num_entities: the total number of mesh elements that belong to the set

  • |entity_sets

To know the entities of a set or to know the sets of an entity

    • GiD_EntitiesSets get <set_name> nodes|elements|all_mesh ?-count?

To get the list of entities of kind <over> that belong to <set_name>
If <over> is all_mesh then is obtained a list with 2 sublists: node id's, element id's
if -count is speficified, then only the number of objects is returned instead of its list.
In fact it is returned an 'objarray': a Tcl_Obj object specialized for arrays, implemented as a Tcl package named 'objarray'. (for more information see scripts\objarray\objarray.pdf)
Example:

Code Block
set count_elements_set [GiD_EntitiesSets get Layer0 elements -count]
set nodes_ids_one_set [GiD_EntitiesSets get Layer0 nodes]



    • GiD_EntitiesSets entity_sets nodes|elements <id>

To get the set that contain the element <id> or the list of set that contain a node <id> (the sets that contain elements with the node as vertex)


Example:

Code Block
set element_21_set [GiD_EntitiesSets entity_sets elements 21]
set node_8_sets [GiD_EntitiesSets entity_sets nodes 8]