Salome HOME
new combo for element generation etc...
[plugins/hybridplugin.git] / idl / HYBRIDPlugin_Algorithm.idl
1 // Copyright (C) 2004-2013  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 //  File   : HYBRID_Algorithm.idl
21 //  Author : Julia DOROVSKIKH
22 //
23 #ifndef _HYBRID_Algorithm_IDL_
24 #define _HYBRID_Algorithm_IDL_
25
26 #include "SALOME_Exception.idl"
27 #include "SMESH_Hypothesis.idl"
28 #include "SMESH_Mesh.idl"
29
30 /*!
31  * HYBRIDPlugin: interfaces to HYBRID related hypotheses and algorithms
32  */
33 module HYBRIDPlugin
34 {
35   typedef sequence<double,3> TCoords;
36   struct HYBRIDEnforcedVertex {
37     string name;
38     string geomEntry;
39     boolean isCompound;
40     TCoords coords;
41     string groupName;
42     double size;
43   };
44   
45   typedef sequence<HYBRIDEnforcedVertex> HYBRIDEnforcedVertexList;
46
47   struct HYBRIDEnforcedMesh {
48     string name;
49     string entry;
50     SMESH::ElementType elementType;
51     string groupName;
52   };
53   
54   typedef sequence<HYBRIDEnforcedMesh> HYBRIDEnforcedMeshList;
55
56   /*!
57    * HYBRIDPlugin_HYBRID: interface of "Tetrahedron (HYBRID)" algorithm
58    */
59   interface HYBRIDPlugin_HYBRID : SMESH::SMESH_3D_Algo
60   {
61     SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
62   };
63
64   /*!
65    * Parameters of "Tetrahedron (HYBRID)" algorithm
66    */
67   interface HYBRIDPlugin_Hypothesis : SMESH::SMESH_Hypothesis
68   {
69     /*!
70      * To mesh "holes" in a solid or not. Default is to mesh.
71      */
72     void SetToMeshHoles(in boolean toMesh);
73     boolean GetToMeshHoles();
74     /*!
75      * To make groups of volumes of different domains when mesh is generated from skin.
76      * Default is to make groups.
77      * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
78      */
79     void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
80     boolean GetToMakeGroupsOfDomains();
81     /*!
82      * Maximal size of memory to be used by the algorithm (in Megabytes).
83      * Negative value means not to use this option
84      */
85     void SetMaximumMemory(in double MB) raises (SALOME::SALOME_Exception);
86     double GetMaximumMemory();
87     /*!
88      * Initial size of memory to be used by the algorithm (in Megabytes) in
89      * automatic memory adjustment mode. Default is zero.
90      * Negative value means not to use this option
91      */
92     void SetInitialMemory(in double MB) raises (SALOME::SALOME_Exception);
93     double GetInitialMemory();
94     /*!
95      * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
96      */
97     void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
98     short GetOptimizationLevel();
99
100
101     /*!
102      * Collision mode: 0-decrease, 1-stop. Default is decrease
103      */
104     void SetCollisionMode(in short level) raises (SALOME::SALOME_Exception);
105     short GetCollisionMode();
106     /*!
107      * BoundaryLayersGrowth: 0-Layer_Growth_Inward, 1-Layer_Growth_Outward. Default is Layer_Growth_Inward
108      */
109     void SetBoundaryLayersGrowth(in short level) raises (SALOME::SALOME_Exception);
110     short GetBoundaryLayersGrowth();
111     /*!
112      * ElementGeneration: 0-Generation_Tetra_Dominant, 1-Generation_Hexa_Dominant. Default is Generation_Tetra_Dominant
113      */
114     void SetElementGeneration(in short level) raises (SALOME::SALOME_Exception);
115     short GetElementGeneration();
116     
117     /*!
118      * To mesh adding extra normals at opening ridges and corners.
119      * Default is no.
120      */
121     void SetAddMultinormals(in boolean toAddMultinormals);
122     boolean GetAddMultinormals();
123     /*!
124      * To mesh smoothing normals at closed ridges and corners.
125      * Default is no.
126      */
127     void SetSmoothNormals(in boolean toSmoothNormals);
128     boolean GetSmoothNormals();
129     /*!
130      * To set height of the first layer.
131      */
132     void SetHeightFirstLayer(in double HFL) raises (SALOME::SALOME_Exception);
133     double GetHeightFirstLayer();
134     /*!
135      * To set boundary layers coefficient of geometric progression.
136      * Default is 1.0
137      */
138     void SetBoundaryLayersProgression(in double BLP) raises (SALOME::SALOME_Exception);
139     double GetBoundaryLayersProgression();
140     /*!
141      * To set multinormals angle threshold at opening ridges.
142      * Default is 30.0
143      */
144     void SetMultinormalsAngle(in double MNA) raises (SALOME::SALOME_Exception);
145     double GetMultinormalsAngle();
146     /*!
147      * To set number of boundary layers.
148      * Default is 1
149      */
150     void SetNbOfBoundaryLayers(in short NBL) raises (SALOME::SALOME_Exception);
151     short GetNbOfBoundaryLayers();
152     
153  
154
155     /*!
156      * Path to working directory
157      */
158     void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
159     string GetWorkingDirectory();
160     /*!
161      * To keep working files or remove them. Log file remains in case of errors anyway.
162      */
163     void SetKeepFiles(in boolean toKeep);
164     boolean GetKeepFiles();
165     /*!
166      * Verbose level [0-10]
167      *  0 - no standard output,
168      *  2 - prints the data, quality statistics of the skin and final meshes and
169      *     indicates when the final mesh is being saved. In addition the software
170      *     gives indication regarding the CPU time.
171      * 10 - same as 2 plus the main steps in the computation, quality statistics
172      *     histogram of the skin mesh, quality statistics histogram together with
173      *     the characteristics of the final mesh.
174      */
175     void SetVerboseLevel(in short level);
176     short GetVerboseLevel();
177     /*!
178      * To create new nodes
179      */
180     void SetToCreateNewNodes(in boolean toCreate);
181     boolean GetToCreateNewNodes();
182     /*!
183      * To use boundary recovery version which tries to create mesh on a very poor
184      * quality surface mesh
185      */
186     void SetToUseBoundaryRecoveryVersion(in boolean toUse);
187     boolean GetToUseBoundaryRecoveryVersion();
188     /*!
189      * Applies finite-element correction by replacing overconstrained elements where
190      * it is possible. The process is cutting first the overconstrained edges and
191      * second the overconstrained facets. This insure that no edges have two boundary
192      * vertices and that no facets have three boundary vertices.
193      */
194     void SetFEMCorrection(in boolean toUseFem);
195     boolean GetFEMCorrection();
196     /*!
197      * To removes initial central point.
198      */
199     void SetToRemoveCentralPoint(in boolean toRemove);
200     boolean GetToRemoveCentralPoint();
201     /*!
202      * To set hiden/undocumented/advanced options
203      */
204     void SetTextOption(in string option);
205     string GetTextOption();
206     /*!
207      * To define the volumic gradation
208      */
209     void SetGradation(in double gradation);
210     double GetGradation();
211     /*!
212      * Print log in standard output
213      */
214     void SetStandardOutputLog(in boolean logInStandardOutput);
215     boolean GetStandardOutputLog();
216     /*!
217     * Remove log file on success
218     */
219     void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
220     boolean GetRemoveLogOnSuccess();
221     /*!
222      * To set an enforced vertex
223      */
224     boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
225     boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
226     boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
227     boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
228     boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
229     boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
230     double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
231     double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
232     boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
233     boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
234     HYBRIDEnforcedVertexList GetEnforcedVertices();
235     void ClearEnforcedVertices();
236    /*!
237     * Set/get/unset an enforced vertex (private method for GUI)
238     */
239     boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
240                                 in string theVertexName, in string theVertexEntry, in string groupName,
241                                 in boolean isCompound) raises (SALOME::SALOME_Exception);
242     
243     boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
244     boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
245     
246     /* OBSOLETE FUNCTIONS */
247     boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
248     boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
249     /* OBSOLETE FUNCTIONS */
250     
251     HYBRIDEnforcedMeshList GetEnforcedMeshes();
252     void ClearEnforcedMeshes();
253
254    /*!
255     * Set/get/unset an enforced vertex (private method for GUI)
256     */
257     boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
258   };
259 };
260
261 #endif