From 236b5af70ef21aef7eaea0c68d9453b263302fdf Mon Sep 17 00:00:00 2001 From: Anthony Geay Date: Tue, 16 Jun 2020 14:01:53 +0200 Subject: [PATCH] Python wrapping of MEDFileMesh.ConvertFromMEDFileGeoType --- src/MEDLoader/Swig/MEDLoaderCommon.i | 6 ++++++ src/MEDLoader/Swig/MEDLoaderTest3.py | 3 +++ 2 files changed, 9 insertions(+) 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 -- 2.39.2