10 #include <tclap/CmdLine.h>
20 int main(
int argc,
char* argv[])
23 "Converts OGS geometry file into another file format. "
24 "Currently *.gml (OGS6 XML-based format) and *.gli (OGS5 format) "
25 "formats are supported.\n\n"
26 "OpenGeoSys-6 software, version " +
29 "Copyright (c) 2012-2021, OpenGeoSys Community "
30 "(http://www.opengeosys.org)",
32 TCLAP::ValueArg<std::string> argInputFileName(
33 "i",
"input-file",
"the name of the geometry file to be converted",
34 true,
"",
"file name");
35 cmd.add(argInputFileName);
36 TCLAP::ValueArg<std::string> argOutputFileName(
38 "the name of the new geometry file whose file format is guessed from "
40 true,
"",
"file name");
41 cmd.add(argOutputFileName);
43 TCLAP::ValueArg<std::string> gmsh_path_arg(
"g",
"gmsh-path",
44 "the path to the gmsh binary",
45 false,
"",
"path as string");
46 cmd.add(gmsh_path_arg);
47 cmd.parse(argc, argv);
51 gmsh_path_arg.getValue());
53 assert(geo_names.size() == 1);
56 argOutputFileName.getValue());
Definition of the GEOObjects class.
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
int main(int argc, char *argv[])
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