From: ana Date: Tue, 20 Sep 2011 14:27:08 +0000 (+0000) Subject: Integrate patches for win32 version X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FV6_3_BR;p=modules%2Fsmesh.git Integrate patches for win32 version --- diff --git a/idl/SMESH_Gen.idl b/idl/SMESH_Gen.idl index 9d70e066e..126c087e8 100644 --- a/idl/SMESH_Gen.idl +++ b/idl/SMESH_Gen.idl @@ -214,6 +214,13 @@ module SMESH out SMESH::DriverMED_ReadStatus theStatus ) raises ( SALOME::SALOME_Exception ); + /*! + * Create Mesh object(s) importing data from given MED file + */ + mesh_array CreateMeshesFromSAUV( in string theFileName, + out SMESH::DriverMED_ReadStatus theStatus ) + raises ( SALOME::SALOME_Exception ); + /*! * Create Mesh object importing data from given STL file */ diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 231753b09..062000999 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -577,6 +577,13 @@ module SMESH void ExportMED( in string file, in boolean auto_groups ) raises (SALOME::SALOME_Exception); + /*! + * Export Mesh to SAUV formatted file + * Write a temporary med file and use med2sauv + */ + void ExportSAUV( in string file, in boolean auto_groups ) + raises (SALOME::SALOME_Exception); + /*! * Return string representation of a MED file version comprising nbDigits */ diff --git a/src/SMESH_SWIG/smeshDC.py b/src/SMESH_SWIG/smeshDC.py index 3e344e61d..73913ce5c 100644 --- a/src/SMESH_SWIG/smeshDC.py +++ b/src/SMESH_SWIG/smeshDC.py @@ -677,6 +677,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 @@ -1685,6 +1696,15 @@ class Mesh: def ExportMED(self, f, auto_groups=0, version=MED_V2_2, overwrite=1): 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 # @ingroup l2_impexp