1 // Copyright (C) 2007-2011 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;
100 struct TAttractorParams {
108 typedef sequence<TAttractorParams> TAttParamsMap;
111 * BLSURFPlugin_BLSURF: interface of BLSURF algorithm
113 interface BLSURFPlugin_BLSURF : SMESH::SMESH_2D_Algo
118 * BLSURFPlugin_Hypothesis: interface of "BLSURF parameters" hypothesis
120 interface BLSURFPlugin_Hypothesis : SMESH::SMESH_Hypothesis
123 * Sets topology usage way defining how mesh conformity is assured
124 * value=0 - mesh conformity is assured by conformity of a shape
125 * value=1,2 - mesh conformity is assured by pre-processing a CAD model
126 * value=3 - mesh conformity is assured by pre-processing a CAD model with Pre-CAD
128 void SetTopology(in long way);
132 * Sets a way to define size of mesh elements to generate
133 * 0 - size is defined automatically
134 * 1 - size is set by SetPhySize() method
135 * 2 - size is set by SetPhySize() method. A sizemap is defined.
137 void SetPhysicalMesh(in long isCustom);
138 long GetPhysicalMesh();
141 * Sets size of mesh elements to generate
143 void SetPhySize(in double size);
147 * Sets lower boundary of mesh element size (PhySize)
149 void SetPhyMin(in double theMinSize);
153 * Sets upper boundary of mesh element size (PhySize)
155 void SetPhyMax(in double theMaxSize);
159 * Sets a way to define maximum angular deflection of mesh from CAD model
160 * 0 - deflection is defined automatically
161 * 1 - deflection is set by SetAngleMeshS() and SetAngleMeshC() methods
163 void SetGeometricMesh(in long isCustom);
164 long GetGeometricMesh();
167 * Sets angular deflection (in degrees) of a mesh face from CAD surface
169 void SetAngleMeshS(in double angle);
170 double GetAngleMeshS();
173 * Sets angular deflection (in degrees) of a mesh edge from CAD curve
175 void SetAngleMeshC(in double angle);
176 double GetAngleMeshC();
179 * Sets lower boundary of mesh element size computed to respect angular deflection
181 void SetGeoMin(in double theMinSize);
185 * Sets upper boundary of mesh element size computed to respect angular deflection
187 void SetGeoMax(in double theMaxSize);
191 * Sets maximal allowed ratio between the lengths of two adjacent edges
193 void SetGradation(in double ratio);
194 double GetGradation();
197 * Sets to create quadrilateral elements or not
199 void SetQuadAllowed(in boolean allowed);
200 boolean GetQuadAllowed();
203 * To respect geometrical edges or not
205 void SetDecimesh(in boolean toIgnoreEdges);
206 boolean GetDecimesh();
209 * Sets verbosity level in the range 0 to 100.
211 void SetVerbosity(in short theVal) raises (SALOME::SALOME_Exception);
212 short GetVerbosity();
217 void SetPreCADMergeEdges(in boolean toMergeEdges);
218 boolean GetPreCADMergeEdges();
221 * To remove nano edges.
223 void SetPreCADRemoveNanoEdges(in boolean toRemoveNanoEdges);
224 boolean GetPreCADRemoveNanoEdges();
227 * To compute topology from scratch
229 void SetPreCADDiscardInput(in boolean toDiscardInput);
230 boolean GetPreCADDiscardInput();
233 * Sets the length below which an edge is considered as nano
234 * for the topology processing.
236 void SetPreCADEpsNano(in double epsNano);
237 double GetPreCADEpsNano();
240 * Sets advanced option value
242 void SetOptionValue(in string optionName,
243 in string optionValue) raises (SALOME::SALOME_Exception);
244 void SetPreCADOptionValue(in string optionName,
245 in string optionValue) raises (SALOME::SALOME_Exception);
246 string GetOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
247 string GetPreCADOptionValue(in string optionName) raises (SALOME::SALOME_Exception);
249 * Unsets advanced option
251 void UnsetOption(in string optionName);
252 void UnsetPreCADOption(in string optionName);
255 * Return array of strings each of which is option name concatenated
256 * with option value devided by semicolon - "option_name:option_value".
257 * Option value is empty if an option is not set.
258 * Note: the method is mostly for interaction with GUI.
260 string_array GetOptionValues();
261 string_array GetPreCADOptionValues();
264 * Set option values each in the form "option_name[:option_value]".
265 * Note: the method is mostly for interaction with GUI.
267 void SetOptionValues(in string_array options);
268 void SetPreCADOptionValues(in string_array options);
273 void SetSizeMapEntries(in string_array sizeMaps);
274 void ClearSizeMaps();
276 void UnsetEntry(in string entry);
279 * Set/unset a SizeMap on geom object
281 void SetSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
282 void UnsetSizeMap(in GEOM::GEOM_Object GeomObj);
285 * Set a SizeMap on geom object given by entry
287 void SetSizeMapEntry(in string entry, in string sizeMap);
288 string GetSizeMapEntry(in string entry);
289 string_array GetSizeMapEntries();
292 * Set/unset an attractor on geom object
294 void SetAttractor(in GEOM::GEOM_Object GeomObj, in string attractor);
295 void UnsetAttractor(in GEOM::GEOM_Object GeomObj);
298 * Set an attractor on geom object given by entry
300 void SetAttractorEntry(in string entry, in string attractor);
301 string GetAttractorEntry(in string entry);
302 string_array GetAttractorEntries();
305 * Set/unset an attractor given as geom object on another geom object
307 void SetAttractorGeom(in GEOM::GEOM_Object GeomObj, in GEOM::GEOM_Object AttractorShape, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius);
308 void UnsetAttractorGeom(in GEOM::GEOM_Object GeomObj);
311 * Set an attractor given by entry on a geom object given by entry
313 void SetClassAttractorEntry(in string entry, in string att_entry, in double StartSize, in double EndSize, in double ActionRadius, in double ConstantRadius );
314 BLSURFPlugin::TAttParamsMap GetAttractorParams();
319 void SetCustomSizeMapEntry(in string entry, in string sizeMap);
320 string GetCustomSizeMapEntry(in string entry);
321 void SetCustomSizeMap(in GEOM::GEOM_Object GeomObj, in string sizeMap);
322 void UnsetCustomSizeMap(in GEOM::GEOM_Object GeomObj);
323 string_array GetCustomSizeMapEntries();
325 ///////////////////////
326 // ENFORCED VERTEXES //
327 ///////////////////////
329 TFaceEntryEnfVertexListMap GetAllEnforcedVerticesByFace();
330 TEnfVertexList GetAllEnforcedVertices();
332 TFaceEntryCoordsListMap GetAllCoordsByFace();
333 TCoordsEnfVertexMap GetAllEnforcedVerticesByCoords();
335 TFaceEntryEnfVertexEntryListMap GetAllEnfVertexEntriesByFace();
336 TEnfVertexEntryEnfVertexMap GetAllEnforcedVerticesByEnfVertexEntry();
338 void ClearAllEnforcedVertices();
341 * Set/get/unset an enforced vertex on geom face
343 boolean SetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
344 boolean SetEnforcedVertexNamed(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
345 boolean SetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
346 boolean SetEnforcedVertexWithGroup(in GEOM::GEOM_Object theFace, in double x, in double y, in double z, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
347 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);
348 boolean SetEnforcedVertexGeomWithGroup(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex, in TEnfGroupName groupName) raises (SALOME::SALOME_Exception);
351 TEnfVertexList GetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
353 boolean UnsetEnforcedVertex(in GEOM::GEOM_Object theFace, in double x, in double y, in double z) raises (SALOME::SALOME_Exception);
354 boolean UnsetEnforcedVertexGeom(in GEOM::GEOM_Object theFace, in GEOM::GEOM_Object theVertex) raises (SALOME::SALOME_Exception);
355 boolean UnsetEnforcedVertices(in GEOM::GEOM_Object theFace) raises (SALOME::SALOME_Exception);
358 * Set/get/unset an enforced vertex on geom face given by entry
360 boolean SetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z,
361 in TEnfName theVertexName, in TEntry theVertexEntry, in string groupName) raises (SALOME::SALOME_Exception);
362 // boolean SetEnforcedVertexEntryNamed(in TEntry theFaceEntry, in double x, in double y, in double z, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
363 // boolean SetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry, in TEnfName theVertexName) raises (SALOME::SALOME_Exception);
365 void SetEnforcedVertexEntryWithGroup(in string theFaceEntry, in double x, in double y, in double z, in TEnfGroupName groupName)
366 raises (SALOME::SALOME_Exception);
369 TEnfVertexList GetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
371 boolean UnsetEnforcedVertexEntry(in TEntry theFaceEntry, in double x, in double y, in double z, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
372 // boolean UnsetEnforcedVertexEntryGeom(in TEntry theFaceEntry, in TEntry theVertexEntry) raises (SALOME::SALOME_Exception);
373 boolean UnsetEnforcedVerticesEntry(in TEntry theFaceEntry) raises (SALOME::SALOME_Exception);
376 * Set/get an enforced vertex on geom object and add it to a group
379 void SetEnforcedVertexGroupName(in double x, in double y, in double z, in TEnfGroupName groupName)
380 raises (SALOME::SALOME_Exception);
381 string GetEnforcedVertexGroupName(in double x, in double y, in double z)
382 raises (SALOME::SALOME_Exception);
384 ///////////////////////
387 * Sets the file for export resulting mesh in GMF format
389 // void SetGMFFile(in string theFileName, in boolean isBinary);
390 void SetGMFFile(in string theFileName);
392 // boolean GetGMFFileMode();