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

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