Salome HOME
NPAL17920: error in init_smesh routine in smeshDC.py file.
[modules/smesh.git] / src / SMESH_SWIG / smeshDC.py
index a50e23fdb873fc6a00e3a22657d7a1a54c0e120f..c4fe06ac3162b2f876e9c56c4f61a35b1db52b7e 100644 (file)
@@ -43,7 +43,7 @@ try:
 except ImportError:
     noNETGENPlugin = 1
     pass
-    
+
 # Types of algo
 REGULAR    = 1
 PYTHON     = 2
@@ -60,7 +60,7 @@ NETGEN_FULL   = FULL_NETGEN
 
 # MirrorType enumeration
 POINT = SMESH_MeshEditor.POINT
-AXIS =  SMESH_MeshEditor.AXIS 
+AXIS =  SMESH_MeshEditor.AXIS
 PLANE = SMESH_MeshEditor.PLANE
 
 # Smooth_Method enumeration
@@ -136,10 +136,10 @@ def TreatHypoStatus(status, hypName, geomName, isAlgo):
 class smeshDC(SMESH._objref_SMESH_Gen):
 
     def init_smesh(self,theStudy,geompyD):
-        self.SetCurrentStudy(theStudy)
         self.geompyD=geompyD
         self.SetGeomEngine(geompyD)
-            
+        self.SetCurrentStudy(theStudy)
+
     def Mesh(self, obj=0, name=0):
       return Mesh(self,self.geompyD,obj,name)
 
@@ -310,7 +310,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
             aCriterion.Compare = self.EnumToLong(FT_EqualTo)
             aTreshold = Compare
             
-        if CritType in [FT_BelongToGeom,     FT_BelongToPlane, FT_BelongToGenSurface, 
+        if CritType in [FT_BelongToGeom,     FT_BelongToPlane, FT_BelongToGenSurface,
                         FT_BelongToCylinder, FT_LyingOnGeom]:
             # Check treshold
             if isinstance(aTreshold, geompyDC.GEOM._objref_GEOM_Object):
@@ -327,7 +327,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
                 print "Error: Treshold should be a string."
                 return None
         elif CritType in [FT_FreeBorders, FT_FreeEdges, FT_BadOrientedVolume]:
-            # Here we don't need treshold
+            # Here we do not need treshold
             if aTreshold ==  FT_LogicalNOT:
                 aCriterion.UnaryOp = self.EnumToLong(FT_LogicalNOT)
             elif aTreshold in [FT_LogicalAND, FT_LogicalOR]:
@@ -412,7 +412,7 @@ import omniORB
 omniORB.registerObjref(SMESH._objref_SMESH_Gen._NP_RepositoryId, smeshDC)
     
     
-## Mother class to define algorithm, recommended to don't use directly.
+## Mother class to define algorithm, recommended to do not use directly.
 #
 #  More details.
 class Mesh_Algorithm:
@@ -496,7 +496,7 @@ class Mesh_Algorithm:
         CreateNew = 1
         if UseExisting:
             hypo = self.FindHypothesis(hyp, args)
-            if hypo!=None: CreateNew = 0
+            if hypo: CreateNew = 0
             pass
         if CreateNew:
             hypo = self.mesh.smeshpyD.CreateHypothesis(hyp, so)
@@ -527,7 +527,7 @@ class Mesh_Algorithm:
 #  More details.
 class Mesh_Segment(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Segment's
+    algo = 0 # algorithm object common for all Mesh_Segments
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -646,7 +646,7 @@ class Mesh_Segment(Mesh_Algorithm):
 #  More details.
 class Mesh_CompositeSegment(Mesh_Segment):
 
-    algo = 0 # algorithm object common for all Mesh_CompositeSegment's
+    algo = 0 # algorithm object common for all Mesh_CompositeSegments
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -665,7 +665,7 @@ class Mesh_CompositeSegment(Mesh_Segment):
 #  More details.
 class Mesh_Segment_Python(Mesh_Segment):
 
-    algo = 0 # algorithm object common for all Mesh_Segment_Python's
+    algo = 0 # algorithm object common for all Mesh_Segment_Pythons
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -700,7 +700,7 @@ class Mesh_Triangle(Mesh_Algorithm):
     params = 0
 
     # algorithm objects common for all instances of Mesh_Triangle
-    algoMEF = 0    
+    algoMEF = 0
     algoNET = 0
     algoNET_2D = 0
 
@@ -805,22 +805,27 @@ class Mesh_Triangle(Mesh_Algorithm):
     #
     #  Only for algoType == NETGEN
     def SetMaxSize(self, theSize):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetMaxSize(theSize)
-        
+
     ## Set SecondOrder flag
     #
     #  Only for algoType == NETGEN
     def SetSecondOrder(self, theVal):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetSecondOrder(theVal)
-            return
 
     ## Set Optimize flag
     #
     #  Only for algoType == NETGEN
     def SetOptimize(self, theVal):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetOptimize(theVal)
 
     ## Set Fineness
@@ -829,33 +834,41 @@ class Mesh_Triangle(Mesh_Algorithm):
     #
     #  Only for algoType == NETGEN
     def SetFineness(self, theFineness):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetFineness(theFineness)
-        
-    ## Set GrowthRate  
+
+    ## Set GrowthRate
     #
     #  Only for algoType == NETGEN
     def SetGrowthRate(self, theRate):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetGrowthRate(theRate)
 
     ## Set NbSegPerEdge
     #
     #  Only for algoType == NETGEN
     def SetNbSegPerEdge(self, theVal):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetNbSegPerEdge(theVal)
 
     ## Set NbSegPerRadius
     #
     #  Only for algoType == NETGEN
     def SetNbSegPerRadius(self, theVal):
-        if self.params == 0 and self.Parameters():
+        if self.params == 0:
+            self.Parameters()
+        if self.params is not None:
             self.params.SetNbSegPerRadius(theVal)
 
     pass
-        
-    
+
+
 # Public class: Mesh_Quadrangle
 # -----------------------------
 
@@ -864,7 +877,7 @@ class Mesh_Triangle(Mesh_Algorithm):
 #  More details.
 class Mesh_Quadrangle(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Quadrangle's
+    algo = 0 # algorithm object common for all Mesh_Quadrangles
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -894,9 +907,9 @@ class Mesh_Tetrahedron(Mesh_Algorithm):
     params = 0
     algoType = 0
 
-    algoNET = 0 # algorithm object common for all Mesh_Tetrahedron's
-    algoGHS = 0 # algorithm object common for all Mesh_Tetrahedron's
-    algoFNET = 0 # algorithm object common for all Mesh_Tetrahedron's
+    algoNET = 0 # algorithm object common for all Mesh_Tetrahedrons
+    algoGHS = 0 # algorithm object common for all Mesh_Tetrahedrons
+    algoFNET = 0 # algorithm object common for all Mesh_Tetrahedrons
 
     ## Private constructor.
     def __init__(self, mesh, algoType, geom=0):
@@ -948,8 +961,8 @@ class Mesh_Tetrahedron(Mesh_Algorithm):
             return self.params
         else:
             print "Algo doesn't support this hypothesis"
-            return None 
-            
+            return None
+
     ## Set MaxSize
     def SetMaxSize(self, theSize):
         if self.params == 0:
@@ -975,8 +988,8 @@ class Mesh_Tetrahedron(Mesh_Algorithm):
         if self.params == 0:
             self.Parameters()
         self.params.SetFineness(theFineness)
-        
-    ## Set GrowthRate  
+
+    ## Set GrowthRate
     def SetGrowthRate(self, theRate):
         if self.params == 0:
             self.Parameters()
@@ -1002,7 +1015,7 @@ class Mesh_Tetrahedron(Mesh_Algorithm):
 #  More details.
 class Mesh_Hexahedron(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Hexahedron's
+    algo = 0 # algorithm object common for all Mesh_Hexahedrons
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1028,8 +1041,8 @@ class Mesh_Netgen(Mesh_Algorithm):
 
     is3D = 0
 
-    algoNET23 = 0 # algorithm object common for all Mesh_Netgen's
-    algoNET2 = 0 # algorithm object common for all Mesh_Netgen's
+    algoNET23 = 0 # algorithm object common for all Mesh_Netgens
+    algoNET2 = 0 # algorithm object common for all Mesh_Netgens
 
     ## Private constructor.
     def __init__(self, mesh, is3D, geom=0):
@@ -1073,7 +1086,7 @@ class Mesh_Netgen(Mesh_Algorithm):
 #  More details.
 class Mesh_Projection1D(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Projection1D's
+    algo = 0 # algorithm object common for all Mesh_Projection1Ds
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1113,7 +1126,7 @@ class Mesh_Projection1D(Mesh_Algorithm):
 #  More details.
 class Mesh_Projection2D(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Projection2D's
+    algo = 0 # algorithm object common for all Mesh_Projection2Ds
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1159,7 +1172,7 @@ class Mesh_Projection2D(Mesh_Algorithm):
 #  More details.
 class Mesh_Projection3D(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Projection3D's
+    algo = 0 # algorithm object common for all Mesh_Projection3Ds
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1207,7 +1220,7 @@ class Mesh_Projection3D(Mesh_Algorithm):
 #  More details.
 class Mesh_Prism3D(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_Prism3D's
+    algo = 0 # algorithm object common for all Mesh_Prism3Ds
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1227,7 +1240,7 @@ class Mesh_Prism3D(Mesh_Algorithm):
 #  More details.
 class Mesh_RadialPrism3D(Mesh_Algorithm):
 
-    algo = 0 # algorithm object common for all Mesh_RadialPrism3D's
+    algo = 0 # algorithm object common for all Mesh_RadialPrism3Ds
 
     ## Private constructor.
     def __init__(self, mesh, geom=0):
@@ -1318,6 +1331,26 @@ class Mesh_RadialPrism3D(Mesh_Algorithm):
         hyp.SetFineness( fineness )
         return hyp
 
+# Private class: Mesh_UseExisting
+# -------------------------------
+class Mesh_UseExisting(Mesh_Algorithm):
+
+    algo1D = 0 # StdMeshers_UseExisting_1D object common for all Mesh_UseExisting
+    algo2D = 0 # StdMeshers_UseExisting_2D object common for all Mesh_UseExisting
+
+    def __init__(self, dim, mesh, geom=0):
+        if dim == 1:
+            if not Mesh_UseExisting.algo1D:
+                Mesh_UseExisting.algo1D= self.Create(mesh, geom, "UseExisting_1D")
+            else:
+                self.Assign( Mesh_UseExisting.algo1D, mesh, geom)
+                pass
+        else:
+            if not Mesh_UseExisting.algo2D:
+                Mesh_UseExisting.algo2D= self.Create(mesh, geom, "UseExisting_2D")
+            else:
+                self.Assign( Mesh_UseExisting.algo2D, mesh, geom)
+                pass
 
 # Public class: Mesh
 # ==================
@@ -1394,8 +1427,8 @@ class Mesh:
     ## Method that associates given shape to the mesh(entails the mesh recreation)
     #  @param geom shape to be meshed(GEOM_Object)
     def SetShape(self, geom):
-        self.mesh = self.smeshpyD.CreateMesh(geom)  
-                
+        self.mesh = self.smeshpyD.CreateMesh(geom)
+
     ## Return true if hypotheses are defined well
     #  @param theMesh is an instance of Mesh class
     #  @param theSubObject subshape of a mesh shape
@@ -1411,7 +1444,7 @@ class Mesh:
         return self.smeshpyD.GetAlgoState(self.mesh, theSubObject)
     
     ## Return geometrical object the given element is built on.
-    #  The returned geometrical object, if not nil, is either found in the 
+    #  The returned geometrical object, if not nil, is either found in the
     #  study or is published by this method with the given name
     #  @param theMesh is an instance of Mesh class
     #  @param theElementID an id of the mesh element
@@ -1454,6 +1487,28 @@ class Mesh:
         else:
             return Mesh_Segment(self, geom)
         
+    ## Enable creation of nodes and segments usable by 2D algoritms.
+    #  Added nodes and segments must be bound to edges and vertices by
+    #  SetNodeOnVertex(), SetNodeOnEdge() and SetMeshElementOnShape()
+    #  If the optional \a geom parameter is not sets, this algorithm is global.
+    #  \n Otherwise, this algorithm define a submesh based on \a geom subshape.
+    #  @param geom subshape to be manually meshed
+    #  @return StdMeshers_UseExisting_1D algorithm that generates nothing
+    def UseExistingSegments(self, geom=0):
+        algo = Mesh_UseExisting(1,self,geom)
+        return algo.GetAlgorithm()
+
+    ## Enable creation of nodes and faces usable by 3D algoritms.
+    #  Added nodes and faces must be bound to geom faces by SetNodeOnFace()
+    #  and SetMeshElementOnShape()
+    #  If the optional \a geom parameter is not sets, this algorithm is global.
+    #  \n Otherwise, this algorithm define a submesh based on \a geom subshape.
+    #  @param geom subshape to be manually meshed
+    #  @return StdMeshers_UseExisting_2D algorithm that generates nothing
+    def UseExistingFaces(self, geom=0):
+        algo = Mesh_UseExisting(2,self,geom)
+        return algo.GetAlgorithm()
+
     ## Creates a triangle 2D algorithm for faces.
     #  If the optional \a geom parameter is not sets, this algorithm is global.
     #  \n Otherwise, this algorithm define a submesh based on \a geom subshape.
@@ -1626,7 +1681,7 @@ class Mesh:
             self.Quadrangle()
             pass
         if dim > 2 :
-            self.Hexahedron()            
+            self.Hexahedron()
             pass
         return self.Compute()
 
@@ -1674,7 +1729,7 @@ class Mesh:
     ## Create a mesh group based on geometric object \a grp
     #  and give a \a name, \n if this parameter is not defined
     #  the name is the same as the geometric group name \n
-    #  Note: Works like GroupOnGeom(). 
+    #  Note: Works like GroupOnGeom().
     #  @param grp  is a geometric group, a vertex, an edge, a face or a solid
     #  @param name is the name of the mesh group
     #  @return SMESH_GroupOnGeom
@@ -2069,19 +2124,34 @@ class Mesh:
         return self.mesh.GetElementType(id, iselem)
 
     ## Returns list of submesh elements ids
-    #  @param shapeID is geom object(subshape) IOR
-    def GetSubMeshElementsId(self, shapeID):
-        return self.mesh.GetSubMeshElementsId(shapeID)
+    #  @param Shape is geom object(subshape) IOR
+    #  Shape must be subshape of a ShapeToMesh()
+    def GetSubMeshElementsId(self, Shape):
+        if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
+            ShapeID = Shape.GetSubShapeIndices()[0]
+        else:
+            ShapeID = Shape
+        return self.mesh.GetSubMeshElementsId(ShapeID)
 
     ## Returns list of submesh nodes ids
-    #  @param shapeID is geom object(subshape) IOR
-    def GetSubMeshNodesId(self, shapeID, all):
-        return self.mesh.GetSubMeshNodesId(shapeID, all)
+    #  @param Shape is geom object(subshape) IOR
+    #  Shape must be subshape of a ShapeToMesh()
+    def GetSubMeshNodesId(self, Shape, all):
+        if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
+            ShapeID = Shape.GetSubShapeIndices()[0]
+        else:
+            ShapeID = Shape
+        return self.mesh.GetSubMeshNodesId(ShapeID, all)
     
     ## Returns list of ids of submesh elements with given type
-    #  @param shapeID is geom object(subshape) IOR
-    def GetSubMeshElementType(self, shapeID):
-        return self.mesh.GetSubMeshElementType(shapeID)
+    #  @param Shape is geom object(subshape) IOR
+    #  Shape must be subshape of a ShapeToMesh()
+    def GetSubMeshElementType(self, Shape):
+        if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
+            ShapeID = Shape.GetSubShapeIndices()[0]
+        else:
+            ShapeID = Shape
+        return self.mesh.GetSubMeshElementType(ShapeID)
       
     ## Get mesh description
     def Dump(self):
@@ -2101,12 +2171,17 @@ class Mesh:
     def GetNodeInverseElements(self, id):
         return self.mesh.GetNodeInverseElements(id)
 
+    ## @brief Return position of a node on shape
+    #  @return SMESH::NodePosition
+    def GetNodePosition(self,NodeID):
+        return self.mesh.GetNodePosition(NodeID)
+
     ## If given element is node returns IDs of shape from position
     #  \n If there is not node for given ID - returns -1
     def GetShapeID(self, id):
         return self.mesh.GetShapeID(id)
 
-    ## For given element returns ID of result shape after 
+    ## For given element returns ID of result shape after
     #  FindShape() from SMESH_MeshEditor
     #  \n If there is not element for given ID - returns -1
     def GetShapeIDForElem(self,id):
@@ -2224,6 +2299,87 @@ class Mesh:
     def AddPolyhedralVolumeByFaces (self, IdsOfFaces):
         return self.editor.AddPolyhedralVolumeByFaces(IdsOfFaces)
     
+
+    ## @brief Bind a node to a vertex
+    # @param NodeID - node ID
+    # @param Vertex - vertex or vertex ID
+    # @return True if succeed else raise an exception
+    def SetNodeOnVertex(self, NodeID, Vertex):
+        if ( isinstance( Vertex, geompy.GEOM._objref_GEOM_Object)):
+            VertexID = Vertex.GetSubShapeIndices()[0]
+        else:
+            VertexID = Vertex
+        try:
+            self.editor.SetNodeOnVertex(NodeID, VertexID)
+        except SALOME.SALOME_Exception, inst:
+            raise ValueError, inst.details.text
+        return True
+        
+
+    ## @brief Store node position on an edge
+    # @param NodeID - node ID
+    # @param Edge - edge or edge ID
+    # @param paramOnEdge - parameter on edge where the node is located
+    # @return True if succeed else raise an exception
+    def SetNodeOnEdge(self, NodeID, Edge, paramOnEdge):
+        if ( isinstance( Edge, geompy.GEOM._objref_GEOM_Object)):
+            EdgeID = Edge.GetSubShapeIndices()[0]
+        else:
+            EdgeID = Edge
+        try:
+            self.editor.SetNodeOnEdge(NodeID, EdgeID, paramOnEdge)
+        except SALOME.SALOME_Exception, inst:
+            raise ValueError, inst.details.text
+        return True
+
+    ## @brief Store node position on a face
+    # @param NodeID - node ID
+    # @param Face - face or face ID
+    # @param u - U parameter on face where the node is located
+    # @param v - V parameter on face where the node is located
+    # @return True if succeed else raise an exception
+    def SetNodeOnFace(self, NodeID, Face, u, v):
+        if ( isinstance( Face, geompy.GEOM._objref_GEOM_Object)):
+            FaceID = Face.GetSubShapeIndices()[0]
+        else:
+            FaceID = Face
+        try:
+            self.editor.SetNodeOnFace(NodeID, FaceID, u, v)
+        except SALOME.SALOME_Exception, inst:
+            raise ValueError, inst.details.text
+        return True
+
+    ## @brief Bind a node to a solid
+    # @param NodeID - node ID
+    # @param Solid - solid or solid ID
+    # @return True if succeed else raise an exception
+    def SetNodeInVolume(self, NodeID, Solid):
+        if ( isinstance( Solid, geompy.GEOM._objref_GEOM_Object)):
+            SolidID = Solid.GetSubShapeIndices()[0]
+        else:
+            SolidID = Solid
+        try:
+            self.editor.SetNodeInVolume(NodeID, SolidID)
+        except SALOME.SALOME_Exception, inst:
+            raise ValueError, inst.details.text
+        return True
+
+    ## @brief Bind an element to a shape
+    # @param ElementID - element ID
+    # @param Shape - shape or shape ID
+    # @return True if succeed else raise an exception
+    def SetMeshElementOnShape(self, ElementID, Shape):
+        if ( isinstance( Shape, geompy.GEOM._objref_GEOM_Object)):
+            ShapeID = Shape.GetSubShapeIndices()[0]
+        else:
+            ShapeID = Shape
+        try:
+            self.editor.SetMeshElementOnShape(ElementID, ShapeID)
+        except SALOME.SALOME_Exception, inst:
+            raise ValueError, inst.details.text
+        return True
+
+
     ## Move node with given id
     #  @param NodeID id of the node
     #  @param x new X coordinate
@@ -2494,9 +2650,9 @@ class Mesh:
     #  @param MaxNbOfIterations maximum number of iterations
     #  @param MaxAspectRatio varies in range [1.0, inf]
     #  @param Method is Laplacian(LAPLACIAN_SMOOTH) or Centroidal(CENTROIDAL_SMOOTH)
-    def SmoothObject(self, theObject, IDsOfFixedNodes, 
+    def SmoothObject(self, theObject, IDsOfFixedNodes,
                      MaxNbOfIterations, MaxxAspectRatio, Method):
-        return self.editor.SmoothObject(theObject, IDsOfFixedNodes, 
+        return self.editor.SmoothObject(theObject, IDsOfFixedNodes,
                                         MaxNbOfIterations, MaxxAspectRatio, Method)
 
     ## Parametric smooth the given elements
@@ -2525,13 +2681,13 @@ class Mesh:
         return self.editor.SmoothParametricObject(theObject, IDsOfFixedNodes,
                                                   MaxNbOfIterations, MaxAspectRatio, Method)
 
-    ## Converts all mesh to quadratic one, deletes old elements, replacing 
+    ## Converts all mesh to quadratic one, deletes old elements, replacing
     #  them with quadratic ones with the same id.
     def ConvertToQuadratic(self, theForce3d):
         self.editor.ConvertToQuadratic(theForce3d)
 
     ## Converts all mesh from quadratic to ordinary ones,
-    #  deletes old quadratic elements, \n replacing 
+    #  deletes old quadratic elements, \n replacing
     #  them with ordinary mesh elements with the same id.
     def ConvertFromQuadratic(self):
         return self.editor.ConvertFromQuadratic()
@@ -2580,7 +2736,7 @@ class Mesh:
 
     ## Generate new elements by extrusion of the elements with given ids
     #  @param IDsOfElements list of elements ids for extrusion
-    #  @param StepVector vector, defining the direction and value of extrusion 
+    #  @param StepVector vector, defining the direction and value of extrusion
     #  @param NbOfSteps the number of steps
     #  @param MakeGroups to generate new groups from existing ones
     def ExtrusionSweep(self, IDsOfElements, StepVector, NbOfSteps, MakeGroups=False):
@@ -2595,7 +2751,7 @@ class Mesh:
 
     ## Generate new elements by extrusion of the elements with given ids
     #  @param IDsOfElements is ids of elements
-    #  @param StepVector vector, defining the direction and value of extrusion 
+    #  @param StepVector vector, defining the direction and value of extrusion
     #  @param NbOfSteps the number of steps
     #  @param ExtrFlags set flags for performing extrusion
     #  @param SewTolerance uses for comparing locations of nodes if flag
@@ -2613,7 +2769,7 @@ class Mesh:
 
     ## Generate new elements by extrusion of the elements belong to object
     #  @param theObject object wich elements should be processed
-    #  @param StepVector vector, defining the direction and value of extrusion 
+    #  @param StepVector vector, defining the direction and value of extrusion
     #  @param NbOfSteps the number of steps
     #  @param MakeGroups to generate new groups from existing ones
     def ExtrusionSweepObject(self, theObject, StepVector, NbOfSteps, MakeGroups=False):
@@ -2626,7 +2782,7 @@ class Mesh:
 
     ## Generate new elements by extrusion of the elements belong to object
     #  @param theObject object wich elements should be processed
-    #  @param StepVector vector, defining the direction and value of extrusion 
+    #  @param StepVector vector, defining the direction and value of extrusion
     #  @param NbOfSteps the number of steps
     #  @param MakeGroups to generate new groups from existing ones
     def ExtrusionSweepObject1D(self, theObject, StepVector, NbOfSteps, MakeGroups=False):
@@ -2639,8 +2795,8 @@ class Mesh:
     
     ## Generate new elements by extrusion of the elements belong to object
     #  @param theObject object wich elements should be processed
-    #  @param StepVector vector, defining the direction and value of extrusion 
-    #  @param NbOfSteps the number of steps    
+    #  @param StepVector vector, defining the direction and value of extrusion
+    #  @param NbOfSteps the number of steps
     #  @param MakeGroups to generate new groups from existing ones
     def ExtrusionSweepObject2D(self, theObject, StepVector, NbOfSteps, MakeGroups=False):
         if ( isinstance( StepVector, geompyDC.GEOM._objref_GEOM_Object)):
@@ -2658,7 +2814,7 @@ class Mesh:
     #  @param NodeStart the first or the last node on the edge. It is used to define the direction of extrusion
     #  @param HasAngles allows the shape to be rotated around the path to get the resulting mesh in a helical fashion
     #  @param Angles list of angles
-    #  @param HasRefPoint allows to use base point 
+    #  @param HasRefPoint allows to use base point
     #  @param RefPoint point around which the shape is rotated(the mass center of the shape by default).
     #         User can specify any point as the Base Point and the shape will be rotated with respect to this point.
     #  @param MakeGroups to generate new groups from existing ones
@@ -2686,7 +2842,7 @@ class Mesh:
     #  @param NodeStart the first or the last node on the edge. It is used to define the direction of extrusion
     #  @param HasAngles allows the shape to be rotated around the path to get the resulting mesh in a helical fashion
     #  @param Angles list of angles
-    #  @param HasRefPoint allows to use base point 
+    #  @param HasRefPoint allows to use base point
     #  @param RefPoint point around which the shape is rotated(the mass center of the shape by default).
     #         User can specify any point as the Base Point and the shape will be rotated with respect to this point.
     #  @param MakeGroups to generate new groups from existing ones
@@ -2695,7 +2851,7 @@ class Mesh:
                                  HasAngles, Angles, HasRefPoint, RefPoint,
                                  MakeGroups=False, LinearVariation=False):
         if ( isinstance( RefPoint, geompyDC.GEOM._objref_GEOM_Object)):
-            RefPoint = self.smeshpyD.GetPointStruct(RefPoint) 
+            RefPoint = self.smeshpyD.GetPointStruct(RefPoint)
         if MakeGroups:
             return self.editor.ExtrusionAlongPathObjectMakeGroups(theObject, PathMesh.GetMesh(),
                                                                   PathShape, NodeStart, HasAngles,
@@ -2768,7 +2924,7 @@ class Mesh:
     #  @param IDsOfElements list of elements ids
     #  @param Axis axis of rotation(AxisStruct or geom line)
     #  @param AngleInRadians angle of rotation(in radians)
-    #  @param Copy allows to copy the rotated elements   
+    #  @param Copy allows to copy the rotated elements
     #  @param MakeGroups to generate new groups from existing ones (if Copy)
     def Rotate (self, IDsOfElements, Axis, AngleInRadians, Copy, MakeGroups=False):
         if IDsOfElements == []:
@@ -2868,13 +3024,13 @@ class Mesh:
         return self.editor.ChangeElemNodes(ide, newIDs)
     
     ## If during last operation of MeshEditor some nodes were
-    #  created this method returns list of it's IDs, \n
+    #  created this method returns list of its IDs, \n
     #  if new nodes not created - returns empty list
     def GetLastCreatedNodes(self):
         return self.editor.GetLastCreatedNodes()
 
     ## If during last operation of MeshEditor some elements were
-    #  created this method returns list of it's IDs, \n
+    #  created this method returns list of its IDs, \n
     #  if new elements not creared - returns empty list
     def GetLastCreatedElems(self):
         return self.editor.GetLastCreatedElems()