Example a_backup/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_backup/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 20-Apr-2012 1.3k COPYRIGHT 20-Apr-2012 504 torso.exregion 20-Apr-2012 159k

Download the entire example:

Name                                    Modified     Size

examples_a_backup_generate_mesh.tar.gz 12-Aug-2014 5.9M

Testing status by version:

StatusTestedReal time (s)
i686-linux
cmgui-wxSuccessSun Mar 6 00:30:59 201617
cmgui-wx-debugSuccessSun Mar 6 00:33:24 201617
cmgui-wx-debug-memorycheckSuccessSun Mar 6 00:45:30 201627
x86_64-linux
cmgui-wxFailureSun Mar 6 00:01:37 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:10:00 201510
cmgui-wx-debugFailureSun Mar 6 00:01:37 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:10:00 201511
cmgui-wx-debug-memorycheckFailureSun Mar 6 00:01:37 20160
last breakSun Mar 6 00:01:00 20160
last successWed Jun 3 00:17:00 201519

Testing status by file:


Html last generated: Sun Mar 6 05:50:57 2016

Input last modified: Fri Apr 20 15:59:17 2012


CMISS Help / Examples / a_backup / generate_mesh