RINGMesh  Version 5.0.0
A programming library for geological model meshes
command_line.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2012-2017, Association Scientifique pour la Geologie et ses
3  * Applications (ASGA). All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are met:
7  * * Redistributions of source code must retain the above copyright
8  * notice, this list of conditions and the following disclaimer.
9  * * Redistributions in binary form must reproduce the above copyright
10  * notice, this list of conditions and the following disclaimer in the
11  * documentation and/or other materials provided with the distribution.
12  * * Neither the name of ASGA nor the
13  * names of its contributors may be used to endorse or promote products
14  * derived from this software without specific prior written permission.
15  *
16  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
18  * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19  * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ASGA BE LIABLE FOR ANY DIRECT,
20  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26  *
27  * http://www.ring-team.org
28  *
29  * RING Project
30  * Ecole Nationale Superieure de Geologie - GeoRessources
31  * 2 Rue du Doyen Marcel Roubault - TSA 70605
32  * 54518 VANDOEUVRE-LES-NANCY
33  * FRANCE
34  */
35 
42 
43 #include <geogram/basic/command_line.h>
44 #include <geogram/basic/command_line_args.h>
45 #include <geogram/basic/file_system.h>
46 
47 namespace RINGMesh
48 {
49  namespace CmdLine
50  {
52  {
53  GEO::CmdLine::declare_arg( "epsilon", 1e-7,
54  "Threshold for numerical precision (ratio of the bbox "
55  "diagonal)",
56  GEO::CmdLine::ARG_ADVANCED );
57  GEO::CmdLine::declare_arg( "validity_save", false,
58  "Saves meshes representing geomodel inconsistencies",
59  GEO::CmdLine::ARG_ADVANCED );
60  GEO::CmdLine::declare_arg( "validity_directory",
61  GEO::FileSystem::get_current_working_directory(),
62  "Directory to save meshes representing geomodel "
63  "inconsistencies",
64  GEO::CmdLine::ARG_ADVANCED );
65  }
66 
68  {
69  GEO::CmdLine::declare_arg_group( "in", "Input data" );
70  GEO::CmdLine::declare_arg(
71  "in:geomodel", "", "Filename of the input geological model" );
72  GEO::CmdLine::declare_arg( "in:intersection_check", true,
73  "Toggle the surface intersection check at loading",
74  GEO::CmdLine::ARG_ADVANCED );
75  GEO::CmdLine::declare_arg(
76  "in:wells", "", "Filename of the input wells" );
77  }
78 
80  {
81  GEO::CmdLine::declare_arg_group( "out", "Output data" );
82  GEO::CmdLine::declare_arg(
83  "out:geomodel", "", "Saves the geological model" );
84  }
85 
86  bool import_arg_group( const std::string& name )
87  {
88  if( name == "global" )
89  {
91  }
92  else if( name == "in" )
93  {
95  }
96  else if( name == "out" )
97  {
99  }
100  else
101  {
102  return GEO::CmdLine::import_arg_group( name );
103  }
104  return true;
105  }
106 
107  } // namespace CmdLine
108 
109 } // namespace RINGMesh
bool RINGMESH_API import_arg_group(const std::string &name)
void import_arg_group_out()
void import_arg_group_global()
Classes to build GeoModel from various inputs.
Definition: algorithm.h:48
void import_arg_group_in()