Salome HOME
OK thanks to INV !
[modules/med.git] / src / MEDCoupling_Swig / MEDCouplingTypemaps.i
index 27a6de03ee46ace0d49c2b5e3307887ebd2154a1..b0d4e26cc93de588af63583ae337fde1cf46a97e 100644 (file)
@@ -419,6 +419,8 @@ static PyObject *convertMesh(ParaMEDMEM::MEDCouplingMesh *mesh, int owner) throw
     ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCouplingUMesh,owner);
   if(dynamic_cast<ParaMEDMEM::MEDCoupling1SGTUMesh *>(mesh))
     ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1SGTUMesh,owner);
+  if(dynamic_cast<ParaMEDMEM::MEDCoupling1DGTUMesh *>(mesh))
+    ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCoupling1DGTUMesh,owner);
   if(dynamic_cast<ParaMEDMEM::MEDCouplingExtrudedMesh *>(mesh))
     ret=SWIG_NewPointerObj((void*)mesh,SWIGTYPE_p_ParaMEDMEM__MEDCouplingExtrudedMesh,owner);
   if(dynamic_cast<ParaMEDMEM::MEDCouplingCMesh *>(mesh))
@@ -1123,7 +1125,10 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons
           PyObject *obj=PyList_GetItem(pyLi,i);
           int status=SWIG_ConvertPtr(obj,&argp,ty,0|0);
           if(!SWIG_IsOK(status))
-            throw INTERP_KERNEL::Exception("list must contain only MEDCouplingUMesh");
+            {
+              std::ostringstream oss; oss << "convertFromPyObjVectorOfObj : list is excepted to contain only " << typeStr << " instances !";
+              throw INTERP_KERNEL::Exception(oss.str().c_str());
+            }
           T arg=reinterpret_cast< T >(argp);
           ret[i]=arg;
         }
@@ -1138,7 +1143,7 @@ static void convertFromPyObjVectorOfObj(PyObject *pyLi, swig_type_info *ty, cons
           int status=SWIG_ConvertPtr(obj,&argp,ty,0|0);
           if(!SWIG_IsOK(status))
             {
-              std::ostringstream oss; oss << "tuple must contain only " << typeStr;
+              std::ostringstream oss; oss << "convertFromPyObjVectorOfObj : tuple is excepted to contain only " << typeStr << " instances !";
               throw INTERP_KERNEL::Exception(oss.str().c_str());
             }
           T arg=reinterpret_cast< T >(argp);