Fix issue in boattail axial offset importing

This commit is contained in:
SiboVG 2023-02-23 21:56:08 +01:00
parent dfac4c6e56
commit c009b23e47
2 changed files with 17 additions and 18 deletions

View File

@ -2,7 +2,6 @@ package net.sf.openrocket.file.rasaero.importt;
import net.sf.openrocket.aerodynamics.WarningSet;
import net.sf.openrocket.file.DocumentLoadingContext;
import net.sf.openrocket.file.simplesax.AbstractElementHandler;
import net.sf.openrocket.file.simplesax.ElementHandler;
import net.sf.openrocket.rocketcomponent.BodyTube;
import net.sf.openrocket.rocketcomponent.PodSet;
@ -23,7 +22,7 @@ import java.util.HashMap;
*
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
*/
public class BoatTailHandler extends TransitionHandler {
public class BoattailHandler extends TransitionHandler {
/**
* Constructor
@ -33,7 +32,7 @@ public class BoatTailHandler extends TransitionHandler {
* @param warnings warning set to add import warnings to
* @throws IllegalArgumentException if the parent component is null
*/
public BoatTailHandler(DocumentLoadingContext context, RocketComponent parent, WarningSet warnings) throws IllegalArgumentException {
public BoattailHandler(DocumentLoadingContext context, RocketComponent parent, WarningSet warnings) throws IllegalArgumentException {
super(context);
if (parent == null) {
@ -54,8 +53,8 @@ public class BoatTailHandler extends TransitionHandler {
RocketComponent lastChild = parent.getChild(parent.getChildCount() - 1);
if (lastChild instanceof BodyTube) {
lastChild.addChild(pod);
pod.setAxialMethod(AxialMethod.BOTTOM);
pod.setAxialOffset(0);
pod.setAxialMethod(AxialMethod.TOP);
pod.setAxialOffset(lastChild.getLength());
} else if (lastChild instanceof Transition) {
BodyTube phantomBodyTube = new BodyTube();
phantomBodyTube.setLength(0);

View File

@ -179,7 +179,7 @@ public class RASAeroHandler extends AbstractElementHandler {
}
// BoatTail
else if (RASAeroCommonConstants.BOATTAIL.equals(element)) {
return new BoatTailHandler(context, component, warnings);
return new BoattailHandler(context, component, warnings);
}
// Surface finish