1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 // File : HYBRIDPlugin_Algorithm.idl
22 // Author : Christian VAN WAMBEKE (CEA)
25 #ifndef _HYBRID_Algorithm_IDL_
26 #define _HYBRID_Algorithm_IDL_
28 #include "SALOME_Exception.idl"
29 #include "SMESH_Hypothesis.idl"
30 #include "SMESH_Mesh.idl"
33 * HYBRIDPlugin: interfaces to HYBRID related hypotheses and algorithms
37 typedef sequence<double,3> TCoords;
38 struct HYBRIDEnforcedVertex {
47 typedef sequence<HYBRIDEnforcedVertex> HYBRIDEnforcedVertexList;
49 struct HYBRIDEnforcedMesh {
52 SMESH::ElementType elementType;
56 typedef sequence<HYBRIDEnforcedMesh> HYBRIDEnforcedMeshList;
59 * HYBRIDPlugin_HYBRID: interface of "Tetra-hexahedron (HYBRID)" algorithm
61 interface HYBRIDPlugin_HYBRID : SMESH::SMESH_3D_Algo
63 SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
67 * Parameters of "Tetra-hexahedron (HYBRID)" algorithm
69 interface HYBRIDPlugin_Hypothesis : SMESH::SMESH_Hypothesis
72 * To mesh "holes" in a solid or not. Default is to mesh.
74 void SetToMeshHoles(in boolean toMesh);
75 boolean GetToMeshHoles();
77 * To mesh layers on all wrap Default is yes.
79 void SetLayersOnAllWrap(in boolean toMesh);
80 boolean GetLayersOnAllWrap();
82 * To mesh layers on given faces.
84 void SetFacesWithLayers(in SMESH::long_array faceIDs);
85 SMESH::long_array GetFacesWithLayers();
87 * To imprint layers on given faces.
89 void SetFacesWithImprinting(in SMESH::long_array faceIDs);
90 SMESH::long_array GetFacesWithImprinting();
92 * To snap layers on given faces.
94 void SetFacesWithSnapping(in SMESH::long_array faceIDs);
95 SMESH::long_array GetFacesWithSnapping();
97 * To make groups of volumes of different domains when mesh is generated from skin.
98 * Default is to make groups.
99 * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
101 void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
102 boolean GetToMakeGroupsOfDomains();
104 * Maximal size of memory to be used by the algorithm (in Megabytes).
105 * Negative value means not to use this option
107 void SetMaximumMemory(in double MB) raises (SALOME::SALOME_Exception);
108 double GetMaximumMemory();
110 * Initial size of memory to be used by the algorithm (in Megabytes) in
111 * automatic memory adjustment mode. Default is zero.
112 * Negative value means not to use this option
114 void SetInitialMemory(in double MB) raises (SALOME::SALOME_Exception);
115 double GetInitialMemory();
117 * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
119 void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
120 short GetOptimizationLevel();
124 * Collision mode: 0-decrease, 1-stop. Default is decrease
126 void SetCollisionMode(in short level) raises (SALOME::SALOME_Exception);
127 short GetCollisionMode();
129 * BoundaryLayersGrowth: 0-Layer_Growth_Inward, 1-Layer_Growth_Outward. Default is Layer_Growth_Inward
131 void SetBoundaryLayersGrowth(in short level) raises (SALOME::SALOME_Exception);
132 short GetBoundaryLayersGrowth();
134 * ElementGeneration: 0-Generation_Tetra_Dominant, 1-Generation_Hexa_Dominant, 2-Generation_Cartesian_Core. Default is Generation_Tetra_Dominant
136 void SetElementGeneration(in short level) raises (SALOME::SALOME_Exception);
137 short GetElementGeneration();
140 * To mesh adding extra normals at opening ridges and corners.
143 void SetAddMultinormals(in boolean toAddMultinormals);
144 boolean GetAddMultinormals();
146 * To mesh smoothing normals at closed ridges and corners.
149 void SetSmoothNormals(in boolean toSmoothNormals);
150 boolean GetSmoothNormals();
152 * To set height of the first layer.
154 void SetHeightFirstLayer(in double HFL) raises (SALOME::SALOME_Exception);
155 double GetHeightFirstLayer();
157 * To set boundary layers coefficient of geometric progression.
160 void SetBoundaryLayersProgression(in double BLP) raises (SALOME::SALOME_Exception);
161 double GetBoundaryLayersProgression();
166 void SetCoreSize(in double CS) raises (SALOME::SALOME_Exception);
167 double GetCoreSize();
169 * To set multinormals angle threshold at opening ridges.
172 void SetMultinormalsAngle(in double MNA) raises (SALOME::SALOME_Exception);
173 double GetMultinormalsAngle();
175 * To set number of boundary layers.
178 void SetNbOfBoundaryLayers(in short NBL) raises (SALOME::SALOME_Exception);
179 short GetNbOfBoundaryLayers();
184 * Path to working directory
186 void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
187 string GetWorkingDirectory();
189 * To keep working files or remove them. Log file remains in case of errors anyway.
191 void SetKeepFiles(in boolean toKeep);
192 boolean GetKeepFiles();
194 * Verbose level [0-10]
195 * 0 - no standard output,
196 * 2 - prints the data, quality statistics of the skin and final meshes and
197 * indicates when the final mesh is being saved. In addition the software
198 * gives indication regarding the CPU time.
199 * 10 - same as 2 plus the main steps in the computation, quality statistics
200 * histogram of the skin mesh, quality statistics histogram together with
201 * the characteristics of the final mesh.
203 void SetVerboseLevel(in short level);
204 short GetVerboseLevel();
206 * To create new nodes
208 void SetToCreateNewNodes(in boolean toCreate);
209 boolean GetToCreateNewNodes();
211 * To use boundary recovery version which tries to create mesh on a very poor
212 * quality surface mesh
214 void SetToUseBoundaryRecoveryVersion(in boolean toUse);
215 boolean GetToUseBoundaryRecoveryVersion();
217 * Applies finite-element correction by replacing overconstrained elements where
218 * it is possible. The process is cutting first the overconstrained edges and
219 * second the overconstrained facets. This insure that no edges have two boundary
220 * vertices and that no facets have three boundary vertices.
222 void SetFEMCorrection(in boolean toUseFem);
223 boolean GetFEMCorrection();
225 * To removes initial central point.
227 void SetToRemoveCentralPoint(in boolean toRemove);
228 boolean GetToRemoveCentralPoint();
230 * To set hiden/undocumented/advanced options
232 void SetAdvancedOption( in string optAndVals );
233 string GetAdvancedOption();
234 void SetTextOption(in string option); // obsolete
235 string GetTextOption();
237 * To define the volumic gradation
239 void SetGradation(in double gradation);
240 double GetGradation();
242 * Print log in standard output
244 void SetStandardOutputLog(in boolean logInStandardOutput);
245 boolean GetStandardOutputLog();
247 * Remove log file on success
249 void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
250 boolean GetRemoveLogOnSuccess();
252 * To set an enforced vertex
254 boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
255 boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
256 boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
257 boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
258 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
259 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
260 double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
261 double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
262 boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
263 boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
264 HYBRIDEnforcedVertexList GetEnforcedVertices();
265 void ClearEnforcedVertices();
267 * Set/get/unset an enforced vertex (private method for GUI)
269 boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
270 in string theVertexName, in string theVertexEntry, in string groupName,
271 in boolean isCompound) raises (SALOME::SALOME_Exception);
273 boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
274 boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
276 /* OBSOLETE FUNCTIONS */
277 boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
278 boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
279 /* OBSOLETE FUNCTIONS */
281 HYBRIDEnforcedMeshList GetEnforcedMeshes();
282 void ClearEnforcedMeshes();
285 * Set/get/unset an enforced vertex (private method for GUI)
287 boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);