From 8a474c2952ef3f7e37124b2dd7f8acea89b4ec9e Mon Sep 17 00:00:00 2001 From: SiboVG Date: Wed, 21 Dec 2022 00:58:11 +0100 Subject: [PATCH 1/2] [#1896] Increase freeform fin set table width --- .../sf/openrocket/gui/configdialog/FreeformFinSetConfig.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java b/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java index 47ade763f..5bae5b08f 100644 --- a/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java +++ b/swing/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java @@ -349,7 +349,7 @@ public class FreeformFinSetConfig extends FinSetConfig { // first row: main display JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tablePane, figurePane); - splitPane.setResizeWeight(0.1); + splitPane.setResizeWeight(0.15); splitPane.setBorder(null); panel.add(splitPane, "width 300lp:500lp:, gap unrel, grow, height 100lp:250lp:, wrap"); order.add(table); From 0f37b8e2622e664c762b0e8fda42218749fc52a1 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Wed, 21 Dec 2022 22:48:22 +0100 Subject: [PATCH 2/2] [#1907] Fix RockSim fin tab offset --- .../net/sf/openrocket/file/rocksim/export/FinSetDTO.java | 3 ++- core/src/net/sf/openrocket/rocketcomponent/FinSet.java | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/net/sf/openrocket/file/rocksim/export/FinSetDTO.java b/core/src/net/sf/openrocket/file/rocksim/export/FinSetDTO.java index ea14bf27c..1d33547ea 100644 --- a/core/src/net/sf/openrocket/file/rocksim/export/FinSetDTO.java +++ b/core/src/net/sf/openrocket/file/rocksim/export/FinSetDTO.java @@ -6,6 +6,7 @@ import net.sf.openrocket.rocketcomponent.EllipticalFinSet; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FreeformFinSet; import net.sf.openrocket.rocketcomponent.TrapezoidFinSet; +import net.sf.openrocket.rocketcomponent.position.AxialMethod; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -64,7 +65,7 @@ public class FinSetDTO extends BasePartDTO { setCantAngle(theORFinSet.getCantAngle()); setTabDepth(theORFinSet.getTabHeight() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); setTabLength(theORFinSet.getTabLength() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); - setTabOffset(theORFinSet.getTabOffset() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); + setTabOffset(theORFinSet.getTabOffset(AxialMethod.TOP) * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); setThickness(theORFinSet.getThickness() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); setRadialAngle(theORFinSet.getBaseRotation()); diff --git a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java index ba14c64b9..83bc3b553 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/FinSet.java +++ b/core/src/net/sf/openrocket/rocketcomponent/FinSet.java @@ -396,8 +396,12 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona return tabPosition; } + public double getTabOffset(AxialMethod method){ + return method.getAsOffset(tabPosition, tabLength, length); + } + public double getTabOffset(){ - return this.tabOffsetMethod.getAsOffset(tabPosition, tabLength, length); + return getTabOffset(this.tabOffsetMethod); } /**