Salome HOME
Add layers imprinting on faces.
[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 imprint layers on given faces.
88      */
89     void SetFacesWithImprinting(in SMESH::long_array faceIDs);
90     SMESH::long_array GetFacesWithImprinting();
91     /*!
92      * To make groups of volumes of different domains when mesh is generated from skin.
93      * Default is to make groups.
94      * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
95      */
96     void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
97     boolean GetToMakeGroupsOfDomains();
98     /*!
99      * Maximal size of memory to be used by the algorithm (in Megabytes).
100      * Negative value means not to use this option
101      */
102     void SetMaximumMemory(in double MB) raises (SALOME::SALOME_Exception);
103     double GetMaximumMemory();
104     /*!
105      * Initial size of memory to be used by the algorithm (in Megabytes) in
106      * automatic memory adjustment mode. Default is zero.
107      * Negative value means not to use this option
108      */
109     void SetInitialMemory(in double MB) raises (SALOME::SALOME_Exception);
110     double GetInitialMemory();
111     /*!
112      * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
113      */
114     void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
115     short GetOptimizationLevel();
116
117
118     /*!
119      * Collision mode: 0-decrease, 1-stop. Default is decrease
120      */
121     void SetCollisionMode(in short level) raises (SALOME::SALOME_Exception);
122     short GetCollisionMode();
123     /*!
124      * BoundaryLayersGrowth: 0-Layer_Growth_Inward, 1-Layer_Growth_Outward. Default is Layer_Growth_Inward
125      */
126     void SetBoundaryLayersGrowth(in short level) raises (SALOME::SALOME_Exception);
127     short GetBoundaryLayersGrowth();
128     /*!
129      * ElementGeneration: 0-Generation_Tetra_Dominant, 1-Generation_Hexa_Dominant, 2-Generation_Cartesian_Core. Default is Generation_Tetra_Dominant
130      */
131     void SetElementGeneration(in short level) raises (SALOME::SALOME_Exception);
132     short GetElementGeneration();
133     
134     /*!
135      * To mesh adding extra normals at opening ridges and corners.
136      * Default is no.
137      */
138     void SetAddMultinormals(in boolean toAddMultinormals);
139     boolean GetAddMultinormals();
140     /*!
141      * To mesh smoothing normals at closed ridges and corners.
142      * Default is no.
143      */
144     void SetSmoothNormals(in boolean toSmoothNormals);
145     boolean GetSmoothNormals();
146     /*!
147      * To set height of the first layer.
148      */
149     void SetHeightFirstLayer(in double HFL) raises (SALOME::SALOME_Exception);
150     double GetHeightFirstLayer();
151     /*!
152      * To set boundary layers coefficient of geometric progression.
153      * Default is 1.0
154      */
155     void SetBoundaryLayersProgression(in double BLP) raises (SALOME::SALOME_Exception);
156     double GetBoundaryLayersProgression();
157     /*!
158      * To set core size.
159      * Default is 0.0
160      */
161     void SetCoreSize(in double CS) raises (SALOME::SALOME_Exception);
162     double GetCoreSize();
163     /*!
164      * To set multinormals angle threshold at opening ridges.
165      * Default is 30.0
166      */
167     void SetMultinormalsAngle(in double MNA) raises (SALOME::SALOME_Exception);
168     double GetMultinormalsAngle();
169     /*!
170      * To set number of boundary layers.
171      * Default is 1
172      */
173     void SetNbOfBoundaryLayers(in short NBL) raises (SALOME::SALOME_Exception);
174     short GetNbOfBoundaryLayers();
175     
176  
177
178     /*!
179      * Path to working directory
180      */
181     void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
182     string GetWorkingDirectory();
183     /*!
184      * To keep working files or remove them. Log file remains in case of errors anyway.
185      */
186     void SetKeepFiles(in boolean toKeep);
187     boolean GetKeepFiles();
188     /*!
189      * Verbose level [0-10]
190      *  0 - no standard output,
191      *  2 - prints the data, quality statistics of the skin and final meshes and
192      *     indicates when the final mesh is being saved. In addition the software
193      *     gives indication regarding the CPU time.
194      * 10 - same as 2 plus the main steps in the computation, quality statistics
195      *     histogram of the skin mesh, quality statistics histogram together with
196      *     the characteristics of the final mesh.
197      */
198     void SetVerboseLevel(in short level);
199     short GetVerboseLevel();
200     /*!
201      * To create new nodes
202      */
203     void SetToCreateNewNodes(in boolean toCreate);
204     boolean GetToCreateNewNodes();
205     /*!
206      * To use boundary recovery version which tries to create mesh on a very poor
207      * quality surface mesh
208      */
209     void SetToUseBoundaryRecoveryVersion(in boolean toUse);
210     boolean GetToUseBoundaryRecoveryVersion();
211     /*!
212      * Applies finite-element correction by replacing overconstrained elements where
213      * it is possible. The process is cutting first the overconstrained edges and
214      * second the overconstrained facets. This insure that no edges have two boundary
215      * vertices and that no facets have three boundary vertices.
216      */
217     void SetFEMCorrection(in boolean toUseFem);
218     boolean GetFEMCorrection();
219     /*!
220      * To removes initial central point.
221      */
222     void SetToRemoveCentralPoint(in boolean toRemove);
223     boolean GetToRemoveCentralPoint();
224     /*!
225      * To set hiden/undocumented/advanced options
226      */
227     void SetAdvancedOption( in string optAndVals );
228     string GetAdvancedOption();
229     void SetTextOption(in string option); // obsolete
230     string GetTextOption();
231     /*!
232      * To define the volumic gradation
233      */
234     void SetGradation(in double gradation);
235     double GetGradation();
236     /*!
237      * Print log in standard output
238      */
239     void SetStandardOutputLog(in boolean logInStandardOutput);
240     boolean GetStandardOutputLog();
241     /*!
242     * Remove log file on success
243     */
244     void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
245     boolean GetRemoveLogOnSuccess();
246     /*!
247      * To set an enforced vertex
248      */
249     boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
250     boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
251     boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
252     boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
253     boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
254     boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
255     double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
256     double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
257     boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
258     boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
259     HYBRIDEnforcedVertexList GetEnforcedVertices();
260     void ClearEnforcedVertices();
261    /*!
262     * Set/get/unset an enforced vertex (private method for GUI)
263     */
264     boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
265                                 in string theVertexName, in string theVertexEntry, in string groupName,
266                                 in boolean isCompound) raises (SALOME::SALOME_Exception);
267     
268     boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
269     boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
270     
271     /* OBSOLETE FUNCTIONS */
272     boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
273     boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
274     /* OBSOLETE FUNCTIONS */
275     
276     HYBRIDEnforcedMeshList GetEnforcedMeshes();
277     void ClearEnforcedMeshes();
278
279    /*!
280     * Set/get/unset an enforced vertex (private method for GUI)
281     */
282     boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
283   };
284 };
285
286 #endif