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", "the name of the geometry file to be converted",
36 true, "", "file name");
37 cmd.add(argInputFileName);
38 TCLAP::ValueArg<std::string> argOutputFileName(
39 "o", "output-file",
40 "the name of the new geometry file whose file format is guessed from "
41 "its file extension",
42 true, "", "file name");
43 cmd.add(argOutputFileName);
44
45 TCLAP::ValueArg<std::string> gmsh_path_arg("g", "gmsh-path",
46 "the path to the gmsh binary",
47 false, "", "path as string");
48 cmd.add(gmsh_path_arg);
49 cmd.parse(argc, argv);
50
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.
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