From 9171de2520a23b28b2edb0e75603de65ae15f66f Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 15 Aug 2023 01:22:59 +0200 Subject: [PATCH] Add motor overhang to motor position --- .../file/wavefrontobj/export/components/MotorExporter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/file/wavefrontobj/export/components/MotorExporter.java b/core/src/net/sf/openrocket/file/wavefrontobj/export/components/MotorExporter.java index b4cac22bb..1d59d9744 100644 --- a/core/src/net/sf/openrocket/file/wavefrontobj/export/components/MotorExporter.java +++ b/core/src/net/sf/openrocket/file/wavefrontobj/export/components/MotorExporter.java @@ -130,7 +130,8 @@ public class MotorExporter { // Translate the mesh to the position in the rocket Coordinate location = context.getLocation(); - location = location.add(mount.getLength() - length, 0, 0); // Motor starts at the aft end of the mount + final double xOffs = mount.getLength() + ((MotorMount) mount).getMotorOverhang() - length; + location = location.add(xOffs, 0, 0); // Motor starts at the aft end of the mount ObjUtils.translateVerticesFromComponentLocation(obj, transformer, startIdx, endIdx, location); } }