1 // Copyright (C) 2004-2020 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
20 // File : GHS3D_Algorithm.idl
21 // Author : Julia DOROVSKIKH
23 #ifndef _GHS3D_Algorithm_IDL_
24 #define _GHS3D_Algorithm_IDL_
26 #include "SALOME_Exception.idl"
27 #include "SMESH_Hypothesis.idl"
28 #include "SMESH_Mesh.idl"
31 * GHS3DPlugin: interfaces to GHS3D related hypotheses and algorithms
35 typedef sequence<string> string_array;
37 typedef sequence<double,3> TCoords;
38 struct GHS3DEnforcedVertex {
47 typedef sequence<GHS3DEnforcedVertex> GHS3DEnforcedVertexList;
49 struct GHS3DEnforcedMesh {
52 SMESH::ElementType elementType;
56 typedef sequence<GHS3DEnforcedMesh> GHS3DEnforcedMeshList;
59 * GHS3DPlugin_GHS3D: interface of "MG-Tetra" algorithm
61 interface GHS3DPlugin_GHS3D : SMESH::SMESH_3D_Algo
63 SMESH::SMESH_Mesh importGMFMesh(in string aGMFFileName);
67 * Parameters of "MG-Tetra" algorithm
69 interface GHS3DPlugin_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 *Set lower boundary of mesh element size
79 void SetMinSize(in double theMinSize);
82 *Set upper boundary of mesh element size
84 void SetMaxSize(in double theMaxSize);
87 * Activate/deactivate volume proximity computation
89 void SetVolumeProximity( in boolean toUse );
90 boolean GetVolumeProximity();
92 * Set number of surface element layers to be generated due to volume proximity
94 void SetNbVolumeProximityLayers( in short nbLayers );
95 short GetNbVolumeProximityLayers();
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 float MB) raises (SALOME::SALOME_Exception);
108 float 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 float MB) raises (SALOME::SALOME_Exception);
115 float 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();
122 * Path to working directory
124 void SetWorkingDirectory(in string path) raises (SALOME::SALOME_Exception);
125 string GetWorkingDirectory();
127 * To keep working files or remove them. Log file remains in case of errors anyway.
129 void SetKeepFiles(in boolean toKeep);
130 boolean GetKeepFiles();
132 * Verbose level [0-10]
133 * 0 - no standard output,
134 * 2 - prints the data, quality statistics of the skin and final meshes and
135 * indicates when the final mesh is being saved. In addition the software
136 * gives indication regarding the CPU time.
137 * 10 - same as 2 plus the main steps in the computation, quality statistics
138 * histogram of the skin mesh, quality statistics histogram together with
139 * the characteristics of the final mesh.
141 void SetVerboseLevel(in short level);
142 short GetVerboseLevel();
144 * To create new nodes
146 void SetToCreateNewNodes(in boolean toCreate);
147 boolean GetToCreateNewNodes();
149 * To use boundary recovery version which tries to create mesh on a very poor
150 * quality surface mesh
152 void SetToUseBoundaryRecoveryVersion(in boolean toUse);
153 boolean GetToUseBoundaryRecoveryVersion();
155 * Applies finite-element correction by replacing overconstrained elements where
156 * it is possible. The process is cutting first the overconstrained edges and
157 * second the overconstrained facets. This insure that no edges have two boundary
158 * vertices and that no facets have three boundary vertices.
160 void SetFEMCorrection(in boolean toUseFem);
161 boolean GetFEMCorrection();
163 * To removes initial central point.
165 void SetToRemoveCentralPoint(in boolean toRemove);
166 boolean GetToRemoveCentralPoint();
168 * To define the volumic gradation
170 void SetGradation(in double gradation);
171 double GetGradation();
173 * Print log in standard output
175 void SetStandardOutputLog(in boolean logInStandardOutput);
176 boolean GetStandardOutputLog();
178 * Remove log file on success
180 void SetRemoveLogOnSuccess(in boolean removeLogOnSuccess);
181 boolean GetRemoveLogOnSuccess();
183 * Set advanced option value
185 void SetOptionValue(in string optionName,
186 in string optionValue) raises (SALOME::SALOME_Exception);
187 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
188 void UnsetOption(in string optionName);
190 * Adds custom advanced option and its value
192 void SetAdvancedOption(in string optionsAndValues) // in a form "option_1 v1 option_2 v2'"
193 raises (SALOME::SALOME_Exception);
194 string GetAdvancedOption();
195 void AddOption(in string optionName, in string optionValue);
196 string GetOption(in string optionName);
197 void SetTextOption(in string option); // obsolete
198 string GetTextOption(); // obsolete
200 * Return array of strings each of which is option name concatenated
201 * with option value devided by semicolon - "option_name:option_value:option_type".
202 * Option value is empty if an option is not set.
203 * option_type: 1 if user-define, 0 if default
204 * Note: the method is mostly for interaction with GUI.
206 string_array GetOptionValues();
207 string_array GetAdvancedOptionValues();
209 * Set option values each in the form "option_name[:option_value][:option_type]".
210 * Note: the method is mostly for interaction with GUI.
212 void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
213 void SetAdvancedOptionValues(in string_array options);
216 * To set an enforced vertex
218 boolean SetEnforcedVertex(in double x, in double y, in double z, in double size) raises (SALOME::SALOME_Exception);
219 boolean SetEnforcedVertexNamed(in double x, in double y, in double z, in double size, in string vertexName) raises (SALOME::SALOME_Exception);
220 boolean SetEnforcedVertexWithGroup(in double x, in double y, in double z, in double size, in string groupName) raises (SALOME::SALOME_Exception);
221 boolean SetEnforcedVertexNamedWithGroup(in double x, in double y, in double z, in double size, in string vertexName, in string groupName) raises (SALOME::SALOME_Exception);
222 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex, in double size) raises (SALOME::SALOME_Exception);
223 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theVertex, in double size, in string groupName) raises (SALOME::SALOME_Exception);
224 double GetEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
225 double GetEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
226 boolean RemoveEnforcedVertex(in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
227 boolean RemoveEnforcedVertexGeom(in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
228 GHS3DEnforcedVertexList GetEnforcedVertices();
229 void ClearEnforcedVertices();
231 * Set/get/unset an enforced vertex (private method for GUI)
233 boolean p_SetEnforcedVertex(in double size, in double x, in double y, in double z,
234 in string theVertexName, in string theVertexEntry, in string groupName,
235 in boolean isCompound) raises (SALOME::SALOME_Exception);
237 boolean SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType) raises (SALOME::SALOME_Exception);
238 boolean SetEnforcedMeshWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string groupName) raises (SALOME::SALOME_Exception);
240 /* OBSOLETE FUNCTIONS */
241 boolean SetEnforcedMeshSize(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size) raises (SALOME::SALOME_Exception);
242 boolean SetEnforcedMeshSizeWithGroup(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in double size, in string groupName) raises (SALOME::SALOME_Exception);
243 /* OBSOLETE FUNCTIONS */
245 GHS3DEnforcedMeshList GetEnforcedMeshes();
246 void ClearEnforcedMeshes();
249 * Set/get/unset an enforced vertex (private method for GUI)
251 boolean p_SetEnforcedMesh(in SMESH::SMESH_IDSource theSource, in SMESH::ElementType elementType, in string name, in string groupName) raises (SALOME::SALOME_Exception);
254 double GetMaxSizeDefault();
255 double GetMinSizeDefault();
256 void SetMinMaxSizeDefault( in double theMinSize, in double theMaxSize );
260 * GHS3DPlugin_Optimizer: interface of "MG-Tetra Optimization" algorithm
262 interface GHS3DPlugin_Optimizer : SMESH::SMESH_3D_Algo
266 enum PThreadsMode { SAFE, AGGRESSIVE, NONE };
267 enum Mode { NO, YES, ONLY };
270 * Parameters of "MG-Tetra Optimization" algorithm
272 * params inherited from GHS3DPlugin_Hypothesis:
274 * - optimization level
275 * - init and max memory
283 interface GHS3DPlugin_OptimizerHypothesis: GHS3DPlugin_Hypothesis
285 void SetOptimization( in Mode optMode );
286 Mode GetOptimization();
288 void SetSplitOverConstrained( in Mode ovcMode );
289 Mode GetSplitOverConstrained();
291 void SetSmoothOffSlivers( in boolean toSmooth );
292 boolean GetSmoothOffSlivers();
294 void SetPThreadsMode( in PThreadsMode mode );
295 PThreadsMode GetPThreadsMode();
297 void SetMaximalNumberOfThreads( in short nb );
298 short GetMaximalNumberOfThreads();