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 @@ ...@@ -5,7 +5,7 @@
2.55583126551 0.135204081633 2.55583126551 0.135204081633
4.20347394541 0.614540816327 4.20347394541 0.614540816327
6.04962779156 0.454081632653 6.04962779156 0.454081632653
7.06203473946 0.326530612245
8.23325062035 0.262755102041 8.23325062035 0.262755102041
9.20595533499 0.108214285714 9.20595533499 0.108214285714
9.841191067 0.0463775510204
10.0 0 10.0 0
...@@ -602,108 +602,108 @@ ...@@ -602,108 +602,108 @@
0.454081632653 0.454081632653
0.454081632653 0.454081632653
0.454081632653 0.454081632653
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.326530612245 0.262755102041
0.262755102041 0.262755102041
0.262755102041 0.262755102041
0.262755102041 0.262755102041
...@@ -918,70 +918,70 @@ ...@@ -918,70 +918,70 @@
0.108214285714 0.108214285714
0.108214285714 0.108214285714
0.108214285714 0.108214285714
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0463775510204
0.0 0.0
0.0 0.0
0.0 0.0
......
# -*- coding: iso-8859-15 -*-
import Tkinter as tk import Tkinter as tk
from numpy import arange, math
from PTE import *
Frms = list() Frms = list()
Ldict = list()
Laycount = 0 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(): def layers():
global Laycount, Ldict
Laycount = 0
laywin = tk.Tk() laywin = tk.Tk()
laywin.title('Layers') laywin.title('Layers')
laywin.minsize(400,400)
laywin.geometry('400x400+200+400')
for i in range(2): for i in range(2):
Frms.insert(i, tk.Frame(laywin)) Frms.insert(i, tk.Frame(laywin))
Frms[0].pack(side='top') Frms[0].pack(side='top')
Frms[1].pack(side='bottom') Frms[1].pack(side='bottom')
Laycanvas = tk.Canvas(Frms[1])
Laycanvas.pack(fill='both',expand=0)
############################################################################## butadd = tk.Button(Frms[0], command=lambda i=i :addlay(Laycanvas), text='Add layer', bd=1, height=1,width=10, pady='4')
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.pack(side='left') 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') butrmv.pack(side='left')
##############################################################################
laywin.mainloop() laywin.mainloop()
############################################################################## ##############################################################################
##############################################################################
85677.2577097 0.0 69694.244146 0.0
85702.2577097 0.000929748745316 69714.244146 1.8224819253e-57
85727.2577097 0.00370997080221 69734.244146 6.85771838924e-57
85752.2577097 0.0112625931849 69754.244146 1.94207982818e-56
85777.2577097 0.02990157766 69774.244146 4.83572291238e-56
85802.2577097 0.071689690136 69794.244146 1.10402841365e-55
85827.2577097 0.156801323186 69814.244146 2.3472531292e-55
85852.2577097 0.314283112104 69834.244146 4.68023195156e-55
85877.2577097 0.578996849601 69854.244146 8.78727603782e-55
85902.2577097 0.983225022743 69874.244146 1.55815831366e-54
85927.2577097 1.54398811455 69894.244146 2.61651159631e-54
85952.2577097 2.2506846847 69914.244146 4.17280654031e-54
85977.2577097 3.05975032234 69934.244146 6.34035723043e-54
86002.2577097 3.90119472078 69954.244146 9.21209381711e-54
86027.2577097 4.69615631353 69974.244146 1.28516288813e-53
86052.2577097 5.37837365762 69994.244146 1.72950655096e-53
86077.2577097 5.91012393754 70014.244146 2.25650644566e-53
86102.2577097 6.28647964018 70034.244146 2.86940795665e-53
86127.2577097 6.52822670369 70054.244146 3.5750249074e-53
86152.2577097 6.6689705191 70074.244146 4.38589786172e-53
86177.2577097 6.74298791049 70094.244146 5.32158942498e-53
86202.2577097 6.77781660685 70114.244146 6.40910250539e-53
86227.2577097 6.79204392966 70134.244146 7.68276264174e-53
86252.2577097 6.79651368446 70154.244146 9.18405186065e-53
86277.2577097 6.79677850751 70174.244146 1.09618104654e-52
86302.2577097 6.79535862643 70194.244146 1.30730333798e-52
86327.2577097 6.79327614917 70214.244146 1.5584301905e-52
86352.2577097 6.79090541075 70234.244146 1.85737866075e-52
86377.2577097 6.78837320721 70254.244146 2.21337431857e-52
86402.2577097 6.78572208736 70274.244146 2.63734681112e-52
86427.2577097 6.7829688113 70294.244146 3.14227440193e-52
86452.2577097 6.78012286581 70314.244146 3.74358600309e-52
86477.2577097 6.77719168876 70334.244146 4.45963318048e-52
86502.2577097 6.77418199678 70354.244146 5.31224743656e-52
86527.2577097 6.77110010093 70374.244146 6.32740052975e-52
86552.2577097 6.76795198918 70394.244146 7.53598830575e-52
86577.2577097 6.76474336227 70414.244146 8.97476186002e-52
86602.2577097 6.76147966276 70434.244146 1.06874340085e-51
86627.2577097 6.75816610511 70454.244146 1.27259941251e-51
86652.2577097 6.75480770849 70474.244146 1.51522705234e-51
86677.2577097 6.75140933296 70494.244146 1.80397868631e-51
86702.2577097 6.74797571972 70514.244146 2.14759677499e-51
86727.2577097 6.7445115359 70534.244146 2.5564759011e-51
86752.2577097 6.74102142489 70554.244146 3.04297403665e-51
86777.2577097 6.7375100628 70574.244146 3.62178227404e-51
86802.2577097 6.73398222223 70594.244146 4.31036396778e-51
86827.2577097 6.73044284422 70614.244146 5.12947627668e-51
86852.2577097 6.72689711962 70634.244146 6.10378952e-51
86877.2577097 6.72335058106 70654.244146 7.2626226343e-51
86902.2577097 6.71980920677 70674.244146 8.64081642651e-51
86927.2577097 6.71627953749 70694.244146 1.02797703593e-50
86952.2577097 6.71276880784 70714.244146 1.22286733966e-50
86977.2577097 6.70928509303 70734.244146 1.45459651171e-50
87002.2577097 6.70583747205 70754.244146 1.73010700393e-50
87027.2577097 6.70243620777 70774.244146 2.05764560809e-50
87052.2577097 6.69909294426 70794.244146 2.44700775412e-50
87077.2577097 6.69582092132 70814.244146 2.90982742048e-50
87102.2577097 6.69263520535 70834.244146 3.45992114564e-50
87127.2577097 6.68955293537 70854.244146 4.11369620432e-50
87152.2577097 6.68659358161 70874.244146 4.89063487802e-50
87177.2577097 6.68377921255 70894.244146 5.81386896017e-50
87202.2577097 6.68113476369 70914.244146 6.91086125526e-50
87227.2577097 6.67868829918 70934.244146 8.2142139338e-50
87252.2577097 6.67647125491 70954.244146 9.76262728005e-50
87277.2577097 6.67451864979 70974.244146 1.16020367221e-49
87302.2577097 6.67286925003 70994.244146 1.37869611887e-49
87327.2577097 6.67156566955 71014.244146 1.63821019425e-49
87352.2577097 6.67065438702 71034.244146 1.94642382665e-49
87377.2577097 6.67018565725 71054.244146 2.31244749411e-49
87402.2577097 6.67021329276 71074.244146 2.74709065809e-49
87427.2577097 6.67079428921 71094.244146 3.26317758959e-49
87452.2577097 6.67198826857 71114.244146 3.87592171424e-49
87477.2577097 6.67385671486 71134.244146 4.60336928355e-49
87502.2577097 6.67646198042 71154.244146 5.4669251685e-49
87527.2577097 6.67986604538 71174.244146 6.49197592618e-49
87552.2577097 6.68412902031 71194.244146 7.70862807523e-49
87577.2577097 6.68930739159 71214.244146 9.15258281235e-49
87602.2577097 6.69545202095 71234.244146 1.08661723017e-48
87627.2577097 6.70260592591 71254.244146 1.28995872824e-48
87652.2577097 6.71080188425 71274.244146 1.53123311974e-48
87677.2577097 6.720059925 71294.244146 1.81749425017e-48
87702.2577097 6.73038478793 71314.244146 2.15710344427e-48
87727.2577097 6.74176345283 71334.244146 2.55997106378e-48
87752.2577097 6.7541628581 71354.244146 3.03784254468e-48
87777.2577097 6.76752794217 71374.244146 3.60463707697e-48