Fix issue in boattail axial offset importing
This commit is contained in:
parent
dfac4c6e56
commit
c009b23e47
core/src/net/sf/openrocket/file/rasaero/importt
@ -2,7 +2,6 @@ package net.sf.openrocket.file.rasaero.importt;
|
|||||||
|
|
||||||
import net.sf.openrocket.aerodynamics.WarningSet;
|
import net.sf.openrocket.aerodynamics.WarningSet;
|
||||||
import net.sf.openrocket.file.DocumentLoadingContext;
|
import net.sf.openrocket.file.DocumentLoadingContext;
|
||||||
import net.sf.openrocket.file.simplesax.AbstractElementHandler;
|
|
||||||
import net.sf.openrocket.file.simplesax.ElementHandler;
|
import net.sf.openrocket.file.simplesax.ElementHandler;
|
||||||
import net.sf.openrocket.rocketcomponent.BodyTube;
|
import net.sf.openrocket.rocketcomponent.BodyTube;
|
||||||
import net.sf.openrocket.rocketcomponent.PodSet;
|
import net.sf.openrocket.rocketcomponent.PodSet;
|
||||||
@ -23,7 +22,7 @@ import java.util.HashMap;
|
|||||||
*
|
*
|
||||||
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
* @author Sibo Van Gool <sibo.vangool@hotmail.com>
|
||||||
*/
|
*/
|
||||||
public class BoatTailHandler extends TransitionHandler {
|
public class BoattailHandler extends TransitionHandler {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
@ -33,7 +32,7 @@ public class BoatTailHandler extends TransitionHandler {
|
|||||||
* @param warnings warning set to add import warnings to
|
* @param warnings warning set to add import warnings to
|
||||||
* @throws IllegalArgumentException if the parent component is null
|
* @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);
|
super(context);
|
||||||
|
|
||||||
if (parent == null) {
|
if (parent == null) {
|
||||||
@ -54,8 +53,8 @@ public class BoatTailHandler extends TransitionHandler {
|
|||||||
RocketComponent lastChild = parent.getChild(parent.getChildCount() - 1);
|
RocketComponent lastChild = parent.getChild(parent.getChildCount() - 1);
|
||||||
if (lastChild instanceof BodyTube) {
|
if (lastChild instanceof BodyTube) {
|
||||||
lastChild.addChild(pod);
|
lastChild.addChild(pod);
|
||||||
pod.setAxialMethod(AxialMethod.BOTTOM);
|
pod.setAxialMethod(AxialMethod.TOP);
|
||||||
pod.setAxialOffset(0);
|
pod.setAxialOffset(lastChild.getLength());
|
||||||
} else if (lastChild instanceof Transition) {
|
} else if (lastChild instanceof Transition) {
|
||||||
BodyTube phantomBodyTube = new BodyTube();
|
BodyTube phantomBodyTube = new BodyTube();
|
||||||
phantomBodyTube.setLength(0);
|
phantomBodyTube.setLength(0);
|
@ -179,7 +179,7 @@ public class RASAeroHandler extends AbstractElementHandler {
|
|||||||
}
|
}
|
||||||
// BoatTail
|
// BoatTail
|
||||||
else if (RASAeroCommonConstants.BOATTAIL.equals(element)) {
|
else if (RASAeroCommonConstants.BOATTAIL.equals(element)) {
|
||||||
return new BoatTailHandler(context, component, warnings);
|
return new BoattailHandler(context, component, warnings);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Surface finish
|
// Surface finish
|
||||||
|
Loading…
x
Reference in New Issue
Block a user