1 // Copyright (C) 2007-2023 CEA, EDF
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<string> string_array;
39 typedef sequence<double,3> TCoords;
40 struct HYBRIDEnforcedVertex {
49 typedef sequence<HYBRIDEnforcedVertex> HYBRIDEnforcedVertexList;
51 struct HYBRIDEnforcedMesh {
54 SMESH::ElementType elementType;
58 typedef sequence<HYBRIDEnforcedMesh> HYBRIDEnforcedMeshList;
61 * HYBRIDPlugin_HYBRID: interface of "Tetra-hexahedron (HYBRID)" algorithm
63 interface HYBRIDPlugin_HYBRID : SMESH::SMESH_3D_Algo
65 SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
69 * Parameters of "Tetra-hexahedron (HYBRID)" algorithm
71 interface HYBRIDPlugin_Hypothesis : SMESH::SMESH_Hypothesis
74 * Sizes of boundary layers are relative to the surface size. Default no
76 void SetHeightIsRelative( in boolean isRelative );
77 boolean GetHeightIsRelative();
79 * Maximum internal angles of boundary elements (in degree)
81 void SetBoundaryLayersMaxElemAngle( in double angle );
82 double GetBoundaryLayersMaxElemAngle();
84 * To mesh "holes" in a solid or not. Default is to mesh.
86 void SetToMeshHoles(in boolean toMesh);
87 boolean GetToMeshHoles();
89 * To mesh layers on all wrap Default is yes.
91 void SetLayersOnAllWrap(in boolean toMesh);
92 boolean GetLayersOnAllWrap();
94 * To mesh layers on given faces.
96 void SetFacesWithLayers(in SMESH::long_array faceIDs);
97 SMESH::long_array GetFacesWithLayers();
99 * To imprint layers on given faces.
101 void SetFacesWithImprinting(in SMESH::long_array faceIDs);
102 SMESH::long_array GetFacesWithImprinting();
104 * To snap layers on given faces.
106 void SetFacesWithSnapping(in SMESH::long_array faceIDs);
107 SMESH::long_array GetFacesWithSnapping();
109 * To make groups of volumes of different domains when mesh is generated from skin.
110 * Default is to make groups.
111 * This option works only (1) for the mesh w/o shape and (2) if GetToMeshHoles() == true
113 void SetToMakeGroupsOfDomains(in boolean toMakeGroups);
114 boolean GetToMakeGroupsOfDomains();
116 * Maximal size of memory to be used by the algorithm (in Megabytes).
117 * Negative value means not to use this option
119 void SetMaximumMemory(in double MB) raises (SALOME::SALOME_Exception);
120 double GetMaximumMemory();
122 * Initial size of memory to be used by the algorithm (in Megabytes) in
123 * automatic memory adjustment mode. Default is zero.
124 * Negative value means not to use this option
126 void SetInitialMemory(in double MB) raises (SALOME::SALOME_Exception);
127 double GetInitialMemory();
129 * Optimization level: 0-none, 1-light, 2-medium, 3-strong. Default is medium
131 void SetOptimizationLevel(in short level) raises (SALOME::SALOME_Exception);
132 short GetOptimizationLevel();
136 * Collision mode: 0-decrease, 1-stop. Default is decrease
138 void SetCollisionMode(in short level) raises (SALOME::SALOME_Exception);
139 short GetCollisionMode();
141 * BoundaryLayersGrowth: 0-Layer_Growth_Inward, 1-Layer_Growth_Outward. Default is Layer_Growth_Inward
143 void SetBoundaryLayersGrowth(in short level) raises (SALOME::SALOME_Exception);
144 short GetBoundaryLayersGrowth();
146 * ElementGeneration: 0-Generation_Tetra_Dominant, 1-Generation_Hexa_Dominant, 2-Generation_Cartesian_Core. Default is Generation_Tetra_Dominant
148 void SetElementGeneration(in short level) raises (SALOME::SALOME_Exception);
149 short GetElementGeneration();
152 * To mesh adding extra normals at opening ridges and corners.
155 void SetAddMultinormals(in boolean toAddMultinormals);
156 boolean GetAddMultinormals();
158 * To mesh smoothing normals at closed ridges and corners.
161 void SetSmoothNormals(in boolean toSmoothNormals);
162 boolean GetSmoothNormals();
164 * To set height of the first layer.
166 void SetHeightFirstLayer(in double HFL) raises (SALOME::SALOME_Exception);
167 double GetHeightFirstLayer();
169 * To set boundary layers coefficient of geometric progression.
172 void SetBoundaryLayersProgression(in double BLP) raises (SALOME::SALOME_Exception);
173 double GetBoundaryLayersProgression();
178 void SetCoreSize(in double CS) raises (SALOME::SALOME_Exception);
179 double GetCoreSize();
181 * To set multinormals angle threshold at opening ridges.
184 void SetMultinormalsAngle(in double MNA) raises (SALOME::SALOME_Exception);
185 double GetMultinormalsAngle();
187 * To set number of boundary layers.
190 void SetNbOfBoundaryLayers(in short NBL) raises (SALOME::SALOME_Exception);
191 short GetNbOfBoundaryLayers();
196 * Path to working directory
198 void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
199 string GetWorkingDirectory();
201 * To keep working files or remove them. Log file remains in case of errors anyway.
203 void SetKeepFiles(in boolean toKeep);
204 boolean GetKeepFiles();
206 * Verbose level [0-10]
207 * 0 - no standard output,
208 * 2 - prints the data, quality statistics of the skin and final meshes and
209 * indicates when the final mesh is being saved. In addition the software
210 * gives indication regarding the CPU time.
211 * 10 - same as 2 plus the main steps in the computation, quality statistics
212 * histogram of the skin mesh, quality statistics histogram together with
213 * the characteristics of the final mesh.
215 void SetVerboseLevel(in short level);
216 short GetVerboseLevel();
218 * To create new nodes
220 void SetToCreateNewNodes(in boolean toCreate);
221 boolean GetToCreateNewNodes();
223 * To use boundary recovery version which tries to create mesh on a very poor
224 * quality surface mesh
226 void SetToUseBoundaryRecoveryVersion(in boolean toUse);
227 boolean GetToUseBoundaryRecoveryVersion();
229 * Applies finite-element correction by replacing overconstrained elements where
230 * it is possible. The process is cutting first the overconstrained edges and
231 * second the overconstrained facets. This insure that no edges have two boundary
232 * vertices and that no facets have three boundary vertices.
234 void SetFEMCorrection(in boolean toUseFem);
235 boolean GetFEMCorrection();
237 * To removes initial central point.
239 void SetToRemoveCentralPoint(in boolean toRemove);
240 boolean GetToRemoveCentralPoint();
242 * Set advanced option value
244 void SetOptionValue(in string optionName,
245 in string optionValue) raises (SALOME::SALOME_Exception);
246 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
247 void UnsetOption(in string optionName);
249 * Adds custom advanced option and its value
251 void SetAdvancedOption(in string optionsAndValues) // in a form "option_1 v1 option_2 v2'"
252 raises (SALOME::SALOME_Exception);
253 string GetAdvancedOption();
254 void AddOption(in string optionName, in string optionValue);
255 string GetOption(in string optionName);
256 void SetTextOption(in string option); // obsolete
257 string GetTextOption(); // obsolete
259 * Return array of strings each of which is option name concatenated
260 * with option value devided by semicolon - "option_name:option_value:option_type".
261 * Option value is empty if an option is not set.
262 * option_type: 1 if user-define, 0 if default
263 * Note: the method is mostly for interaction with GUI.
265 string_array GetOptionValues();
266 string_array GetAdvancedOptionValues();
268 * Set option values each in the form "option_name[:option_value][:option_type]".
269 * Note: the method is mostly for interaction with GUI.
271 void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
272 void SetAdvancedOptionValues(in string_array options);
275 * To define the volumic gradation
277 void SetGradation(in double gradation);
278 double GetGradation();
280 * Print log in standard output
282 void SetStandardOutputLog(in boolean logInStandardOutput);
283 boolean GetStandardOutputLog();
285 * Remove log file on success
287 void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
288 boolean GetRemoveLogOnSuccess();
290 * To set an enforced vertex
292 boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
293 boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
294 boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
295 boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
296 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
297 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
298 double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
299 double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
300 boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
301 boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
302 HYBRIDEnforcedVertexList GetEnforcedVertices();
303 void ClearEnforcedVertices();
305 * Set/get/unset an enforced vertex (private method for GUI)
307 boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
308 in string theVertexName, in string theVertexEntry, in string groupName,
309 in boolean isCompound) raises (SALOME::SALOME_Exception);
311 boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
312 boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
314 /* OBSOLETE FUNCTIONS */
315 boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
316 boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
317 /* OBSOLETE FUNCTIONS */
319 HYBRIDEnforcedMeshList GetEnforcedMeshes();
320 void ClearEnforcedMeshes();
323 * Set/get/unset an enforced vertex (private method for GUI)
325 boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);