chrono::ChVisualShapeFEA Class Reference

Description

FEA mesh visualization.

Adds to the containing visual model a trimesh and a glyphs visual shapes.

#include <ChVisualShapeFEA.h>

Public Types

enum  DataType {
  NONE, SURFACE, CONTACTSURFACES, LOADSURFACES,
  NODE_DISP_NORM, NODE_DISP_X, NODE_DISP_Y, NODE_DISP_Z,
  NODE_SPEED_NORM, NODE_SPEED_X, NODE_SPEED_Y, NODE_SPEED_Z,
  NODE_ACCEL_NORM, NODE_ACCEL_X, NODE_ACCEL_Y, NODE_ACCEL_Z,
  ELEM_STRAIN_VONMISES, ELEM_STRESS_VONMISES, ELEM_STRAIN_HYDROSTATIC, ELEM_STRESS_HYDROSTATIC,
  ELEM_BEAM_MX, ELEM_BEAM_MY, ELEM_BEAM_MZ, ELEM_BEAM_TX,
  ELEM_BEAM_TY, ELEM_BEAM_TZ, NODE_P, ANCF_BEAM_AX,
  ANCF_BEAM_BD
}
 
enum  GlyphType {
  NONE, NODE_DOT_POS, NODE_CSYS, NODE_VECT_SPEED,
  NODE_VECT_ACCEL, ELEM_TENS_STRAIN, ELEM_TENS_STRESS, ELEM_VECT_DP
}
 

Public Member Functions

 ChVisualShapeFEA (std::shared_ptr< fea::ChMesh > fea_mesh)
 
fea::ChMeshGetMesh ()
 Access the referenced FEM mesh.
 
DataType GetFEMdataType ()
 Returns the current data type to be plotted (speeds, forces, etc.).
 
void SetFEMdataType (DataType mdata)
 Set the current data type to be plotted (speeds, forces, etc.).
 
GlyphType GetFEMglyphType ()
 Returns the current data type to be drawn with glyphs.
 
void SetFEMglyphType (GlyphType mdata)
 Set the current data type to be drawn with glyphs.
 
void SetColorscaleMinMax (double mmin, double mmax)
 Set upper and lower values of the plotted variable for the colorscale plots.
 
void SetSymbolsScale (double mscale)
 Set the scale for drawing the symbols for vectors, tensors, etc.
 
double GetSymbolsScale ()
 
void SetSymbolsThickness (double mthick)
 Set the thickness of symbols used for drawing the vectors, tensors, etc.
 
double GetSymbolsThickness ()
 
void SetBeamResolution (int mres)
 Set the resolution of beam triangulated drawing, along direction of beam.
 
int GetBeamResolution ()
 
void SetBeamResolutionSection (int mres)
 Set the resolution of beam triangulated drawing, along the section (i.e. More...
 
int GetBeamResolutionSection ()
 
void SetShellResolution (int mres)
 Set the resolution of shell triangulated drawing.
 
int GetShellResolution ()
 
void SetShrinkElements (bool mshrink, double mfact)
 Set shrinkage of elements during drawing.
 
void SetWireframe (bool mwireframe)
 Set as wireframe visualization.
 
void SetBackfaceCull (bool mbc)
 Set backface cull speedup (default false). More...
 
void SetZbufferHide (bool mhide)
 Set the Z buffer enable/disable, for visualization systems that support it (default: true). More...
 
void SetDefaultMeshColor (ChColor mcolor)
 Set color for SURFACE mode (also for wireframe lines).
 
void SetDefaultSymbolsColor (ChColor mcolor)
 Set color for GlyphType::NONE mode or for wireframe lines.
 
void SetSmoothFaces (bool msmooth)
 Activate Gourad or Phong smoothing for faces of non-straight elements. More...
 
void SetDrawInUndeformedReference (bool mdu)
 Draw the mesh in its underformed (reference) configuration.
 
void Update (ChPhysicsItem *updater, const ChFrame<> &frame)
 Update the triangle visualization mesh so that it matches with the FEM mesh.
 

Friends

class ChVisualModel
 

Member Function Documentation

◆ SetBackfaceCull()

void chrono::ChVisualShapeFEA::SetBackfaceCull ( bool  mbc)
inline

Set backface cull speedup (default false).

Must be set true for shells and in general where already double-sided twin triangles are used.

◆ SetBeamResolutionSection()

void chrono::ChVisualShapeFEA::SetBeamResolutionSection ( int  mres)
inline

Set the resolution of beam triangulated drawing, along the section (i.e.

for circular section = number of points along the circle)

◆ SetSmoothFaces()

void chrono::ChVisualShapeFEA::SetSmoothFaces ( bool  msmooth)
inline

Activate Gourad or Phong smoothing for faces of non-straight elements.

Note: experimental feature.

◆ SetZbufferHide()

void chrono::ChVisualShapeFEA::SetZbufferHide ( bool  mhide)
inline

Set the Z buffer enable/disable, for visualization systems that support it (default: true).

If hide = false, symbols will appear even if hidden by meshes/geometries.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono/assets/ChVisualShapeFEA.h
  • /builds/uwsbel/chrono/src/chrono/assets/ChVisualShapeFEA.cpp