updates for 0.9.4
[debian/openrocket] / src / net / sf / openrocket / gui / rocketfigure / FinSetShapes.java
index 3d874a205acbbc1fdb648ad2dd7d44352a132eaa..0eb856f55f95b5fd312b9a52585c54c0bf496e32 100644 (file)
@@ -22,16 +22,16 @@ public class FinSetShapes extends RocketComponentShapes {
                Transformation baseRotation = finset.getBaseRotationTransformation();
                Transformation finRotation = finset.getFinRotationTransformation();
                
-               Coordinate c[] = finset.getFinPoints();
-
+               Coordinate finPoints[] = finset.getFinPointsWithTab();
+               
                
                // TODO: MEDIUM: sloping radius
                double radius = finset.getBodyRadius();
                
                // Translate & rotate the coordinates
-               for (int i=0; i<c.length; i++) {
-                       c[i] = cantRotation.transform(c[i]);
-                       c[i] = baseRotation.transform(c[i].add(0,radius,0));
+               for (int i=0; i<finPoints.length; i++) {
+                       finPoints[i] = cantRotation.transform(finPoints[i]);
+                       finPoints[i] = baseRotation.transform(finPoints[i].add(0,radius,0));
                }
                
                
@@ -43,19 +43,20 @@ public class FinSetShapes extends RocketComponentShapes {
 
                        // Make polygon
                        p = new Path2D.Float();
-                       for (int i=0; i<c.length; i++) {
-                               a = transformation.transform(finset.toAbsolute(c[i])[0]);
+                       for (int i=0; i<finPoints.length; i++) {
+                               a = transformation.transform(finset.toAbsolute(finPoints[i])[0]);
                                if (i==0)
                                        p.moveTo(a.x*S, a.y*S);
                                else
                                        p.lineTo(a.x*S, a.y*S);                 
                        }
+                       
                        p.closePath();
                        s[fin] = p;
 
                        // Rotate fin coordinates
-                       for (int i=0; i<c.length; i++)
-                               c[i] = finRotation.transform(c[i]);
+                       for (int i=0; i<finPoints.length; i++)
+                               finPoints[i] = finRotation.transform(finPoints[i]);
                }
                
                return s;