X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FcasStandard.py;h=c2360531626912d16f9e2c63546036850093fe67;hp=2b9ef26e842598702c01cff2164889612222eaf7;hb=b24a2d1b7692bdb21cf037b026e0273ba547cef4;hpb=09eeca0267acf6f14581efdd342e8b7a87d09cf0 diff --git a/src/Tools/blocFissure/gmu/casStandard.py b/src/Tools/blocFissure/gmu/casStandard.py index 2b9ef26e8..c23605316 100644 --- a/src/Tools/blocFissure/gmu/casStandard.py +++ b/src/Tools/blocFissure/gmu/casStandard.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Copyright (C) 2014-2020 EDF R&D +# 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 @@ -116,32 +116,39 @@ class casStandard(fissureGenerique): lenSegPipe = self.lenSegPipe) # --------------------------------------------------------------------------- - def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams): - logging.info("genereShapeFissure %s", self.nomCas) + def genereShapeFissure( self, geometriesSaines, geomParams, shapeFissureParams, \ + mailleur="MeshGems"): lgInfluence = shapeFissureParams['lgInfluence'] - cao_file = self.dicoParams['brepFaceFissure'] +# Contrôle de 'brepFaceFissure' pour les anciennes versions + if ( 'brepFaceFissure' in self.dicoParams ): + self.dicoParams['CAOFaceFissure'] = self.dicoParams['brepFaceFissure'] + cao_file = self.dicoParams['CAOFaceFissure'] suffix = os.path.basename(cao_file).split(".")[-1] if ( suffix.upper() == "BREP" ): shellFiss = geompy.ImportBREP(cao_file) elif ( suffix.upper() == "XAO" ): (_, shellFiss, _, l_groups, _) = geompy.ImportXAO(cao_file) fondFiss = geompy.CreateGroup(shellFiss, geompy.ShapeType["EDGE"]) - if isinstance(self.dicoParams['edgeFissIds'][0],int): - geompy.UnionIDs(fondFiss, self.dicoParams['edgeFissIds'] ) +# Contrôle de 'edgeFissIds' pour les anciennes versions + if ( 'edgeFissIds' in self.dicoParams ): + self.dicoParams['edgeFiss'] = self.dicoParams['edgeFissIds'] + if isinstance(self.dicoParams['edgeFiss'][0],int): + geompy.UnionIDs(fondFiss, self.dicoParams['edgeFiss'] ) else: l_groups = geompy.GetGroups(shellFiss) l_aux = list() for group in l_groups: - if ( group.GetName() in self.dicoParams['edgeFissIds'] ): + if ( group.GetName() in self.dicoParams['edgeFiss'] ): l_aux.append(group) geompy.UnionList(fondFiss, l_aux ) geomPublish(initLog.debug, shellFiss, 'shellFiss' ) geomPublishInFather(initLog.debug, shellFiss, fondFiss, 'fondFiss' ) - coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1]) + coordsNoeudsFissure = genereMeshCalculZoneDefaut(shellFiss, self.dicoParams['meshBrep'][0] ,self.dicoParams['meshBrep'][1], \ + mailleur) centre = None return [shellFiss, centre, lgInfluence, coordsNoeudsFissure, fondFiss] @@ -162,12 +169,13 @@ class casStandard(fissureGenerique): return elementsDefaut # --------------------------------------------------------------------------- - def genereMaillageFissure(self, geometriesSaines, maillagesSains, - shapesFissure, shapeFissureParams, - maillageFissureParams, elementsDefaut, step): - maillageFissure = construitFissureGenerale(maillagesSains, \ - shapesFissure, shapeFissureParams, \ - maillageFissureParams, elementsDefaut, step) + def genereMaillageFissure(self, geometriesSaines, maillagesSains, \ + shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, step, \ + mailleur="MeshGems"): + maillageFissure = construitFissureGenerale(shapesFissure, shapeFissureParams, \ + maillageFissureParams, elementsDefaut, \ + step, mailleur) return maillageFissure # ---------------------------------------------------------------------------