DGP - added Radial Angle to launch lug on Rocksim import
This commit is contained in:
parent
5590093f63
commit
833e2f80cf
@ -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());
|
||||
}
|
||||
|
@ -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());
|
||||
|
@ -722,7 +722,7 @@
|
||||
<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>
|
||||
@ -1312,7 +1312,7 @@
|
||||
<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>
|
||||
|
Loading…
x
Reference in New Issue
Block a user