27 "Maps geometric objects to the surface of a given mesh. "
28 "The documentation is available at "
29 "https://docs.opengeosys.org/docs/tools/model-preparation/"
30 "map-geometric-object-to-the-surface-of-a-mesh.\n\n"
31 "OpenGeoSys-6 software, version " +
34 "Copyright (c) 2012-2021, OpenGeoSys Community "
35 "(http://www.opengeosys.org)",
37 TCLAP::ValueArg<std::string> mesh_in(
38 "m",
"mesh-file",
"the name of the file containing the mesh",
true,
"",
41 TCLAP::ValueArg<std::string> input_geometry_fname(
42 "i",
"input-geometry",
43 "the name of the file containing the input geometry",
true,
"",
45 cmd.add(input_geometry_fname);
46 TCLAP::SwitchArg additional_insert_mapping(
47 "a",
"additional-insert-mapping",
48 "Advanced mapping algorithm will be applied, i.e. a new geometry will "
49 "be created and possibly new points will be inserted.");
50 cmd.add(additional_insert_mapping);
51 TCLAP::ValueArg<std::string> output_geometry_fname(
52 "o",
"output-geometry",
53 "the name of the file containing the input geometry",
true,
"",
55 cmd.add(output_geometry_fname);
56 cmd.parse(argc, argv);
62 if (xml_io.readFile(input_geometry_fname.getValue()))
64 INFO(
"Read geometry from file '{:s}'.",
65 input_geometry_fname.getValue());
78 std::unique_ptr<MeshLib::Mesh> mesh(
81 if (additional_insert_mapping.getValue())
83 geo_mapper.advancedMapOnMesh(*mesh);
87 geo_mapper.mapOnMesh(mesh.get());
92 xml_io.export_name = geo_name;
94 output_geometry_fname.getValue());
void INFO(char const *fmt, Args const &... args)
Container class for geometric objects.
std::vector< std::string > getGeometryNames() const
Returns the names of all geometry vectors.
int writeStringToFile(std::string content, std::filesystem::path const &file_path)
GITINFOLIB_EXPORT const std::string ogs_version
MeshLib::Mesh * readMeshFromFile(const std::string &file_name)