36 #include <ringmesh/ringmesh_tests_config.h> 56 std::string input_geomodel3d_file_name =
57 ringmesh_test_data_path +
"seg_overthrust_afault.gm";
59 Logger::out(
"TEST",
"Loading GeoModel3D input file ",
60 input_geomodel3d_file_name );
62 GeoModel3D geomodel3d;
65 GeoModel2D projection_geomodel2d;
67 { 987., 0., 2150. }, { 6300., 10500., -3200. } );
69 projection_geomodel2d, geomodel3d, projection_plane );
70 geomodel2d_builder.build_geomodel();
72 std::vector< std::future< void > > checks;
74 std::async( std::launch::async, [&projection_geomodel2d] {
78 "TEST",
"FAILED : built GeoModel2D is not valid" );
82 std::string output_model_file_name( ringmesh_test_output_path );
83 output_model_file_name +=
84 projection_geomodel2d.name() +
"_saved_out.gm";
85 geomodel_save( projection_geomodel2d, output_model_file_name );
87 GeoModel2D reloaded_geomodel2d;
88 auto is_reloaded_model_valid =
90 if( !is_reloaded_model_valid )
92 std::string output_model_file_name_bis( ringmesh_test_output_path );
93 output_model_file_name_bis +=
94 reloaded_geomodel2d.name() +
"_saved_out_bis.gm";
95 geomodel_save( reloaded_geomodel2d, output_model_file_name_bis );
97 "TEST",
"FAILED : reloaded GeoModel2D is not valid" );
100 for(
auto& check : checks )
110 catch(
const std::exception& e )
Builder of GeoModel2D which project a GeoModel3D onto a plane.
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)
void geomodel_save(const GeoModel< DIMENSION > &geomodel, const std::string &filename)
const std::string & category() const
Classes to build GeoModel from various inputs.
void RINGMESH_API default_configure()