X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2FMacMesh%2FMacMesh%2FCylinder.py;h=97d90781d3cbf04fcd1275a8f76695dd9b02dd91;hb=a274ade365bd0f0e19d56c577acc4a13aa1972a7;hp=7042e212f62657ab5259e1135e6bb81e3eb7ee09;hpb=84cf6c491178cc4cea1be9c8b2ba4d13750d02a3;p=modules%2Fsmesh.git diff --git a/src/Tools/MacMesh/MacMesh/Cylinder.py b/src/Tools/MacMesh/MacMesh/Cylinder.py index 7042e212f..97d90781d 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-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 @@ -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]