1 // Copyright (C) 2007-2012 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.
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 : BLSURFPlugin_Algorithm.idl
22 // Authors : Francis KLOSS (OCC) & Patrick LAUG (INRIA) & Lioka RAZAFINDRAZAKA (CEA)
23 // Size maps developement: Nicolas GEIMER (OCC) & Gilles DAVID (EURIWARE)
26 #ifndef _SMESH_BLSURFALGORITHM_IDL_
27 #define _SMESH_BLSURFALGORITHM_IDL_
29 #include "SMESH_Hypothesis.idl"
30 #include "GEOM_Gen.idl"
31 #include "SALOME_Exception.idl"
34 * BLSURFPlugin: interfaces to BLSURF related hypotheses and algorithms
38 typedef sequence<string> string_array;
40 // Enforced vertex name
41 typedef string TEnfName;
43 typedef string TEntry;
44 typedef sequence<TEntry> TEntryList;
46 typedef string TEnfGroupName;
48 // Coordinates of enforced vertex
49 typedef sequence<double,3> TEnfVertexCoords;
51 typedef sequence<TEnfVertexCoords> TEnfVertexCoordsList;
57 TEnfVertexCoords coords;
58 TEnfGroupName grpName;
59 TEntryList faceEntries;
61 // List of enforced vertices
62 typedef sequence<TEnfVertex> TEnfVertexList;
64 // Map Face Entry / List of enforced vertices
65 struct TFaceEntryEnfVertexListMapElement {
67 TEnfVertexList enfVertexList;
69 typedef sequence<TFaceEntryEnfVertexListMapElement> TFaceEntryEnfVertexListMap;
71 // Map Face Entry / List of coords
72 struct TFaceEntryCoordsListMapElement {
74 TEnfVertexCoordsList coordsList;
76 typedef sequence<TFaceEntryCoordsListMapElement> TFaceEntryCoordsListMap;
78 // Map Face Entry / List of enf vertex entries
79 struct TFaceEntryEnfVertexEntryListMapElement {
81 TEntryList enfVertexEntryList;
83 typedef sequence<TFaceEntryEnfVertexEntryListMapElement> TFaceEntryEnfVertexEntryListMap;
85 // Map Coords / Enforced vertex
86 struct TCoordsEnfVertexElement {
87 TEnfVertexCoords coords;
90 typedef sequence<TCoordsEnfVertexElement> TCoordsEnfVertexMap;
92 // Map Enf Vertex Entry / Enforced vertex
93 struct TEnfVertexEntryEnfVertexElement {
94 TEntry enfVertexEntry;
97 typedef sequence<TEnfVertexEntryEnfVertexElement> TEnfVertexEntryEnfVertexMap;
99 // List of Face Entry with internal enforced vertices activated
100 typedef sequence<TEntry> TFaceEntryInternalVerticesList;
103 struct TAttractorParams {
111 typedef sequence<TAttractorParams> TAttParamsMap;
114 * BLSURFPlugin_BLSURF: interface of BLSURF algorithm
116 interface BLSURFPlugin_BLSURF : SMESH::SMESH_2D_Algo
121 * BLSURFPlugin_Hypothesis: interface of "BLSURF parameters" hypothesis
123 interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
127 * Sets a way to define size of mesh elements to generate
128 * 0 - size is defined automatically
129 * 1 - size is set by SetPhySize() method
130 * 2 - size is set by SetPhySize() method. A sizemap is defined.
132 void SetPhysicalMesh(in long isCustom);
133 long GetPhysicalMesh();
136 * Sets a way to define maximum angular deflection of mesh from CAD model
137 * 0 - deflection is defined automatically
138 * 1 - deflection is set by SetAngleMesh() method
139 * 2 - deflection is set by SetAngleMesh() method. A sizemap is defined (TODO).
141 void SetGeometricMesh(in long isCustom);
142 long GetGeometricMesh();
145 * Sets size of mesh elements to generate
147 void SetPhySize(in double size);
148 void SetPhySizeRel(in double size);
150 boolean IsPhySizeRel();
153 * Sets lower boundary of mesh element size
155 void SetMinSize(in double theMinSize);
156 void SetMinSizeRel(in double theMinSize);
158 boolean IsMinSizeRel();
161 * Sets upper boundary of mesh element size
163 void SetMaxSize(in double theMaxSize);
164 void SetMaxSizeRel(in double theMaxSize);
166 boolean IsMaxSizeRel();
169 * Sets maximal allowed ratio between the lengths of two adjacent edges
171 void SetGradation(in double ratio);
172 double GetGradation();
175 * Sets to create quadrilateral elements or not
177 void SetQuadAllowed(in boolean allowed);
178 boolean GetQuadAllowed();
181 * Sets angular deflection (in degrees) of a mesh face and edge from CAD surface
183 void SetAngleMesh(in double angle);
184 double GetAngleMesh();
187 * Sets the maximum desired distance between a triangle and its supporting CAD surface
189 void SetChordalError(in double distance);
190 double GetChordalError();
193 * Determines whether the generated mesh will be isotropic or anisotropic
195 void SetAnisotropic(in boolean anisotropic);
196 boolean GetAnisotropic();
199 * Defines the maximum anisotropic ratio of the metric governing the anisotropic process.
200 * The default value of 0 means that the metric (and thus the generated elements)
201 * can be arbitrarily stretched.
203 void SetAnisotropicRatio(in double ratio);
204 double GetAnisotropicRatio();
207 * This patch-independent correction option can be activated to remove the tiny
208 * (nano) edges from the generated mesh, without taking into account the tags
209 * (attributes) specifications.
211 void SetRemoveTinyEdges(in boolean remove);
212 boolean GetRemoveTinyEdges();
215 * Defines the minimal length under which an edge is considered to be a tiny one
217 void SetTinyEdgeLength(in double length);
218 double GetTinyEdgeLength();
221 * This patch independent correction option can be activated to remove the bad
222 * elements (often called slivers) from the generated mesh, without taking into account
223 * the tags (attributes) specification.
225 void SetBadElementRemoval(in boolean remove);
226 boolean GetBadElementRemoval();
229 * This parameter defines the aspect ratio triggering the "bad element"
230 * classification for the force bad surface element removal option.
232 void SetBadElementAspectRatio(in double ratio);
233 double GetBadElementAspectRatio();
236 * If this option is activated, MeshGems-CADSurf will optimize the mesh in order to
237 * get better shaped elements, during a process which respects the patch independent options.
238 * This optimisation cannot be fully performed when correct_surface_intersections = 1.
240 void SetOptimizeMesh(in boolean optimize);
241 boolean GetOptimizeMesh();
244 * Determines the order of mesh elements to be generated (linear or quadratic)
246 void SetQuadraticMesh(in boolean quadratic);
247 boolean GetQuadraticMesh();
250 * Sets topology usage way defining how mesh conformity is assured
251 * value=0 - mesh conformity is assured by conformity of a shape
252 * value=1,2 - mesh conformity is assured by pre-processing a CAD model (OBSOLETE)
253 * value=3 - mesh conformity is assured by pre-processing a CAD model with Pre-CAD
255 void SetTopology(in long way);
259 * Sets verbosity level in the range 0 to 100.
261 void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
262 short GetVerbosity();
267 void SetPreCADMergeEdges(in boolean toMergeEdges);
268 boolean GetPreCADMergeEdges();
271 * To process 3D topology.
273 void SetPreCADProcess3DTopology(in boolean toProcess);
274 boolean GetPreCADProcess3DTopology();
278 * To compute topology from scratch
280 void SetPreCADDiscardInput(in boolean toDiscardInput);
281 boolean GetPreCADDiscardInput();
284 * Sets advanced option value
286 void SetOptionValue(in string optionName,
287 in string optionValue) raises (SALOME::SALOME_Exception);
288 void SetPreCADOptionValue(in string optionName,
289 in string optionValue) raises (SALOME::SALOME_Exception);
290 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
291 string GetPreCADOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
293 * Unsets advanced option
295 void UnsetOption(in string optionName);
296 void UnsetPreCADOption(in string optionName);
299 * Return array of strings each of which is option name concatenated
300 * with option value devided by semicolon - "option_name:option_value".
301 * Option value is empty if an option is not set.
302 * Note: the method is mostly for interaction with GUI.
304 string_array GetOptionValues();
305 string_array GetPreCADOptionValues();
308 * Set option values each in the form "option_name[:option_value]".
309 * Note: the method is mostly for interaction with GUI.
311 void SetOptionValues(in string_array options);
312 void SetPreCADOptionValues(in string_array options);
317 void SetSizeMapEntries(in string_array sizeMaps);
318 void ClearSizeMaps();
320 void UnsetEntry(in string entry);
323 * Set/unset a SizeMap on geom object
325 void SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
326 void SetConstantSizeMap(in GEOM::GEOM_Object GeomObj, in double sizeMap);
327 void UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
330 * Set a SizeMap on geom object given by entry
332 void SetSizeMapEntry(in string entry, in string sizeMap);
333 void SetConstantSizeMapEntry(in string entry, in GEOM::shape_type shapeType, in double sizeMap);
334 string GetSizeMapEntry(in string entry);
335 string_array GetSizeMapEntries();
338 * Set/unset an attractor on geom object
340 void SetAttractor(in GEOM::GEOM_Object GeomObj, in string attractor);
341 void UnsetAttractor(in GEOM::GEOM_Object GeomObj);
344 * Set an attractor on geom object given by entry
346 void SetAttractorEntry(in string entry, in string attractor);
347 string GetAttractorEntry(in string entry);
348 string_array GetAttractorEntries();
351 * Set/unset an attractor given as geom object on another geom object
353 void SetAttractorGeom(in GEOM::GEOM_Object GeomObj, in GEOM::GEOM_Object AttractorShape, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius);
354 void UnsetAttractorGeom(in GEOM::GEOM_Object GeomObj);
357 * Set an attractor given by entry on a geom object given by entry
359 void SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius );
360 BLSURFPlugin::TAttParamsMap GetAttractorParams();
363 void SetCustomSizeMapEntry(in string entry, in string sizeMap);
364 string GetCustomSizeMapEntry(in string entry);
365 void SetCustomSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
366 void UnsetCustomSizeMap(in GEOM::GEOM_Object GeomObj);
367 string_array GetCustomSizeMapEntries();
369 ///////////////////////
370 // ENFORCED VERTEXES //
371 ///////////////////////
373 TFaceEntryEnfVertexListMap GetAllEnforcedVerticesByFace();
374 TEnfVertexList GetAllEnforcedVertices();
376 TFaceEntryCoordsListMap GetAllCoordsByFace();
377 TCoordsEnfVertexMap GetAllEnforcedVerticesByCoords();
379 TFaceEntryEnfVertexEntryListMap GetAllEnfVertexEntriesByFace();
380 TEnfVertexEntryEnfVertexMap GetAllEnforcedVerticesByEnfVertexEntry();
382 void ClearAllEnforcedVertices();
385 * Set/get/unset an enforced vertex on geom face
387 boolean SetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
388 boolean SetEnforcedVertexNamed(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
389 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
390 boolean SetEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
391 boolean SetEnforcedVertexNamedWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
392 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
395 TEnfVertexList GetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
397 boolean UnsetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
398 boolean UnsetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
399 boolean UnsetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
402 * Set/get/unset an enforced vertex on geom face given by entry
404 boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z,
405 in TEnfName theVertexName, in TEntry theVertexEntry, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
407 TEnfVertexList GetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
408 boolean UnsetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
409 // boolean UnsetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
410 boolean UnsetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
413 * To get/set internal vertices as enforced vertices
415 void SetInternalEnforcedVertexAllFaces(in boolean toEnforceInternalVertices);
416 boolean GetInternalEnforcedVertexAllFaces();
417 void SetInternalEnforcedVertexAllFacesGroup(in TEnfGroupName groupName);
418 TEnfGroupName GetInternalEnforcedVertexAllFacesGroup();
420 // Enable internal enforced vertices on specific face if requested by user
421 // void SetInternalEnforcedVertex(in GEOM::GEOM_Object theFace,in boolean toEnforceInternalVertices) raises (SALOME::SALOME_Exception);
422 // void SetInternalEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in boolean toEnforceInternalVertices, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
423 // void SetInternalEnforcedVertexEntry(in TEntry theFaceEntry, in boolean toEnforceInternalVertices, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
424 // boolean GetInternalEnforcedVertex(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
425 // boolean GetInternalEnforcedVertexEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
426 // TFaceEntryInternalVerticesList GetAllInternalEnforcedVerticesFaces();
427 ///////////////////////
430 * Sets the file for export resulting mesh in GMF format
432 // void SetGMFFile(in string theFileName, in boolean isBinary);
433 void SetGMFFile(in string theFileName);
435 // boolean GetGMFFileMode();
438 // Obsolete methods - To be removed in V7
440 void SetPhyMin(in double theMinSize);
442 void SetPhyMax(in double theMaxSize);
444 void SetGeoMin(in double theMinSize);
446 void SetGeoMax(in double theMaxSize);
448 void SetAngleMeshS(in double angle);
449 double GetAngleMeshS();
450 void SetAngleMeshC(in double angle);
451 double GetAngleMeshC();
452 void SetDecimesh(in boolean toIgnoreEdges);
453 boolean GetDecimesh();
454 void SetPreCADRemoveNanoEdges(in boolean toRemoveNanoEdges);
455 boolean GetPreCADRemoveNanoEdges();
456 void SetPreCADEpsNano(in double epsNano);
457 double GetPreCADEpsNano();