Merge remote-tracking branch 'origin/Change-side-view-to-top-view' into Change-side-view-to-top-view

This commit is contained in:
SiboVG 2022-12-22 00:25:41 +01:00
commit 0b52d585cc
3 changed files with 8 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import net.sf.openrocket.rocketcomponent.EllipticalFinSet;
import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FinSet;
import net.sf.openrocket.rocketcomponent.FreeformFinSet; import net.sf.openrocket.rocketcomponent.FreeformFinSet;
import net.sf.openrocket.rocketcomponent.TrapezoidFinSet; import net.sf.openrocket.rocketcomponent.TrapezoidFinSet;
import net.sf.openrocket.rocketcomponent.position.AxialMethod;
import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlAccessorType;
@ -64,7 +65,7 @@ public class FinSetDTO extends BasePartDTO {
setCantAngle(theORFinSet.getCantAngle()); setCantAngle(theORFinSet.getCantAngle());
setTabDepth(theORFinSet.getTabHeight() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH); setTabDepth(theORFinSet.getTabHeight() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
setTabLength(theORFinSet.getTabLength() * 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); setThickness(theORFinSet.getThickness() * RockSimCommonConstants.ROCKSIM_TO_OPENROCKET_LENGTH);
setRadialAngle(theORFinSet.getBaseRotation()); setRadialAngle(theORFinSet.getBaseRotation());

View File

@ -396,8 +396,12 @@ public abstract class FinSet extends ExternalComponent implements AxialPositiona
return tabPosition; return tabPosition;
} }
public double getTabOffset(AxialMethod method){
return method.getAsOffset(tabPosition, tabLength, length);
}
public double getTabOffset(){ public double getTabOffset(){
return this.tabOffsetMethod.getAsOffset(tabPosition, tabLength, length); return getTabOffset(this.tabOffsetMethod);
} }
/** /**

View File

@ -349,7 +349,7 @@ public class FreeformFinSetConfig extends FinSetConfig {
// first row: main display // first row: main display
JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tablePane, figurePane); JSplitPane splitPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, tablePane, figurePane);
splitPane.setResizeWeight(0.1); splitPane.setResizeWeight(0.15);
splitPane.setBorder(null); splitPane.setBorder(null);
panel.add(splitPane, "width 300lp:500lp:, gap unrel, grow, height 100lp:250lp:, wrap"); panel.add(splitPane, "width 300lp:500lp:, gap unrel, grow, height 100lp:250lp:, wrap");
order.add(table); order.add(table);