From: Anthony Geay Date: Tue, 16 Jun 2020 12:01:53 +0000 (+0200) Subject: Python wrapping of MEDFileMesh.ConvertFromMEDFileGeoType X-Git-Tag: V9_5_0rc2~2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=236b5af70ef21aef7eaea0c68d9453b263302fdf;p=tools%2Fmedcoupling.git Python wrapping of MEDFileMesh.ConvertFromMEDFileGeoType --- diff --git a/src/MEDLoader/Swig/MEDLoaderCommon.i b/src/MEDLoader/Swig/MEDLoaderCommon.i index 3d051d513..062e28200 100644 --- a/src/MEDLoader/Swig/MEDLoaderCommon.i +++ b/src/MEDLoader/Swig/MEDLoaderCommon.i @@ -1203,6 +1203,12 @@ namespace MEDCoupling return self->getMeshAtLevel(meshDimRelToMaxExt,false); } + static INTERP_KERNEL::NormalizedCellType ConvertFromMEDFileGeoType(int geoType) + { + med_geometry_type geoType2((med_geometry_type) geoType); + return MEDFileMesh::ConvertFromMEDFileGeoType(geoType2); + } + PyObject *getTime() { int tmp1,tmp2; diff --git a/src/MEDLoader/Swig/MEDLoaderTest3.py b/src/MEDLoader/Swig/MEDLoaderTest3.py index ef1369b22..8b68a492e 100644 --- a/src/MEDLoader/Swig/MEDLoaderTest3.py +++ b/src/MEDLoader/Swig/MEDLoaderTest3.py @@ -6732,6 +6732,9 @@ class MEDLoaderTest3(unittest.TestCase): self.assertTrue(mm.getGroupArr(0,"grp2").isEqualWithoutConsideringStr(grp2)) self.assertEqual(mm.getFamiliesNames(),('Fam_1','Fam_2','Fam_6','Fam_7')) pass + + def testMeshConvertFromMEDFileGeoType(self): + self.assertEqual(MEDFileMesh.ConvertFromMEDFileGeoType(320),NORM_HEXA20) pass