- print
- print "--- Get med object from study ..."
- med_obj = visu_gui.visu.getMedObjectFromStudy()
- if not med_obj:
- raise RuntimeError, "Med object is not found in the study"
- print "OK"
-
- print
- print "--- Get field from study ..."
- field = visu_gui.visu.getFieldObjectFromStudy(3,1)
- if not field:
- raise RuntimeError, "Field object is not found in the study"
- print "OK"
-
- print
- print "--- Import field to the VISU ..."
- aTimeStampId = -1
- result1 = visu.ImportMedField(field)
- if not result1:
- raise RuntimeError, "Can't import field"
- print "OK"
-
- print
- print "--- Create mesh presentation ..."
- mesh1 = visu.MeshOnEntity(result1, aMeshName, anEntity);
- if not mesh1:
- raise RuntimeError, "Can't create mesh presentation"
- print "OK"
-
- print
- print "--- Create scalar map ..."
- scalarMap1 = visu.ScalarMapOnField(result1, aMeshName, anEntity, field_name, aTimeStampId)
- if not scalarMap1:
- raise RuntimeError, "Can't create scalar map"
- print "OK"
-
- pass # if not med_comp
-
- print
- print "--- Import med file %s to the VISU ..." % medFile
- result2 = visu.ImportFile(medFile);
- if not result2:
- raise RuntimeError, "Can't import file"
- print "OK"
-
- print
- print "--- Create mesh presentation ..."
- mesh2 = visu.MeshOnEntity(result2, aMeshName, anEntity);
- if not mesh2:
- raise RuntimeError, "Can't create mesh presentation"
- print "OK"
-
- print
- print "--- Create scalar map ..."
- scalarMap2 = visu.ScalarMapOnField(result2, aMeshName, anEntity, field_name, 3)
- if not scalarMap2:
- raise RuntimeError, "Can't create scalar map"
- print "OK"
- pass