29int main(
int argc,
char* argv[])
32 "Converts TIN file into VTU file.\n\n"
33 "OpenGeoSys-6 software, version " +
36 "Copyright (c) 2012-2026, OpenGeoSys Community "
37 "(http://www.opengeosys.org)",
39 TCLAP::ValueArg<std::string> inArg(
"i",
"input-tin-file",
40 "Input (.tin). The name "
42 "containing the input TIN ",
43 true,
"",
"INPUT_FILE");
45 TCLAP::ValueArg<std::string> outArg(
46 "o",
"output-vtu-file",
47 "Output (.vtu). The name of the output file "
48 "the mesh will be written to",
49 true,
"",
"OUTPUT_FILE");
52 cmd.add(log_level_arg);
53 cmd.parse(argc, argv);
58 INFO(
"reading the TIN file...");
59 const std::string tinFileName(inArg.getValue());
60 std::string point_vec_name{
"SurfacePoints"};
63 std::unique_ptr<GeoLib::Surface> sfc(
69 INFO(
"TIN read: {:d} points, {:d} triangles", point_vec.
size(),
70 sfc->getNumberOfTriangles());
72 INFO(
"converting to mesh data");
75 std::numeric_limits<double>::epsilon()));
76 INFO(
"Mesh created: {:d} nodes, {:d} elements.", mesh->getNumberOfNodes(),
77 mesh->getNumberOfElements());
79 INFO(
"Write it into VTU");