X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FMacMesh%2FMacMesh%2FCylinder.py;h=e66bf92bcacd46b6cc9ac50214b6a88b796a12ca;hp=7042e212f62657ab5259e1135e6bb81e3eb7ee09;hb=0fc0831670e27a5611b941c52dc152fd63964515;hpb=84cf6c491178cc4cea1be9c8b2ba4d13750d02a3 diff --git a/src/Tools/MacMesh/MacMesh/Cylinder.py b/src/Tools/MacMesh/MacMesh/Cylinder.py index 7042e212f..e66bf92bc 100644 --- a/src/Tools/MacMesh/MacMesh/Cylinder.py +++ b/src/Tools/MacMesh/MacMesh/Cylinder.py @@ -1,4 +1,4 @@ -# Copyright (C) 2014-2016 EDF R&D +# 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 @@ -25,8 +25,8 @@ # This functions can take a groups input containing the group names of 4 sides in addition to the internal circular boundary # in the following order : [South,North,West,East,Internal]. -import sys, math, commands -CWD = commands.getoutput('pwd') +import sys, math, subprocess +CWD = subprocess.getoutput('pwd') sys.path.append(CWD) @@ -39,11 +39,11 @@ def Cylinder (X0 , Y0 , D , DX , DY , LocalMeshing , **args) : # K is the pitch ratio K = float(D)/(DLocal-D) - print "A local pitch ratio of K =", K ," will be used. " + print("A local pitch ratio of K =", K ," will be used. ") NumCuts = 2*GenFunctions.QuarCylParam(K) InternalMeshing = int(math.ceil(math.pi*D/(4*NumCuts*LocalMeshing))) if InternalMeshing == 0 : InternalMeshing = 1 # This sets a minimum meshing condition in order to avoid an error. The user is notified of the value considered for the local meshing - print "Possible Local meshing is :", math.pi*D/(4*NumCuts*InternalMeshing), "\nThis value is returned by this function for your convenience.\n" + print("Possible Local meshing is :", math.pi*D/(4*NumCuts*InternalMeshing), "\nThis value is returned by this function for your convenience.\n") if args.__contains__('groups') : GroupNames = args['groups'] else : GroupNames = [None, None, None, None, None]