X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FTools%2FZCracksPlug%2FgenereCrack.py;h=0f434a30e44b49c7de6266eb1adc59144a284d73;hp=372772b4311ba2f91f62aa4f3e97928c838976c5;hb=442fd64c19a6e27a339ca36264c15ec91732cf32;hpb=1746a461949c030eb46ccb860e586ade2e5de5e3 diff --git a/src/Tools/ZCracksPlug/genereCrack.py b/src/Tools/ZCracksPlug/genereCrack.py index 372772b43..0f434a30e 100644 --- a/src/Tools/ZCracksPlug/genereCrack.py +++ b/src/Tools/ZCracksPlug/genereCrack.py @@ -1,7 +1,7 @@ import os, shutil -import sphere, ellipse, rectangle -import utilityFunctions as uF -from output import message +from . import sphere, ellipse, rectangle +from . import utilityFunctions as uF +from .output import message def main(data, outFile): activeCrack=data['crack']['actif'] @@ -32,7 +32,7 @@ def generateEllipse(crack, outFile): res=False demiGrandAxe=crack['Rayon'][0] - if 'Rayon 2' not in crack.keys(): crack['Rayon 2']=[] + if 'Rayon 2' not in list(crack.keys()): crack['Rayon 2']=[] if len(crack['Rayon 2'])==0: demiPetitAxe=demiGrandAxe else: @@ -54,7 +54,7 @@ def generateEllipse(crack, outFile): res=False normale=crack['Normale'] - if 'Direction' not in crack.keys(): crack['Direction']=[] + if 'Direction' not in list(crack.keys()): crack['Direction']=[] if len(crack['Direction'])==0: if normale==[1.,0.,0.]: direction=[0.,1.,0.] @@ -71,7 +71,7 @@ def generateEllipse(crack, outFile): message('E','Normale and Direction are equals',goOn=True) res=False - if 'Angle' not in crack.keys(): crack['Angle']=[] + if 'Angle' not in list(crack.keys()): crack['Angle']=[] if len(crack['Angle'])==0: angle=0.0 else: @@ -81,7 +81,7 @@ def generateEllipse(crack, outFile): res=False angle=crack['Angle'][0] - if 'Rayon entaille' not in crack.keys(): crack['Rayon entaille']=[] + if 'Rayon entaille' not in list(crack.keys()): crack['Rayon entaille']=[] if len(crack['Rayon entaille'])==0: rayon_entaille=0.0 else: @@ -91,7 +91,7 @@ def generateEllipse(crack, outFile): res=False rayon_entaille=crack['Rayon entaille'][0] - if 'Extension' not in crack.keys(): crack['Extension']=[] + if 'Extension' not in list(crack.keys()): crack['Extension']=[] if len(crack['Extension'])==0: extension=0.0 else: @@ -117,7 +117,7 @@ def generateRectangle(crack, outFile): res=False longueur=crack['Longueur'][0] - if 'Largeur' not in crack.keys(): crack['Largeur']=[] + if 'Largeur' not in list(crack.keys()): crack['Largeur']=[] if len(crack['Largeur'])==0: largeur=longueur else: @@ -145,7 +145,7 @@ def generateRectangle(crack, outFile): res=False direction=crack['Direction'] - if 'Angle' not in crack.keys(): crack['Angle']=[] + if 'Angle' not in list(crack.keys()): crack['Angle']=[] if len(crack['Angle'])==0: angle=0.0 else: @@ -155,7 +155,7 @@ def generateRectangle(crack, outFile): res=False angle=crack['Angle'][0] - if 'Rayon' not in crack.keys(): crack['Rayon']=[] + if 'Rayon' not in list(crack.keys()): crack['Rayon']=[] if len(crack['Rayon'])==0: rayon=0.0 else: @@ -165,7 +165,7 @@ def generateRectangle(crack, outFile): res=False rayon=crack['Rayon'][0] - if 'Rayon entaille' not in crack.keys(): crack['Rayon entaille']=[] + if 'Rayon entaille' not in list(crack.keys()): crack['Rayon entaille']=[] if len(crack['Rayon entaille'])==0: rayon_entaille=0.0 else: