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 2 Next »

A customlib <condition> is used to represent concepts like a force, a prescribed displacement, a velocity to some geometrical part, represented by a group that collect the entities.

By default a condition can be drawn representing its entities by colors, but is also possible to draw it with an specific custom symbol.

There are different possibilities and sceneries for the symbols:

  • 2D bitmap.

The most simple case is to draw a 2D bitmap

Can see an example in our cmas2d_customlib example problemtype.

<gid>/problemtypes/examples/cmas2d_customlib.gid

The condition named Point_Weight declares inside the <condition> xml node a <symbol> Tcl proc, to draw the condition as a simple raster image file.

<condition n="Point_Weight" pn="Point Weight" ov="point" ovm="node" icon="darkorange-weight-18" groups_icon="yelowish-group" help="Concentrated mass">
    <value n="Weight" pn="Weight" v="0.0" unit_magnitude="M" units="kg" help="Specify the weight that you want to apply"/>  
    <symbol proc="gid_groups_conds::draw_symbol_image weight-18.png" orientation="global"/>
    <!-- or a more customized example implementing our own procecedure <symbol proc='Cmas2d::DrawSymbolWeigth' orientation='global'/> -->
  </condition>

The gid_groups_conds::draw_symbol_image predefined library proc require the image file name (common image formats are allowed)

the orientation=”global” doesn’t matter in this case, because the 2D image is always drawn on the 3D space on to the screen plane perpendicular to the user view.

  • Procedural drawing

It is also possible to draw 3D symbols using OpenGL commands to draw triangles, lines, etc.

A simple way is to have the shape defined in a file with GiD mesh ASCII format

  • No labels