From: yfr Date: Tue, 20 Jul 2004 08:27:55 +0000 (+0000) Subject: DCQ:prepare 2.0.0 X-Git-Tag: V2_0_0~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=911bf85e07d88ab762d9c5fb9242de5e8b8ae66a;p=modules%2Fvisu.git DCQ:prepare 2.0.0 --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 1b8e88ac..97fddf99 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -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") diff --git a/src/VISU_SWIG/visu.py b/src/VISU_SWIG/visu.py index 86d8adc8..840c61ea 100644 --- a/src/VISU_SWIG/visu.py +++ b/src/VISU_SWIG/visu.py @@ -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: