1 // Copyright (C) 2007-2016 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 : 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 struct TPreCadPeriodicity {
117 TEntryList theSourceVerticesEntries;
118 TEntryList theTargetVerticesEntries;
121 typedef sequence<TPreCadPeriodicity> TPeriodicityList;
124 * BLSURFPlugin_BLSURF: interface of BLSURF algorithm
126 interface BLSURFPlugin_BLSURF : SMESH::SMESH_2D_Algo
131 * BLSURFPlugin_Hypothesis: interface of "BLSURF parameters" hypothesis
133 interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
137 * Sets a way to define size of mesh elements to generate
138 * 0 - size is defined automatically
139 * 1 - size is set by SetPhySize() method
140 * 2 - size is set by SetPhySize() method. A sizemap is defined.
142 void SetPhysicalMesh(in long isCustom);
143 long GetPhysicalMesh();
146 * Sets a way to define maximum angular deflection of mesh from CAD model
147 * 0 - deflection is defined automatically
148 * 1 - deflection is set by SetAngleMesh() method
149 * 2 - deflection is set by SetAngleMesh() method. A sizemap is defined (TODO).
151 void SetGeometricMesh(in long isCustom);
152 long GetGeometricMesh();
155 * Sets size of mesh elements to generate
157 void SetPhySize(in double size);
158 void SetPhySizeRel(in double size);
160 boolean IsPhySizeRel();
163 * Sets lower boundary of mesh element size
165 void SetMinSize(in double theMinSize);
166 void SetMinSizeRel(in double theMinSize);
168 boolean IsMinSizeRel();
171 * Sets upper boundary of mesh element size
173 void SetMaxSize(in double theMaxSize);
174 void SetMaxSizeRel(in double theMaxSize);
176 boolean IsMaxSizeRel();
179 * Sets maximal allowed ratio between the lengths of two adjacent edges
181 void SetGradation(in double ratio);
182 double GetGradation();
185 * Sets to create quadrilateral elements or not
187 void SetQuadAllowed(in boolean allowed);
188 boolean GetQuadAllowed();
191 * Sets angular deflection (in degrees) of a mesh face and edge from CAD surface
193 void SetAngleMesh(in double angle);
194 double GetAngleMesh();
197 * Sets the maximum desired distance between a triangle and its supporting CAD surface
199 void SetChordalError(in double distance);
200 double GetChordalError();
203 * Determines whether the generated mesh will be isotropic or anisotropic
205 void SetAnisotropic(in boolean anisotropic);
206 boolean GetAnisotropic();
209 * Defines the maximum anisotropic ratio of the metric governing the anisotropic process.
210 * The default value of 0 means that the metric (and thus the generated elements)
211 * can be arbitrarily stretched.
213 void SetAnisotropicRatio(in double ratio);
214 double GetAnisotropicRatio();
217 * This patch-independent correction option can be activated to remove the tiny
218 * (nano) edges from the generated mesh, without taking into account the tags
219 * (attributes) specifications.
221 void SetRemoveTinyEdges(in boolean remove);
222 boolean GetRemoveTinyEdges();
225 * Defines the minimal length under which an edge is considered to be a tiny one
227 void SetTinyEdgeLength(in double length);
228 double GetTinyEdgeLength();
231 * This patch independent correction option can be activated to remove the bad
232 * elements (often called slivers) from the generated mesh, without taking into account
233 * the tags (attributes) specification.
235 void SetBadElementRemoval(in boolean remove);
236 boolean GetBadElementRemoval();
239 * This parameter defines the aspect ratio triggering the "bad element"
240 * classification for the force bad surface element removal option.
242 void SetBadElementAspectRatio(in double ratio);
243 double GetBadElementAspectRatio();
246 * If this option is activated, MeshGems-CADSurf will optimize the mesh in order to
247 * get better shaped elements, during a process which respects the patch independent options.
248 * This optimisation cannot be fully performed when correct_surface_intersections = 1.
250 void SetOptimizeMesh(in boolean optimize);
251 boolean GetOptimizeMesh();
254 * Determines the order of mesh elements to be generated (linear or quadratic)
256 void SetQuadraticMesh(in boolean quadratic);
257 boolean GetQuadraticMesh();
260 * Sets topology usage way defining how mesh conformity is assured
261 * value=0 - mesh conformity is assured by conformity of a shape
262 * value=1,2 - mesh conformity is assured by pre-processing a CAD model (OBSOLETE)
263 * value=3 - mesh conformity is assured by pre-processing a CAD model with Pre-CAD
265 void SetTopology(in long way);
269 * Sets verbosity level in the range 0 to 100.
271 void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
272 short GetVerbosity();
277 void SetPreCADMergeEdges(in boolean toMergeEdges);
278 boolean GetPreCADMergeEdges();
281 * To remove tiny UV edges edges.
283 void SetPreCADRemoveTinyUVEdges(in boolean toRemoveTinyUVEdges);
284 boolean GetPreCADRemoveTinyUVEdges();
287 * To remove duplicate CAD faces.
289 void SetPreCADRemoveDuplicateCADFaces(in boolean toRemoveDuplicateCADFaces);
290 boolean GetPreCADRemoveDuplicateCADFaces();
293 * To process 3D topology.
295 void SetPreCADProcess3DTopology(in boolean toProcess);
296 boolean GetPreCADProcess3DTopology();
300 * To compute topology from scratch
302 void SetPreCADDiscardInput(in boolean toDiscardInput);
303 boolean GetPreCADDiscardInput();
306 * Sets advanced option value
308 void SetOptionValue(in string optionName,
309 in string optionValue) raises (SALOME::SALOME_Exception);
310 void SetPreCADOptionValue(in string optionName,
311 in string optionValue) raises (SALOME::SALOME_Exception);
312 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
313 string GetPreCADOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
315 * Unsets advanced option
317 void UnsetOption(in string optionName);
318 void UnsetPreCADOption(in string optionName);
321 * Adds custom advanced option and its value
323 void AddOption(in string optionName, in string optionValue);
324 void AddPreCADOption(in string optionName, in string optionValue);
325 string GetOption(in string optionName);
326 string GetPreCADOption(in string optionName);
329 * Return array of strings each of which is option name concatenated
330 * with option value devided by semicolon - "option_name:option_value:option_type".
331 * Option value is empty if an option is not set.
332 * Note: the method is mostly for interaction with GUI.
334 string_array GetOptionValues();
335 string_array GetPreCADOptionValues();
338 * Set option values each in the form "option_name[:option_value][:option_type]".
339 * Note: the method is mostly for interaction with GUI.
341 void SetOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
342 void SetPreCADOptionValues(in string_array options) raises (SALOME::SALOME_Exception);
347 void SetSizeMapEntries(in string_array sizeMaps) raises (SALOME::SALOME_Exception);
348 void ClearSizeMaps();
350 void UnsetEntry(in string entry);
353 * Set/unset a SizeMap on geom object
355 void SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap) raises (SALOME::SALOME_Exception);
356 void SetConstantSizeMap(in GEOM::GEOM_Object GeomObj, in double sizeMap);
357 void UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
360 * Set a SizeMap on geom object given by entry
362 void SetSizeMapEntry(in string entry, in string sizeMap) raises (SALOME::SALOME_Exception);
363 void SetConstantSizeMapEntry(in string entry, in GEOM::shape_type shapeType, in double sizeMap) raises (SALOME::SALOME_Exception);
364 string GetSizeMapEntry(in string entry) raises (SALOME::SALOME_Exception);
365 string_array GetSizeMapEntries();
368 * Set/unset an attractor on geom object
370 void SetAttractor(in GEOM::GEOM_Object GeomObj, in string attractor);
371 void UnsetAttractor(in GEOM::GEOM_Object GeomObj);
374 * Set an attractor on geom object given by entry
376 void SetAttractorEntry(in string entry, in string attractor) raises (SALOME::SALOME_Exception);
377 string GetAttractorEntry(in string entry) raises (SALOME::SALOME_Exception);
378 string_array GetAttractorEntries();
381 * Set/unset an attractor given as geom object on another geom object
383 void SetAttractorGeom(in GEOM::GEOM_Object GeomObj, in GEOM::GEOM_Object AttractorShape, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius);
384 void UnsetAttractorGeom(in GEOM::GEOM_Object GeomObj, in GEOM::GEOM_Object AttractorShape);
385 void UnsetAttractorEntry(in string entry, in string attractor);
388 * Set an attractor given by entry on a geom object given by entry
390 void SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius ) raises (SALOME::SALOME_Exception);
391 BLSURFPlugin::TAttParamsMap GetAttractorParams();
394 void SetCustomSizeMapEntry(in string entry, in string sizeMap);
395 string GetCustomSizeMapEntry(in string entry);
396 void SetCustomSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
397 void UnsetCustomSizeMap(in GEOM::GEOM_Object GeomObj);
398 string_array GetCustomSizeMapEntries();
400 ///////////////////////
401 // ENFORCED VERTEXES //
402 ///////////////////////
404 TFaceEntryEnfVertexListMap GetAllEnforcedVerticesByFace();
405 TEnfVertexList GetAllEnforcedVertices();
407 TFaceEntryCoordsListMap GetAllCoordsByFace();
408 TCoordsEnfVertexMap GetAllEnforcedVerticesByCoords();
410 TFaceEntryEnfVertexEntryListMap GetAllEnfVertexEntriesByFace();
411 TEnfVertexEntryEnfVertexMap GetAllEnforcedVerticesByEnfVertexEntry();
413 void ClearAllEnforcedVertices();
416 * Set/get/unset an enforced vertex on geom face
418 boolean SetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
419 boolean SetEnforcedVertexNamed(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
420 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
421 boolean SetEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
422 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);
423 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
426 TEnfVertexList GetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
428 boolean UnsetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
429 boolean UnsetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
430 boolean UnsetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
433 * Set/get/unset an enforced vertex on geom face given by entry
435 boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z,
436 in TEnfName theVertexName, in TEntry theVertexEntry, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
438 TEnfVertexList GetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
439 boolean UnsetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
440 // boolean UnsetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
441 boolean UnsetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
444 * To get/set internal vertices as enforced vertices
446 void SetInternalEnforcedVertexAllFaces(in boolean toEnforceInternalVertices);
447 boolean GetInternalEnforcedVertexAllFaces();
448 void SetInternalEnforcedVertexAllFacesGroup(in TEnfGroupName groupName);
449 TEnfGroupName GetInternalEnforcedVertexAllFacesGroup();
451 // Enable internal enforced vertices on specific face if requested by user
452 // void SetInternalEnforcedVertex(in GEOM::GEOM_Object theFace,in boolean toEnforceInternalVertices) raises (SALOME::SALOME_Exception);
453 // void SetInternalEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in boolean toEnforceInternalVertices, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
454 // void SetInternalEnforcedVertexEntry(in TEntry theFaceEntry, in boolean toEnforceInternalVertices, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
455 // boolean GetInternalEnforcedVertex(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
456 // boolean GetInternalEnforcedVertexEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
457 // TFaceEntryInternalVerticesList GetAllInternalEnforcedVerticesFaces();
458 ///////////////////////
461 ///////////////////////
463 ///////////////////////
465 void ClearPreCadPeriodicityVectors();
466 void AddPreCadFacesPeriodicity(in GEOM::GEOM_Object theFace1, in GEOM::GEOM_Object theFace2) raises (SALOME::SALOME_Exception);
467 void AddPreCadFacesPeriodicityWithVertices(in GEOM::GEOM_Object theFace1, in GEOM::GEOM_Object theFace2, in GEOM::ListOfGO theSourceVertices, in GEOM::ListOfGO theTargetVertices) raises (SALOME::SALOME_Exception);
468 void AddPreCadFacesPeriodicityEntry(in TEntry theFace1, in TEntry theFace2, in TEntryList theSourceVertices, in TEntryList theTargetVertices) raises (SALOME::SALOME_Exception);
469 void AddPreCadEdgesPeriodicity(in GEOM::GEOM_Object theEdge1, in GEOM::GEOM_Object theEdge2) raises (SALOME::SALOME_Exception);
470 void AddPreCadEdgesPeriodicityWithVertices(in GEOM::GEOM_Object theEdge1, in GEOM::GEOM_Object theEdge2, in GEOM::ListOfGO theSourceVertices, in GEOM::ListOfGO theTargetVertices) raises (SALOME::SALOME_Exception);
471 void AddPreCadEdgesPeriodicityEntry(in TEntry theEdge1, in TEntry theEdge2, in TEntryList theSourceVertices, in TEntryList theTargetVertices) raises (SALOME::SALOME_Exception);
472 TPeriodicityList GetPreCadFacesPeriodicityVector();
473 TPeriodicityList GetPreCadEdgesPeriodicityVector();
474 ///////////////////////
477 * Sets the file for export resulting mesh in GMF format
479 // void SetGMFFile(in string theFileName, in boolean isBinary);
480 void SetGMFFile(in string theFileName);
482 // boolean GetGMFFileMode();
485 // Obsolete methods - To be removed in V7
487 void SetPhyMin(in double theMinSize);
489 void SetPhyMax(in double theMaxSize);
491 void SetGeoMin(in double theMinSize);
493 void SetGeoMax(in double theMaxSize);
495 void SetAngleMeshS(in double angle);
496 double GetAngleMeshS();
497 void SetAngleMeshC(in double angle);
498 double GetAngleMeshC();
499 void SetDecimesh(in boolean toIgnoreEdges);
500 boolean GetDecimesh();
501 void SetPreCADRemoveNanoEdges(in boolean toRemoveNanoEdges);
502 boolean GetPreCADRemoveNanoEdges();
503 void SetPreCADEpsNano(in double epsNano);
504 double GetPreCADEpsNano();