X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FblocFissure%2Fgmu%2FcreeZoneDefautDansObjetSain.py;h=0e87d70887aaeb0ff659bd8b271d03b87b829f2e;hb=deac0e50eb0cac03cef72883584e167fbe4f7d74;hp=1684dd47cfe353b87b2bc3009501761f55f9ac1a;hpb=5260bd00bd51567f6137d5ea7ae0564464c4290a;p=modules%2Fsmesh.git diff --git a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py index 1684dd47c..0e87d7088 100644 --- a/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py +++ b/src/Tools/blocFissure/gmu/creeZoneDefautDansObjetSain.py @@ -1,4 +1,24 @@ # -*- coding: utf-8 -*- +# Copyright (C) 2014-2020 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 +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. +# +# This library is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with this library; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# +# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +# + +import os import logging from .geomsmesh import smesh @@ -21,8 +41,6 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, #TODO: a compléter """ logging.info('start') - - #smesh.SetCurrentStudy(salome.myStudy) geometrieSaine = geometriesSaines[0] maillageSain = maillagesSains[0] @@ -46,7 +64,7 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, nomRep = maillageFissureParams['nomRep'] nomFicSain = maillageFissureParams['nomFicSain'] - fichierMaillageSain = nomRep + '/' + nomFicSain + '.med' + fichierMaillageSain = os.path.join (nomRep , '{}.med'.format(nomFicSain)) # --- centre de fond de fissure et tangente @@ -59,15 +77,15 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, [origShapes, verticesShapes, dmoyen] = \ creeZoneDefautMaillage(maillagesSains, shapeDefaut, tailleDefaut, nomZones, coordsNoeudsFissure) - maillageSain.ExportMED( fichierMaillageSain, 0, SMESH.MED_V2_2, 1 ) + maillageSain.ExportMED(fichierMaillageSain) logging.debug("fichier maillage sain %s", fichierMaillageSain) [maillageSain, internalBoundary, zoneDefaut, zoneDefaut_skin, zoneDefaut_internalFaces, zoneDefaut_internalEdges] = \ peauInterne(fichierMaillageSain, shapeDefaut, nomZones) - facesDefaut = [] - centresDefaut = [] - normalsDefaut =[] - extrusionsDefaut = [] + facesDefaut = list() + centresDefaut = list() + normalsDefaut = list() + extrusionsDefaut = list() isPlane = False if isHexa and not isPlane: meshQuad = smesh.CopyMesh( zoneDefaut_skin, 'meshQuad', 0, 0) @@ -84,7 +102,7 @@ def creeZoneDefautDansObjetSain(geometriesSaines, maillagesSains, shapesFissure, else: [facesDefaut, centreDefaut, normalDefaut, extrusionDefaut] = \ creeZoneDefautGeom( geometrieSaine, shapeDefaut, origShapes, verticesShapes, dmoyen, lgExtrusion) - bordsPartages = [] + bordsPartages = list() for face in facesDefaut: bordsPartages.append([None,None]) # TODO : traitement des arêtes vives ? fillconts = facesDefaut