== Import and Render a 3-D Mesh with Fibers == [[TableOfContents(3)]] === Description === * This example reads the nodal parameters and element connectivity of a rabbit ventricular mesh and renders the elements, surfaces and fibers. * The nodal coordinates and element connectivities are read from tab-delimited spreadsheets. * The steps below are saved in a script that can be found in the examples directory on your Continuity client `.../continuity/pcty/examples/mesh07/renderFibers.py.py` which can be executed automatically with [:Continuity/Documentation/Help/ReadPythonScript:File→Read→Python script] === Start Continuity === * Launch the Continuity Client * On the [:Continuity/Documentation/Help/HelpAboutContinuity:About Continuity startup screen] * leave the '''mesh''' checkbox checked under `Use Modules:` * Click '''OK''' === Set up coordinate system and basis functions === * [:Continuity/Documentation/Help/MeshEditCoordinates:Mesh→Edit→Coordinates...] * Select '''rectangular cartesian''' in the `Global Coordinates:` pop-up menu * Click '''OK''' to submit `Coordinate Form` * [:Continuity/Documentation/Help/MeshEditBasis:Mesh→Edit→Basis...] * Choose '''Hermite Basis Function→3D→Cubic-Cubic-Cubic''' * Click '''Add Cubic-Cubic-Cubic''' * Verify that the list of basis functions now contains: * Cubic-Cubic-Cubic Hermite 3*3*3 * Cubic-Cubic Hermite 3*3 * Click '''OK''' to submit `Basis Form` === Read nodal parameters and elements === * [:Continuity/Documentation/Help/MeshEditNodes:Mesh→Edit→Nodes...] * Click '''Import/Export/Graph''' button to open [:Continuity/Documentation/Help/TableManager:Continuity Table Manager] * [:Continuity/Documentation/Help/TableManager#FileMenu:Continuity Table Manager→File→Open...] * Select tab-delimited nodes file (attachment:nodes.xls) * [:Continuity/Documentation/Help/TableManager#FileMenu:Continuity Table Manager→File→Close and update form] * You should now have nodes numbered 1-100 * Click '''OK''' to submit `Node Form` * [:Continuity/Documentation/Help/MeshEditElements:Mesh→Edit→Elements...] * Click '''Import/Export''' button to open [:Continuity/Documentation/Help/TableManager:Continuity Table Manager] * [:Continuity/Documentation/Help/TableManager#FileMenu:Continuity Table Manager→File→Open...] * Select tab-delimited elements file (attachment:elems.xls) * [:Continuity/Documentation/Help/TableManager#FileMenu:Continuity Table Manager→File→Close and update form] * You should now have 48 elements * Click '''OK''' to submit `Element Form` === Calculate and render mesh === * [:Continuity/Documentation/Help/MeshRenderNodes:Mesh→Render→Nodes...] * [:Continuity/Documentation/Help/ViewShowOpenMesh:View→Show Open Mesh...] * Click on '''nodes1''' in the list on the left * Click on the '''Properties''' tab * For `Size`, enter '''0.1''' and hit '''Enter''' * Close the `Open Mesh Controls` form * The mesh should look similar to the image below. attachment:tut-mesh-4-1.png * [:Continuity/Documentation/Help/MeshRenderElements:Mesh→Render→Elements...] * Click the '''lines''' radio button * Click '''Render''' to display mesh wireframe * The mesh should now look similar to the image below. attachment:tut-mesh-4-2.png * [:Continuity/Documentation/Help/MeshRenderElements:Mesh→Render→Elements...] * Click the '''surfaces''' radio button * Click '''Render''' to display mesh surfaces * The mesh should now look similar to the image below. attachment:tut-mesh-4-3.png * [:Continuity/Documentation/Help/MeshEditMaterialCoordinates:Mesh→Edit→Material Coordinates...] * Click on the '''OK''' Button * [:Continuity/Documentation/Help/FileSend:File→Send] * [:Continuity/Documentation/Help/MeshRenderFibers:Mesh→Render→Fibers...] * Click '''OK''' to render fiber vectors * You can change the size of the fiber vectors from View→Show Open Mesh→material axes3→Properties tab→Size * The mesh should now look similar to these last screenshots, viewed from different angles. attachment:tut-mesh-4-4.png attachment:tut-mesh-4-5.png === Pre-built model === This cont6 file contains all data and parameters for this problem: attachment:mesh4.cont6