1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2014-2020 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License, or (at your option) any later version.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 """problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline"""
26 from blocFissure import gmu
27 from blocFissure.gmu.geomsmesh import geompy, smesh
28 from blocFissure.gmu.genereMeshCalculZoneDefaut import genereMeshCalculZoneDefaut
34 from .cylindre import cylindre
36 class cylindre_2(cylindre):
37 """problème de fissure plane sur cylindre hexa, fond de fissure complexe : polyline"""
39 nomProbleme = "cylindre2"
41 # ---------------------------------------------------------------------------
42 def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams):
43 logging.info("genereShapeFissure %s", self.nomCas)
45 lgInfluence = shapeFissureParams['lgInfluence']
47 shellFiss = geompy.ImportBREP(os.path.join(gmu.pathBloc, "materielCasTests", "FissInCylindre.brep"))
48 fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"])
49 geompy.UnionIDs(fondFiss, [6])
50 geompy.addToStudy( shellFiss, 'shellFiss' )
51 geompy.addToStudyInFather( shellFiss, fondFiss, 'fondFiss' )
54 coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, 5 ,15)
57 return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss]
59 # ---------------------------------------------------------------------------
60 def setReferencesMaillageFissure(self):
61 self.referencesMaillageFissure = dict( \
62 Entity_Quad_Quadrangle = 7028, \
63 Entity_Quad_Hexa = 18366, \
64 Entity_Node = 105035, \
65 Entity_Quad_Edge = 735, \
66 Entity_Quad_Triangle = 1056, \
67 Entity_Quad_Tetra = 16305, \
68 Entity_Quad_Pyramid = 1158, \
69 Entity_Quad_Penta = 384 \