Example a/generate_mesh: Generate mesh: Using built-in Netgen module to generate tetrahedral mesh for a

Using built-in Netgen module to generate tetrahedral mesh for a finite element torso model in cmgui.

This example will read in a finite element torso model, convert it into a tetrahedal mesh using built-in Netgen module in cmgui and then output in to an exregion file.

Created November, 2009 by Heye Zhang and Alan Wu.

Screenshot of example a/generate_mesh


The comfile run by this example is as follows:

#A short example to demonstrate meshing from a finite element torso model into a
#tetrahedral mesh.


gfx create material torso diffuse 0.7 0.7 0.7 alpha 1.0  #Translucent grey torso

gfx read elem example torso.exregion
#
#Create a 3-D graphics window, adjust the view and set axes appropriately.
gfx create window 1
gfx modify win 1 view perspective

#Create and modify graphical settings for torso
gfx modify g_element torso general clear circle_discretization 6 default_coordinate coordinates element_discretization "4*4*4" native_discretization none;
gfx modify g_element torso lines select_on invisible material default selected_material default_selected;
gfx modify g_element torso surfaces select_on material torso selected_material default_selected render_shaded;

#
#The following commands create a new region "results" and create a tetrahedral mesh with a global mesh size 20 of the region torso in it.
gfx create region result;
gfx mesh graphics tetrahedral region result mesh_global_size 20;

#write out the new mesh into torso_result.exregion
gfx write elements nodes group result torso_result.exregion;
#Now hide the graphics of region torso and show only the resulting tetrahedrals.
gfx modify g_element torso general clear;
gfx modify g_element result surfaces select_on material red selected_material default_selected render_shaded;

Files used by this example are:

Name               Modified     Size

generate_mesh.com 17-Mar-2014 1.3k COPYRIGHT 17-Mar-2014 504 torso.exregion 17-Mar-2014 159k

Download the entire example:

Name                             Modified     Size

examples_a_generate_mesh.tar.gz 09-Mar-2016 7.1M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxFailureSun Mar 6 00:33:03 201617
last breakTue Mar 31 00:50:00 201522
cmgui-wx-debugFailureSun Mar 6 00:34:56 201620
last breakTue Mar 31 00:52:00 201518
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:43:37 201632
last breakTue Mar 31 01:06:00 201529
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:30 20160
last breakSun Mar 6 00:01:00 20160
cmgui-wx-debugFailureSun Mar 6 00:01:30 20160
last breakSun Mar 6 00:01:00 20160
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:30 20160
last breakSun Mar 6 00:01:00 20160

Testing status by file:


Html last generated: Wed Mar 9 16:02:07 2016

Input last modified: Wed Mar 9 15:49:40 2016


CMISS Help / Examples / a / generate_mesh