From: Gérald NICOLAS Date: Tue, 27 Apr 2021 14:17:18 +0000 (+0200) Subject: Passage des cas-tests en moins de 1mn chacun X-Git-Tag: V9_7_0rc1~5^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=705ff2e64ca884a8b62d28974fd63a9f15772cb2;p=modules%2Fsmesh.git Passage des cas-tests en moins de 1mn chacun --- diff --git a/doc/salome/examples/blocFissure_01_without_session.py b/doc/salome/examples/blocFissure_01_without_session.py index 798b5fd69..fcdda3284 100755 --- a/doc/salome/examples/blocFissure_01_without_session.py +++ b/doc/salome/examples/blocFissure_01_without_session.py @@ -11,7 +11,7 @@ Gérald NICOLAS +33.1.78.19.43.52 """ -__revision__ = "V02.03" +__revision__ = "V02.04" import os import sys @@ -22,18 +22,7 @@ salome.standalone() salome.salome_init() from blocFissure.CasTests.blocFissureTest import blocFissureTest -BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle2","cubeCoin", "cubeMilieu", "cubeTransverse"]) -#BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2"]) -#BLOCFISSURE_TEST = blocFissureTest(["disque_perce"]) -#BLOCFISSURE_TEST = blocFissureTest(["faceGauche"]) -#BLOCFISSURE_TEST = blocFissureTest(["ellipse_1", "ellipse_2", "faceGauche_2"]) -#BLOCFISSURE_TEST = blocFissureTest(["eprouvetteCourbe"]) -#BLOCFISSURE_TEST = blocFissureTest(["eprouvetteDroite", "eprouvetteDroite_2"]) -#BLOCFISSURE_TEST = blocFissureTest(["vis"]) -#BLOCFISSURE_TEST = blocFissureTest(["fissureCoude_1", "fissureCoude_2", "fissureCoude_3", "fissureCoude_4", "fissureCoude_5", "fissureCoude_6", "fissureCoude_7", "fissureCoude_8", "fissureCoude_9", "fissureCoude_10", "fissure_Coude", "fissure_Coude_4"]) -#BLOCFISSURE_TEST = blocFissureTest(["fissureCoude_1", "fissureCoude_2", "fissureCoude_3", "fissureCoude_4", "fissureCoude_5"]) -#BLOCFISSURE_TEST = blocFissureTest(["fissureCoude_6", "fissureCoude_7", "fissureCoude_8", "fissureCoude_9", "fissureCoude_10"]) -#BLOCFISSURE_TEST = blocFissureTest(["fissure_Coude", "fissure_Coude_4"]) +BLOCFISSURE_TEST = blocFissureTest(["cubeAngle", "cubeAngle_2","cubeCoin", "cubeMilieu", "cubeTransverse"]) MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement() #sys.stdout.write(MESSAGE_ERREUR) del BLOCFISSURE_TEST diff --git a/doc/salome/examples/blocFissure_02_without_session.py b/doc/salome/examples/blocFissure_02_without_session.py index 454c70f3d..72700e3e9 100755 --- a/doc/salome/examples/blocFissure_02_without_session.py +++ b/doc/salome/examples/blocFissure_02_without_session.py @@ -6,7 +6,7 @@ Cas tests basés sur les matériels : . decoupeCylindre . disque_perce . fissureGauche -. fissureGauche2 +. fissureGauche_2 + ellipse, ellipse_disque, ellipse_probleme Copyright 2021 EDF @@ -14,7 +14,7 @@ Gérald NICOLAS +33.1.78.19.43.52 """ -__revision__ = "V02.03" +__revision__ = "V02.04" import os import sys @@ -25,10 +25,10 @@ salome.standalone() salome.salome_init() from blocFissure.CasTests.blocFissureTest import blocFissureTest -BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2", "faceGauche_2"]) -#BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2"]) +BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2"]) +#BLOCFISSURE_TEST = blocFissureTest(["cylindre", "cylindre_2", "disquePerce", "faceGauche","ellipse_1", "ellipse_2", "faceGauche_2"]) MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement() -sys.stdout.write(MESSAGE_ERREUR) +#sys.stdout.write(MESSAGE_ERREUR) del BLOCFISSURE_TEST # Diagnostic diff --git a/doc/salome/examples/blocFissure_07_without_session.py b/doc/salome/examples/blocFissure_07_without_session.py index 0d5413215..87ff9823b 100755 --- a/doc/salome/examples/blocFissure_07_without_session.py +++ b/doc/salome/examples/blocFissure_07_without_session.py @@ -11,7 +11,7 @@ Gérald NICOLAS +33.1.78.19.43.52 """ -__revision__ = "V02.03" +__revision__ = "V02.04" import os import sys @@ -22,8 +22,8 @@ salome.standalone() salome.salome_init() from blocFissure.CasTests.blocFissureTest import blocFissureTest -BLOCFISSURE_TEST = blocFissureTest(["vis"]) -#BLOCFISSURE_TEST = blocFissureTest(["vis", "tube"]) +BLOCFISSURE_TEST = blocFissureTest(["vis_1"]) +#BLOCFISSURE_TEST = blocFissureTest(["vis_1", "tube"]) MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement() #sys.stdout.write(MESSAGE_ERREUR) del BLOCFISSURE_TEST diff --git a/src/Tools/blocFissure/CasTests/CMakeLists.txt b/src/Tools/blocFissure/CasTests/CMakeLists.txt index d6bce955a..2aec25d1e 100644 --- a/src/Tools/blocFissure/CasTests/CMakeLists.txt +++ b/src/Tools/blocFissure/CasTests/CMakeLists.txt @@ -23,7 +23,7 @@ SET(plugin_SCRIPTS __init__.py blocFissureTest.py - cubeAngle2.py + cubeAngle_2.py cubeAngle.py cubeCoin.py cubeMilieu.py diff --git a/src/Tools/blocFissure/CasTests/blocFissureTest.py b/src/Tools/blocFissure/CasTests/blocFissureTest.py index 8a5335753..6beab0aed 100644 --- a/src/Tools/blocFissure/CasTests/blocFissureTest.py +++ b/src/Tools/blocFissure/CasTests/blocFissureTest.py @@ -17,17 +17,17 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -__revision__ = "V03.01" +__revision__ = "V03.02" """Lancement des cas-tests de blocFissure Temps par type de matériel : -. cubeAngle : 24s ["cubeAngle", "cubeAngle2"]) +. cubeAngle : 24s ["cubeAngle", "cubeAngle_2"]) . cubeFin : 42s ["cubeCoin", "cubeMilieu", "cubeTransverse"] . decoupeCylindre : 8s ["cylindre", "cylindre_2"] -. disque_perce (+ ellipse_disque) : 9s ["disque_perce"] +. disquePerce (+ ellipse_disque) : 9s ["disquePerce"] . fissureGauche : 26s ["faceGauche"] -. fissureGauche2 (+ ellipse + ellipse_probleme): 22s ["ellipse_1", "ellipse_2", "faceGauche_2"] +. fissureGauche_2 (+ ellipse + ellipse_probleme): 22s ["ellipse_1", "ellipse_2", "faceGauche_2"] . eprouvetteCourbe : 22s ["eprouvetteCourbe"] . eprouvetteDroite : 31s ["eprouvetteDroite", "eprouvetteDroite_2"] . vis : 9s ["vis"] @@ -66,7 +66,7 @@ print ("TORUN = {} # PB".format(TORUNPB)) # Numéro de référence associé à chaque problème défini par le nom de son fichier dans le répertoire CasTests NREF_PB = dict() NREF_PB["cubeAngle"] = 0 -NREF_PB["cubeAngle2"] = 1 +NREF_PB["cubeAngle_2"] = 1 NREF_PB["cubeCoin"] = 2 NREF_PB["cubeMilieu"] = 3 NREF_PB["cubeTransverse"] = 4 @@ -198,8 +198,8 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so n_cas = 1 if n_cas in self.l_cas: - from blocFissure.CasTests.cubeAngle2 import cubeAngle2 - self.l_problemes.append(cubeAngle2(n_cas)) + from blocFissure.CasTests.cubeAngle_2 import cubeAngle_2 + self.l_problemes.append(cubeAngle_2(n_cas)) self.l_materiels.append("cubeAngle") n_cas = 2 @@ -240,7 +240,7 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so from blocFissure.CasTests import disquePerce self.l_problemes.append(casStandard(disquePerce.dicoParams, disquePerce.referencesMaillageFissure, n_cas)) self.d_nom_probleme[n_cas] = "disquePerce" - self.l_materiels.append("disque_perce") + self.l_materiels.append("disquePerce") self.l_materiels.append("ellipse_disque") n_cas = 8 @@ -248,14 +248,14 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so from blocFissure.CasTests.ellipse_1 import ellipse_1 self.l_problemes.append(ellipse_1(n_cas)) self.l_materiels.append("ellipse") - self.l_materiels.append("fissureGauche2") + self.l_materiels.append("fissureGauche_2") n_cas = 9 if n_cas in self.l_cas: from blocFissure.CasTests.ellipse_2 import ellipse_2 self.l_problemes.append(ellipse_2(n_cas)) self.l_materiels.append("ellipse_probleme") - self.l_materiels.append("fissureGauche2") + self.l_materiels.append("fissureGauche_2") n_cas = 10 if n_cas in self.l_cas: @@ -285,7 +285,7 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so if n_cas in self.l_cas: from blocFissure.CasTests.faceGauche_2 import faceGauche_2 self.l_problemes.append(faceGauche_2(n_cas)) - self.l_materiels.append("fissureGauche2") + self.l_materiels.append("fissureGauche_2") n_cas = 15 if n_cas in self.l_cas: @@ -385,8 +385,8 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so if "decoupeCylindre" in self.l_materiels: from blocFissure.materielCasTests import decoupeCylindre - if "disque_perce" in self.l_materiels: - from blocFissure.materielCasTests import disque_perce + if "disquePerce" in self.l_materiels: + from blocFissure.materielCasTests import disquePerce if "ellipse_disque" in self.l_materiels: from blocFissure.materielCasTests import ellipse_disque @@ -400,8 +400,8 @@ Le(s) numéro/nom du/des tests à passer. Si aucun n'est donné, tous les cas so if "fissureGauche" in self.l_materiels: from blocFissure.materielCasTests import fissureGauche - if "fissureGauche2" in self.l_materiels: - from blocFissure.materielCasTests import fissureGauche2 + if "fissureGauche_2" in self.l_materiels: + from blocFissure.materielCasTests import fissureGauche_2 if "eprouvetteCourbe" in self.l_materiels: from blocFissure.materielCasTests import eprouvetteCourbe diff --git a/src/Tools/blocFissure/CasTests/cubeAngle2.py b/src/Tools/blocFissure/CasTests/cubeAngle2.py deleted file mode 100644 index f2ede5d65..000000000 --- a/src/Tools/blocFissure/CasTests/cubeAngle2.py +++ /dev/null @@ -1,64 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2014-2021 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 -# -"""problème de fissure plane coupant 2 faces (angle)""" - -import os - -from .cubeAngle import cubeAngle - -class cubeAngle2(cubeAngle): - """problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan - - detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe - """ - - nomProbleme = "cubeAngle2" - - # --------------------------------------------------------------------------- - def setParamShapeFissure(self): - """paramètres de la fissure pour méthode construitFissureGenerale - - lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage) - rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure - """ - self.shapeFissureParams = dict(lgInfluence = 20, - rayonPipe = 5) - - # --------------------------------------------------------------------------- - def setParamMaillageFissure(self): - self.maillageFissureParams = dict(nomRep = os.curdir, - nomFicSain = self.nomProbleme, - nomFicFissure = self.nomProbleme + "_fissure", - nbsegRad = 5, - nbsegCercle = 32, - areteFaceFissure = 5) - - # --------------------------------------------------------------------------- - def setReferencesMaillageFissure(self): - self.referencesMaillageFissure = dict( \ - Entity_Quad_Quadrangle = 2350, \ - Entity_Quad_Hexa = 5315, \ - Entity_Node = 38196, \ - Entity_Quad_Edge = 345, \ - Entity_Quad_Triangle = 1214, \ - Entity_Quad_Tetra = 7772, \ - Entity_Quad_Pyramid = 620, \ - Entity_Quad_Penta = 512 \ - ) diff --git a/src/Tools/blocFissure/CasTests/cubeAngle_2.py b/src/Tools/blocFissure/CasTests/cubeAngle_2.py new file mode 100644 index 000000000..24f2d01e1 --- /dev/null +++ b/src/Tools/blocFissure/CasTests/cubeAngle_2.py @@ -0,0 +1,64 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2014-2021 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 +# +"""problème de fissure plane coupant 2 faces (angle)""" + +import os + +from .cubeAngle import cubeAngle + +class cubeAngle_2(cubeAngle): + """problème de fissure plane coupant 2 faces (angle), débouches normaux, objet plan + + detection d'un probleme de tolerance sur les edges de jonction pipe et face fissure externe + """ + + nomProbleme = "cubeAngle_2" + + # --------------------------------------------------------------------------- + def setParamShapeFissure(self): + """paramètres de la fissure pour méthode construitFissureGenerale + + lgInfluence : distance autour de la shape de fissure a remailler (A ajuster selon le maillage) + rayonPipe : le rayon du pile maillé en hexa autour du fond de fissure + """ + self.shapeFissureParams = dict(lgInfluence = 20, + rayonPipe = 5) + + # --------------------------------------------------------------------------- + def setParamMaillageFissure(self): + self.maillageFissureParams = dict(nomRep = os.curdir, + nomFicSain = self.nomProbleme, + nomFicFissure = self.nomProbleme + "_fissure", + nbsegRad = 5, + nbsegCercle = 32, + areteFaceFissure = 5) + + # --------------------------------------------------------------------------- + def setReferencesMaillageFissure(self): + self.referencesMaillageFissure = dict( \ + Entity_Quad_Quadrangle = 2350, \ + Entity_Quad_Hexa = 5315, \ + Entity_Node = 38196, \ + Entity_Quad_Edge = 345, \ + Entity_Quad_Triangle = 1214, \ + Entity_Quad_Tetra = 7772, \ + Entity_Quad_Pyramid = 620, \ + Entity_Quad_Penta = 512 \ + ) diff --git a/src/Tools/blocFissure/CasTests/cylindre_2.py b/src/Tools/blocFissure/CasTests/cylindre_2.py index 05e6f22bc..4d0a93d4f 100644 --- a/src/Tools/blocFissure/CasTests/cylindre_2.py +++ b/src/Tools/blocFissure/CasTests/cylindre_2.py @@ -33,7 +33,7 @@ from .cylindre import cylindre class cylindre_2(cylindre): """problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline""" - nomProbleme = "cylindre2" + nomProbleme = "cylindre_2" # --------------------------------------------------------------------------- def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams, \ diff --git a/src/Tools/blocFissure/CasTests/disquePerce.py b/src/Tools/blocFissure/CasTests/disquePerce.py index 558afb038..8412b52d1 100644 --- a/src/Tools/blocFissure/CasTests/disquePerce.py +++ b/src/Tools/blocFissure/CasTests/disquePerce.py @@ -23,8 +23,8 @@ import os from blocFissure import gmu -dicoParams = dict(nomCas = 'disque', - nomProbleme = "disque", +dicoParams = dict(nomCas = 'disquePerce', + nomProbleme = "disquePerce", maillageSain = os.path.join(gmu.pathBloc, "materielCasTests", "disque.med"), CAOFaceFissure = os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_disque.brep"), edgeFiss = [3], diff --git a/src/Tools/blocFissure/CasTests/ellipse_1.py b/src/Tools/blocFissure/CasTests/ellipse_1.py index 764e75c48..d29eddc25 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_1.py +++ b/src/Tools/blocFissure/CasTests/ellipse_1.py @@ -34,7 +34,7 @@ from blocFissure.gmu.putName import putName class ellipse_1(fissureGenerique): """problème de fissure non plane, débouchante non normale""" - nomProbleme = "ellipse1" + nomProbleme = "ellipse_1" shapeFissureParams = dict() maillageFissureParams = dict() referencesMaillageFissure = dict() @@ -78,7 +78,7 @@ class ellipse_1(fissureGenerique): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/CasTests/ellipse_2.py b/src/Tools/blocFissure/CasTests/ellipse_2.py index b1dd29490..aaf78dc8a 100644 --- a/src/Tools/blocFissure/CasTests/ellipse_2.py +++ b/src/Tools/blocFissure/CasTests/ellipse_2.py @@ -32,7 +32,7 @@ from .ellipse_1 import ellipse_1 class ellipse_2(ellipse_1): """problème de fissure non plane, débouchante non normale""" - nomProbleme = "ellipse2" + nomProbleme = "ellipse_2" # --------------------------------------------------------------------------- def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams, \ @@ -43,7 +43,7 @@ class ellipse_2(ellipse_1): lgInfluence = shapeFissureParams['lgInfluence'] - shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1_pb.brep")) + shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1_pb.brep")) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) geompy.UnionIDs(fondFiss, [3]) geompy.addToStudy( shellFiss, 'shellFiss' ) diff --git a/src/Tools/blocFissure/doc/conf.py.in b/src/Tools/blocFissure/doc/conf.py.in index 5d530fb5c..b72f48cc0 100644 --- a/src/Tools/blocFissure/doc/conf.py.in +++ b/src/Tools/blocFissure/doc/conf.py.in @@ -43,7 +43,7 @@ master_doc = 'index' # General substitutions. project = 'Plug-in blocFissure' -copyright = '2010-2021 EDF R&D' +copyright = '2010-2021 EDF' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. diff --git a/src/Tools/blocFissure/doc/images/01_CubeAngle_2.png b/src/Tools/blocFissure/doc/images/01_CubeAngle_2.png deleted file mode 100644 index aa4b00c7b..000000000 Binary files a/src/Tools/blocFissure/doc/images/01_CubeAngle_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/01_CubeAngle_a.png b/src/Tools/blocFissure/doc/images/01_CubeAngle_a.png new file mode 100644 index 000000000..aa4b00c7b Binary files /dev/null and b/src/Tools/blocFissure/doc/images/01_CubeAngle_a.png differ diff --git a/src/Tools/blocFissure/doc/images/02_CubeAngle2.png b/src/Tools/blocFissure/doc/images/02_CubeAngle2.png deleted file mode 100644 index 3a0174839..000000000 Binary files a/src/Tools/blocFissure/doc/images/02_CubeAngle2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/02_CubeAngle2_2.png b/src/Tools/blocFissure/doc/images/02_CubeAngle2_2.png deleted file mode 100644 index d59072042..000000000 Binary files a/src/Tools/blocFissure/doc/images/02_CubeAngle2_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/02_CubeAngle_2.png b/src/Tools/blocFissure/doc/images/02_CubeAngle_2.png new file mode 100644 index 000000000..3a0174839 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/02_CubeAngle_2.png differ diff --git a/src/Tools/blocFissure/doc/images/02_CubeAngle_2_a.png b/src/Tools/blocFissure/doc/images/02_CubeAngle_2_a.png new file mode 100644 index 000000000..d59072042 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/02_CubeAngle_2_a.png differ diff --git a/src/Tools/blocFissure/doc/images/03_cylindre_2.png b/src/Tools/blocFissure/doc/images/03_cylindre_2.png deleted file mode 100644 index 106d20128..000000000 Binary files a/src/Tools/blocFissure/doc/images/03_cylindre_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/03_cylindre_a.png b/src/Tools/blocFissure/doc/images/03_cylindre_a.png new file mode 100644 index 000000000..106d20128 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/03_cylindre_a.png differ diff --git a/src/Tools/blocFissure/doc/images/04_cylindre2.png b/src/Tools/blocFissure/doc/images/04_cylindre2.png deleted file mode 100644 index 8f06c17d7..000000000 Binary files a/src/Tools/blocFissure/doc/images/04_cylindre2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/04_cylindre2_2.png b/src/Tools/blocFissure/doc/images/04_cylindre2_2.png deleted file mode 100644 index a065a41b6..000000000 Binary files a/src/Tools/blocFissure/doc/images/04_cylindre2_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/04_cylindre_2.png b/src/Tools/blocFissure/doc/images/04_cylindre_2.png new file mode 100644 index 000000000..8f06c17d7 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/04_cylindre_2.png differ diff --git a/src/Tools/blocFissure/doc/images/04_cylindre_2_a.png b/src/Tools/blocFissure/doc/images/04_cylindre_2_a.png new file mode 100644 index 000000000..a065a41b6 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/04_cylindre_2_a.png differ diff --git a/src/Tools/blocFissure/doc/images/05_disque_2.png b/src/Tools/blocFissure/doc/images/05_disque_2.png deleted file mode 100644 index deda21495..000000000 Binary files a/src/Tools/blocFissure/doc/images/05_disque_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/05_disque_a.png b/src/Tools/blocFissure/doc/images/05_disque_a.png new file mode 100644 index 000000000..deda21495 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/05_disque_a.png differ diff --git a/src/Tools/blocFissure/doc/images/06_ellipse1.png b/src/Tools/blocFissure/doc/images/06_ellipse1.png deleted file mode 100644 index 9ad5911d2..000000000 Binary files a/src/Tools/blocFissure/doc/images/06_ellipse1.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/06_ellipse1_2.png b/src/Tools/blocFissure/doc/images/06_ellipse1_2.png deleted file mode 100644 index 349ff365a..000000000 Binary files a/src/Tools/blocFissure/doc/images/06_ellipse1_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/06_ellipse_1.png b/src/Tools/blocFissure/doc/images/06_ellipse_1.png new file mode 100644 index 000000000..9ad5911d2 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/06_ellipse_1.png differ diff --git a/src/Tools/blocFissure/doc/images/06_ellipse_1_a.png b/src/Tools/blocFissure/doc/images/06_ellipse_1_a.png new file mode 100644 index 000000000..349ff365a Binary files /dev/null and b/src/Tools/blocFissure/doc/images/06_ellipse_1_a.png differ diff --git a/src/Tools/blocFissure/doc/images/07_ellipse2.png b/src/Tools/blocFissure/doc/images/07_ellipse2.png deleted file mode 100644 index 354b93d92..000000000 Binary files a/src/Tools/blocFissure/doc/images/07_ellipse2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/07_ellipse2_2.png b/src/Tools/blocFissure/doc/images/07_ellipse2_2.png deleted file mode 100644 index 0f306a7a7..000000000 Binary files a/src/Tools/blocFissure/doc/images/07_ellipse2_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/07_ellipse_2.png b/src/Tools/blocFissure/doc/images/07_ellipse_2.png new file mode 100644 index 000000000..354b93d92 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/07_ellipse_2.png differ diff --git a/src/Tools/blocFissure/doc/images/07_ellipse_2_a.png b/src/Tools/blocFissure/doc/images/07_ellipse_2_a.png new file mode 100644 index 000000000..0f306a7a7 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/07_ellipse_2_a.png differ diff --git a/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_2.png b/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_2.png deleted file mode 100644 index 53e826f67..000000000 Binary files a/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_a.png b/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_a.png new file mode 100644 index 000000000..53e826f67 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/08_eprouvetteCourbe_a.png differ diff --git a/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_2.png b/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_2.png deleted file mode 100644 index 9c5c2227d..000000000 Binary files a/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_a.png b/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_a.png new file mode 100644 index 000000000..9c5c2227d Binary files /dev/null and b/src/Tools/blocFissure/doc/images/09_eprouvetteDroite_a.png differ diff --git a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2.png b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2.png deleted file mode 100644 index 3801db32f..000000000 Binary files a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2_2.png b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2_2.png deleted file mode 100644 index 562865e25..000000000 Binary files a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite2_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2.png b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2.png new file mode 100644 index 000000000..3801db32f Binary files /dev/null and b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2.png differ diff --git a/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2_a.png b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2_a.png new file mode 100644 index 000000000..562865e25 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/10_eprouvetteDroite_2_a.png differ diff --git a/src/Tools/blocFissure/doc/images/12_faceGauche2.png b/src/Tools/blocFissure/doc/images/12_faceGauche2.png deleted file mode 100644 index ff0163a52..000000000 Binary files a/src/Tools/blocFissure/doc/images/12_faceGauche2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/12_faceGauche2_2.png b/src/Tools/blocFissure/doc/images/12_faceGauche2_2.png deleted file mode 100644 index 2e4cbe508..000000000 Binary files a/src/Tools/blocFissure/doc/images/12_faceGauche2_2.png and /dev/null differ diff --git a/src/Tools/blocFissure/doc/images/12_faceGauche_2.png b/src/Tools/blocFissure/doc/images/12_faceGauche_2.png new file mode 100644 index 000000000..ff0163a52 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/12_faceGauche_2.png differ diff --git a/src/Tools/blocFissure/doc/images/12_faceGauche_2_a.png b/src/Tools/blocFissure/doc/images/12_faceGauche_2_a.png new file mode 100644 index 000000000..2e4cbe508 Binary files /dev/null and b/src/Tools/blocFissure/doc/images/12_faceGauche_2_a.png differ diff --git a/src/Tools/blocFissure/doc/scripts.rst b/src/Tools/blocFissure/doc/scripts.rst index 078da2596..d8804c1c3 100644 --- a/src/Tools/blocFissure/doc/scripts.rst +++ b/src/Tools/blocFissure/doc/scripts.rst @@ -51,21 +51,21 @@ Geometrical parameters of the tore are illustrated : :align: center :alt: Geometrical parameters of the tore -Different levels of verbose are available. Use one of this 4 optional functions to set verbose type: +Different levels of verbose are available. The prints are located in the file ''LOGFILE''. Use one of this 4 optional functions to set verbose type: -- / **setDebug()** +- / **setDebug(LOGFILE)** -- / **setVerbose()** +- / **setVerbose(LOGFILE)** -- / **setRelease()** +- / **setRelease(LOGFILE)** -- / **setUnitTests()** +- / **setUnitTests(LOGFILE)** **example to run in salome session**:: from blocFissure import gmu from blocFissure.gmu import initLog - initLog.setDebug() + initLog.setDebug("/tmp/blocFissure.log") from blocFissure.casStandard import casStandard @@ -83,6 +83,8 @@ Different levels of verbose are available. Use one of this 4 optional functions execInstance = casStandard(dicoParams) + newmesh = execInstance.maillageFissure + diff --git a/src/Tools/blocFissure/doc/testcases.rst b/src/Tools/blocFissure/doc/testcases.rst index 8119c4e6e..57dc09481 100644 --- a/src/Tools/blocFissure/doc/testcases.rst +++ b/src/Tools/blocFissure/doc/testcases.rst @@ -4,96 +4,102 @@ Test cases ####################### -A base of 30 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes ` and the others 13 are for other :ref:`generic geometries `. They are shown here in order to illustrate cases on which « Bloc Fissure » works. +A base of 28 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes ` and the others 16 are for other :ref:`generic geometries `. They are shown here in order to illustrate cases on which « Bloc Fissure » works. .. _genericTC: Generic cases =============================== -All 13 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore. - -+-------------------------------------------+----------------------------------------------+ -| CubeAngle | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| CubeAngle2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/02_CubeAngle2.png | .. image:: images/02_CubeAngle2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| cylindre | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| cylindre2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/04_cylindre2.png | .. image:: images/04_cylindre2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| disque | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/05_disque.png | .. image:: images/05_disque_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| ellipse1 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/06_ellipse1.png | .. image:: images/06_ellipse1_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| ellipse2 (tilted crack) | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/07_ellipse2.png | .. image:: images/07_ellipse2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteCourbe | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteDroite | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| eprouvetteDroite2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/10_eprouvetteDroite2.png | .. image:: images/10_eprouvetteDroite2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| faceGauche | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| faceGauche2 | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/12_faceGauche2.png | .. image:: images/12_faceGauche2_2.png | -| :height: 300 | :height: 300 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| vis (Crack is in the radius filet between the screw head and the screw shank) | -+-------------------------------------------+----------------------------------------------+ -|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png | -| :width: 400 | :width: 400 | -| :align: center | :align: center | -+-------------------------------------------+----------------------------------------------+ -| tube | -+-------------------------------------------+----------------------------------------------+ +All 16 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore. + ++--------------------------------------------+-----------------------------------------------+ +| CubeAngle | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| CubeAngle_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/02_CubeAngle_2.png | .. image:: images/02_CubeAngle_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| cubeCoin | ++--------------------------------------------+-----------------------------------------------+ +| cubeMilieu | ++--------------------------------------------+-----------------------------------------------+ +| cubeTransverse | ++--------------------------------------------+-----------------------------------------------+ +| cylindre | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| cylindre_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/04_cylindre_2.png | .. image:: images/04_cylindre_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| disquePerce | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/05_disque.png | .. image:: images/05_disque_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| ellipse_1 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/06_ellipse_1.png | .. image:: images/06_ellipse_1_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| ellipse_2 (tilted crack) | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/07_ellipse_2.png | .. image:: images/07_ellipse_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteCourbe | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteDroite | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| eprouvetteDroite_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/10_eprouvetteDroite_2.png | .. image:: images/10_eprouvetteDroite_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| faceGauche | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| faceGauche_2 | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/12_faceGauche_2.png | .. image:: images/12_faceGauche_2_a.png | +| :height: 300 | :height: 300 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| vis (Crack is in the radius filet between the screw head and the screw shank) | ++--------------------------------------------+-----------------------------------------------+ +|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png | +| :width: 400 | :width: 400 | +| :align: center | :align: center | ++--------------------------------------------+-----------------------------------------------+ +| tube | ++--------------------------------------------+-----------------------------------------------+ .. _pipeTC: @@ -123,16 +129,14 @@ coude_0 can be computed using this file for the data: « Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s. -Running test cases +Data for the test cases ===================================== All the files for these test cases are stored in the directory of the installation of SALOME: ``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure`` -The test cases can be runned either through the python window of the SALOME GUI or with a python script. - -0) **Generate med and breps files.**:: +The set of the med, xao and brep files can be created by the following importation: from blocFissure.materielCasTests import genereMateriel @@ -142,48 +146,36 @@ Once the files are generated, they are saved into the directory of the installat There is no need to generate them again. -1) **To execute all test cases**:: - - from blocFissure.CasTests import execution_Cas - -2) **To execute only selected test cases**: +To check the installation of salome, the test cases can be computed by the salome test process:: -modify the file ``CasTests/execution_Cas.py`` and change:: + salome -test blocFissure - runall = False. #old : True - -And change from 0 to 1 of the index of the test you want to launch:: +Running test cases +===================================== - torun = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +The test cases can be runned by the following instructions:: -then launch the test cases:: + from blocFissure.CasTests.blocFissureTest import blocFissureTest + BLOCFISSURE_TEST = blocFissureTest(list_of_cases) + MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement() + sys.stdout.write(MESSAGE_ERREUR) + del BLOCFISSURE_TEST - from blocFissure.CasTests import execution_Cas +If ``list_of_cases`` is an empty list, all the cases are computed. -The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle2, -2 for cubeCoin... from top to bottom, then from left to right. +If not, ``list_of_cases`` is made of the list of the numbers and/or the name of the requested case. The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle_2, 2 for cubeCoin... from top to bottom, then from left to right. +--------------------+--------------------+--------------------+-----------------+-----------------+ | cubeAngle | cylindre_2 | eprouvetteDroite_2 | fissureCoude_3 | fissureCoude_9 | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| cubeAngle2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude | +| cubeAngle_2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude | +--------------------+--------------------+--------------------+-----------------+-----------------+ | cubeCoin | ellipse_1 | faceGauche_2 | fissureCoude_5 | fissure_Coude_4 | +--------------------+--------------------+--------------------+-----------------+-----------------+ | cubeMilieu | ellipse_2 | fissureCoude_1 | fissureCoude_6 | vis_1 | +--------------------+--------------------+--------------------+-----------------+-----------------+ -| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | tube | +| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | | +--------------------+--------------------+--------------------+-----------------+-----------------+ | cylindre | eprouvetteDroite | fissureCoude_2 | fissureCoude_8 | | +--------------------+--------------------+--------------------+-----------------+-----------------+ -3) **To execute only one test case**:: - - from blocFissure.CasTests.[TEST_CASE_NAME] import [TEST_CASE_NAME] - - [TEST_CASE_NAME](0).executeProbleme() - -[TEST_CASE_NAME] is the name of the test case in the previous list. Note that the test cases fissureCoude_4 and fissure_Coude_4 are very similar. - - - diff --git a/src/Tools/blocFissure/materielCasTests/CMakeLists.txt b/src/Tools/blocFissure/materielCasTests/CMakeLists.txt index 51701fde3..af61ca4b1 100644 --- a/src/Tools/blocFissure/materielCasTests/CMakeLists.txt +++ b/src/Tools/blocFissure/materielCasTests/CMakeLists.txt @@ -25,13 +25,13 @@ SET(plugin_SCRIPTS cubeAngle.py cubeFin.py decoupeCylindre.py - disque_perce.py + disquePerce.py ellipse_disque.py ellipse_probleme.py ellipse.py eprouvetteCourbe.py eprouvetteDroite.py - fissureGauche2.py + fissureGauche_2.py fissureGauche.py genereMateriel.py tube.py diff --git a/src/Tools/blocFissure/materielCasTests/cubeAngle.py b/src/Tools/blocFissure/materielCasTests/cubeAngle.py index b3ed2808b..fe9332e1e 100644 --- a/src/Tools/blocFissure/materielCasTests/cubeAngle.py +++ b/src/Tools/blocFissure/materielCasTests/cubeAngle.py @@ -19,7 +19,7 @@ # """Géométries et maillages de base nécessaires aux cas-tests : . cubeAngle -. cubeAngle2 +. cubeAngle_2 """ import os diff --git a/src/Tools/blocFissure/materielCasTests/disquePerce.py b/src/Tools/blocFissure/materielCasTests/disquePerce.py new file mode 100644 index 000000000..c56b9ec9c --- /dev/null +++ b/src/Tools/blocFissure/materielCasTests/disquePerce.py @@ -0,0 +1,105 @@ +# -*- coding: iso-8859-1 -*- +# Copyright (C) 2014-2021 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 +# +"""Géométrie et maillage de base nécessaire au cas-test : +. disquePerce +""" + +import os + +import logging + +import salome +from salome.smesh import smeshBuilder +from salome.StdMeshers import StdMeshersBuilder +import GEOM +import SMESH +import SALOMEDS + +from blocFissure import gmu +from blocFissure.gmu.geomsmesh import geompy +from blocFissure.gmu.geomsmesh import geomPublish +from blocFissure.gmu.geomsmesh import geomPublishInFather + +from blocFissure.gmu.triedreBase import triedreBase +from blocFissure.gmu.putName import putName +from blocFissure.gmu import initLog + +### +### GEOM component +### + +O, OX, OY, OZ = triedreBase() + +Cylinder_1 = geompy.MakeCylinderRH(100, 300) +Cylinder_2 = geompy.MakeCylinderRH(600, 200) +Cut_1 = geompy.MakeCut(Cylinder_2, Cylinder_1) +Face_1 = geompy.MakeFaceHW(500, 1500, 3) +Disque = geompy.MakePartition([Cut_1], [Face_1], [], [], geompy.ShapeType["SOLID"], 0, [], 0) +[Compound_1, Compound_2, Compound_3, Compound_4] = geompy.Propagate(Disque) +geompy.addToStudy( Disque, 'Disque' ) +geompy.addToStudyInFather( Disque, Compound_1, 'Compound_1' ) +geompy.addToStudyInFather( Disque, Compound_2, 'Compound_2' ) +geompy.addToStudyInFather( Disque, Compound_3, 'Compound_3' ) +geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' ) + +geomPublish(initLog.debug, Cylinder_1, 'Cylinder_1' ) +geomPublish(initLog.debug, Cylinder_2, 'Cylinder_2' ) +geomPublish(initLog.debug, Cut_1, 'Cut_1' ) +geomPublish(initLog.debug, Face_1, 'Face_1' ) + +### +### SMESH component +### + +smesh = smeshBuilder.New() +Disque_1 = smesh.Mesh(Disque) +putName(Disque_1.GetMesh(), 'Disque') + +Regular_1D = Disque_1.Segment() +Nb_Segments_1 = Regular_1D.NumberOfSegments(10) +Nb_Segments_1.SetDistrType( 0 ) +Hexa_3D = Disque_1.Hexahedron(algo=smeshBuilder.Hexa) +Regular_1D_1 = Disque_1.Segment(geom=Compound_3) +Nb_Segments_2 = Regular_1D_1.NumberOfSegments(20) +Nb_Segments_2.SetDistrType( 0 ) +Regular_1D_2 = Disque_1.Segment(geom=Compound_4) +status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4) +Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) + +## set object names +#smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') +#smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') +#smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') +putName(Nb_Segments_1, 'Nb. Segments_1', i_pref='Disque') +putName(Nb_Segments_2, 'Nb. Segments_2', i_pref='Disque') + +is_done = Disque_1.Compute() +text = "Disque_1.Compute" +if is_done: + logging.info(text+" OK") +else: + text = "Erreur au calcul du maillage.\n" + text + logging.info(text) + raise Exception(text) + +Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "disque.med")) + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/disque_perce.py b/src/Tools/blocFissure/materielCasTests/disque_perce.py deleted file mode 100644 index 0bc931a23..000000000 --- a/src/Tools/blocFissure/materielCasTests/disque_perce.py +++ /dev/null @@ -1,105 +0,0 @@ -# -*- coding: iso-8859-1 -*- -# Copyright (C) 2014-2021 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 -# -"""Géométrie et maillage de base nécessaire au cas-test : -. disque_perce -""" - -import os - -import logging - -import salome -from salome.smesh import smeshBuilder -from salome.StdMeshers import StdMeshersBuilder -import GEOM -import SMESH -import SALOMEDS - -from blocFissure import gmu -from blocFissure.gmu.geomsmesh import geompy -from blocFissure.gmu.geomsmesh import geomPublish -from blocFissure.gmu.geomsmesh import geomPublishInFather - -from blocFissure.gmu.triedreBase import triedreBase -from blocFissure.gmu.putName import putName -from blocFissure.gmu import initLog - -### -### GEOM component -### - -O, OX, OY, OZ = triedreBase() - -Cylinder_1 = geompy.MakeCylinderRH(100, 300) -Cylinder_2 = geompy.MakeCylinderRH(600, 200) -Cut_1 = geompy.MakeCut(Cylinder_2, Cylinder_1) -Face_1 = geompy.MakeFaceHW(500, 1500, 3) -Disque = geompy.MakePartition([Cut_1], [Face_1], [], [], geompy.ShapeType["SOLID"], 0, [], 0) -[Compound_1, Compound_2, Compound_3, Compound_4] = geompy.Propagate(Disque) -geompy.addToStudy( Disque, 'Disque' ) -geompy.addToStudyInFather( Disque, Compound_1, 'Compound_1' ) -geompy.addToStudyInFather( Disque, Compound_2, 'Compound_2' ) -geompy.addToStudyInFather( Disque, Compound_3, 'Compound_3' ) -geompy.addToStudyInFather( Disque, Compound_4, 'Compound_4' ) - -geomPublish(initLog.debug, Cylinder_1, 'Cylinder_1' ) -geomPublish(initLog.debug, Cylinder_2, 'Cylinder_2' ) -geomPublish(initLog.debug, Cut_1, 'Cut_1' ) -geomPublish(initLog.debug, Face_1, 'Face_1' ) - -### -### SMESH component -### - -smesh = smeshBuilder.New() -Disque_1 = smesh.Mesh(Disque) -putName(Disque_1.GetMesh(), 'Disque') - -Regular_1D = Disque_1.Segment() -Nb_Segments_1 = Regular_1D.NumberOfSegments(10) -Nb_Segments_1.SetDistrType( 0 ) -Hexa_3D = Disque_1.Hexahedron(algo=smeshBuilder.Hexa) -Regular_1D_1 = Disque_1.Segment(geom=Compound_3) -Nb_Segments_2 = Regular_1D_1.NumberOfSegments(20) -Nb_Segments_2.SetDistrType( 0 ) -Regular_1D_2 = Disque_1.Segment(geom=Compound_4) -status = Disque_1.AddHypothesis(Nb_Segments_2,Compound_4) -Quadrangle_2D = Disque_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) - -## set object names -#smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') -#smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') -#smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') -putName(Nb_Segments_1, 'Nb. Segments_1', i_pref='Disque') -putName(Nb_Segments_2, 'Nb. Segments_2', i_pref='Disque') - -is_done = Disque_1.Compute() -text = "Disque_1.Compute" -if is_done: - logging.info(text+" OK") -else: - text = "Erreur au calcul du maillage.\n" + text - logging.info(text) - raise Exception(text) - -Disque_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "disque.med")) - -if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/ellipse.py b/src/Tools/blocFissure/materielCasTests/ellipse.py index d2e592577..dd3272758 100644 --- a/src/Tools/blocFissure/materielCasTests/ellipse.py +++ b/src/Tools/blocFissure/materielCasTests/ellipse.py @@ -54,8 +54,8 @@ Scale_1 = geompy.MakeScaleAlongAxes(Rotation_1, Vertex_1, 1, 1.5, 1) Vertex_3 = geompy.MakeVertex(420, -400, 300) Vertex_4 = geompy.MakeVertex(500, 400, 500) Box_1 = geompy.MakeBoxTwoPnt(Vertex_4, Vertex_3) -ellipse1 = geompy.MakeCut(Scale_1, Box_1) -[fondFiss] = geompy.SubShapes(ellipse1, [4]) +ellipse_1 = geompy.MakeCut(Scale_1, Box_1) +[fondFiss] = geompy.SubShapes(ellipse_1, [4]) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) geompy.addToStudy( OY, 'OY' ) @@ -69,9 +69,9 @@ geompy.addToStudy( Scale_1, 'Scale_1' ) geompy.addToStudy( Vertex_3, 'Vertex_3' ) geompy.addToStudy( Vertex_4, 'Vertex_4' ) geompy.addToStudy( Box_1, 'Box_1' ) -geompy.addToStudy( ellipse1, 'ellipse1' ) -geompy.addToStudyInFather( ellipse1, fondFiss, 'fondFiss' ) -geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1.brep")) +geompy.addToStudy( ellipse_1, 'ellipse_1' ) +geompy.addToStudyInFather( ellipse_1, fondFiss, 'fondFiss' ) +geompy.ExportBREP(ellipse_1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1.brep")) if salome.sg.hasDesktop(): diff --git a/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py b/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py index 1d271c599..096f805aa 100644 --- a/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py +++ b/src/Tools/blocFissure/materielCasTests/ellipse_probleme.py @@ -54,7 +54,7 @@ Vertex_2 = geompy.MakeVertex(20, -100, -50) Vertex_4 = geompy.MakeVertex(100, 100, 50) Box_1 = geompy.MakeBoxTwoPnt(Vertex_2, Vertex_4) Cut_1 = geompy.MakeCut(Rotation_1, Box_1) -ellipse1 = geompy.MakeTranslation(Cut_1, 400, 0, 400) +ellipse_1 = geompy.MakeTranslation(Cut_1, 400, 0, 400) geompy.addToStudy( Disk_1, 'Disk_1' ) geompy.addToStudy( O, 'O' ) geompy.addToStudy( OX, 'OX' ) @@ -68,8 +68,8 @@ geompy.addToStudy( Vertex_2, 'Vertex_2' ) geompy.addToStudy( Box_1, 'Box_1' ) geompy.addToStudy( Vertex_4, 'Vertex_4' ) geompy.addToStudy( Cut_1, 'Cut_1' ) -geompy.addToStudy( ellipse1, 'ellipse1_pb' ) -geompy.ExportBREP(ellipse1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse1_pb.brep")) +geompy.addToStudy( ellipse_1, 'ellipse_1_pb' ) +geompy.ExportBREP(ellipse_1, os.path.join(gmu.pathBloc, "materielCasTests", "ellipse_1_pb.brep")) if salome.sg.hasDesktop(): diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche2.py deleted file mode 100644 index 2ea914c72..000000000 --- a/src/Tools/blocFissure/materielCasTests/fissureGauche2.py +++ /dev/null @@ -1,124 +0,0 @@ -# -*- coding: utf-8 -*- -# Copyright (C) 2014-2021 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 -# -"""Géométrie et maillage de base nécessaire au cas-test : -. faceGauche_2 -""" - -import os -import math - -import logging - -import salome -from salome.smesh import smeshBuilder -from salome.StdMeshers import StdMeshersBuilder -import GEOM -import SMESH -import SALOMEDS - -from blocFissure import gmu -from blocFissure.gmu.geomsmesh import geompy -from blocFissure.gmu.geomsmesh import geomPublish -from blocFissure.gmu.geomsmesh import geomPublishInFather - -from blocFissure.gmu.triedreBase import triedreBase -from blocFissure.gmu.putName import putName -from blocFissure.gmu import initLog - -### -### GEOM component -### - -O, OX, OY, OZ = triedreBase() - -Circle_1 = geompy.MakeCircle(O, OX, 500.) -Extrusion_1 = geompy.MakePrismVecH2Ways(Circle_1, OX, 500) -Vertex_1 = geompy.MakeVertex(500., 0., 0.) -Circle_3 = geompy.MakeCircle(Vertex_1, OZ, 300) -Extrusion_2 = geompy.MakePrismVecH(Circle_3, OZ, 1000) -Partition_1 = geompy.MakePartition([Extrusion_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) -[Face_1,Face_2] = geompy.SubShapes(Partition_1, [18, 13]) - -FaceFissExt = geompy.MakeFuse(Face_2, Face_1) -geompy.addToStudy( FaceFissExt, 'FaceFissExt' ) -geompy.ExportBREP(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2Fiss.brep")) - -Vertex_2 = geompy.MakeVertex(0, -500, 0) -Vertex_3 = geompy.MakeVertex(400, 500, 800) -objetSain = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2) -geompy.addToStudy( objetSain, 'objetSain' ) - -Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, math.pi) -Partition_2 = geompy.MakePartition([Rotation_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) -geompy.addToStudy( Partition_2, 'Partition_2' ) -[FaceFissExtSimple] = geompy.SubShapes(Partition_2, [13]) -geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' ) -Plane_1 = geompy.MakePlaneLCS(None, 2000., 3) - -FaceFissExtCoupe = geompy.MakePartition([FaceFissExtSimple], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0) -geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' ) - -geompy.ExportBREP(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2FissCoupe.brep")) - -geomPublish(initLog.debug, Circle_1, 'Circle_1' ) -geomPublish(initLog.debug, Extrusion_1, 'Extrusion_1' ) -geomPublish(initLog.debug, Vertex_1, 'Vertex_1' ) -geomPublish(initLog.debug, Circle_3, 'Circle_3' ) -geomPublish(initLog.debug, Extrusion_2, 'Extrusion_2' ) -geomPublish(initLog.debug, Partition_1, 'Partition_1' ) -geomPublishInFather(initLog.debug, Partition_1, Face_1, 'Face_1' ) -geomPublishInFather(initLog.debug, Partition_1, Face_2, 'Face_2' ) -geomPublish(initLog.debug, Vertex_2, 'Vertex_2' ) -geomPublish(initLog.debug, Vertex_3, 'Vertex_3' ) -geomPublish(initLog.debug, Rotation_1, 'Rotation_1' ) -geomPublish(initLog.debug, Plane_1, 'Plane_1' ) - -### -### SMESH component -### -smesh = smeshBuilder.New() -Mesh_1 = smesh.Mesh(objetSain) -putName(Mesh_1.GetMesh(), 'Mesh_1') - -Regular_1D = Mesh_1.Segment() -Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[ ]) -Nb_Segments_1.SetDistrType( 0 ) -Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) -Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa) - -## set object names -#smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') -#smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') -#smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') -putName(Nb_Segments_1, 'Nb. Segments_1', i_pref='fissuregauche2') - -is_done = Mesh_1.Compute() -text = "Mesh_1.Compute" -if is_done: - logging.info(text+" OK") -else: - text = "Erreur au calcul du maillage.\n" + text - logging.info(text) - raise Exception(text) - -Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med")) - -if salome.sg.hasDesktop(): - salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/fissureGauche_2.py b/src/Tools/blocFissure/materielCasTests/fissureGauche_2.py new file mode 100644 index 000000000..2ea914c72 --- /dev/null +++ b/src/Tools/blocFissure/materielCasTests/fissureGauche_2.py @@ -0,0 +1,124 @@ +# -*- coding: utf-8 -*- +# Copyright (C) 2014-2021 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 +# +"""Géométrie et maillage de base nécessaire au cas-test : +. faceGauche_2 +""" + +import os +import math + +import logging + +import salome +from salome.smesh import smeshBuilder +from salome.StdMeshers import StdMeshersBuilder +import GEOM +import SMESH +import SALOMEDS + +from blocFissure import gmu +from blocFissure.gmu.geomsmesh import geompy +from blocFissure.gmu.geomsmesh import geomPublish +from blocFissure.gmu.geomsmesh import geomPublishInFather + +from blocFissure.gmu.triedreBase import triedreBase +from blocFissure.gmu.putName import putName +from blocFissure.gmu import initLog + +### +### GEOM component +### + +O, OX, OY, OZ = triedreBase() + +Circle_1 = geompy.MakeCircle(O, OX, 500.) +Extrusion_1 = geompy.MakePrismVecH2Ways(Circle_1, OX, 500) +Vertex_1 = geompy.MakeVertex(500., 0., 0.) +Circle_3 = geompy.MakeCircle(Vertex_1, OZ, 300) +Extrusion_2 = geompy.MakePrismVecH(Circle_3, OZ, 1000) +Partition_1 = geompy.MakePartition([Extrusion_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) +[Face_1,Face_2] = geompy.SubShapes(Partition_1, [18, 13]) + +FaceFissExt = geompy.MakeFuse(Face_2, Face_1) +geompy.addToStudy( FaceFissExt, 'FaceFissExt' ) +geompy.ExportBREP(FaceFissExt, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2Fiss.brep")) + +Vertex_2 = geompy.MakeVertex(0, -500, 0) +Vertex_3 = geompy.MakeVertex(400, 500, 800) +objetSain = geompy.MakeBoxTwoPnt(Vertex_3, Vertex_2) +geompy.addToStudy( objetSain, 'objetSain' ) + +Rotation_1 = geompy.MakeRotation(Extrusion_1, OX, math.pi) +Partition_2 = geompy.MakePartition([Rotation_1], [Extrusion_2], [], [], geompy.ShapeType["FACE"], 0, [], 0) +geompy.addToStudy( Partition_2, 'Partition_2' ) +[FaceFissExtSimple] = geompy.SubShapes(Partition_2, [13]) +geompy.addToStudyInFather( Partition_2, FaceFissExtSimple, 'FaceFissExtSimple' ) +Plane_1 = geompy.MakePlaneLCS(None, 2000., 3) + +FaceFissExtCoupe = geompy.MakePartition([FaceFissExtSimple], [Plane_1], [], [], geompy.ShapeType["FACE"], 0, [], 0) +geompy.addToStudy( FaceFissExtCoupe, 'FaceFissExtCoupe' ) + +geompy.ExportBREP(FaceFissExtCoupe, os.path.join(gmu.pathBloc, "materielCasTests", "faceGauche2FissCoupe.brep")) + +geomPublish(initLog.debug, Circle_1, 'Circle_1' ) +geomPublish(initLog.debug, Extrusion_1, 'Extrusion_1' ) +geomPublish(initLog.debug, Vertex_1, 'Vertex_1' ) +geomPublish(initLog.debug, Circle_3, 'Circle_3' ) +geomPublish(initLog.debug, Extrusion_2, 'Extrusion_2' ) +geomPublish(initLog.debug, Partition_1, 'Partition_1' ) +geomPublishInFather(initLog.debug, Partition_1, Face_1, 'Face_1' ) +geomPublishInFather(initLog.debug, Partition_1, Face_2, 'Face_2' ) +geomPublish(initLog.debug, Vertex_2, 'Vertex_2' ) +geomPublish(initLog.debug, Vertex_3, 'Vertex_3' ) +geomPublish(initLog.debug, Rotation_1, 'Rotation_1' ) +geomPublish(initLog.debug, Plane_1, 'Plane_1' ) + +### +### SMESH component +### +smesh = smeshBuilder.New() +Mesh_1 = smesh.Mesh(objetSain) +putName(Mesh_1.GetMesh(), 'Mesh_1') + +Regular_1D = Mesh_1.Segment() +Nb_Segments_1 = Regular_1D.NumberOfSegments(15,[],[ ]) +Nb_Segments_1.SetDistrType( 0 ) +Quadrangle_2D = Mesh_1.Quadrangle(algo=smeshBuilder.QUADRANGLE) +Hexa_3D = Mesh_1.Hexahedron(algo=smeshBuilder.Hexa) + +## set object names +#smesh.SetName(Regular_1D.GetAlgorithm(), 'Regular_1D') +#smesh.SetName(Quadrangle_2D.GetAlgorithm(), 'Quadrangle_2D') +#smesh.SetName(Hexa_3D.GetAlgorithm(), 'Hexa_3D') +putName(Nb_Segments_1, 'Nb. Segments_1', i_pref='fissuregauche2') + +is_done = Mesh_1.Compute() +text = "Mesh_1.Compute" +if is_done: + logging.info(text+" OK") +else: + text = "Erreur au calcul du maillage.\n" + text + logging.info(text) + raise Exception(text) + +Mesh_1.ExportMED(os.path.join(gmu.pathBloc, "materielCasTests", "boiteSaine.med")) + +if salome.sg.hasDesktop(): + salome.sg.updateObjBrowser() diff --git a/src/Tools/blocFissure/materielCasTests/genereMateriel.py b/src/Tools/blocFissure/materielCasTests/genereMateriel.py index f597b9eb9..7ef23abb6 100644 --- a/src/Tools/blocFissure/materielCasTests/genereMateriel.py +++ b/src/Tools/blocFissure/materielCasTests/genereMateriel.py @@ -21,13 +21,13 @@ from blocFissure.materielCasTests import cubeAngle from blocFissure.materielCasTests import cubeFin from blocFissure.materielCasTests import decoupeCylindre -from blocFissure.materielCasTests import disque_perce +from blocFissure.materielCasTests import disquePerce from blocFissure.materielCasTests import ellipse_disque from blocFissure.materielCasTests import ellipse from blocFissure.materielCasTests import ellipse_probleme from blocFissure.materielCasTests import eprouvetteCourbe from blocFissure.materielCasTests import eprouvetteDroite from blocFissure.materielCasTests import fissureGauche -from blocFissure.materielCasTests import fissureGauche2 +from blocFissure.materielCasTests import fissureGauche_2 from blocFissure.materielCasTests import vis from blocFissure.materielCasTests import tube