diff options
author | Marius Peter <blendoit@gmail.com> | 2019-06-20 00:03:13 -0700 |
---|---|---|
committer | Marius Peter <blendoit@gmail.com> | 2019-06-20 00:03:13 -0700 |
commit | 9d0824403aa06b1cf12ac62b587f4ca07819395b (patch) | |
tree | df7b87f004ce9843de8c4e7e6b301a7d8dc8a495 | |
parent | 98eba92ca268fb18886309d535a3a52d38e09ba4 (diff) |
begin work on a gui
-rw-r--r-- | evaluator.py | 2 | ||||
-rw-r--r-- | gui.py | 35 | ||||
-rw-r--r-- | main.py | 4 |
3 files changed, 38 insertions, 3 deletions
diff --git a/evaluator.py b/evaluator.py index 69a589a..824b578 100644 --- a/evaluator.py +++ b/evaluator.py @@ -23,7 +23,7 @@ def get_centroid(airfoil): numerator += _ * area for _ in airfoil.stringer.x_l: numerator += _ * area - denominator + # denominator # z_c = @@ -0,0 +1,35 @@ +import tkinter as tk +from tkinter import ttk + + +class Input: + '''User inputs.''' + + def __init__(self, master): + ttk.Frame(master).grid(row=0, column=0) + ttk.Label(master, text='NACA Number').grid(row=0, sticky='W') + ttk.Label(master, text='Chord Length').grid(row=1, sticky='W') + ttk.Entry(master).grid(row=0, column=1) + ttk.Entry(master).grid(row=1, column=1) + + +class Graph: + '''Graph airfoil.''' + + def __init__(self, master): + ttk.Frame(master).grid(row=0, column=1) + + +def main(): + root = tk.Tk() + root.title('MAE 154B - Airfoil Design, Evaluation, Optimization') + root.geometry('1000x400') + + Input(root) + Graph(root) + root.mainloop() + return None + + +if __name__ == '__main__': + main() @@ -21,7 +21,7 @@ import random import time start_time = time.time() -CHORD_LENGTH = 100 +CHORD_LENGTH = 10 SEMI_SPAN = 200 # m=Mass @@ -75,7 +75,7 @@ def main(): af.stringer.print_info(2) # Plot components with matplotlib - # creator.plot(af, af.spar, af.stringer) + creator.plot(af, af.spar, af.stringer) # Save component info af.save_info(SAVE_PATH, _) |