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