diff --git a/CHANGELOG.md b/CHANGELOG.md index 41f7ae58..f86f2b5e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -40,6 +40,7 @@ Also, for at least one version before a breaking change, AeroSandbox development #### 4.1.5 +- PENDING DEPRECATION added: `asb.Airplane.export_XFLR()` has been renamed to `asb.Airplane.export_XFLR5_xml()`. This clarifies that the output is an XFLR5 XML file (which needs to be imported through the Plane menu in XFLR5), not an XFLR5 .xfl file - a point of user confusion. For now, both will work, but the old name will trigger a warning, and eventually will be removed. - Added improvements to `asb.LiftingLine` to ensure mixed-backend compatibility. #### 4.1.4 diff --git a/aerosandbox/geometry/airplane.py b/aerosandbox/geometry/airplane.py index c14dd7f8..b2734712 100644 --- a/aerosandbox/geometry/airplane.py +++ b/aerosandbox/geometry/airplane.py @@ -946,14 +946,28 @@ def export_AVL(self, ) avl.write_avl(filepath=filename) - def export_XFLR(self, - filename, - mass_props: MassProperties = None, - include_fuselages: bool = False, - mainwing: Wing = None, - elevator: Wing = None, - fin: Wing = None, - ): + def export_XFLR(self, *args, **kwargs): + import warnings + + warnings.warn( + "`Airplane.export_XFLR()` has been renamed to `Airplane.export_XFLR5_xml()`, to clarify\n" + "that it exports to XFLR5's XML format, not to a XFL file.\n" + "\n" + "Please update your code to use `Airplane.export_XFLR5_xml()` instead.\n" + "\n" + "This function will be removed in a future version of AeroSandbox.", + PendingDeprecationWarning + ) + return self.export_XFLR5_xml(*args, **kwargs) + + def export_XFLR5_xml(self, + filename, + mass_props: MassProperties = None, + include_fuselages: bool = False, + mainwing: Wing = None, + elevator: Wing = None, + fin: Wing = None, + ): """ Exports the airplane geometry to an XFLR5 `.xml` file. @@ -1398,4 +1412,4 @@ def ft(feet, inches=0): # Converts feet (and inches) to meters ) airplane.draw_three_view() - # airplane.export_XFLR("test.xml", mass_props=asb.MassProperties(mass=1, Ixx=1, Iyy=1, Izz=1)) + # airplane.export_XFLR5_xml("test.xml", mass_props=asb.MassProperties(mass=1, Ixx=1, Iyy=1, Izz=1))