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++ )
139 for(
int i = 0; i < 8; i++ )
140 conn[i] = vtx_handles[connect[i]];
143 for(
int i = 0; i < 8; i++ )
144 conn[i] = vtx_handles[connect[8 + i]];
148 for(
int i = 0; i < 4; i++ )
149 conn[i] = vtx_handles[connect[i]];
166 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,
167 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,
168 2.0, 0.0, 1.0, 2.0, .75, .75, 1.0, .75, .25, 1.0, .25, .25, 1.0, .25, .75, 1.0 };
170 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,
171 2, 6, 10, 14, 3, 7, 11, 15, 0, 3, 2, 1, 12, 15, 14, 13, 12, 15, 14, 13, 8, 11, 10, 9 };
176 for(
int i = 0; i < 16; i++ )
184 for(
int j = 0; j < 6; j++ )
186 for(
int i = 0; i < 8; i++ )
187 conn[i] = vtx_handles[connect[j * 8 + i]];
204 double vtx_coord[] = {
205 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,
208 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,
209 -0.5, -1.0, 1.0, 0.5, -1.0,
211 0.0, -.333, 0.05, 0.0, -.667, 0.10 };
215 0, 2, 1, 6, 7, 9, 8, 13,
217 0, 4, 3, 2, 7, 11, 10, 9,
219 6, 5, 4, 0, 13, 12, 11, 7,
221 2, 0, 4, 3, 14, 6, 5, 15,
223 2, 14, 15, 3, 0, 6, 5, 4,
225 2, 0, 4, 3, 6, 5, 4, 0,
235 for(
int i = 0; i < 16; i++ )
243 for(
int i = 0; i < 5; i++ )
245 for(
int j = 0; j < 8; j++ )
246 conn[j] = vtx_handles[connect[8 * i + j]];
251 for(
int i = 0; i < 2; i++ )
253 for(
int j = 0; j < 4; j++ )
254 conn[j] = vtx_handles[connect[40 + 4 * i + j]];
259 for(
int i = 0; i < 2; i++ )
261 for(
int j = 0; j < 4; j++ )
262 conn[j] = vtx_handles[connect[40 + 4 * i + j]];
267 for(
int i = 0; i < 2; i++ )
269 for(
int j = 0; j < 2; j++ )
270 conn[j] = vtx_handles[connect[48 + j]];
275 for(
int j = 0; j < 4; j++ )
276 conn[j] = vtx_handles[connect[50 + j]];
313 double vtx_coord[] = {
314 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,
317 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,
318 -0.5, -1.0, 1.0, 0.5, -1.0,
320 0.0, 0.0, -0.25, 0.0, 0.0, 0.0 };
324 14, 2, 1, 6, 7, 9, 8, 13,
326 14, 4, 3, 2, 7, 11, 10, 9,
328 6, 5, 4, 14, 13, 12, 11, 7,
330 0, 4, 3, 2, 6, 5, 15, 1,
332 2, 1, 15, 3, 14, 6, 5, 4 };
337 for(
int i = 0; i < 16; i++ )
345 for(
int i = 0; i < 5; i++ )
347 for(
int j = 0; j < 8; j++ )
348 conn[j] = vtx_handles[connect[8 * i + j]];