#include <iostream>
#include <cassert>
#include "moab/Core.hpp"
#include "quads_to_tris.hpp"
Go to the source code of this file.
◆ MBI
◆ main()
int main |
( |
int |
argc, |
|
|
char ** |
argv |
|
) |
| |
Definition at line 14 of file quads_to_tris_driver.cpp.
15 {
16
17 if( 2 > argc )
18 {
19 std::cout << "Need name of input file with quads." << std::endl;
20 return 0;
21 }
22
23
24 ErrorCode result;
25 std::string filename = argv[1];
26 result = MBI->load_file( filename.c_str() );
27 if( MB_SUCCESS != result )
28 {
29 std::cout << "Error reading file." << std::endl;
30 return 1;
31 }
32
33 result = quads_to_tris( MBI, 0 );
34 if( MB_SUCCESS != result )
35 {
36 std::cout << "Error converting to tris." << std::endl;
37 return 1;
38 }
39
40
41
42 int len1 = filename.length();
43 filename.erase( len1 - 4 );
44 std::string filename_new = filename + "_tris.h5m";
45 result = MBI->write_mesh( filename_new.c_str() );
46 assert( MB_SUCCESS == result );
47
48 return 0;
49 }
References ErrorCode, MB_SUCCESS, MBI, and quads_to_tris().
◆ mb_instance()