32 const char*
OperationNames[] = {
"atomic_pillow",
"face_open_collapse",
"face_shrink",
"chord_push",
33 "triple_chord_push",
"triple_hex_push",
"undefined" };
35 int main(
int argc,
char** argv )
38 const char* extensions[] = {
".g",
".h5m",
".vtk" };
41 std::vector< OperationType > op_types;
45 std::cout <<
"Usage: " << argv[0] <<
" [-h5m] [-vtk] {-ap | -foc | -fs | -cp | -tcp | -thp}" << std::endl;
50 while( current_arg < argc )
52 if( !strcmp(
"-g", argv[current_arg] ) )
54 else if( !strcmp(
"-h5m", argv[current_arg] ) )
56 else if( !strcmp(
"-vtk", argv[current_arg] ) )
58 else if( !strcmp(
"-ap", argv[current_arg] ) )
60 else if( !strcmp(
"-foc", argv[current_arg] ) )
62 else if( !strcmp(
"-fs", argv[current_arg] ) )
64 else if( !strcmp(
"-cp", argv[current_arg] ) )
66 else if( !strcmp(
"-tcp", argv[current_arg] ) )
68 else if( !strcmp(
"-thp", argv[current_arg] ) )
75 for( std::vector< OperationType >::iterator vit = op_types.begin(); vit != op_types.end(); ++vit )
104 std::cout <<
"Operation undefined." << std::endl;
107 if(
MB_SUCCESS != tmp_result ) result = tmp_result;
111 filename.append( extensions[file_exten] );
113 if(
MB_SUCCESS != tmp_result ) result = tmp_result;
123 double vtx_coord[] = { 1.0, 1.0, 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0,
124 .75, .75, 1.0, .75, .25, 1.0, .25, .25, 1.0, .25, .75, 1.0 };
126 int connect[] = { 0, 1, 2, 3, 4, 5, 6, 7, 4, 5, 6, 7, 0, 1, 2, 3 };
131 for(
int i = 0; i < 8; i++ )
140 for(
int i = 0; i < 8; i++ )
141 conn[i] = vtx_handles[connect[i]];
145 for(
int i = 0; i < 8; i++ )
146 conn[i] = vtx_handles[connect[8 + i]];
151 for(
int i = 0; i < 4; i++ )
152 conn[i] = vtx_handles[connect[i]];
173 double vtx_coord[] = { 1.0, 1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0,
174 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 1.0, 1.0, 2.0, 1.0, 0.0, 2.0, 0.0, 0.0,
175 2.0, 0.0, 1.0, 2.0, .75, .75, 1.0, .75, .25, 1.0, .25, .25, 1.0, .25, .75, 1.0 };
177 int connect[] = { 3, 7, 11, 15, 0, 4, 8, 12, 0, 4, 8, 12, 1, 5, 9, 13, 1, 5, 9, 13, 2, 6, 10, 14,
178 2, 6, 10, 14, 3, 7, 11, 15, 0, 3, 2, 1, 12, 15, 14, 13, 12, 15, 14, 13, 8, 11, 10, 9 };
183 for(
int i = 0; i < 16; i++ )
192 for(
int j = 0; j < 6; j++ )
194 for(
int i = 0; i < 8; i++ )
195 conn[i] = vtx_handles[connect[j * 8 + i]];
213 double vtx_coord[] = {
214 0.0, 0.0, 0.5, 0.0, 1.0, 0.0, -1.0, 0.5, 0.0, -1.0, -0.5, 0.0, 0.0, -1.0, 0.0, 1.0, -0.5,
217 0.0, 0.0, -1.5, 0.0, 1.0, -1.0, -1.0, 0.5, -1.0, -1.0, -0.5, -1.0, 0.0, -1.0, -1.0, 1.0,
218 -0.5, -1.0, 1.0, 0.5, -1.0,
220 0.0, -.333, 0.05, 0.0, -.667, 0.10 };
224 0, 2, 1, 6, 7, 9, 8, 13,
226 0, 4, 3, 2, 7, 11, 10, 9,
228 6, 5, 4, 0, 13, 12, 11, 7,
230 2, 0, 4, 3, 14, 6, 5, 15,
232 2, 14, 15, 3, 0, 6, 5, 4,
234 2, 0, 4, 3, 6, 5, 4, 0,
244 for(
int i = 0; i < 16; i++ )
253 for(
int i = 0; i < 5; i++ )
255 for(
int j = 0; j < 8; j++ )
256 conn[j] = vtx_handles[connect[8 * i + j]];
262 for(
int i = 0; i < 2; i++ )
264 for(
int j = 0; j < 4; j++ )
265 conn[j] = vtx_handles[connect[40 + 4 * i + j]];
271 for(
int i = 0; i < 2; i++ )
273 for(
int j = 0; j < 4; j++ )
274 conn[j] = vtx_handles[connect[40 + 4 * i + j]];
280 for(
int i = 0; i < 2; i++ )
282 for(
int j = 0; j < 2; j++ )
283 conn[j] = vtx_handles[connect[48 + j]];
289 for(
int j = 0; j < 4; j++ )
290 conn[j] = vtx_handles[connect[50 + j]];
340 double vtx_coord[] = {
341 0.0, 0.0, 0.5, 0.0, 1.0, 0.0, -1.0, 0.5, 0.0, -1.0, -0.5, 0.0, 0.0, -1.0, 0.0, 1.0, -0.5,
344 0.0, 0.0, -1.5, 0.0, 1.0, -1.0, -1.0, 0.5, -1.0, -1.0, -0.5, -1.0, 0.0, -1.0, -1.0, 1.0,
345 -0.5, -1.0, 1.0, 0.5, -1.0,
347 0.0, 0.0, -0.25, 0.0, 0.0, 0.0 };
351 14, 2, 1, 6, 7, 9, 8, 13,
353 14, 4, 3, 2, 7, 11, 10, 9,
355 6, 5, 4, 14, 13, 12, 11, 7,
357 0, 4, 3, 2, 6, 5, 15, 1,
359 2, 1, 15, 3, 14, 6, 5, 4 };
364 for(
int i = 0; i < 16; i++ )
373 for(
int i = 0; i < 5; i++ )
375 for(
int j = 0; j < 8; j++ )
376 conn[j] = vtx_handles[connect[8 * i + j]];