36 #include <ringmesh/ringmesh_tests_config.h> 41 #include <geogram/basic/command_line.h> 42 #include <geogram/basic/logger.h> 46 #ifdef RINGMESH_TEST_GRAPHICS 48 #include <geogram/basic/process.h> 58 void open_viewer_load_geomodel_then_close(
59 const int argc,
char** argv,
const std::string& glup_profile )
61 RINGMeshApplication app( argc, argv );
63 GEO::CmdLine::set_arg(
"GLUP_profile", glup_profile );
67 std::future< void > start =
68 std::async( std::launch::async, &RINGMeshApplication::start, &app );
69 std::this_thread::sleep_for( std::chrono::seconds( 3 ) );
70 std::future< void > end =
71 std::async( std::launch::async, &RINGMeshApplication::quit, &app );
81 char ringmesh_view[] =
"ringmesh-view";
82 std::string input_model_file_name( ringmesh_test_data_path );
83 input_model_file_name +=
"modelA6.ml";
84 char* input_model = &input_model_file_name[0];
86 char* argv[2] = { ringmesh_view, input_model };
91 std::vector< std::string > GLUP_profiles( 1,
"" );
92 GLUP_profiles[0] =
"auto";
97 for(
const std::string& profile : GLUP_profiles )
99 open_viewer_load_geomodel_then_close( argc, argv, profile );
107 catch(
const std::exception& e )
123 "To test RINGMesh viewer you need to configure ",
124 "the project with the RINGMESH_TEST_GRAPHICS option ON" );
static void err(const std::string &feature, const Args &... args)
static void out(const std::string &feature, const Args &... args)
const std::string & category() const
Classes to build GeoModel from various inputs.
void RINGMESH_API default_configure()