+33.1.78.19.43.52
"""
-__revision__ = "V02.03"
+__revision__ = "V02.04"
import os
import sys
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
. decoupeCylindre
. disque_perce
. fissureGauche
-. fissureGauche2
+. fissureGauche_2
+ ellipse, ellipse_disque, ellipse_probleme
Copyright 2021 EDF
+33.1.78.19.43.52
"""
-__revision__ = "V02.03"
+__revision__ = "V02.04"
import os
import sys
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
+33.1.78.19.43.52
"""
-__revision__ = "V02.03"
+__revision__ = "V02.04"
import os
import sys
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
SET(plugin_SCRIPTS
__init__.py
blocFissureTest.py
- cubeAngle2.py
+ cubeAngle_2.py
cubeAngle.py
cubeCoin.py
cubeMilieu.py
#
# 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"]
# 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
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
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
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:
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:
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
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
+++ /dev/null
-# -*- 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 \
- )
--- /dev/null
+# -*- 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 \
+ )
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, \
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],
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()
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' )
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, \
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' )
# 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.
:align: center\r
:alt: Geometrical parameters of the tore\r
\r
-Different levels of verbose are available. Use one of this 4 optional functions to set verbose type:\r
+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:\r
\r
-- / **setDebug()**\r
+- / **setDebug(LOGFILE)**\r
\r
-- / **setVerbose()**\r
+- / **setVerbose(LOGFILE)**\r
\r
-- / **setRelease()**\r
+- / **setRelease(LOGFILE)**\r
\r
-- / **setUnitTests()**\r
+- / **setUnitTests(LOGFILE)**\r
\r
**example to run in salome session**::\r
\r
from blocFissure import gmu\r
from blocFissure.gmu import initLog\r
- initLog.setDebug()\r
+ initLog.setDebug("/tmp/blocFissure.log")\r
\r
from blocFissure.casStandard import casStandard\r
\r
\r
execInstance = casStandard(dicoParams)\r
\r
+ newmesh = execInstance.maillageFissure\r
+\r
\r
\r
\r
Test cases\r
#######################\r
\r
-A base of 30 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 13 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.\r
+A base of 28 test cases guarantees the correct functioning of « Bloc Fissure ». 12 cases are dedicated to :ref:`cracked bended pipes <pipeTC>` and the others 16 are for other :ref:`generic geometries <genericTC>`. They are shown here in order to illustrate cases on which « Bloc Fissure » works.\r
\r
.. _genericTC:\r
\r
Generic cases\r
===============================\r
\r
-All 13 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.\r
-\r
-+-------------------------------------------+----------------------------------------------+\r
-| CubeAngle |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| CubeAngle2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/02_CubeAngle2.png | .. image:: images/02_CubeAngle2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| cylindre |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| cylindre2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/04_cylindre2.png | .. image:: images/04_cylindre2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| disque |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/05_disque.png | .. image:: images/05_disque_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| ellipse1 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/06_ellipse1.png | .. image:: images/06_ellipse1_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| ellipse2 (tilted crack) |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/07_ellipse2.png | .. image:: images/07_ellipse2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteCourbe |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteDroite |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| eprouvetteDroite2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/10_eprouvetteDroite2.png | .. image:: images/10_eprouvetteDroite2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| faceGauche |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| faceGauche2 |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/12_faceGauche2.png | .. image:: images/12_faceGauche2_2.png |\r
-| :height: 300 | :height: 300 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| vis (Crack is in the radius filet between the screw head and the screw shank) |\r
-+-------------------------------------------+----------------------------------------------+\r
-|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png |\r
-| :width: 400 | :width: 400 |\r
-| :align: center | :align: center |\r
-+-------------------------------------------+----------------------------------------------+\r
-| tube |\r
-+-------------------------------------------+----------------------------------------------+\r
+All 16 cases are shown Table 2. Two views show the whole cracked structure and a zoom onto the crack with its tore.\r
+\r
++--------------------------------------------+-----------------------------------------------+\r
+| CubeAngle |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/01_CubeAngle.png | .. image:: images/01_CubeAngle_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| CubeAngle_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/02_CubeAngle_2.png | .. image:: images/02_CubeAngle_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeCoin |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeMilieu |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cubeTransverse |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cylindre |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/03_cylindre.png | .. image:: images/03_cylindre_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| cylindre_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/04_cylindre_2.png | .. image:: images/04_cylindre_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| disquePerce |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/05_disque.png | .. image:: images/05_disque_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| ellipse_1 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/06_ellipse_1.png | .. image:: images/06_ellipse_1_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| ellipse_2 (tilted crack) |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/07_ellipse_2.png | .. image:: images/07_ellipse_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteCourbe |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/08_eprouvetteCourbe.png | .. image:: images/08_eprouvetteCourbe_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteDroite |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/09_eprouvetteDroite.png | .. image:: images/09_eprouvetteDroite_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| eprouvetteDroite_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/10_eprouvetteDroite_2.png | .. image:: images/10_eprouvetteDroite_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| faceGauche |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/11_faceGauche.png | .. image:: images/11_faceGauche_2.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| faceGauche_2 |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/12_faceGauche_2.png | .. image:: images/12_faceGauche_2_a.png |\r
+| :height: 300 | :height: 300 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| vis (Crack is in the radius filet between the screw head and the screw shank) |\r
++--------------------------------------------+-----------------------------------------------+\r
+|.. image:: images/13_vis_1.png | .. image:: images/13_vis_1_2.png |\r
+| :width: 400 | :width: 400 |\r
+| :align: center | :align: center |\r
++--------------------------------------------+-----------------------------------------------+\r
+| tube |\r
++--------------------------------------------+-----------------------------------------------+\r
\r
.. _pipeTC:\r
\r
\r
« Bloc Fissure » is very efficient for the case of bended pipes. The generation of the geometry and the crack insertion takes only around 15s.\r
\r
-Running test cases\r
+Data for the test cases\r
=====================================\r
\r
All the files for these test cases are stored in the directory of the installation of SALOME:\r
\r
``Salome-VXXXX_package-YY/modules/SMESH_VXXXX/lib/python3.6/site-packages/salome/blocFissure``\r
\r
-The test cases can be runned either through the python window of the SALOME GUI or with a python script.\r
-\r
-0) **Generate med and breps files.**::\r
+The set of the med, xao and brep files can be created by the following importation:\r
\r
from blocFissure.materielCasTests import genereMateriel\r
\r
\r
There is no need to generate them again.\r
\r
-1) **To execute all test cases**::\r
-\r
- from blocFissure.CasTests import execution_Cas\r
-\r
-2) **To execute only selected test cases**:\r
+To check the installation of salome, the test cases can be computed by the salome test process::\r
\r
-modify the file ``CasTests/execution_Cas.py`` and change::\r
+ salome -test blocFissure\r
\r
- runall = False. #old : True\r
-\r
-And change from 0 to 1 of the index of the test you want to launch::\r
+Running test cases\r
+=====================================\r
\r
- 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]\r
+The test cases can be runned by the following instructions::\r
\r
-then launch the test cases::\r
+ from blocFissure.CasTests.blocFissureTest import blocFissureTest\r
+ BLOCFISSURE_TEST = blocFissureTest(list_of_cases)\r
+ MESSAGE_ERREUR = BLOCFISSURE_TEST.lancement()\r
+ sys.stdout.write(MESSAGE_ERREUR)\r
+ del BLOCFISSURE_TEST\r
\r
- from blocFissure.CasTests import execution_Cas\r
+If ``list_of_cases`` is an empty list, all the cases are computed.\r
\r
-The index of each test is the position of the test in the following table, from 0 for cubeAngle, 1 for cubeAngle2,\r
-2 for cubeCoin... from top to bottom, then from left to right.\r
+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.\r
\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeAngle | cylindre_2 | eprouvetteDroite_2 | fissureCoude_3 | fissureCoude_9 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
-| cubeAngle2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |\r
+| cubeAngle_2 | disquePerce | faceGauche | fissureCoude_4 | fissure_Coude |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeCoin | ellipse_1 | faceGauche_2 | fissureCoude_5 | fissure_Coude_4 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cubeMilieu | ellipse_2 | fissureCoude_1 | fissureCoude_6 | vis_1 |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
-| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | tube |\r
+| cubeTransverse | eprouvetteCourbe | fissureCoude_10 | fissureCoude_7 | |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
| cylindre | eprouvetteDroite | fissureCoude_2 | fissureCoude_8 | |\r
+--------------------+--------------------+--------------------+-----------------+-----------------+\r
\r
-3) **To execute only one test case**::\r
-\r
- from blocFissure.CasTests.[TEST_CASE_NAME] import [TEST_CASE_NAME]\r
-\r
- [TEST_CASE_NAME](0).executeProbleme()\r
-\r
-[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.\r
-\r
-\r
-\r
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
#
"""Géométries et maillages de base nécessaires aux cas-tests :
. cubeAngle
-. cubeAngle2
+. cubeAngle_2
"""
import os
--- /dev/null
+# -*- 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()
+++ /dev/null
-# -*- 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()
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' )
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():
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' )
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():
+++ /dev/null
-# -*- 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()
--- /dev/null
+# -*- 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()
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