From 6a826d54b96e1b34fc128e0d3641229aa9cce515 Mon Sep 17 00:00:00 2001 From: JoePfeiffer Date: Wed, 16 Mar 2022 08:10:01 -0600 Subject: [PATCH] Get correct fin span when last point in shape is loewr than first point. Note that the lowest point on the fin is guaranteed to be either the first point which is at (0, 0) or the last point, which will have a y coordinate of 0 if on a body tube, greater than 0 if on an increasing transition, or less than 0 on a decreasing transition (boattail). --- core/src/net/sf/openrocket/rocketcomponent/FreeformFinSet.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/src/net/sf/openrocket/rocketcomponent/FreeformFinSet.java b/core/src/net/sf/openrocket/rocketcomponent/FreeformFinSet.java index 284f70550..b0fe74cea 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FreeformFinSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FreeformFinSet.java @@ -296,7 +296,8 @@ public class FreeformFinSet extends FinSet { if (c.y > max) max = c.y; } - return max; + + return max - Math.min(points.get(points.size() - 1).y, 0); } @Override