]> SALOME platform Git repositories - modules/smesh.git/blob - src/Tools/blocFissure/CasTests/cylindre_2.py
Salome HOME
Install tests.set
[modules/smesh.git] / src / Tools / blocFissure / CasTests / cylindre_2.py
1 # -*- coding: utf-8 -*-
2
3 import os
4 from blocFissure import gmu
5 from blocFissure.gmu.geomsmesh import geompy, smesh
6
7 import math
8 import GEOM
9 import SALOMEDS
10 import SMESH
11 import logging
12
13 from cylindre import cylindre
14
15 from blocFissure.gmu.triedreBase import triedreBase
16 from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
17 from blocFissure.gmu.creeZoneDefautDansObjetSain import creeZoneDefautDansObjetSain
18 from blocFissure.gmu.construitFissureGenerale import construitFissureGenerale
19
20 O, OX, OY, OZ = triedreBase()
21
22 class cylindre_2(cylindre):
23   """
24   problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline
25   """
26   nomProbleme = "cylindre2"
27
28   # ---------------------------------------------------------------------------
29   def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
30     logging.info("genereShapeFissure %s", self.nomCas)
31
32     lgInfluence = shapeFissureParams['lgInfluence']
33
34     shellFiss = geompy.ImportFile(os.path.join(gmu.pathBloc, "materielCasTests/FissInCylindre.brep"), "BREP")
35     fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
36     geompy.UnionIDs(fondFiss, [3])
37     geompy.addToStudy( shellFiss, 'shellFiss' )
38     geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
39
40
41     coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15)
42
43     centre = None
44     return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
45
46   # ---------------------------------------------------------------------------
47   def setReferencesMaillageFissure(self):
48     self.referencesMaillageFissure = dict(Entity_Quad_Pyramid    = 1334,
49                                           Entity_Quad_Triangle   = 1432,
50                                           Entity_Quad_Edge       = 785,
51                                           Entity_Quad_Penta      = 560,
52                                           Entity_Quad_Hexa       = 19070,
53                                           Entity_Node            = 114290,
54                                           Entity_Quad_Tetra      = 19978,
55                                           Entity_Quad_Quadrangle = 7424)
56