Commit f4596ef2 authored by hrchilds's avatar hrchilds

Add support for voxels and pixels to visit_writer.


git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@11784 18c085ea-50e0-402c-830e-de6fd14e8384
parent 9e2be638
......@@ -37,6 +37,7 @@ enhancements and bug-fixes that were added to this release.</p>
<a name="Advanced_Features"></a>
<p><b><font size="4">Advanced features added in version 2.1</font></b></p>
<ul>
<li>The visit_writer library now supports voxels and pixels.</li>
</ul>
<a name="File_format"></a>
......
......@@ -50,7 +50,8 @@ static PyObject *ErrorExc;
static int connectionTypes[][2] = {
{ VISIT_VERTEX, 1 }, { VISIT_LINE, 2 }, { VISIT_TRIANGLE, 3 }, { VISIT_QUAD, 4 },
{ VISIT_TETRA, 4 }, { VISIT_HEXAHEDRON, 8 }, { VISIT_WEDGE, 6 }, { VISIT_PYRAMID, 5 } };
{ VISIT_TETRA, 4 }, { VISIT_HEXAHEDRON, 8 }, { VISIT_WEDGE, 6 }, { VISIT_PYRAMID, 5 },
{ VISIT_PIXEL, 4 }, { VISIT_VOXEL, 8 } };
enum TokenTypes { endOfList = 0, logicalToken, integerToken };
......@@ -544,7 +545,7 @@ static int convertCell( int nCellsDone, PyObject *cellItem, int *cellTypes, int
visItWriterIntegerTokens cellTypeToken[] = {
{ integerToken, VISIT_VERTEX, "vertex" }, { integerToken, VISIT_LINE, "line" }, { integerToken, VISIT_TRIANGLE, "triangle" },
{ integerToken, VISIT_QUAD, "quad" }, { integerToken, VISIT_TETRA, "tetrahedron" }, { integerToken, VISIT_HEXAHEDRON, "hexahedron" },
{ integerToken, VISIT_WEDGE, "wedge" }, { integerToken, VISIT_PYRAMID, "pyramid" }, { endOfList, 0, NULL } };
{ integerToken, VISIT_WEDGE, "wedge" }, { integerToken, VISIT_PYRAMID, "pyramid" }, {integerToken, VISIT_PIXEL, "pixel"}, {integerToken, VISIT_VOXEL, "voxel"}, { endOfList, 0, NULL } };
if( ( len = getLength( cellItem, "cellItem" ) ) < 0 ) return( setErrorAndReturnInt( -1, "cell element at index %d of cellTypeConnection", nCellsDone ) );
if( len == 0 ) return( setErrorAndReturnInt( 0, "cell element at index %d of cellTypeConnection is empty", nCellsDone ) );
......@@ -788,6 +789,12 @@ DL_EXPORT( void ) initvisit_writer( void )
member = PyInt_FromLong( VISIT_PYRAMID );
PyModule_AddObject( m, "pyramid", member );
member = PyInt_FromLong( VISIT_PIXEL );
PyModule_AddObject( m, "pixel", member );
member = PyInt_FromLong( VISIT_VOXEL );
PyModule_AddObject( m, "voxel", member );
member = PyString_FromString( version );
PyModule_AddObject( m, "version", member );
}
......@@ -84,8 +84,10 @@ static char visItWriterInitDoc[] =
" visit_writer.line | 'line' , 2\n"
" visit_writer.triangle | 'triangle' , 3\n"
" visit_writer.quad | 'quad' , 4\n"
" visit_writer.pixel | 'pixel' , 4\n"
" visit_writer.tetrahedron | 'tetrahedron' , 4\n"
" visit_writer.hexahedron | 'hexahedron' , 8\n"
" visit_writer.voxel | 'voxel' , 8\n"
" visit_writer.wedge | 'wedge' , 6\n"
" visit_writer.pyramid | 'pyramid' , 5\n"
"\n"
......
......@@ -722,6 +722,11 @@ void write_point_mesh(const char *filename, int ub, int npts, float *pts,
* Programmer: Hank Childs
* Creation: September 3, 2004
*
* Modifications:
*
* Hank Childs, Mon Jun 28 12:19:25 PDT 2010
* Support for pixels and voxels.
*
* ************************************************************************* */
static int num_points_for_cell(int celltype)
......@@ -741,12 +746,18 @@ static int num_points_for_cell(int celltype)
case VISIT_QUAD:
npts = 4;
break;
case VISIT_PIXEL:
npts = 4;
break;
case VISIT_TETRA:
npts = 4;
break;
case VISIT_HEXAHEDRON:
npts = 8;
break;
case VISIT_VOXEL:
npts = 8;
break;
case VISIT_WEDGE:
npts = 6;
break;
......
......@@ -162,12 +162,19 @@ void write_point_mesh(const char *filename, int useBinary, int npts,
// Programmer: Hank Childs
// Creation: September 2, 2004
//
// Modifications:
//
// Hank Childs, Mon Jun 28 11:49:41 PDT 2010
// Add pixel and voxel.
//
// ***************************************************************************/
#define VISIT_VERTEX 1
#define VISIT_LINE 3
#define VISIT_TRIANGLE 5
#define VISIT_PIXEL 8
#define VISIT_QUAD 9
#define VISIT_VOXEL 11
#define VISIT_TETRA 10
#define VISIT_HEXAHEDRON 12
#define VISIT_WEDGE 13
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment