Commit a0bb7f95 authored by Matheus Müller's avatar Matheus Müller

Adicao de camadas e elementos para cada camada

parent fae5b316
No preview for this file type
......@@ -5,7 +5,7 @@
2.55583126551 0.135204081633
4.20347394541 0.614540816327
6.04962779156 0.454081632653
7.06203473946 0.326530612245
8.23325062035 0.262755102041
9.20595533499 0.108214285714
9.841191067 0.0463775510204
10.0 0
......@@ -602,108 +602,108 @@
0.454081632653
0.454081632653
0.454081632653
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.326530612245
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
0.262755102041
......@@ -918,70 +918,70 @@
0.108214285714
0.108214285714
0.108214285714
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0463775510204
0.0
0.0
0.0
......
# -*- coding: iso-8859-15 -*-
import Tkinter as tk
from numpy import arange, math
from PTE import *
Frms = list()
Ldict = list()
Laycount = 0
##############################################################################
##############################################################################
class Layer:
global Ldict
def self_destruct():
return 0
def elem_select(i):
return 0
def addel(self):
i = int(self.Ecount)
self.Elements[i]=dict(name="New",symbol="Hf",mass=178.,Z=72,LineShape=200.,profundidademax=10.)
self.Ebuttons.insert(i, tk.Button(self.Frames[6], text=i, command = lambda i=i : elem_select(i) ))
self.Ebuttons[i].grid(column=0, row=i)
self.Spinboxes.insert(i, tk.Spinbox(self.Frames[7], from_=0, to=1, increment=0.05, bd=5 ))
self.Spinboxes[i].grid(column=0, row=i)
self.Ecount = self.Ecount + 1
def rmvel(self):
return 0
def __init__(self, canvas, count):
self.Number=count
self.Ecount=0
self.Elements=dict()
self.Ebuttons=list()
self.Spinboxes=list()
self.Frames=list()
self.LandE=list()
self.Buttons=list()
self.LabelFrm = tk.LabelFrame(canvas, text = 'Layer %d' %int(Laycount+1), relief='raised', bd=2)
self.LabelFrm.grid(column=(Laycount%4), row=int(math.floor(Laycount/4)) )
for i in range(2):
self.Frames.insert(i, tk.Frame(self.LabelFrm))
for i in arange(2,4):
self.Frames.insert(i, tk.Frame(self.Frames[0]))
for i in arange(4,6):
self.Frames.insert(i, tk.Frame(self.Frames[2]))
for i in arange(6,8):
self.Frames.insert(i, tk.Frame(self.Frames[1]))
self.Frames[0].pack(side='top')
self.Frames[1].pack(side='bottom')
self.Frames[2].pack(side='left')
self.Frames[3].pack(side='right')
self.Frames[4].pack(side='left')
self.Frames[5].pack(side='right')
self.Frames[6].pack(side='left')
self.Frames[7].pack(side='right')
self.LandE.insert(0, tk.Label(self.Frames[4], width=14, pady=2, text='dƐ/dx') )
self.LandE.insert(1, tk.Label(self.Frames[4], width=14, pady=2, text='dω²/dx') )
for i in arange(2,4):
self.LandE.insert(i, tk.Entry(self.Frames[5], width=11) )
for i in range(4):
self.LandE[i].pack()
self.Buttons.insert(0, tk.Button(self.Frames[4], command=lambda i=i :Ldict[self.Number].addel(), text='Add element',width=11))
self.Buttons.insert(1, tk.Button(self.Frames[5], command=lambda i=i :Ldict[self.Number].rmvel(), text='Remove element',width=11))
for i in range(2):
self.Buttons[i].pack()
##############################################################################
##############################################################################
def addlay(Laycanvas):
global Laycount, Ldict
Ldict.insert(Laycount, Layer(Laycanvas, Laycount))
Laycount = Laycount + 1
##############################################################################
def rmvlay():
global Laycount, Ldict
if Laycount > 0:
Ldict[Laycount].self_destruct()
Laycount = Laycount - 1
##############################################################################
##############################################################################
def layers():
global Laycount, Ldict
Laycount = 0
laywin = tk.Tk()
laywin.title('Layers')
laywin.minsize(400,400)
laywin.geometry('400x400+200+400')
for i in range(2):
Frms.insert(i, tk.Frame(laywin))
Frms[0].pack(side='top')
Frms[1].pack(side='bottom')
Laycanvas = tk.Canvas(Frms[1])
Laycanvas.pack(fill='both',expand=0)
##############################################################################
def addlay():
return 0
def rmvlay():
return 0
##############################################################################
butadd = tk.Button(Frms[0], command=addlay, text='Add layer', bd=1, height=1,width=10, pady='4')
butadd = tk.Button(Frms[0], command=lambda i=i :addlay(Laycanvas), text='Add layer', bd=1, height=1,width=10, pady='4')
butadd.pack(side='left')
butrmv = tk.Button(Frms[0], command=rmvlay, text='Remove layer', bd=1, height=1,width=10, pady='4')
butrmv = tk.Button(Frms[0], command=lambda i=i :rmvlay, text='Remove layer', bd=1, height=1,width=10, pady='4')
butrmv.pack(side='left')
##############################################################################
laywin.mainloop()
##############################################################################
##############################################################################
85677.2577097 0.0
85702.2577097 0.000929748745316
85727.2577097 0.00370997080221
85752.2577097 0.0112625931849
85777.2577097 0.02990157766
85802.2577097 0.071689690136
85827.2577097 0.156801323186
85852.2577097 0.314283112104
85877.2577097 0.578996849601
85902.2577097 0.983225022743
85927.2577097 1.54398811455
85952.2577097 2.2506846847
85977.2577097 3.05975032234
86002.2577097 3.90119472078
86027.2577097 4.69615631353
86052.2577097 5.37837365762
86077.2577097 5.91012393754
86102.2577097 6.28647964018
86127.2577097 6.52822670369
86152.2577097 6.6689705191
86177.2577097 6.74298791049
86202.2577097 6.77781660685
86227.2577097 6.79204392966
86252.2577097 6.79651368446
86277.2577097 6.79677850751
86302.2577097 6.79535862643
86327.2577097 6.79327614917
86352.2577097 6.79090541075
86377.2577097 6.78837320721
86402.2577097 6.78572208736
86427.2577097 6.7829688113
86452.2577097 6.78012286581
86477.2577097 6.77719168876
86502.2577097 6.77418199678
86527.2577097 6.77110010093
86552.2577097 6.76795198918
86577.2577097 6.76474336227
86602.2577097 6.76147966276
86627.2577097 6.75816610511
86652.2577097 6.75480770849
86677.2577097 6.75140933296
86702.2577097 6.74797571972
86727.2577097 6.7445115359
86752.2577097 6.74102142489
86777.2577097 6.7375100628
86802.2577097 6.73398222223
86827.2577097 6.73044284422
86852.2577097 6.72689711962
86877.2577097 6.72335058106
86902.2577097 6.71980920677
86927.2577097 6.71627953749
86952.2577097 6.71276880784
86977.2577097 6.70928509303
87002.2577097 6.70583747205
87027.2577097 6.70243620777
87052.2577097 6.69909294426
87077.2577097 6.69582092132
87102.2577097 6.69263520535
87127.2577097 6.68955293537
87152.2577097 6.68659358161
87177.2577097 6.68377921255
87202.2577097 6.68113476369
87227.2577097 6.67868829918
87252.2577097 6.67647125491
87277.2577097 6.67451864979
87302.2577097 6.67286925003
87327.2577097 6.67156566955
87352.2577097 6.67065438702
87377.2577097 6.67018565725
87402.2577097 6.67021329276
87427.2577097 6.67079428921
87452.2577097 6.67198826857
87477.2577097 6.67385671486
87502.2577097 6.67646198042
87527.2577097 6.67986604538
87552.2577097 6.68412902031
87577.2577097 6.68930739159
87602.2577097 6.69545202095
87627.2577097 6.70260592591
87652.2577097 6.71080188425
87677.2577097 6.720059925
87702.2577097 6.73038478793
87727.2577097 6.74176345283
87752.2577097 6.7541628581
87777.2577097 6.76752794217
87802.2577097 6.78178015001
87827.2577097 6.7968165486
87852.2577097 6.81250968654
87877.2577097 6.82870831365
87902.2577097 6.84523904414
87927.2577097 6.861909002
87952.2577097 6.87850943014
87977.2577097 6.89482017725
88002.2577097 6.91061490189
88027.2577097 6.92566675675
88052.2577097 6.93975424237
88077.2577097 6.95266685679
88102.2577097 6.96421012126
88127.2577097 6.97420953883
88152.2577097 6.98251304771
88177.2577097 6.98899156568
88202.2577097 6.99353728618
88227.2577097 6.99605947456
88252.2577097 6.99647761682
88277.2577097 6.99471187927
88302.2577097 6.99067093124
88327.2577097 6.98423724789
88352.2577097 6.97525002974
88377.2577097 6.96348583949
88402.2577097 6.94865325206
88427.2577097 6.93037224429
88452.2577097 6.90818674989
88477.2577097 6.88160691565
88502.2577097 6.85020442571
88527.2577097 6.81377251552
88552.2577097 6.77253657793
88577.2577097 6.72735916322
88602.2577097 6.67984388047
88627.2577097 6.63223971074
88652.2577097 6.58710612234
88677.2577097 6.54680811719
88702.2577097 6.51301131599
88727.2577097 6.4863705061
88752.2577097 6.46652410821
88777.2577097 6.45236656523
88802.2577097 6.44245645542
88827.2577097 6.43539209927
88852.2577097 6.43004546059
88877.2577097 6.42563556937
88902.2577097 6.42168846476
88927.2577097 6.41794932356
88952.2577097 6.41429597439
88977.2577097 6.41067595764
89002.2577097 6.40706903665
89027.2577097 6.40346818189
89052.2577097 6.39987118979
89077.2577097 6.39627743485
89102.2577097 6.39268675473
89127.2577097 6.38909910928
89152.2577097 6.38551448742
89177.2577097 6.3819328843
89202.2577097 6.37835429629
89227.2577097 6.37477871996
89252.2577097 6.37120615193
89277.2577097 6.36763658881
89302.2577097 6.36407002725
89327.2577097 6.36050646387
89352.2577097 6.3569458953
89377.2577097 6.35338831819
89402.2577097 6.34983372918
89427.2577097 6.34628212492
89452.2577097 6.34273350206
89477.2577097 6.33918785725
89502.2577097 6.33564518714
89527.2577097 6.33210548839
89552.2577097 6.32856875765
89577.2577097 6.32503499158
89602.2577097 6.32150418682
89627.2577097 6.31797634001
89652.2577097 6.31445144778
89677.2577097 6.31092950675
89702.2577097 6.30741051351
89727.2577097 6.30389446464
89752.2577097 6.30038135667
89777.2577097 6.29687118608
89802.2577097 6.2933639493
89827.2577097 6.28985964268
89852.2577097 6.28635826247
89877.2577097 6.28285980479
89902.2577097 6.2793642656
89927.2577097 6.27587164067
89952.2577097 6.27238192551
89977.2577097 6.26889511532
90002.2577097 6.26541120491
90027.2577097 6.26193018862
90052.2577097 6.25845206018
90077.2577097 6.25497681263
90102.2577097 6.25150443809
90127.2577097 6.24803492764
90152.2577097 6.24456827102
90177.2577097 6.24110445641
90202.2577097 6.23764347007
90227.2577097 6.23418529594
90252.2577097 6.23072991521
90277.2577097 6.22727730575
90302.2577097 6.22382744147
90327.2577097 6.22038029153
90352.2577097 6.21693581945
90377.2577097 6.21349398203
90402.2577097 6.21005472809
90427.2577097 6.20661799692
90452.2577097 6.2031837166
90477.2577097 6.19975180178
90502.2577097 6.19632215128
90527.2577097 6.19289464506
90552.2577097 6.18946914075
90577.2577097 6.18604546944
90602.2577097 6.18262343073
90627.2577097 6.17920278677
90652.2577097 6.17578325525
90677.2577097 6.17236450097
90702.2577097 6.16894612586
90727.2577097 6.16552765705
90752.2577097 6.16210853277
90777.2577097 6.15868808546
90802.2577097 6.15526552186
90827.2577097 6.15183989933
90852.2577097 6.14841009779
90877.2577097 6.14497478666
90902.2577097 6.14153238575
90927.2577097 6.13808101922
90952.2577097 6.13461846146
90977.2577097 6.13114207358
91002.2577097 6.12764872905
91027.2577097 6.12413472674
91052.2577097 6.12059568975
91077.2577097 6.11702644754
91102.2577097 6.1134208995
91127.2577097 6.10977185718
91152.2577097 6.10607086254
91177.2577097 6.10230797944
91202.2577097 6.0984715554
91227.2577097 6.09454795062
91252.2577097 6.09052123136
91277.2577097 6.08637282489
91302.2577097 6.08208113365
91327.2577097 6.07762110665
91352.2577097 6.07296376698
91377.2577097 6.06807569568
91402.2577097 6.06291847353
91427.2577097 6.05744808452
91452.2577097 6.05161428731
91477.2577097 6.04535996364
91502.2577097 6.03862045698
91527.2577097 6.03132291814
91552.2577097 6.02338568012
91577.2577097 6.01471768978
91602.2577097 6.00521802972
91627.2577097 5.99477557041
91652.2577097 5.98326879894
91677.2577097 5.97056587692
91702.2577097 5.95652498577
91727.2577097 5.94099502217
91752.2577097 5.9238167088
91777.2577097 5.90482418608
91802.2577097 5.88384714716
91827.2577097 5.86071357115
91852.2577097 5.8352530973
91877.2577097 5.80730106473
91902.2577097 5.77670321763
91927.2577097 5.74332104478
91952.2577097 5.70703768427
91977.2577097 5.66776428
92002.2577097 5.62544662784
92027.2577097 5.5800718969
92052.2577097 5.53167515929
92077.2577097 5.48034541246
92102.2577097 5.42623073697
92127.2577097 5.36954220369
92152.2577097 5.3105561335
92177.2577097 5.24961432522
92202.2577097 5.18712190769
92227.2577097 5.12354254397
92252.2577097 5.05939082065
92277.2577097 4.99522179302
92302.2577097 4.93161782216
92327.2577097 4.86917302652
92352.2577097 4.80847586597
92377.2577097 4.75009056567
92402.2577097 4.69453825342
92427.2577097 4.64227880755
92452.2577097 4.59369447496
92477.2577097 4.54907630418
92502.2577097 4.50861433602
92527.2577097 4.47239230111
92552.2577097 4.44038729548
92577.2577097 4.41247456057
92602.2577097 4.3884371083
92627.2577097 4.36797954262
92652.2577097 4.35074507669
92677.2577097 4.33633447127
92702.2577097 4.32432546098
92727.2577097 4.31429213858
92752.2577097 4.30582129082
92777.2577097 4.29852740644
92802.2577097 4.29206542915
92827.2577097 4.28614228017
92852.2577097 4.28052788811
92877.2577097 4.2750653376
92902.2577097 4.26967762715