1 # -*- coding: utf-8 -*-
5 from geomsmesh import geompy
6 from geomsmesh import smesh
7 from salome.smesh import smeshBuilder
10 from putName import putName
12 def mailleFacesFissure(faceFissureExterne, edgesPipeFissureExterneC, edgesPeauFissureExterneC,
13 meshPipeGroups, areteFaceFissure, rayonPipe, nbsegRad):
15 maillage faces de fissure
19 meshFaceFiss = smesh.Mesh(faceFissureExterne)
20 algo2d = meshFaceFiss.Triangle(algo=smeshBuilder.NETGEN_1D2D)
21 hypo2d = algo2d.Parameters()
22 hypo2d.SetMaxSize( areteFaceFissure )
23 hypo2d.SetSecondOrder( 0 )
24 hypo2d.SetOptimize( 1 )
25 hypo2d.SetFineness( 2 )
26 hypo2d.SetMinSize( rayonPipe/float(nbsegRad) )
27 hypo2d.SetQuadAllowed( 0 )
28 putName(algo2d.GetSubMesh(), "faceFiss")
29 putName(algo2d, "algo2d_faceFiss")
30 putName(hypo2d, "hypo2d_faceFiss")
32 algo1d = meshFaceFiss.UseExisting1DElements(geom=edgesPipeFissureExterneC)
33 hypo1d = algo1d.SourceEdges([ meshPipeGroups['edgeFaceFissGroup'] ],0,0)
34 putName(algo1d.GetSubMesh(), "edgeFissPeau")
35 putName(algo1d, "algo1d_edgeFissPeau")
36 putName(hypo1d, "hypo1d_edgeFissPeau")
38 isDone = meshFaceFiss.Compute()
39 logging.info("meshFaceFiss fini")
41 grpFaceFissureExterne = meshFaceFiss.GroupOnGeom(faceFissureExterne, "fisOutPi", SMESH.FACE)
42 grpEdgesPeauFissureExterne = meshFaceFiss.GroupOnGeom(edgesPeauFissureExterneC,'edgesPeauFissureExterne',SMESH.EDGE)
43 grpEdgesPipeFissureExterne = meshFaceFiss.GroupOnGeom(edgesPipeFissureExterneC,'edgesPipeFissureExterne',SMESH.EDGE)
45 return (meshFaceFiss, grpFaceFissureExterne, grpEdgesPeauFissureExterne, grpEdgesPipeFissureExterne)