Salome HOME
Merge from V5_1_main branch 24/11/2010
[plugins/ghs3dplugin.git] / src / GHS3DPlugin_Hypothesis_i.hxx
1 //  Copyright (C) 2004-2010  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
20 //  GHS3DPlugin : C++ implementation
21 // File      : GHS3DPlugin_Hypothesis_i.hxx
22 // Date      : 03/04/2006
23 // Project   : SALOME
24 //
25 #ifndef _GHS3DPlugin_Hypothesis_i_HXX_
26 #define _GHS3DPlugin_Hypothesis_i_HXX_
27
28 #include "GHS3DPlugin_Defs.hxx"
29
30 #include <SALOMEconfig.h>
31 #include CORBA_SERVER_HEADER(GHS3DPlugin_Algorithm)
32
33 #include "SMESH_Hypothesis_i.hxx"
34 #include "GHS3DPlugin_Hypothesis.hxx"
35
36 class SMESH_Gen;
37
38 // GHS3DPlugin parameters hypothesis
39
40 class GHS3DPLUGIN_EXPORT GHS3DPlugin_Hypothesis_i:
41   public virtual POA_GHS3DPlugin::GHS3DPlugin_Hypothesis,
42   public virtual SMESH_Hypothesis_i
43 {
44  public:
45   // Constructor
46   GHS3DPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
47                             int                     theStudyId,
48                             ::SMESH_Gen*            theGenImpl);
49   // Destructor
50   virtual ~GHS3DPlugin_Hypothesis_i();
51
52   /*!
53    * To mesh "holes" in a solid or not. Default is to mesh.
54    */
55   void SetToMeshHoles(CORBA::Boolean toMesh);
56   CORBA::Boolean GetToMeshHoles();
57   /*!
58    * Maximal size of memory to be used by the algorithm (in Megabytes)
59    */
60   void SetMaximumMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
61   CORBA::Short GetMaximumMemory();
62   /*!
63    * Initial size of memory to be used by the algorithm (in Megabytes) in
64    * automatic memory adjustment mode. Default is zero
65    */
66   void SetInitialMemory(CORBA::Short MB) throw ( SALOME::SALOME_Exception );
67   CORBA::Short GetInitialMemory();
68   /*!
69    * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
70    */
71   void SetOptimizationLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
72   CORBA::Short GetOptimizationLevel();
73   /*!
74    * Path to working directory
75    */
76   void SetWorkingDirectory(const char* path) throw ( SALOME::SALOME_Exception );
77   char* GetWorkingDirectory();
78   /*!
79    * To keep working files or remove them. Log file remains in case of errors anyway.
80    */
81   void SetKeepFiles(CORBA::Boolean toKeep);
82   CORBA::Boolean GetKeepFiles();
83   /*!
84    * Verbose level [0-10]
85    *  0 - no standard output,
86    *  2 - prints the data, quality statistics of the skin and final meshes and
87    *     indicates when the final mesh is being saved. In addition the software
88    *     gives indication regarding the CPU time.
89    * 10 - same as 2 plus the main steps in the computation, quality statistics
90    *     histogram of the skin mesh, quality statistics histogram together with
91    *     the characteristics of the final mesh.
92    */
93   void SetVerboseLevel(CORBA::Short level) throw ( SALOME::SALOME_Exception );
94   CORBA::Short GetVerboseLevel();
95   /*!
96    * To create new nodes
97    */
98   void SetToCreateNewNodes(CORBA::Boolean toCreate);
99   CORBA::Boolean GetToCreateNewNodes();
100   /*!
101    * To use boundary recovery version which tries to create mesh on a very poor
102    * quality surface mesh
103    */
104   void SetToUseBoundaryRecoveryVersion(CORBA::Boolean toUse);
105   CORBA::Boolean GetToUseBoundaryRecoveryVersion();
106   /*!
107    * Applies finite-element correction by replacing overconstrained elements where
108    * it is possible. The process is cutting first the overconstrained edges and
109    * second the overconstrained facets. This insure that no edges have two boundary
110    * vertices and that no facets have three boundary vertices.
111    */
112   void SetFEMCorrection(CORBA::Boolean toUseFem);
113   CORBA::Boolean GetFEMCorrection();
114   /*!
115    * To removes initial central point.
116    */
117   void SetToRemoveCentralPoint(CORBA::Boolean toRemove);
118   CORBA::Boolean GetToRemoveCentralPoint();
119   /*!
120    * To set hiden/undocumented/advanced options
121    */
122   void SetTextOption(const char* option);
123   char* GetTextOption();
124   /*!
125    * To set an enforced vertex
126    */
127   void SetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z, CORBA::Double size);
128   CORBA::Double GetEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
129   void RemoveEnforcedVertex(CORBA::Double x, CORBA::Double y, CORBA::Double z) throw (SALOME::SALOME_Exception);
130   GHS3DPlugin::GHS3DEnforcedVertexList* GetEnforcedVertices();
131   void ClearEnforcedVertices();
132
133   // Get implementation
134   ::GHS3DPlugin_Hypothesis* GetImpl();
135   
136   // Verify whether hypothesis supports given entity type 
137   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
138 };
139
140 #endif