Skip to content

Commit

Permalink
adds type hints
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdsharpe committed Feb 13, 2024
1 parent 6e4f6b1 commit 13d71ed
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions aerosandbox/geometry/airplane.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,7 +946,7 @@ def export_AVL(self,
)
avl.write_avl(filepath=filename)

def export_XFLR(self, *args, **kwargs):
def export_XFLR(self, *args, **kwargs) -> str:
import warnings

warnings.warn(
Expand All @@ -967,7 +967,7 @@ def export_XFLR5_xml(self,
mainwing: Wing = None,
elevator: Wing = None,
fin: Wing = None,
):
) -> str:
"""
Exports the airplane geometry to an XFLR5 `.xml` file.
Expand Down Expand Up @@ -1270,6 +1270,17 @@ def indent(elem, level=0):

return xml_string

def export_OpenVSP_vspscript(self,
filename,
):
from aerosandbox.geometry.openvsp_io.asb_to_openvsp.airplane_vspscript_generator import generate_airplane

vspscript_code = generate_airplane(self)

with open(filename, "w+") as f:
f.write(vspscript_code)

return vspscript_code

if __name__ == '__main__':
import aerosandbox as asb
Expand Down

0 comments on commit 13d71ed

Please sign in to comment.