From fad1390cc3471a33e09ef90688f832cb2c3b9ff0 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Thu, 25 Aug 2022 09:25:14 +0200 Subject: [PATCH] [#1603] Fix tab height validation --- core/src/net/sf/openrocket/rocketcomponent/FinSet.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java index 065e84245..d73928fd2 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java @@ -428,12 +428,14 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona public void validateFinTabHeight(){ // check tab height if( null != getParent() ){ + final Coordinate finFront = this.getFinFront(); + // pulls the parent-body radius at the fin-tab reference point. final double xLead = this.getTabFrontEdge(); final double xTrail = this.getTabTrailingEdge(); final SymmetricComponent sym = (SymmetricComponent)this.parent; - final double bodyRadius = MathUtil.min(sym.getRadius( xLead), sym.getRadius( xTrail)); + final double bodyRadius = MathUtil.min(sym.getRadius(finFront.x + xLead), sym.getRadius(finFront.x + xTrail)); // limit the new heights to be no greater than the current body radius. this.tabHeight = Math.min( this.tabHeight, bodyRadius );