Passage des cas-tests en moins de 1mn chacun

This commit is contained in:
Gérald NICOLAS 2021-04-27 16:17:18 +02:00
parent e2f6c81304
commit 705ff2e64c
37 changed files with 163 additions and 180 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -23,7 +23,7 @@
SET(plugin_SCRIPTS
__init__.py
blocFissureTest.py
cubeAngle2.py
cubeAngle_2.py
cubeAngle.py
cubeCoin.py
cubeMilieu.py

View File

@ -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

View File

@ -23,13 +23,13 @@ import os
from .cubeAngle import cubeAngle
class cubeAngle2(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 = "cubeAngle2"
nomProbleme = "cubeAngle_2"
# ---------------------------------------------------------------------------
def setParamShapeFissure(self):

View File

@ -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, \

View File

@ -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],

View File

@ -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' )

View File

@ -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' )

View File

@ -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.

View File

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

View File

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

View File

@ -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

View File

@ -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 <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.
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.
.. _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.
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_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 |
+-------------------------------------------+----------------------------------------------+
+--------------------------------------------+-----------------------------------------------+
| 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**::
To check the installation of salome, the test cases can be computed by the salome test process::
from blocFissure.CasTests import execution_Cas
salome -test blocFissure
2) **To execute only selected test cases**:
Running test cases
=====================================
modify the file ``CasTests/execution_Cas.py`` and change::
The test cases can be runned by the following instructions::
runall = False. #old : True
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
And change from 0 to 1 of the index of the test you want to launch::
If ``list_of_cases`` is an empty list, all the cases are computed.
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]
then launch the test cases::
from blocFissure.CasTests import execution_Cas
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.

View File

@ -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

View File

@ -19,7 +19,7 @@
#
"""Géométries et maillages de base nécessaires aux cas-tests :
. cubeAngle
. cubeAngle2
. cubeAngle_2
"""
import os

View File

@ -18,7 +18,7 @@
# 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
. disquePerce
"""
import os

View File

@ -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():

View File

@ -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():

View File

@ -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