# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-2021 CEA/DEN, EDF R&D
+# Copyright (C) 2007-2024 CEA, EDF
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
import sys
-if sys.platform == "win32":
- from MEDCouplingCompat import *
-else:
- from medcoupling import *
+from medcoupling import *
import unittest
from math import pi, sqrt
with tempfile.TemporaryDirectory() as tmpdirname:
os.chdir(tmpdirname)
ret = func(*args,**kwargs)
+ os.chdir(os.path.dirname(tmpdirname))
pass
return ret
return decoratedFunc
badCellIds=mesh.are2DCellsNotCorrectlyOriented( vec, False )
assert len( badCellIds ) == 0 # the orientation is OK
#! [PySnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_2]
+ #! [PySnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_3]
+ mesh.orientCorrectly2DCells( None )
+ #! [PySnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_3]
+ #! [PySnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_4]
+ refCells = [ 0,2 ]
+ objCells = [ 1,3 ]
+ refGroup = mesh.buildPartOfMySelf( refCells )
+ objGroup = mesh.buildPartOfMySelf( objCells )
+ objGroup.orientCorrectly2DCells( refGroup )
+ mesh.setPartOfMySelf( objCells, objGroup )
+ #! [PySnippet_MEDCouplingUMesh_are2DCellsNotCorrectlyOriented_4]
return
def testExample_MEDCouplingUMesh_getCellsContainingPoints(self):