Salome HOME
merge from branch V5_1_sizemap tag mergeto_V5_1_main_8oct09
[plugins/ghs3dplugin.git] / src / GHS3DPlugin_Hypothesis_i.hxx
1 //  Copyright (C) 2004-2008  CEA/DEN, EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 //  GHS3DPlugin : C++ implementation
20 // File      : GHS3DPlugin_Hypothesis_i.hxx
21 // Date      : 03/04/2006
22 // Project   : SALOME
23 //
24 #ifndef _GHS3DPlugin_Hypothesis_i_HXX_
25 #define _GHS3DPlugin_Hypothesis_i_HXX_
26
27 #include "GHS3DPlugin_Defs.hxx"
28
29 #include <SALOMEconfig.h>
30 #include CORBA_SERVER_HEADER(GHS3DPlugin_Algorithm)
31
32 #include "SMESH_Hypothesis_i.hxx"
33 #include "GHS3DPlugin_Hypothesis.hxx"
34
35 class SMESH_Gen;
36
37 // GHS3DPlugin parameters hypothesis
38
39 class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i:
40   public virtual POA_GHS3DPlugin::GHS3DPlugin_Hypothesis,
41   public virtual SMESH_Hypothesis_i
42 {
43  public:
44   // Constructor
45   GHS3DPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
46                             int                     theStudyId,
47                             ::SMESH_Gen*            theGenImpl);
48   // Destructor
49   virtual ~GHS3DPlugin_Hypothesis_i();
50
51   /*!
52    * To mesh "holes" in a solid or not. Default is to mesh.
53    */
54   void SetToMeshHoles(CORBA::Boolean toMesh);
55   CORBA::Boolean GetToMeshHoles();
56   /*!
57    * Maximal size of memory to be used by the algorithm (in Megabytes)
58    */
59   void SetMaximumMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
60   CORBA::Short GetMaximumMemory();
61   /*!
62    * Initial size of memory to be used by the algorithm (in Megabytes) in
63    * automatic memory adjustment mode. Default is zero
64    */
65   void SetInitialMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
66   CORBA::Short GetInitialMemory();
67   /*!
68    * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
69    */
70   void SetOptimizationLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
71   CORBA::Short GetOptimizationLevel();
72   /*!
73    * Path to working directory
74    */
75   void SetWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception );
76   char* GetWorkingDirectory();
77   /*!
78    * To keep working files or remove them. Log file remains in case of errors anyway.
79    */
80   void SetKeepFiles(CORBA::Boolean toKeep);
81   CORBA::Boolean GetKeepFiles();
82   /*!
83    * Verbose level [0-10]
84    *  0 - no standard output,
85    *  2 - prints the data, quality statistics of the skin and final meshes and
86    *     indicates when the final mesh is being saved. In addition the software
87    *     gives indication regarding the CPU time.
88    * 10 - same as 2 plus the main steps in the computation, quality statistics
89    *     histogram of the skin mesh, quality statistics histogram together with
90    *     the characteristics of the final mesh.
91    */
92   void SetVerboseLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
93   CORBA::Short GetVerboseLevel();
94   /*!
95    * To create new nodes
96    */
97   void SetToCreateNewNodes(CORBA::Boolean toCreate);
98   CORBA::Boolean GetToCreateNewNodes();
99   /*!
100    * To use boundary recovery version which tries to create mesh on a very poor
101    * quality surface mesh
102    */
103   void SetToUseBoundaryRecoveryVersion(CORBA::Boolean toUse);
104   CORBA::Boolean GetToUseBoundaryRecoveryVersion();
105   /*!
106    * Applies finite-element correction by replacing overconstrained elements where
107    * it is possible. The process is cutting first the overconstrained edges and
108    * second the overconstrained facets. This insure that no edges have two boundary
109    * vertices and that no facets have three boundary vertices.
110    */
111   void SetFEMCorrection(CORBA::Boolean toUseFem);
112   CORBA::Boolean GetFEMCorrection();
113   /*!
114    * To removes initial central point.
115    */
116   void SetToRemoveCentralPoint(CORBA::Boolean toRemove);
117   CORBA::Boolean GetToRemoveCentralPoint();
118   /*!
119    * To set hiden/undocumented/advanced options
120    */
121   void SetTextOption(const char* option);
122   char* GetTextOption();
123   /*!
124    * To set an enforced vertex
125    */
126   void SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size);
127   CORBA::Double GetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
128   void RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
129   GHS3DPlugin::GHS3DEnforcedVertexList* GetEnforcedVertices();
130   void ClearEnforcedVertices();
131
132   // Get implementation
133   ::GHS3DPlugin_Hypothesis* GetImpl();
134   
135   // Verify whether hypothesis supports given entity type 
136   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
137 };
138
139 #endif