From 1f3b0d4482531b555f0342d92d43cca7448f5282 Mon Sep 17 00:00:00 2001 From: Peter Sharpe Date: Wed, 14 Feb 2024 17:18:25 -0500 Subject: [PATCH] fixes a bug with fuselage x locations --- .../openvsp_io/asb_to_openvsp/fuselage_vspscript_generator.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aerosandbox/geometry/openvsp_io/asb_to_openvsp/fuselage_vspscript_generator.py b/aerosandbox/geometry/openvsp_io/asb_to_openvsp/fuselage_vspscript_generator.py index c8194451..85ad493c 100644 --- a/aerosandbox/geometry/openvsp_io/asb_to_openvsp/fuselage_vspscript_generator.py +++ b/aerosandbox/geometry/openvsp_io/asb_to_openvsp/fuselage_vspscript_generator.py @@ -28,6 +28,9 @@ def generate_fuselage(fuselage: Fuselage, include_main=True) -> str: if len(fuselage.xsecs) < 2: raise ValueError("Fuselages must have at least 2 cross sections.") else: + script += f"""\ +SetParmVal( fid, "XLocPercent", "XSec_3", 1.0 ); // Causes all sections to be generated at x/L = 1, so they don't conflict + """ for i in range(len(fuselage.xsecs) - 1): script += f"""\ InsertXSec( fid, 3, XS_SUPER_ELLIPSE ); // FuselageXSecs {i} to {i + 1}