From 84100ba74ce4317f6294ee1c423f4bd323988cf1 Mon Sep 17 00:00:00 2001 From: SiboVG Date: Tue, 16 Aug 2022 00:54:48 +0200 Subject: [PATCH] Cleanup code --- .../net/sf/openrocket/gui/scalefigure/FinPointFigure.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java index d6a06bd2f..032085e54 100644 --- a/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java +++ b/swing/src/net/sf/openrocket/gui/scalefigure/FinPointFigure.java @@ -178,14 +178,15 @@ public class FinPointFigure extends AbstractScaleFigure { // vv in fin-frame == draw-frame vv final double xOffset = -xFinStart; final double yOffset = -body.getRadius(xFinStart); + final float length_m = (float)( body.getLength()); Path2D.Double bodyShape = new Path2D.Double(); // draw front-cap: bodyShape.moveTo( xOffset, yOffset); bodyShape.lineTo( xOffset, yOffset + body.getForeRadius()); - final float length_m = (float)( body.getLength()); - Point2D.Double cur = new Point2D.Double (); + // draw edge + Point2D.Double cur = new Point2D.Double(); for( double xBody = xResolution_m ; xBody < length_m; xBody += xResolution_m ){ // xBody is distance from front of parent body cur.x = xOffset + xBody; // offset from origin (front of fin)