*ARCHIVED* development moved to aircraft-studio.
remove global variable in creator.py
creator.py
@@ -78,6 +78,7 @@
78
78
79
79
This function's output is piped to the 'save_coord' function below.
80
80
"""
81
Added:
81
82
name = ' CREATOR DATA '
82
83
num_of_dashes = len(name)
83
84
@@ -96,6 +97,7 @@
96
97
"""
97
98
Save all the object's coordinates (must be full path).
98
99
"""
100
Added:
99
101
file_name = '{}_{}.txt'.format(str(self).lower(), number)
100
102
full_path = os.path.join(save_path, file_name)
101
103
try:
@@ -126,7 +128,6 @@
126
128
"""
127
129
128
130
def __init__(self):
129
Removed:
global parent
130
131
# Run 'Coordinates' super class init method with same chord & 1/2 span.
131
132
super().__init__()
132
133
self.chord = Coordinates.chord
@@ -259,6 +260,7 @@
259
260
Return:
260
261
None
261
262
"""
263
Added:
262
264
# Scaled spar location with regards to chord
263
265
loc = x_loc_percent * self.chord
264
266
# bi.bisect_left: returns index of first value in airfoil.x > loc
@@ -328,6 +330,7 @@
328
330
Returns:
329
331
None
330
332
"""
333
Added:
331
334
# Find distance between leading edge and first upper stringer
332
335
interval = airfoil.spar.x[0][0] / (stringer_u_1 + 1)
333
336
# initialise first self.stringer_x at first interval
@@ -396,6 +399,7 @@
396
399
397
400
def plot_geom(airfoil):
398
401
"""This function plots the airfoil's + sub-components' geometry."""
402
Added:
399
403
# Plot chord
400
404
x_chord = [0, airfoil.chord]
401
405
y_chord = [0, 0]