Back to index

salome-smesh  6.5.0
Functions | Variables
SMESH_test5 Namespace Reference

Functions

def SetSObjName
def ConvertMED2UNV

Variables

tuple aPath = os.getenv('DATA_DIR')
tuple aListDir = os.listdir(aPath)
list aFileName = aListDir[iFile]

Function Documentation

def SMESH_test5.ConvertMED2UNV (   thePath,
  theFile 
)

Definition at line 43 of file SMESH_test5.py.

00043 
00044 def ConvertMED2UNV(thePath,theFile) :
00045     anInitFileName = thePath + theFile
00046     aMeshes,aResult = smesh.CreateMeshesFromMED(anInitFileName)
00047     print aResult, aMeshes
00048 
00049     for iMesh in range(len(aMeshes)) :
00050         aMesh = aMeshes[iMesh]
00051         print aMesh.GetName(),
00052         aFileName = anInitFileName
00053         aFileName = os.path.basename(aFileName)
00054         aMesh.SetName(aFileName)
00055         print aMesh.GetName()
00056 
00057         aOutPath = '/tmp/'
00058         aFileName = aOutPath + theFile + "." + str(iMesh) + ".unv"
00059         aMesh.ExportUNV(aFileName)
00060         aMesh = smesh.CreateMeshesFromUNV(aFileName)
00061         print aMesh.GetName(),
00062         os.remove(aFileName)
00063         aFileName = os.path.basename(aFileName)
00064         aMesh.SetName(aFileName)
00065         print aMesh.GetName()

def SMESH_test5.SetSObjName (   theSObj,
  theName 
)

Definition at line 36 of file SMESH_test5.py.

00036 
00037 def SetSObjName(theSObj,theName) :
00038     ok, anAttr = theSObj.FindAttribute("AttributeName")
00039     if ok:
00040         aName = anAttr._narrow(SALOMEDS.AttributeName)
00041         #print aName.__dict__
00042         aName.SetValue(theName)


Variable Documentation

Definition at line 71 of file SMESH_test5.py.

tuple SMESH_test5.aListDir = os.listdir(aPath)

Definition at line 67 of file SMESH_test5.py.

tuple SMESH_test5.aPath = os.getenv('DATA_DIR')

Definition at line 66 of file SMESH_test5.py.