Salome HOME
Addition of MEDFileUMesh.__getitem__ in python bindings to ease fetch of MEDCouplingU...
[tools/medcoupling.git] / src / MEDLoader / Swig / MEDLoaderCommon.i
index e069accbc61706da8f6e42eee32c0b06d4fb7518..f9143b5a8d3efb8d93f9ffb5b45b6f32cd145578 100644 (file)
@@ -112,6 +112,7 @@ using namespace ParaMEDMEM;
 %newobject ParaMEDMEM::MEDFileUMesh::extractNumberFieldOnGeoType;
 %newobject ParaMEDMEM::MEDFileUMesh::zipCoords;
 %newobject ParaMEDMEM::MEDFileUMesh::buildExtrudedMesh;
+%newobject ParaMEDMEM::MEDFileUMesh::__getitem__;
 %newobject ParaMEDMEM::MEDFileCMesh::New;
 %newobject ParaMEDMEM::MEDFileCurveLinearMesh::New;
 %newobject ParaMEDMEM::MEDFileMeshMultiTS::New;
@@ -900,6 +901,11 @@ namespace ParaMEDMEM
            }
          }
 
+         MEDCouplingUMesh *__getitem__(int meshDimRelToMaxExt) const throw(INTERP_KERNEL::Exception)
+         {
+           return self->getMeshAtLevel(meshDimRelToMaxExt,false);
+         }
+
          void setMeshes(PyObject *li, bool renum=false) throw(INTERP_KERNEL::Exception)
          {
            std::vector<const MEDCouplingUMesh *> ms;