12#include <tclap/CmdLine.h>
26int main(
int argc,
char* argv[])
29 "Maps geometric objects to the surface of a given mesh. "
30 "The documentation is available at "
31 "https://docs.opengeosys.org/docs/tools/model-preparation/"
32 "map-geometric-object-to-the-surface-of-a-mesh.\n\n"
33 "OpenGeoSys-6 software, version " +
36 "Copyright (c) 2012-2024, OpenGeoSys Community "
37 "(http://www.opengeosys.org)",
39 TCLAP::ValueArg<std::string> mesh_in(
40 "m",
"mesh-file",
"the name of the file containing the mesh",
true,
"",
43 TCLAP::ValueArg<std::string> input_geometry_fname(
44 "i",
"input-geometry",
45 "the name of the file containing the input geometry",
true,
"",
47 cmd.add(input_geometry_fname);
48 TCLAP::SwitchArg additional_insert_mapping(
49 "a",
"additional-insert-mapping",
50 "Advanced mapping algorithm will be applied, i.e. a new geometry will "
51 "be created and possibly new points will be inserted.");
52 cmd.add(additional_insert_mapping);
53 TCLAP::ValueArg<std::string> output_geometry_fname(
54 "o",
"output-geometry",
55 "the name of the file containing the input geometry",
true,
"",
57 cmd.add(output_geometry_fname);
58 cmd.parse(argc, argv);
66 if (xml_io.
readFile(input_geometry_fname.getValue()))
68 INFO(
"Read geometry from file '{:s}'.",
69 input_geometry_fname.getValue());
83 mesh_in.getValue(),
true ));
85 if (additional_insert_mapping.getValue())
98 output_geometry_fname.getValue());
Definition of the BoostXmlGmlInterface class.
Definition of the GEOObjects class.
Definition of the GeoMapper class.
void INFO(fmt::format_string< Args... > fmt, Args &&... args)
int main(int argc, char *argv[])
Definition of the Mesh class.
std::string writeToString()
Writes the object to a string.
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
bool readFile(const std::string &fname) override
Reads an xml-file containing OGS geometry.
int writeStringToFile(std::string_view content, std::filesystem::path const &file_path)
GITINFOLIB_EXPORT const std::string ogs_version
MeshLib::Mesh * readMeshFromFile(const std::string &file_name, bool const compute_element_neighbors)
Definition of readMeshFromFile function.