]> git.gag.com Git - debian/openrocket/commitdiff
DGP - added Radial Angle to launch lug on Rocksim import
authorrodinia814 <rodinia814@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sun, 24 Oct 2010 01:58:38 +0000 (01:58 +0000)
committerrodinia814 <rodinia814@180e2498-e6e9-4542-8430-84ac67f01cd8>
Sun, 24 Oct 2010 01:58:38 +0000 (01:58 +0000)
git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/trunk@92 180e2498-e6e9-4542-8430-84ac67f01cd8

src/net/sf/openrocket/file/rocksim/LaunchLugHandler.java
test/net/sf/openrocket/file/rocksim/RocksimLoaderTest.java
test/net/sf/openrocket/file/rocksim/rocksimTestRocket3.rkt

index 049feedd8579b4fd05f6a629938a1bde28cf9428..d459618dd51655852d895ae69e4f0017f333eb45 100644 (file)
@@ -64,6 +64,9 @@ class LaunchLugHandler extends PositionDependentHandler<LaunchLug> {
             if ("Material".equals(element)) {
                 setMaterialName(content);
             }
+            if ("RadialAngle".equals(element)) {
+                lug.setRadialDirection(Double.parseDouble(content));
+            }
             if ("FinishCode".equals(element)) {
                 lug.setFinish(RocksimFinishCode.fromCode(Integer.parseInt(content)).asOpenRocket());
             }
index 9b33319d5aff4412ce1adf70ec56c7630557d48e..1ea1f98934eb8af5c7f2ddee7b2bcb9f8fed7edd 100644 (file)
@@ -8,6 +8,8 @@ import junit.framework.Test;
 import junit.framework.TestCase;
 import junit.framework.TestSuite;
 import net.sf.openrocket.document.OpenRocketDocument;
+import net.sf.openrocket.rocketcomponent.BodyTube;
+import net.sf.openrocket.rocketcomponent.LaunchLug;
 import net.sf.openrocket.rocketcomponent.Rocket;
 import net.sf.openrocket.rocketcomponent.Stage;
 
@@ -156,6 +158,10 @@ public class RocksimLoaderTest extends TestCase {
         assertTrue(stage2.isCGOverridden());
         assertEquals(0.4d, stage2.getOverrideCG().x);
         
+        BodyTube bt = (BodyTube)stage2.getChild(0);
+        LaunchLug ll = (LaunchLug)bt.getChild(6);
+        assertEquals(1.22d, ll.getRadialDirection());
+        
         assertEquals(2, stage3.getChildCount());
         assertEquals("Transition", stage3.getChild(0).getName());
         assertEquals("Body tube", stage3.getChild(1).getName());
index a7c46dae2c1f005e305ed4f4d7712dd93925a95b..df1788c2b2c73f370a6aa4d7fe9b3e88203bb32c 100644 (file)
 <PartNo>13056</PartNo>
 <PartDesc><![CDATA[1/4" X 3]]></PartDesc>
 <RadialLoc>37.185</RadialLoc>
-<RadialAngle>0.</RadialAngle>
+<RadialAngle>3.14</RadialAngle>
 <Texture>file=()|position=(0,0,0)|origin=(0.5,0.5,0.5)|scale=(1,1,1)|repeat=(1)|interpolate=(0)|flipr(0)|flips(0)|flipt=(0)|preventseam=(1)</Texture>
 <Opacity>1.</Opacity>
 <Specular>0.</Specular>
 <PartNo>13056</PartNo>
 <PartDesc><![CDATA[1/4" X 3]]></PartDesc>
 <RadialLoc>37.185</RadialLoc>
-<RadialAngle>0.</RadialAngle>
+<RadialAngle>1.22</RadialAngle>
 <Texture>file=()|position=(0,0,0)|origin=(0.5,0.5,0.5)|scale=(1,1,1)|repeat=(1)|interpolate=(0)|flipr(0)|flips(0)|flipt=(0)|preventseam=(1)</Texture>
 <Opacity>1.</Opacity>
 <Specular>0.</Specular>