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")
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: