Salome HOME
[PY3] use python3 idioms, fix relative imports, fix plugins
[modules/smesh.git] / src / Tools / MacMesh / MacMesh / MacObject.py
index f2665083dca65df9ee917f8a8450ec95562b7388..162c7d5b7bd4e51681604865c8b0c215dc4b3110 100644 (file)
@@ -209,7 +209,7 @@ class MacObject:
         """
         PtCoor = self.PtCoor
         PtCoor.append(self.PtCoor[0])
-        if type(Direction) is str :
+        if isinstance(Direction, str) :
             Dir = { 'South'  : lambda : 0,
                     'North'  : lambda : 1,
                     'West'   : lambda : 2,
@@ -226,7 +226,7 @@ class MacObject:
         The interest in using this method is for non-orthogonal objects where the sides can be
         deviated from the orthogonal basis vectors
         """
-        if type(Direction) is str :
+        if isinstance(Direction, str) :
             Dir = { 'South'  : lambda : 0,
                     'North'  : lambda : 1,
                     'West'   : lambda : 2,
@@ -243,7 +243,7 @@ class MacObject:
         from salome.geom import geomBuilder
         geompy = geomBuilder.New( Config.theStudy )
 
-        if type(Criterion) is str :
+        if isinstance(Criterion, str) :
             Crit = {'South'  : lambda : 0,
                     'North'  : lambda : 1,
                     'West'   : lambda : 2,