summaryrefslogtreecommitdiff
path: root/creator/base.py
diff options
context:
space:
mode:
Diffstat (limited to 'creator/base.py')
-rw-r--r--creator/base.py20
1 files changed, 5 insertions, 15 deletions
diff --git a/creator/base.py b/creator/base.py
index f6342c8..5d90efd 100644
--- a/creator/base.py
+++ b/creator/base.py
@@ -13,23 +13,17 @@ logging.basicConfig(filename='log.txt',
class Aircraft:
"""This class tracks all sub-components and is fed to the evaluator."""
def __init__(self, evaluator, name):
- self.tree = {name: None}
- if type(self).__name__ not in evaluator.tree:
- evaluator.tree[name] = self.tree
- else:
- evaluator.tree[name] = self.tree
+ evaluator.aircrafts.append(self)
self.evaluator = evaluator
self.name = name
+ self.fuselage = None
+ self.propulsion = None
+ self.wing = None
+
class Component:
"""Basic component providing coordinates, tools and a component tree."""
def __init__(self, parent, name):
- self.tree = {type(self).__name__: name}
- # print(type(self).__name__)
- if type(self).__name__ not in parent.tree:
- parent.tree.update(self.tree)
- else:
- parent.tree[name] = self.tree
self.parent = parent
self.name = name
self.x = np.array([])
@@ -37,10 +31,6 @@ class Component:
self.material = None
self.mass = float()
- def set_material(self, material):
- """Set the component bulk material."""
- self.material = material
-
def info_print(self, round):
"""Print all the component's coordinates to the terminal."""
name = f' CREATOR DATA FOR {str(self).upper()} '
Copyright 2019--2024 Marius PETER