This example shows transfering data between CM and CMGUI. The object, consisting of eight elements, is defined in the FEM environment and exported to cmgui to be viewed. Note: cmiss is both cm and cmgui.
# This example shows transfering files between CM and CMGUI. The object, # consisting of eight elements, is defined in the FEM environment # and then exported to cmgui to be viewed. # Note: cmiss is both cm and cmgui. # First set up the FEM environment. fem # Next define rectangular cartesian coordinates in 3D. fem def coord;r;cheese;example # Define a bicubic linear basis function and face basis functions. # (xi 1 and xi 2 directions are cubic Hermite, while xi 3 is linear). fem def bas;r;cheese;example # Define 32 nodes and specify derivatives. fem def node;r;cheese;example # define eight elements. fem def ele;r;cheese;example # Define viewing windows in all three directions. fem def win on xz fem def win on yz fem def win on xy # Draw axes,lines and nodes. fem draw axes fem draw lines fem draw nodes # Viewing a 3D object with a series of fixed 2D views can be tricky. # CMGUI lets you change the viewing direction, making it easier to # interpret the object. To do this, the nodes and elements have to # be exported so it can be read into the GFX environment. # The "as" operator lets you name the object before it is exported. # The name after the ";" is the name of the exported file, while the # extention is set depending on whether it is a node or element being # exported. the files created by the following commands are: # cheese.exnode and cheese.exelem respectively. fem export node;cheese as cheese fem export elem;cheese as cheese # Now set up the GFX environment. gfx # Read in nodes and elements. gfx read node example cheese.exnode gfx read elem example cheese.exelem # Now create materials. axes will be used for the axes, while cheese # will be used on the surface of the object. gfx create material axes ambient 0 0 1 diffuse 0 0 1 gfx create material cheese ambient 1 1 0 diffuse 1 1 0 specular 1 0 0 # # Draw axes. gfx create axes material axes length 0.4 gfx draw axes # # Create viewing window. gfx create window # The curved lines in the view aren't very smooth. Change the element # discretisation to be 8 in the xi 1 and xi 2 directions and one in # the xi 3 direction. gfx modify g_element cheese gen element_discretization "8*8*1" # To view the fixed 2D views as in the FEM environment, with the # GFX view, change the layout from simple to free_ortho. # This can be done by clicking with the mouse on the layout button in # the CMGUI graphics window, or by entering the following command. gfx mod win 1 layout free_ortho # The top left window is the view which can be changed, while the other # three views are the fixed 2D views seen in the FEM environment. # Now change back to the initial layout. gfx mod win 1 layout simple # Now give the object a cheese-coloured surface. gfx modify g_element cheese surface material cheese # finally hide the element lines, to view the cheesil. gfx modify g_element cheese lines invisible
Name Modified Size
example_ag.com 20-Apr-2012 2.8k COPYRIGHT 19-Apr-2012 504 cheese.exelem 20-Apr-2012 15k cheese.exnode 20-Apr-2012 10k cheese.ipbase 20-Apr-2012 6.0k cheese.ipcoor 20-Apr-2012 597 cheese.ipelem 20-Apr-2012 2.9k cheese.ipnode 20-Apr-2012 29k
Name Modified Size
examples_a_backup_ag.tar.gz 12-Aug-2014 76k
Status | Tested | Real time (s) | |
i686-linux | |||
cmgui-wx | Success | Sun Mar 6 00:06:16 2016 | 1 |
cmgui-wx-debug | Success | Sun Mar 6 00:06:16 2016 | 0 |
cmgui-wx-debug-memorycheck | Success | Sun Mar 6 00:06:17 2016 | 1 |
cmgui-wx-debug-valgrind | Success | Sun Mar 6 00:27:11 2016 | 14 |
x86_64-linux | |||
cmgui-wx | Success | Thu Jan 7 00:01:24 2016 | 0 |
cmgui-wx-debug | Success | Thu Jan 7 00:01:24 2016 | 0 |
cmgui-wx-debug-memorycheck | Success | Thu Jan 7 00:01:24 2016 | 0 |
cmgui-wx-debug-valgrind | Success | Thu Jan 7 00:03:47 2016 | 12 |
cmgui-wx-gcc-cad-debug-valgrind | Success | Thu Jan 7 00:02:44 2016 | 10 |
i686-linux | |||
Success | cmgui-wx: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug-memorycheck: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug-valgrind: | cmiss_test.log.retain. | |
x86_64-linux | |||
Success | cmgui-wx: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug-memorycheck: | cmiss_test.log.retain. | |
Success | cmgui-wx-debug-valgrind: | cmiss_test.log.retain. |
Html last generated: Sun Mar 6 05:50:51 2016
Input last modified: Fri Apr 20 15:56:07 2012