diff options
author | Marius Peter <blendoit@gmail.com> | 2019-06-29 15:29:10 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-06-29 15:29:10 -0700 |
commit | 59a41c177ce3f3e0f488708466ea0eec09da3294 (patch) | |
tree | 5271305554e0010a1a0a5f1ec596a37ef5e2932e | |
parent | ef58cbaeab672ec406f31f3598d8ffffb372b4c9 (diff) |
clean gui
-rw-r--r-- | gui.py | 38 |
1 files changed, 0 insertions, 38 deletions
@@ -17,11 +17,6 @@ import creator import tkinter as tk import tkinter.ttk as ttk -import matplotlib.pyplot as plt -from matplotlib.backends.backend_tkagg import ( - FigureCanvasTkAgg, NavigationToolbar2Tk) -import numpy as np - def main(): root = tk.Tk() @@ -34,39 +29,6 @@ def main(): ttk.Label(frame, text='Chord Length').grid(row=1, sticky='W') ttk.Entry(frame).grid(row=1, column=1) - # Create airfoil instance - creator.Coordinates(68, 200) - af = creator.Airfoil() - af.add_naca(2412) - af.add_mass(10) - - af.spar = creator.Spar() - af.spar.add_coord(af, 0.20) - af.spar.add_coord(af, 0.65) - af.spar.add_spar_caps(0.03) - af.spar.add_mass(0.04) - af.spar.add_webs(0.02) - - af.stringer = creator.Stringer() - af.stringer.add_coord(af, 3, 6, 5, 4) - af.stringer.add_area(0.1) - af.stringer.add_mass(0.02) - af.stringer.add_webs(0.03) - - frame = ttk.Frame(root).grid(row=0, column=1) - - fig = plt.Figure(figsize=(5, 4), dpi=100) - t = np.arange(0, 3, .01) - fig.add_subplot(111).plot(af.x, af.z) - - canvas = FigureCanvasTkAgg(fig, master=frame) # A tk.DrawingArea. - # canvas.draw() - canvas.get_tk_widget().grid(row=0, column=1) - - # toolbar = NavigationToolbar2Tk(canvas, master) - # toolbar.update() - # canvas.get_tk_widget().grid(row=0, column=1) - root.mainloop() return None |