Package theia :: Package helpers :: Module settings
[hide private]
[frames] | no frames]

Source Code for Module theia.helpers.settings

 1  '''Module to initiate all global variables for theia.''' 
 2   
 3  # Provides: 
 4  #   init 
 5   
6 -def init(dic):
7 '''Initiate globals with dictionary. 8 9 dic: dictionary holding values for globals. [dictionary] 10 11 ''' 12 # these are *all* the theia globals 13 global info 14 global warning 15 global text 16 global cad 17 global fname 18 global fclib 19 global antiClip 20 global clipFactor # portion of beam inside optic to determine whether 21 # clipping has occured. 22 global FCFactor # factor to compensate for FreeCAD units 23 24 #geometry 25 global zero #geometrical 0 distance (for seperation) 26 global inf # geometrical infinite 27 global flatK # curvature of a flat surface 28 29 #dictionary of orders in which input is given in .tia 30 global inOrder 31 32 #geometry 33 zero = 1.e-10 34 inf = 1.e15 35 flatK = 1.e-5 36 clipFactor = 2. 37 FCFactor = 0.001 38 39 40 #order of data in .tia 41 inOrder = {} 42 inOrder['bm'] = ['Wx','Wy','WDistx','WDisty','Wl','P', 43 'X','Y','Z','Theta','Phi','Alpha','Ref'] 44 45 inOrder['mr'] = ['X','Y','Z','Theta','Phi','Wedge','Alpha', 46 'HRK','ARK','Diameter','Thickness','N','HRr','HRt','ARr','ARt', 47 'KeepI', 'Ref'] 48 49 inOrder['th'] = ['X','Y','Z','Theta','Phi','Focal','Diameter', 50 'R','T','KeepI','Ref'] 51 52 inOrder['tk'] = ['X','Y','Z','Theta','Phi','K1','K2','Diameter', 53 'Thickness','N','R','T','KeepI','Ref'] 54 55 inOrder['bd'] = ['X','Y','Z','Theta','Phi','Diameter','Thickness', 'Ref'] 56 inOrder['gh'] = ['X','Y','Z','Theta','Phi','Diameter', 'Ref'] 57 inOrder['bo'] = ['X', 'Y', 'Z'] 58 59 #parsed from command line 60 info = dic['info'] 61 warning = dic['warning'] 62 text = dic['text'] 63 cad = dic['cad'] 64 fname = dic['fname'] 65 fclib = dic['fclib'] 66 antiClip = dic['antiClip']
67