]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
DCQ:prepare 2.0.0
authoryfr <yfr@opencascade.com>
Tue, 20 Jul 2004 08:27:55 +0000 (08:27 +0000)
committeryfr <yfr@opencascade.com>
Tue, 20 Jul 2004 08:27:55 +0000 (08:27 +0000)
src/CONVERTOR/VISU_Convertor_impl.cxx
src/VISU_SWIG/visu.py

index 1b8e88acb5d828488aca2c8d987e3f0e061b7bcd..97fddf99d2bab3d749a907aa2ecc50c4322592e3 100644 (file)
@@ -163,7 +163,7 @@ namespace{
        int aMeshDimension = theMesh.myDim;
        bool anIsDimPresent[3] = {false, false, false};
        for(int iDim = 0; iDim < aMeshDimension; iDim++){
-         string aDimName = theMesh.myPointsDim[iDim];
+         string aDimName = theMesh.myPointsDim.at(iDim);
          if(aDimName == "x" || aDimName == "X")
            anIsDimPresent[eX] = true;
          else if(aDimName == "y" || aDimName == "Y")
index 86d8adc8a7392b8dccfdde36f65d6f9a3d58a542..840c61eab9691de12e87e3916f1cb94aad9c3748 100644 (file)
@@ -99,17 +99,20 @@ def CreateStudyForMed(theVisu, theFileName) :
             return [aStudy, myViewManager, myView]
     raise RuntimeError, "Error: There is no shuch file."
 
-def getMedObjectFromStudy(theStudy = myLocalStudy):
+def getMedSObject(theStudy = myLocalStudy ):
     if theStudy is None:
         theStudy = myLocalStudy
-    mySO = theStudy.FindObject("Objet MED")
-    anAttr = mySO.FindAttribute("AttributeIOR")[1]
-    obj = myORB.string_to_object(anAttr.Value())
-    myObj = obj._narrow(SALOME_MED.MED)
-    return myObj
+    aSO = theStudy.FindObject("Med")
+    anIsPresetn, aSObject = aSO.FindSubObject(1)
+    return aSObject
 
-def getMedSObject(theStudy = myLocalStudy ):
-    return theStudy.FindObject("Objet MED")
+def getMedObjectFromStudy(theStudy = myLocalStudy):
+    aSObject = getMedSObject(theStudy)
+    if aSObject:
+        anAttr = aSObject.FindAttribute("AttributeIOR")[1]
+        anObj = myORB.string_to_object(anAttr.Value())
+        return  anObj._narrow(SALOME_MED.MED)
+    return None
 
 def getFieldObjectFromStudy(number, subnumber, theStudy = myLocalStudy):
     if theStudy is None: