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