]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
Python wrapping of MEDFileMesh.ConvertFromMEDFileGeoType
authorAnthony Geay <anthony.geay@edf.fr>
Tue, 16 Jun 2020 12:01:53 +0000 (14:01 +0200)
committervsr <vsr@opencascade.com>
Tue, 23 Jun 2020 16:15:02 +0000 (19:15 +0300)
src/MEDLoader/Swig/MEDLoaderCommon.i
src/MEDLoader/Swig/MEDLoaderTest3.py

index 3d051d5136eca06f425cedd8fab458bb958c60c3..062e282004c39680f6183d14220d9310f78d316f 100644 (file)
@@ -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;
index ef1369b22026824c2a130b3ce5a55222b8680b2c..8b68a492e73effd8436618e55240a4e2f42dbf9c 100644 (file)
@@ -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