36 #include <ringmesh/ringmesh_tests_config.h> 57 std::string log_file( ringmesh_test_output_path );
58 log_file +=
"log.txt";
59 GEO::FileLogger* file_logger =
new GEO::FileLogger( log_file );
62 std::string file_name( ringmesh_test_data_path );
63 file_name +=
"modelA6.ml";
67 bool loaded_model_is_valid =
geomodel_load( geomodel, file_name );
69 if( !loaded_model_is_valid )
72 "Failed when building model ", geomodel.name(),
73 ": the model is not valid." );
79 tetrahedralize( geomodel,
"MG_Tetra", NO_ID,
false );
81 for( index_t r :
range( geomodel.nb_regions() ) )
83 if( !geomodel.region( r ).is_meshed() )
86 "Failed when tetrahedralize model ", geomodel.name(),
87 " Region ", r,
" is not meshed ",
88 "maybe the MG Tetra Licence can not be reached" );
94 "Failed when tetrahedralize model ", geomodel.name(),
95 ": the model becomes invalid." );
105 catch(
const std::exception& e )
bool is_geomodel_valid(const GeoModel< DIMENSION > &geomodel, ValidityCheckMode validity_check_mode=ValidityCheckMode::ALL)
Check global geomodel validity.
bool geomodel_load(GeoModel< DIMENSION > &geomodel, const std::string &filename)
static void err(const std::string &feature, const Args &... args)
static void out(const std::string &feature, const Args &... args)
static GEO::Logger * instance()
const std::string & category() const
Classes to build GeoModel from various inputs.
void RINGMESH_API default_configure()