diff options
Diffstat (limited to 'creator.py')
-rw-r--r-- | creator.py | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -69,7 +69,7 @@ class Coordinates: def __str__(self): return type(self).__name__ - def print_info(self, round): + def info_print(self, round): ''' Print all the component's coordinates to the terminal. @@ -91,7 +91,7 @@ class Coordinates: print('z_l the lower z-coordinates:\n', np.around(self.z_l, round)) return None - def save_info(self, save_dir_path, number): + def info_save(self, save_dir_path, number): ''' Save all the object's coordinates (must be full path). ''' @@ -100,7 +100,7 @@ class Coordinates: full_path = os.path.join(save_dir_path, file_name) try: with open(full_path, 'w') as sys.stdout: - self.print_info(6) + self.info_print(6) # This line required to reset behavior of sys.stdout sys.stdout = sys.__stdout__ print('Successfully wrote to file {}'.format(full_path)) @@ -218,8 +218,8 @@ class Airfoil(Coordinates): def add_mass(self, mass): self.mass = mass - def print_info(self, round): - super().print_info(round) + def info_print(self, round): + super().info_print(round) print('x_c the camber x-coordinates:\n', np.around(self.x_u, round)) print('z_c the camber z-coordinates:\n', np.around(self.x_u, round)) return None @@ -408,8 +408,8 @@ class Stringer(Coordinates): self.mass = len(self.x_u) * mass + len(self.x_l) * mass return None - def print_info(self, round): - super().print_info(round) + def info_print(self, round): + super().info_print(round) print('Stringer Area:\n', np.around(self.area, round)) return None |