diff --git a/core/src/net/sf/openrocket/rocketcomponent/Stage.java b/core/src/net/sf/openrocket/rocketcomponent/Stage.java index 70cf13a9d..855096e25 100644 --- a/core/src/net/sf/openrocket/rocketcomponent/Stage.java +++ b/core/src/net/sf/openrocket/rocketcomponent/Stage.java @@ -142,7 +142,7 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon @Override public void setRadialPosition(final double radius) { this.radialPosition_m = radius; - log.error(" set radial position for: " + this.getName() + " to: " + this.radialPosition_m + " ... in meters?"); + // log.error(" set radial position for: " + this.getName() + " to: " + this.radialPosition_m + " ... in meters?"); if (this.outside) { fireComponentChangeEvent(ComponentChangeEvent.BOTH_CHANGE); } @@ -207,11 +207,9 @@ public class Stage extends ComponentAssembly implements FlightConfigurableCompon double angle0 = this.angularPosition_rad; double angleIncr = this.angularSeparation; - System.err.println("Producing offsets list: "); double thisAngle = angle0; for (int instanceNumber = 0; instanceNumber < this.count; instanceNumber++) { toReturn[instanceNumber] = new Coordinate(0, radius * Math.cos(thisAngle), radius * Math.sin(thisAngle)); - System.err.println(" instance#: " + instanceNumber + " = " + toReturn[instanceNumber]); thisAngle += angleIncr; } diff --git a/swing/src/net/sf/openrocket/gui/rocketfigure/TransitionShapes.java b/swing/src/net/sf/openrocket/gui/rocketfigure/TransitionShapes.java index 5bf62313d..c5ce8e0d4 100644 --- a/swing/src/net/sf/openrocket/gui/rocketfigure/TransitionShapes.java +++ b/swing/src/net/sf/openrocket/gui/rocketfigure/TransitionShapes.java @@ -1,5 +1,6 @@ package net.sf.openrocket.gui.rocketfigure; +import net.sf.openrocket.gui.scalefigure.RocketFigure; import net.sf.openrocket.rocketcomponent.Transition; import net.sf.openrocket.util.Coordinate; import net.sf.openrocket.util.Transformation; @@ -7,6 +8,7 @@ import net.sf.openrocket.util.Transformation; import java.awt.*; import java.awt.geom.Ellipse2D; import java.awt.geom.Path2D; +import java.awt.geom.Point2D; import java.awt.geom.Rectangle2D; @@ -18,14 +20,14 @@ public class TransitionShapes extends RocketComponentShape { net.sf.openrocket.rocketcomponent.RocketComponent component, Transformation transformation, Coordinate instanceOffset) { - return getShapesSide(component, transformation, instanceOffset, S); + return getShapesSide(component, transformation, instanceOffset, S); } public static RocketComponentShape[] getShapesSide( - net.sf.openrocket.rocketcomponent.RocketComponent component, - Transformation transformation, - Coordinate instanceOffset, - final double scaleFactor) { + net.sf.openrocket.rocketcomponent.RocketComponent component, + Transformation transformation, + Coordinate instanceOffset, + final double scaleFactor) { net.sf.openrocket.rocketcomponent.Transition transition = (net.sf.openrocket.rocketcomponent.Transition)component; RocketComponentShape[] mainShapes; @@ -37,12 +39,12 @@ public class TransitionShapes extends RocketComponentShape { double r2 = transition.getAftRadius(); Coordinate start = transformation.transform(transition. toAbsolute(instanceOffset)[0]); - + Path2D.Float path = new Path2D.Float(); - path.moveTo(start.x* scaleFactor, r1* scaleFactor); - path.lineTo((start.x+length)* scaleFactor, r2* scaleFactor); - path.lineTo((start.x+length)* scaleFactor, -r2* scaleFactor); - path.lineTo(start.x* scaleFactor, -r1* scaleFactor); + path.moveTo( start.x* scaleFactor, (start.y+ r1)* scaleFactor); + path.lineTo( (start.x+length)* scaleFactor, (start.y+r2)* scaleFactor); + path.lineTo( (start.x+length)* scaleFactor, (start.y-r2)* scaleFactor); + path.lineTo( start.x* scaleFactor, (start.y-r1)* scaleFactor); path.closePath(); mainShapes = new RocketComponentShape[] { new RocketComponentShape( path, component) }; diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java b/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java index f3aeb285a..b540cdcb3 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/RocketFigure.java @@ -449,7 +449,7 @@ public class RocketFigure extends AbstractScaleFigure { for ( int instanceNumber = 0; instanceNumber < instanceCount; instanceNumber++ ){ childrenToReplicate.clear(); Coordinate curInstanceOffset = componentLocation.add( instanceOffsets[instanceNumber] ); - + // get n children shapes toReplicate for ( int childNumber = 0; childNumber < childCount; childNumber++ ){ RocketComponent curChildComp = comp.getChild( childNumber);