25{
26 TCLAP::CmdLine cmd(
27 "Converts OGS geometry file into another file format. "
28 "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) "
29 "formats are supported.\n\n"
30 "OpenGeoSys-6 software, version " +
32 ".\n"
33 "Copyright (c) 2012-2025, OpenGeoSys Community "
34 "(http://www.opengeosys.org)",
36 TCLAP::ValueArg<std::string> argInputFileName(
37 "i", "input-file",
38 "Input (.gml|.gli). The name of the geometry file to be converted",
39 true, "", "INPUT_FILE");
40 cmd.add(argInputFileName);
41 TCLAP::ValueArg<std::string> argOutputFileName(
42 "o", "output-file",
43 "Output. The name of the new geometry file whose file format is "
44 "guessed from "
45 "its file extension",
46 true, "", "OUTPUT_FILE");
47 cmd.add(argOutputFileName);
48
49 TCLAP::ValueArg<std::string> gmsh_path_arg(
50 "g", "gmsh-path", "Input (.msh). The path to the gmsh binary file",
51 false, "", "INPUT_FILE");
52 cmd.add(gmsh_path_arg);
54 cmd.add(log_level_arg);
55 cmd.parse(argc, argv);
56
59
62 gmsh_path_arg.getValue());
64 assert(geo_names.size() == 1);
65
67 argOutputFileName.getValue());
68
69 return EXIT_SUCCESS;
70}
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
TCLAP::ValueArg< std::string > makeLogLevelArg()
void initOGSLogger(std::string const &log_level)
void readGeometryFromFile(std::string const &fname, GeoLib::GEOObjects &geo_objs, std::string const &gmsh_path)
void writeGeometryToFile(std::string const &geo_name, GeoLib::GEOObjects &geo_objs, std::string const &fname)
GITINFOLIB_EXPORT const std::string ogs_version