Salome HOME
Mise à la norme python des fichiers
[modules/smesh.git] / src / Tools / blocFissure / CasTests / faceGauche.py
index 890a76ea80b913030e561265f2ea18688c05937f..0736bdb549e2b2ad2ddf7d45722147e9322ff0d2 100644 (file)
@@ -1,4 +1,22 @@
 # -*- coding: utf-8 -*-
+# Copyright (C) 2014-2020  EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License, or (at your option) any later version.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
 
 import os
 from blocFissure import gmu
@@ -23,9 +41,7 @@ from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
 O, OX, OY, OZ = triedreBase()
 
 class faceGauche(fissureGenerique):
-  """
-  problème de fissure non plane, débouchante non normale
-  """
+  """problème de fissure non plane, débouchante non normale"""
 
   nomProbleme = "faceGauche"
 
@@ -33,7 +49,7 @@ class faceGauche(fissureGenerique):
   def genereMaillageSain(self, geometriesSaines, meshParams):
     logging.info("genereMaillageSain %s", self.nomCas)
 
-    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheSain.med"))
+    ([objetSain], status) = smesh.CreateMeshesFromMED(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheSain.med"))
     smesh.SetName(objetSain.GetMesh(), 'objetSain')
 
     return [objetSain, True] # True : maillage hexa
@@ -57,7 +73,7 @@ class faceGauche(fissureGenerique):
 
     lgInfluence = shapeFissureParams['lgInfluence']
 
-    shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/faceGaucheFiss.brep"), "BREP")
+    shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "faceGaucheFiss.brep"))
     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
     geompy.UnionIDs(fondFiss, [6])
     geompy.addToStudy( shellFiss, 'shellFiss' )
@@ -94,12 +110,14 @@ class faceGauche(fissureGenerique):
 
   # ---------------------------------------------------------------------------
   def setReferencesMaillageFissure(self):
-    self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1284,
-                                          Entity_Quad_Triangle   = 2336,
-                                          Entity_Quad_Edge       = 758,
-                                          Entity_Quad_Penta      = 984,
-                                          Entity_Quad_Hexa       = 6416,
-                                          Entity_Node            = 85673,
-                                          Entity_Quad_Tetra      = 35990,
-                                          Entity_Quad_Quadrangle = 4285)
+    self.referencesMaillageFissure = dict( \
+                                          Entity_Quad_Quadrangle = 3997, \
+                                          Entity_Quad_Hexa = 5904, \
+                                          Entity_Node = 77735, \
+                                          Entity_Quad_Edge = 725, \
+                                          Entity_Quad_Triangle = 2176, \
+                                          Entity_Quad_Tetra = 32320, \
+                                          Entity_Quad_Pyramid = 1156, \
+                                          Entity_Quad_Penta = 856 \
+                                         )