Salome HOME
Merge from BR_V7_periodicity 22/08/2013
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPluginBuilder.py
1 # Copyright (C) 2007-2013  CEA/DEN, EDF R&D
2 #
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.
7 #
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.
12 #
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
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19
20 ##
21 # @package BLSURFPluginBuilder
22 # Python API for the BLSURF meshing plug-in module.
23
24 from salome.smesh.smesh_algorithm import Mesh_Algorithm
25 from salome.smesh.smeshBuilder import AssureGeomPublished
26
27 # Topology treatment way of BLSURF
28 FromCAD, PreProcess, PreProcessPlus, PreCAD = 0,1,2,3
29
30 # Element size flag of BLSURF
31 DefaultSize, DefaultGeom, BLSURF_GlobalSize, BLSURF_LocalSize = 0,0,1,2
32 # Retrocompatibility
33 BLSURF_Custom, SizeMap = BLSURF_GlobalSize, BLSURF_LocalSize
34
35
36 # import BLSURFPlugin module if possible
37 noBLSURFPlugin = 0
38 try:
39   import BLSURFPlugin
40 except ImportError:
41   noBLSURFPlugin = 1
42   pass
43
44 #----------------------------
45 # Mesh algo type identifiers
46 #----------------------------
47
48 ## Algorithm type: BLSurf triangle 2D algorithm, see BLSURF_Algorithm
49 BLSURF = "BLSURF"
50
51 #----------------------
52 # Algorithms
53 #----------------------
54
55 ## BLSurf 2D algorithm.
56 #
57 #  It can be created by calling smeshBuilder.Mesh.Triangle(smeshBuilder.BLSURF,geom=0)
58 #
59 class BLSURF_Algorithm(Mesh_Algorithm):
60
61   ## name of the dynamic method in smeshBuilder.Mesh class
62   #  @internal
63   meshMethod = "Triangle"
64   ## type of algorithm used with helper function in smeshBuilder.Mesh class
65   #  @internal
66   algoType   = BLSURF
67   ## doc string of the method
68   #  @internal
69   docHelper  = "Creates triangle 2D algorithm for faces"
70
71   _anisotropic_ratio = 0
72   _bad_surface_element_aspect_ratio = 1000
73   _geometric_approximation = 22
74   _gradation  = 1.3
75   _metric = "isotropic"
76   _remove_tiny_edges = 0
77
78   ## Private constructor.
79   #  @param mesh parent mesh object algorithm is assigned to
80   #  @param geom geometry (shape/sub-shape) algorithm is assigned to;
81   #              if it is @c 0 (default), the algorithm is assigned to the main shape
82   def __init__(self, mesh, geom=0):
83     Mesh_Algorithm.__init__(self)
84     if noBLSURFPlugin:
85       print "Warning: BLSURFPlugin module unavailable"
86     self.Create(mesh, geom, BLSURF, "libBLSURFEngine.so")
87     self.params=None
88     #self.SetPhysicalMesh() - PAL19680
89     pass
90
91   ## Sets a way to define size of mesh elements to generate.
92   #  @param thePhysicalMesh is: DefaultSize, BLSURF_Custom or SizeMap.
93   def SetPhysicalMesh(self, thePhysicalMesh=DefaultSize):
94     physical_size_mode = thePhysicalMesh
95     if self.Parameters().GetGeometricMesh() == DefaultGeom:
96       if physical_size_mode == DefaultSize:
97         physical_size_mode = BLSURF_GlobalSize
98     self.Parameters().SetPhysicalMesh(physical_size_mode)
99     pass
100
101   ## Sets a way to define maximum angular deflection of mesh from CAD model.
102   #  @param theGeometricMesh is: DefaultGeom (0)) or BLSURF_GlobalSize (1))
103   def SetGeometricMesh(self, theGeometricMesh=DefaultGeom):
104     geometric_size_mode = theGeometricMesh
105     if self.Parameters().GetPhysicalMesh() == DefaultSize:
106       if geometric_size_mode == DefaultGeom:
107         geometric_size_mode = BLSURF_GlobalSize
108     self.Parameters().SetGeometricMesh(geometric_size_mode)
109     pass
110
111   ## Sets size of mesh elements to generate.
112   #  @param theVal : constant global size when using a global physical size.
113   #  @param isRelative : if True, the value is relative to the length of the diagonal of the bounding box
114   def SetPhySize(self, theVal, isRelative = False):
115     if self.Parameters().GetPhysicalMesh() == DefaultSize:
116       self.SetPhysicalMesh(BLSURF_GlobalSize)
117     if isRelative:
118       self.Parameters().SetPhySizeRel(theVal)
119     else:
120       self.Parameters().SetPhySize(theVal)
121     pass
122
123   ## Sets lower boundary of mesh element size.
124   #  @param theVal : global minimal cell size desired.
125   #  @param isRelative : if True, the value is relative to the length of the diagonal of the bounding box
126   def SetMinSize(self, theVal=-1, isRelative = False):
127     if isRelative:
128       self.Parameters().SetMinSizeRel(theVal)
129     else:
130       self.Parameters().SetMinSize(theVal)
131     pass
132
133   ## Sets upper boundary of mesh element size.
134   #  @param theVal : global maximal cell size desired.
135   #  @param isRelative : if True, the value is relative to the length of the diagonal of the bounding box
136   def SetMaxSize(self, theVal=-1):
137     if isRelative:
138       self.Parameters().SetMaxSizeRel(theVal)
139     else:
140       self.Parameters().SetMaxSize(theVal)
141     pass
142
143   ## Sets angular deflection (in degrees) from CAD surface.
144   #  @param theVal value of angular deflection
145   def SetAngleMesh(self, theVal=_geometric_approximation):
146     if self.Parameters().GetGeometricMesh() == DefaultGeom:
147       self.SetGeometricMesh(BLSURF_GlobalSize)
148     self.Parameters().SetAngleMesh(theVal)
149     pass
150
151   ## Sets maximal allowed ratio between the lengths of two adjacent edges.
152   #  @param theVal value of maximal length ratio
153   def SetGradation(self, theVal=_gradation):
154     if self.Parameters().GetGeometricMesh() == 0: theVal = self._gradation
155     self.Parameters().SetGradation(theVal)
156     pass
157
158   ## Sets topology usage way.
159   # @param way defines how mesh conformity is assured <ul>
160   # <li>FromCAD - mesh conformity is assured by conformity of a shape</li>
161   # <li>PreProcess or PreProcessPlus - by pre-processing a CAD model (OBSOLETE: FromCAD will be used)</li>
162   # <li>PreCAD - by pre-processing with PreCAD a CAD model</li></ul>
163   def SetTopology(self, way):
164     if way != PreCAD:
165       print "Warning: topology mode %d is no longer supported. Mode FromCAD is used."%way
166       way = FromCAD
167     self.Parameters().SetTopology(way)
168     pass
169
170   ## To respect geometrical edges or not.
171   #  @param toIgnoreEdges "ignore edges" flag value
172   def SetDecimesh(self, toIgnoreEdges=False):
173     if toIgnoreEdges:
174       self.SetOptionValue("respect_geometry","0")
175     else:
176       self.SetOptionValue("respect_geometry","1")
177     pass
178
179   ## Sets verbosity level in the range 0 to 100.
180   #  @param level verbosity level
181   def SetVerbosity(self, level):
182     self.Parameters().SetVerbosity(level)
183     pass
184
185   ## To optimize merges edges.
186   #  @param toMergeEdges "merge edges" flag value
187   def SetPreCADMergeEdges(self, toMergeEdges=False):
188     if self.Parameters().GetTopology() != PreCAD:
189       self.SetTopology(PreCAD)
190     self.Parameters().SetPreCADMergeEdges(toMergeEdges)
191     pass
192
193   ## To process 3D topology.
194   #  @param toProcess "PreCAD process 3D" flag value
195   def SetPreCADProcess3DTopology(self, toProcess=False):
196     if self.Parameters().GetTopology() != PreCAD:
197       self.SetTopology(PreCAD)
198     self.Parameters().SetPreCADProcess3DTopology(toProcess)
199     pass
200
201   ## To remove nano edges.
202   #  @param toRemoveNanoEdges "remove nano edges" flag value
203   def SetPreCADRemoveNanoEdges(self, toRemoveNanoEdges=False):
204     if toRemoveNanoEdges:
205       self.SetPreCADOptionValue("remove_tiny_edges","1")
206     else:
207       self.SetPreCADOptionValue("remove_tiny_edges","0")
208     pass
209
210   ## To compute topology from scratch
211   #  @param toDiscardInput "discard input" flag value
212   def SetPreCADDiscardInput(self, toDiscardInput=False):
213     if self.Parameters().GetTopology() != PreCAD:
214       self.SetTopology(PreCAD)
215     self.Parameters().SetPreCADDiscardInput(toDiscardInput)
216     pass
217
218   ## Sets the length below which an edge is considered as nano
219   #  for the topology processing.
220   #  @param epsNano nano edge length threshold value
221   def SetPreCADEpsNano(self, epsNano):
222     self.SetPreCADOptionValue("tiny_edge_length","%f"%epsNano)
223     pass
224
225   ## Sets advanced option value.
226   #  @param optionName advanced option name
227   #  @param level advanced option value
228   def SetOptionValue(self, optionName, level):
229     self.Parameters().SetOptionValue(optionName,level)
230     pass
231
232   ## Sets advanced PreCAD option value.
233   #  @param optionName name of the option
234   #  @param optionValue value of the option
235   def SetPreCADOptionValue(self, optionName, optionValue):
236     if self.Parameters().GetTopology() != PreCAD:
237       self.SetTopology(PreCAD)
238     self.Parameters().SetPreCADOptionValue(optionName,optionValue)
239     pass
240
241   ## Sets GMF file for export at computation
242   #  @param fileName GMF file name
243   def SetGMFFile(self, fileName):
244     self.Parameters().SetGMFFile(fileName)
245     pass
246
247   #-----------------------------------------
248   # Enforced vertices (BLSURF)
249   #-----------------------------------------
250
251   ## To get all the enforced vertices
252   def GetAllEnforcedVertices(self):
253     return self.Parameters().GetAllEnforcedVertices()
254
255   ## To get all the enforced vertices sorted by face (or group, compound)
256   def GetAllEnforcedVerticesByFace(self):
257     return self.Parameters().GetAllEnforcedVerticesByFace()
258
259   ## To get all the enforced vertices sorted by coords of input vertices
260   def GetAllEnforcedVerticesByCoords(self):
261     return self.Parameters().GetAllEnforcedVerticesByCoords()
262
263   ## To get all the coords of input vertices sorted by face (or group, compound)
264   def GetAllCoordsByFace(self):
265     return self.Parameters().GetAllCoordsByFace()
266
267   ## To get all the enforced vertices on a face (or group, compound)
268   #  @param theFace : GEOM face (or group, compound) on which to define an enforced vertex
269   def GetEnforcedVertices(self, theFace):
270     AssureGeomPublished( self.mesh, theFace )
271     return self.Parameters().GetEnforcedVertices(theFace)
272
273   ## To clear all the enforced vertices
274   def ClearAllEnforcedVertices(self):
275     return self.Parameters().ClearAllEnforcedVertices()
276
277   ## To set an enforced vertex on a face (or group, compound) given the coordinates of a point. If the point is not on the face, it will projected on it. If there is no projection, no enforced vertex is created.
278   #  @param theFace      : GEOM face (or group, compound) on which to define an enforced vertex
279   #  @param x            : x coordinate
280   #  @param y            : y coordinate
281   #  @param z            : z coordinate
282   #  @param vertexName   : name of the enforced vertex
283   #  @param groupName    : name of the group
284   def SetEnforcedVertex(self, theFace, x, y, z, vertexName = "", groupName = ""):
285     AssureGeomPublished( self.mesh, theFace )
286     if vertexName == "":
287       if groupName == "":
288         return self.Parameters().SetEnforcedVertex(theFace, x, y, z)
289       else:
290         return self.Parameters().SetEnforcedVertexWithGroup(theFace, x, y, z, groupName)
291       pass
292     else:
293       if groupName == "":
294         return self.Parameters().SetEnforcedVertexNamed(theFace, x, y, z, vertexName)
295       else:
296         return self.Parameters().SetEnforcedVertexNamedWithGroup(theFace, x, y, z, vertexName, groupName)
297       pass
298     pass
299
300   ## To set an enforced vertex on a face (or group, compound) given a GEOM vertex, group or compound.
301   #  @param theFace      : GEOM face (or group, compound) on which to define an enforced vertex
302   #  @param theVertex    : GEOM vertex (or group, compound) to be projected on theFace.
303   #  @param groupName    : name of the group
304   def SetEnforcedVertexGeom(self, theFace, theVertex, groupName = ""):
305     AssureGeomPublished( self.mesh, theFace )
306     AssureGeomPublished( self.mesh, theVertex )
307     if groupName == "":
308       return self.Parameters().SetEnforcedVertexGeom(theFace, theVertex)
309     else:
310       return self.Parameters().SetEnforcedVertexGeomWithGroup(theFace, theVertex,groupName)
311     pass
312
313   ## To remove an enforced vertex on a given GEOM face (or group, compound) given the coordinates.
314   #  @param theFace      : GEOM face (or group, compound) on which to remove the enforced vertex
315   #  @param x            : x coordinate
316   #  @param y            : y coordinate
317   #  @param z            : z coordinate
318   def UnsetEnforcedVertex(self, theFace, x, y, z):
319     AssureGeomPublished( self.mesh, theFace )
320     return self.Parameters().UnsetEnforcedVertex(theFace, x, y, z)
321
322   ## To remove an enforced vertex on a given GEOM face (or group, compound) given a GEOM vertex, group or compound.
323   #  @param theFace      : GEOM face (or group, compound) on which to remove the enforced vertex
324   #  @param theVertex    : GEOM vertex (or group, compound) to remove.
325   def UnsetEnforcedVertexGeom(self, theFace, theVertex):
326     AssureGeomPublished( self.mesh, theFace )
327     AssureGeomPublished( self.mesh, theVertex )
328     return self.Parameters().UnsetEnforcedVertexGeom(theFace, theVertex)
329
330   ## To remove all enforced vertices on a given face.
331   #  @param theFace      : face (or group/compound of faces) on which to remove all enforced vertices
332   def UnsetEnforcedVertices(self, theFace):
333     AssureGeomPublished( self.mesh, theFace )
334     return self.Parameters().UnsetEnforcedVertices(theFace)
335
336   ## To tell BLSURF to add a node on internal vertices
337   #  @param toEnforceInternalVertices : boolean; if True the internal vertices are added as enforced vertices
338   def SetInternalEnforcedVertexAllFaces(self, toEnforceInternalVertices):
339     return self.Parameters().SetInternalEnforcedVertexAllFaces(toEnforceInternalVertices)
340
341   ## To know if BLSURF will add a node on internal vertices
342   def GetInternalEnforcedVertexAllFaces(self):
343     return self.Parameters().GetInternalEnforcedVertexAllFaces()
344
345   ## To define a group for the nodes of internal vertices
346   #  @param groupName : string; name of the group
347   def SetInternalEnforcedVertexAllFacesGroup(self, groupName):
348     return self.Parameters().SetInternalEnforcedVertexAllFacesGroup(groupName)
349
350   ## To get the group name of the nodes of internal vertices
351   def GetInternalEnforcedVertexAllFacesGroup(self):
352     return self.Parameters().GetInternalEnforcedVertexAllFacesGroup()
353
354   #-----------------------------------------
355   #  Attractors
356   #-----------------------------------------
357
358   ## Sets an attractor on the chosen face. The mesh size will decrease exponentially with the distance from theAttractor, following the rule h(d) = theEndSize - (theEndSize - theStartSize) * exp [ - ( d / theInfluenceDistance ) ^ 2 ]
359   #  @param theFace      : face on which the attractor will be defined
360   #  @param theAttractor : geometrical object from which the mesh size "h" decreases exponentially
361   #  @param theStartSize : mesh size on theAttractor
362   #  @param theEndSize   : maximum size that will be reached on theFace
363   #  @param theInfluenceDistance : influence of the attractor ( the size grow slower on theFace if it's high)
364   #  @param theConstantSizeDistance : distance until which the mesh size will be kept constant on theFace
365   def SetAttractorGeom(self, theFace, theAttractor, theStartSize, theEndSize, theInfluenceDistance, theConstantSizeDistance):
366     AssureGeomPublished( self.mesh, theFace )
367     AssureGeomPublished( self.mesh, theAttractor )
368     self.Parameters().SetAttractorGeom(theFace, theAttractor, theStartSize, theEndSize, theInfluenceDistance, theConstantSizeDistance)
369     pass
370
371   ## Unsets an attractor on the chosen face.
372   #  @param theFace      : face on which the attractor has to be removed
373   def UnsetAttractorGeom(self, theFace):
374     AssureGeomPublished( self.mesh, theFace )
375     self.Parameters().SetAttractorGeom(theFace)
376     pass
377
378   #-----------------------------------------
379   # Size maps (BLSURF)
380   #-----------------------------------------
381
382   ## To set a size map on a face, edge or vertex (or group, compound) given Python function.
383   #  If theObject is a face, the function can be: def f(u,v): return u+v
384   #  If theObject is an edge, the function can be: def f(t): return t/2
385   #  If theObject is a vertex, the function can be: def f(): return 10
386   #  @param theObject   : GEOM face, edge or vertex (or group, compound) on which to define a size map
387   #  @param theSizeMap  : Size map defined as a string
388   def SetSizeMap(self, theObject, theSizeMap):
389     AssureGeomPublished( self.mesh, theObject )
390     self.Parameters().SetSizeMap(theObject, theSizeMap)
391     pass
392
393   ## To set a constant size map on a face, edge or vertex (or group, compound).
394   #  @param theObject   : GEOM face, edge or vertex (or group, compound) on which to define a size map
395   #  @param theSizeMap  : Size map defined as a double
396   def SetConstantSizeMap(self, theObject, theSizeMap):
397     AssureGeomPublished( self.mesh, theObject )
398     self.Parameters().SetConstantSizeMap(theObject, theSizeMap)
399
400   ## To remove a size map defined on a face, edge or vertex (or group, compound)
401   #  @param theObject   : GEOM face, edge or vertex (or group, compound) on which to define a size map
402   def UnsetSizeMap(self, theObject):
403     AssureGeomPublished( self.mesh, theObject )
404     self.Parameters().UnsetSizeMap(theObject)
405     pass
406
407   ## To remove all the size maps
408   def ClearSizeMaps(self):
409     self.Parameters().ClearSizeMaps()
410     pass
411
412   ## Sets QuadAllowed flag.
413   #  @param toAllow "allow quadrangles" flag value
414   def SetQuadAllowed(self, toAllow=True):
415     self.Parameters().SetQuadAllowed(toAllow)
416     pass
417
418   ## Defines hypothesis having several parameters
419   #  @return hypothesis object
420   def Parameters(self):
421     if not self.params:
422       self.params = self.Hypothesis("BLSURF_Parameters", [],
423                                     "libBLSURFEngine.so", UseExisting=0)
424       pass
425     return self.params
426
427   #-----------------------------------------
428   # Periodicity (BLSURF with PreCAD)
429   #-----------------------------------------
430   
431   ## Defines periodicity between two groups of faces, using PreCAD
432   #  @param theFace1 : GEOM face (or group, compound) to associate with theFace2
433   #  @param theFace2 : GEOM face (or group, compound) associated with theFace1
434   #  @param theSourceVertices (optionnal): list of GEOM vertices on theFace1 defining the transformation from theFace1 to theFace2.
435   #    If None, PreCAD tries to find a simple translation. Else, need at least 3 not aligned vertices.
436   #  @param theTargetVertices (optionnal): list of GEOM vertices on theFace2 defining the transformation from theFace1 to theFace2.
437   #    If None, PreCAD tries to find a simple translation. Else, need at least 3 not aligned vertices.
438   def AddPreCadFacesPeriodicity(self, theFace1, theFace2, theSourceVertices=[], theTargetVertices=[]):
439     """calls preCad function:
440     status_t cad_add_face_multiple_periodicity_with_transformation_function(cad t *cad,
441           integer *fid1, integer size1, integer *fid2, integer size2,
442           periodicity_transformation_t transf, void *user data);
443     """
444     if theSourceVertices and theTargetVertices:
445       self.Parameters().AddPreCadFacesPeriodicityWithVertices(theFace1, theFace2, theSourceVertices, theTargetVertices)
446     else:
447       self.Parameters().AddPreCadFacesPeriodicity(theFace1, theFace2)
448     pass
449
450   ## Defines periodicity between two groups of edges, using PreCAD
451   #  @param theEdge1 : GEOM edge (or group, compound) to associate with theEdge2
452   #  @param theEdge2 : GEOM edge (or group, compound) associated with theEdge1
453   #  @param theSourceVertices (optionnal): list of GEOM vertices on theEdge1 defining the transformation from theEdge1 to theEdge2.
454   #    If None, PreCAD tries to find a simple translation. Else, need at least 3 not aligned vertices.
455   #  @param  theTargetVertices (optionnal): list of GEOM vertices on theEdge2 defining the transformation from theEdge1 to theEdge2.
456   #    If None, PreCAD tries to find a simple translation. Else, need at least 3 not aligned vertices.
457   def AddPreCadEdgesPeriodicity(self, theEdge1, theEdge2, theSourceVertices=[], theTargetVertices=[]):
458     """calls preCad function:
459     status_t cad_add_edge_multiple_periodicity_with_transformation_function(cad t *cad,
460           integer *eid1, integer size1, integer *eid2, integer size2,
461           periodicity_transformation_t transf, void *user data);
462     """
463     if theSourceVertices and theTargetVertices:
464         self.Parameters().AddPreCadEdgesPeriodicityWithVertices(theEdge1, theEdge2, theSourceVertices, theTargetVertices)
465     else:
466         self.Parameters().AddPreCadEdgesPeriodicity(theEdge1, theEdge2)
467     pass
468
469
470   #-----------------------------------------
471   # Periodicity (BLSURF without PreCAD)
472   #-----------------------------------------
473
474
475   ## Defines periodicity between two faces, without using PreCAD.
476   #  User has to call AddEdgePeriodicity with the edges of the face,
477   #  and AddVertexPeriodicity with the vertices of each edge.
478   #  @param theFace1 : GEOM face to associate with theFace2
479   #  @param theFace2 : GEOM face associated with theFace1
480   def AddFacePeriodicity(self, theFace1, theFace2):
481     self.Parameters().AddFacePeriodicity(theFace1, theFace2)
482     pass
483       
484   ## Defines periodicity between two edges belonging to two periodic faces, without using PreCAD.
485   #  To be used with AddFacePeriodicity.
486   #  User has to call AddVertexPeriodicity with the vertices of each edge
487   #  @param theFace1 : GEOM face to associate with theFace2
488   #  @param theEdge1 : GEOM edge to associate with theEdge2
489   #  @param theFace2 : GEOM face associated with theFace1
490   #  @param theEdge2 : GEOM edge associated with theEdge1
491   #  @param theEdgeOrientation : -1 (reversed), 0 (unknown) or 1 (forward)
492   def AddEdgePeriodicity(self, theFace1, theEdge1, theFace2, theEdge2, theEdgeOrientation=0):
493     self.Parameters().AddEdgePeriodicity(theFace1, theEdge1, theFace2, theEdge2, theEdgeOrientation)
494     pass
495
496   ## Defines periodicity between two edges without face periodicity, without using PreCAD.
497   #  User has to call AddVertexPeriodicity with the vertices of each edge.
498   #  @param theEdge1 : GEOM edge to associate with theEdge2
499   #  @param theEdge2 : GEOM edge associated with theEdge1
500   #  @param theEdgeOrientation : -1 (reversed), 0 (unknown) or 1 (forward)
501   def AddEdgePeriodicityWithoutFaces(self, theEdge1, theEdge2, theEdgeOrientation=0):
502     self.Parameters().AddEdgePeriodicityWithoutFaces(theEdge1, theEdge2, theEdgeOrientation)
503     pass
504       
505   ## Defines periodicity between two vertices.
506   #  To be used with AddFacePeriodicity and AddEdgePeriodicity.
507   #  @param theEdge1 : GEOM edge to associate with theEdge2
508   #  @param theVertex1 : GEOM face to associate with theVertex2
509   #  @param theEdge2 : GEOM edge associated with theEdge1
510   #  @param theVertex2 : GEOM face associated with theVertex1
511   def AddVertexPeriodicity(self, theEdge1, theVertex1, theEdge2, theVertex2):
512     self.Parameters().AddVertexPeriodicity(theEdge1, theVertex1, theEdge2, theVertex2)
513     pass
514
515
516   #=====================
517   # Obsolete methods
518   #=====================
519   #
520   # SALOME 6.6.0
521   #
522
523   ## Sets lower boundary of mesh element size (PhySize).
524   def SetPhyMin(self, theVal=-1):
525     """
526     Obsolete function. Use SetMinSize.
527     """
528     print "Warning: SetPhyMin is obsolete. Please use SetMinSize"
529     self.SetMinSize(theVal)
530     pass
531
532   ## Sets upper boundary of mesh element size (PhySize).
533   def SetPhyMax(self, theVal=-1):
534     """
535     Obsolete function. Use SetMaxSize.
536     """
537     print "Warning: SetPhyMax is obsolete. Please use SetMaxSize"
538     self.SetMaxSize(theVal)
539     pass
540
541   ## Sets angular deflection (in degrees) of a mesh face from CAD surface.
542   def SetAngleMeshS(self, theVal=_geometric_approximation):
543     """
544     Obsolete function. Use SetAngleMesh.
545     """
546     print "Warning: SetAngleMeshS is obsolete. Please use SetAngleMesh"
547     self.SetAngleMesh(theVal)
548     pass
549
550   ## Sets angular deflection (in degrees) of a mesh edge from CAD curve.
551   def SetAngleMeshC(self, theVal=_geometric_approximation):
552     """
553     Obsolete function. Use SetAngleMesh.
554     """
555     print "Warning: SetAngleMeshC is obsolete. Please use SetAngleMesh"
556     self.SetAngleMesh(theVal)
557     pass
558
559   ## Sets lower boundary of mesh element size computed to respect angular deflection.
560   def SetGeoMin(self, theVal=-1):
561     """
562     Obsolete function. Use SetMinSize.
563     """
564     print "Warning: SetGeoMin is obsolete. Please use SetMinSize"
565     self.SetMinSize(theVal)
566     pass
567
568   ## Sets upper boundary of mesh element size computed to respect angular deflection.
569   def SetGeoMax(self, theVal=-1):
570     """
571     Obsolete function. Use SetMaxSize.
572     """
573     print "Warning: SetGeoMax is obsolete. Please use SetMaxSize"
574     self.SetMaxSize(theVal)
575     pass
576
577
578   pass # end of BLSURF_Algorithm class