Salome HOME
Merge from V6_3_BR branch (Windows porting) 27/10/2011
[modules/smesh.git] / src / SMESH_SWIG / smeshDC.py
index a11feb4d6213d6b3a8e4bf03deab09c42bd5085d..29b6c39fdd41dac1032feb1efd16e8267b54e51d 100644 (file)
@@ -697,6 +697,17 @@ class smeshDC(SMESH._objref_SMESH_Gen):
             aMeshes.append(aMesh)
         return aMeshes, aStatus
 
+    ## Creates a Mesh object(s) importing data from the given SAUV file
+    #  @return a list of Mesh class instances
+    #  @ingroup l2_impexp
+    def CreateMeshesFromSAUV( self,theFileName ):
+        aSmeshMeshes, aStatus = SMESH._objref_SMESH_Gen.CreateMeshesFromSAUV(self,theFileName)
+        aMeshes = []
+        for iMesh in range(len(aSmeshMeshes)) :
+            aMesh = Mesh(self, self.geompyD, aSmeshMeshes[iMesh])
+            aMeshes.append(aMesh)
+        return aMeshes, aStatus
+
     ## Creates a Mesh object importing data from the given STL file
     #  @return an instance of Mesh class
     #  @ingroup l2_impexp
@@ -1413,6 +1424,15 @@ class Mesh:
     def Projection1D(self, geom=0):
         return Mesh_Projection1D(self,  geom)
 
+    ## Creates a projection 1D-2D algorithm for faces.
+    #  If the optional \a geom parameter is not set, this algorithm is global.
+    #  Otherwise, this algorithm defines a submesh based on \a geom subshape.
+    #  @param geom If defined, the subshape to be meshed
+    #  @return an instance of Mesh_Projection2D algorithm
+    #  @ingroup l3_algos_proj
+    def Projection1D2D(self, geom=0):
+        return Mesh_Projection2D(self,  geom, "Projection_1D2D")
+
     ## Creates a projection 2D algorithm for faces.
     #  If the optional \a geom parameter is not set, this algorithm is global.
     #  Otherwise, this algorithm defines a submesh based on \a geom subshape.
@@ -1420,7 +1440,7 @@ class Mesh:
     #  @return an instance of Mesh_Projection2D algorithm
     #  @ingroup l3_algos_proj
     def Projection2D(self, geom=0):
-        return Mesh_Projection2D(self,  geom)
+        return Mesh_Projection2D(self,  geom, "Projection_2D")
 
     ## Creates a projection 3D algorithm for solids.
     #  If the optional \a geom parameter is not set, this algorithm is global.
@@ -1738,6 +1758,15 @@ class Mesh:
         else:
             self.mesh.ExportToMEDX(f, auto_groups, version, overwrite)
 
+    ## Exports the mesh in a file in SAUV format
+    #  @param f is the file name
+    #  @param auto_groups boolean parameter for creating/not creating
+    #  the groups Group_On_All_Nodes, Group_On_All_Faces, ... ;
+    #  the typical use is auto_groups=false.
+    #  @ingroup l2_impexp
+    def ExportSAUV(self, f, auto_groups=0):
+        self.mesh.ExportSAUV(f, auto_groups)
+
     ## Exports the mesh in a file in DAT format
     #  @param f the file name
     #  @param meshPart a part of mesh (group, sub-mesh) to export instead of the mesh
@@ -6093,9 +6122,9 @@ class Mesh_Projection1D(Mesh_Algorithm):
 class Mesh_Projection2D(Mesh_Algorithm):
 
     ## Private constructor.
-    def __init__(self, mesh, geom=0):
+    def __init__(self, mesh, geom=0, algoName="Projection_2D"):
         Mesh_Algorithm.__init__(self)
-        self.Create(mesh, geom, "Projection_2D")
+        self.Create(mesh, geom, algoName)
 
     ## Defines "Source Face" hypothesis, specifying a meshed face, from where
     #  a mesh pattern is taken, and, optionally, the association of vertices