The post-processor component of a Finite Element Analysis application, along with many virtual prototyping/simulation applications, typically displays a 3D model that has color data mapped to it. This color data represents the 'solved' model (The original CAD model gets sent to a mesher, and then the 'mesh' version is 'solved' for one or more variables, such as heat, stress, fluid flow, electromagnetic field, deformation, etc...) A legend bar is also commonly displayed so the end-user can see the relationship between color and results. Here are some general guidelines to follow when organizing the scene-graph:
3D Model
Legend Bar
The diagram below depicts how the scene graph might look:
The HOOPS/3dGS pseudo-code corresponding with the blue portions of the diagram is listed down below. This code actually corresponds with the scene-graph contained in the /datasets/hsf/cad/analysis.hsf file located in the datasets package (available from the Tech Soft 3D Developer Zone). Visually explore its scene graph in a dynamic fashion by loading it into the HOOPS 3D Part Viewer, and then opening the 'Segment Browser' dialog. Additionally, review the ASCII readable version of analysis.hsf (and thus the scene-graph), by saving the HSF file out to an HMF file and then loading it into a text editor.
// define the model HC_Open_Segment("?Include Library"); HC_Open_Segment("Model_0"); HC_Open_Segment("driveshaft"); HC_Open_Segment("fea_facets"); HC_Open_Segment("Body_1"); // define the model using shells // turn off the visibility of 'edges' (to hide the implicit 'shell' edges) HC_Close_Segment(); HC_Open_Segment("fea_edges"); // define the edges using polylines // if the 'shell edges' are suitable, omit this segment, and display the 'shell' edges above, as desired HC_Close_Segment(); HC_Close_Segment(); HC_Close_Segment(); // close "driveshaft" HC_Open_Segment("legendbar"); HC_Set_Rendering_Options("depth range = (0,0)"); HC_Set_Camera(set a camera which can view the extents of the geometry denoting the color 'chart'); HC_Set_Heuristics("exclude bounding"); HC_Open_Segment("chart"); HC_Set_Color_Map_By_Value(...); HC_Insert_Shell(...); // insert text/lines to annotation the legend bar HC_Close_Segment(); // close "chart" HC_Close_Segment(); // close "legendbar" HC_Close_Segment(); // close "Model_0" HC_Close_Segment(); // close "?Include Library" // include the model into the scene HC_Open_Segment("?driver/opengl/window0"); HC_Open_Segment("Scene"); HC_Include_Segment("Model_0"); HC_Close_Segment(); HC_Close_Segment();