25int main(
int argc,
char* argv[])
28 "Reads a Gocad stratigraphic grid file (file ending sg) and writes the "
29 "data in the vtk unstructured grid file format. The documentation is "
31 "https://www.opengeosys.org/docs/tools/meshing/gocadsgridreader/."
34 "software, version " +
37 "Copyright (c) 2012-2026, OpenGeoSys Community "
38 "(http://www.opengeosys.org)",
41 TCLAP::SwitchArg face_set_arg(
"f",
"generate-face-sets",
42 "Generate face sets.");
43 cmd.add(face_set_arg);
45 TCLAP::ValueArg<std::string> mesh_output_arg(
46 "o",
"output-mesh",
"Output (.vtu). Unstructured grid filename",
true,
48 cmd.add(mesh_output_arg);
50 TCLAP::ValueArg<std::string> sg_file_arg(
51 "s",
"sg",
"Input (.sg). Gocad stratigraphic grid filename",
true,
"",
55 cmd.add(log_level_arg);
57 cmd.parse(argc, argv);
63 INFO(
"Start reading Gocad SGrid.");
65 INFO(
"End reading Gocad SGrid.");
67 if (face_set_arg.getValue())
69 INFO(
"Generating a mesh for every face set.");
74 std::unique_ptr<MeshLib::Mesh> mesh(reader.
getMesh());
77 INFO(
"Writing mesh to '{:s}'.", mesh_output_arg.getValue());