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());
}
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;
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());
<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>