18{
19 TCLAP::CmdLine cmd(
20 "Converts OGS geometry file into another file format. "
21 "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) "
22 "formats are supported.\n\n"
23 "OpenGeoSys-6 software, version " +
25 ".\n"
26 "Copyright (c) 2012-2026, OpenGeoSys Community "
27 "(http://www.opengeosys.org)",
29 TCLAP::ValueArg<std::string> argInputFileName(
30 "i", "input-file",
31 "Input (.gml|.gli). The name of the geometry file to be converted",
32 true, "", "INPUT_FILE");
33 cmd.add(argInputFileName);
34 TCLAP::ValueArg<std::string> argOutputFileName(
35 "o", "output-file",
36 "Output. The name of the new geometry file whose file format is "
37 "guessed from "
38 "its file extension",
39 true, "", "OUTPUT_FILE");
40 cmd.add(argOutputFileName);
41
42 TCLAP::ValueArg<std::string> gmsh_path_arg(
43 "g", "gmsh-path", "Input (.msh). The path to the gmsh binary file",
44 false, "", "INPUT_FILE");
45 cmd.add(gmsh_path_arg);
47 cmd.add(log_level_arg);
48 cmd.parse(argc, argv);
49
52
55 gmsh_path_arg.getValue());
57 assert(geo_names.size() == 1);
58
60 argOutputFileName.getValue());
61
62 return EXIT_SUCCESS;
63}
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