Merge branch 'unstable' into issue-106

# Conflicts:
#	core/test/net/sf/openrocket/file/rocksim/importt/RockSimLoaderTest.java
This commit is contained in:
SiboVG 2022-11-04 01:02:49 +01:00
commit ad937b968d
3 changed files with 536 additions and 0 deletions

View File

@ -0,0 +1,448 @@
<RockSimDocument>
<FileVersion>4</FileVersion>
<DesignInformation>
<RocketDesign>
<Name>FinsOnTransitions</Name>
<CalculateCD>1</CalculateCD>
<ProCalculateCD>1</ProCalculateCD>
<ProCalculateCN>1</ProCalculateCN>
<FixedCd>0.75</FixedCd>
<FixedCd2>0.8</FixedCd2>
<FixedCd3>0.81</FixedCd3>
<FixedCd2Alone>0.95</FixedCd2Alone>
<FixedCd3Alone>0.95</FixedCd3Alone>
<StageCount>1</StageCount>
<Stage3Mass>0.</Stage3Mass>
<Stage2Mass>0.</Stage2Mass>
<Stage1Mass>0.</Stage1Mass>
<Stage321CG>0.</Stage321CG>
<Stage32CG>0.</Stage32CG>
<Stage3CG>0.</Stage3CG>
<Stage2CGAlone>0.</Stage2CGAlone>
<Stage1CGAlone>0.</Stage1CGAlone>
<CPCalcFlags>4</CPCalcFlags>
<LaunchGuideLength>914.4</LaunchGuideLength>
<UseKnownMass>0</UseKnownMass>
<DefaultFinish>0</DefaultFinish>
<FinishMedium>0</FinishMedium>
<FinishCoatCount>1</FinishCoatCount>
<GlueType>0</GlueType>
<CPSimFlags>4</CPSimFlags>
<LastSerialNumber>4</LastSerialNumber>
<DisplayFlags>1</DisplayFlags>
<MetricsFlags>0</MetricsFlags>
<BarromanXN>0,51.854,0,0</BarromanXN>
<BarrowmanCNa>0,24.095,0,0</BarrowmanCNa>
<RockSimXN>0,70.2027,0,0</RockSimXN>
<RockSimCNa>0,51.2803,0,0</RockSimCNa>
<RockSimCNa90>0,0,0,0</RockSimCNa90>
<RockSimXN90>0,0,0,0</RockSimXN90>
<ViewType>0</ViewType>
<ViewStageCount>1</ViewStageCount>
<ViewTypeEdit>0</ViewTypeEdit>
<ViewStageCountEdit>1</ViewStageCountEdit>
<ZoomFactor>0.</ZoomFactor>
<ZoomFactorEdit>0.</ZoomFactorEdit>
<ScrollPosX>0</ScrollPosX>
<ScrollPosY>0</ScrollPosY>
<ScrollPosXEdit>0</ScrollPosXEdit>
<ScrollPosYEdit>0</ScrollPosYEdit>
<ThreeDFlags>0</ThreeDFlags>
<ThreeDFlagsEdit>0</ThreeDFlagsEdit>
<UseModelSprite>0</UseModelSprite>
<StaticMarginRef>0</StaticMarginRef>
<UserRefDiameter>0.</UserRefDiameter>
<SideMarkerHeight>10.</SideMarkerHeight>
<SideDimensionHeight>10.</SideDimensionHeight>
<BaseMarkerHeight>10.</BaseMarkerHeight>
<BaseDimensionHeight>10.</BaseDimensionHeight>
<ShowGlideCP>0</ShowGlideCP>
<ShowGridTypeSide>0</ShowGridTypeSide>
<ShowGridTypeBase>0</ShowGridTypeBase>
<GridSpacing>10.</GridSpacing>
<GridOpacity>0.15</GridOpacity>
<GridColor>black</GridColor>
<MaxDiaWithFins>141.176</MaxDiaWithFins>
<MaxDiaWithoutFins>50.</MaxDiaWithoutFins>
<MaxLenWithFins>150.</MaxLenWithFins>
<MaxLenWithoutFins>150.</MaxLenWithoutFins>
<MinXExtent>0.</MinXExtent>
<MaxXExtent>150.</MaxXExtent>
<CalculatedMaxStageDia>0,50,0,0</CalculatedMaxStageDia>
<CalculatedStageLen>0,150,0,0</CalculatedStageLen>
<Cd3>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cd3>
<Cd32>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cd32>
<Cd321>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cd321>
<Cb3>
<PolyData useXYOnly="1" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cb3>
<Cb32>
<PolyData useXYOnly="1" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cb32>
<Cb321>
<PolyData useXYOnly="1" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</Cb321>
<CNa3>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CNa3>
<CNa32>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CNa32>
<CNa321>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CNa321>
<CP3>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CP3>
<CP32>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CP32>
<CP321>
<PolyData useXYOnly="0" useSmoothCurveEvaluation="0" count="0">
<X-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</X-data>
<A-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</A-data>
<B-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</B-data>
<C-data>0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0</C-data>
</PolyData>
</CP321>
<SimulationEventList>
</SimulationEventList>
<Stage3Parts>
<Transition>
<PartMfg>Custom</PartMfg>
<KnownMass>0.</KnownMass>
<Density>361.377</Density>
<Material>1/16 Aircraft Plywood</Material>
<Name>Transition 1</Name>
<KnownCG>0.</KnownCG>
<UseKnownCG>0</UseKnownCG>
<Xb>0.</Xb>
<CalcMass>31.0433</CalcMass>
<CalcCG>45.5357</CalcCG>
<WettedSurface>0.00894567</WettedSurface>
<PaintedSurface>0.00894567</PaintedSurface>
<GlueJointLength>0.</GlueJointLength>
<DensityType>0</DensityType>
<RadialLoc>0.</RadialLoc>
<RadialAngle>0.</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)|rotate=(0)</Texture>
<Opacity>1.</Opacity>
<Specular>0.</Specular>
<SpecularPower>1.</SpecularPower>
<Ambient>0.</Ambient>
<Diffuse>1.</Diffuse>
<AbientColor>blue</AbientColor>
<DiffuseColor>blue</DiffuseColor>
<SpecularColor>white</SpecularColor>
<UseSingleColor>1</UseSingleColor>
<SerialNo>1</SerialNo>
<DisplayFlags>1</DisplayFlags>
<MetricsFlags>0</MetricsFlags>
<LocationMode>0</LocationMode>
<Color>blue</Color>
<BarrowmanCNa>6.</BarrowmanCNa>
<BarrowmanXN>0.0416667</BarrowmanXN>
<RockSimCNa>6.</RockSimCNa>
<RockSimXN>0.0416667</RockSimXN>
<SimpleColorModel>1</SimpleColorModel>
<ProduceTemplate>0</ProduceTemplate>
<TemplateUnits>8</TemplateUnits>
<Removed>0</Removed>
<Station>0.</Station>
<FrontDia>25.</FrontDia>
<RearDia>50.</RearDia>
<Len>75.</Len>
<FinishCode>0</FinishCode>
<FrontShoulderLen>0.</FrontShoulderLen>
<RearShoulderLen>0.</RearShoulderLen>
<ConstructionType>0</ConstructionType>
<WallThickness>0.</WallThickness>
<FrontShoulderDia>0.</FrontShoulderDia>
<RearShoulderDia>0.</RearShoulderDia>
<CoreDia>0.</CoreDia>
<ShapeCode>0</ShapeCode>
<ShapeParameter>0.</ShapeParameter>
<EquivNoseLen>150.</EquivNoseLen>
<EquivNoseOffset>75.</EquivNoseOffset>
<AttachedParts>
<FinSet>
<PartMfg>Custom</PartMfg>
<KnownMass>0.</KnownMass>
<Density>0.0446449</Density>
<Material>1/2 in. tubular kevlar</Material>
<Name>Fin set 1</Name>
<KnownCG>0.</KnownCG>
<UseKnownCG>0</UseKnownCG>
<Xb>0.</Xb>
<CalcMass>0.000805757</CalcMass>
<CalcCG>41.0078</CalcCG>
<WettedSurface>0.00245034</WettedSurface>
<PaintedSurface>0.00735103</PaintedSurface>
<GlueJointLength>0.</GlueJointLength>
<DensityType>2</DensityType>
<RadialLoc>0.</RadialLoc>
<RadialAngle>0.</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)|rotate=(0)</Texture>
<Opacity>1.</Opacity>
<Specular>0.</Specular>
<SpecularPower>1.</SpecularPower>
<Ambient>0.</Ambient>
<Diffuse>1.</Diffuse>
<AbientColor>blue</AbientColor>
<DiffuseColor>blue</DiffuseColor>
<SpecularColor>white</SpecularColor>
<UseSingleColor>1</UseSingleColor>
<SerialNo>2</SerialNo>
<DisplayFlags>0</DisplayFlags>
<MetricsFlags>0</MetricsFlags>
<LocationMode>0</LocationMode>
<Color>blue</Color>
<BarrowmanCNa>10.3073</BarrowmanCNa>
<BarrowmanXN>0.0301389</BarrowmanXN>
<RockSimCNa>14.8561</RockSimCNa>
<RockSimXN>0.0301389</RockSimXN>
<SimpleColorModel>1</SimpleColorModel>
<ProduceTemplate>0</ProduceTemplate>
<TemplateUnits>8</TemplateUnits>
<Removed>0</Removed>
<Station>0.</Station>
<FinCount>3</FinCount>
<RootChord>75.</RootChord>
<TipChord>37.5</TipChord>
<SemiSpan>30.</SemiSpan>
<MidChordLen>34.1184</MidChordLen>
<SweepDistance>35.</SweepDistance>
<Thickness>3.18</Thickness>
<ShapeCode>0</ShapeCode>
<FinishCode>0</FinishCode>
<TipShapeCode>0</TipShapeCode>
<TabLength>50.</TabLength>
<TabDepth>7.5</TabDepth>
<TabOffset>10.</TabOffset>
<SweepMode>1</SweepMode>
<SweepAngle>0.859994</SweepAngle>
<RockSimXNPerFin>0.</RockSimXNPerFin>
<RockSimRadialXNPerFin>25.8333</RockSimRadialXNPerFin>
<RockSimCNaPerFin>8.57716</RockSimCNaPerFin>
<TaperRatio>0.5</TaperRatio>
<CantAngle>0.</CantAngle>
<CantPivotPoint>0.</CantPivotPoint>
<AttachedParts>
</AttachedParts>
</FinSet>
</AttachedParts>
</Transition>
<Transition>
<PartMfg>Custom</PartMfg>
<KnownMass>0.</KnownMass>
<Density>361.377</Density>
<Material>1/16 Aircraft Plywood</Material>
<Name>Transition 2</Name>
<KnownCG>0.</KnownCG>
<UseKnownCG>0</UseKnownCG>
<Xb>0.</Xb>
<CalcMass>31.0433</CalcMass>
<CalcCG>29.4643</CalcCG>
<WettedSurface>0.00895163</WettedSurface>
<PaintedSurface>0.00895163</PaintedSurface>
<GlueJointLength>0.</GlueJointLength>
<DensityType>0</DensityType>
<RadialLoc>0.</RadialLoc>
<RadialAngle>0.</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)|rotate=(0)</Texture>
<Opacity>1.</Opacity>
<Specular>0.</Specular>
<SpecularPower>1.</SpecularPower>
<Ambient>0.</Ambient>
<Diffuse>1.</Diffuse>
<AbientColor>blue</AbientColor>
<DiffuseColor>blue</DiffuseColor>
<SpecularColor>white</SpecularColor>
<UseSingleColor>1</UseSingleColor>
<SerialNo>3</SerialNo>
<DisplayFlags>1</DisplayFlags>
<MetricsFlags>0</MetricsFlags>
<LocationMode>0</LocationMode>
<Color>blue</Color>
<BarrowmanCNa>-6.</BarrowmanCNa>
<BarrowmanXN>0.108333</BarrowmanXN>
<RockSimCNa>-6.</RockSimCNa>
<RockSimXN>0.108333</RockSimXN>
<SimpleColorModel>1</SimpleColorModel>
<ProduceTemplate>0</ProduceTemplate>
<TemplateUnits>8</TemplateUnits>
<Removed>0</Removed>
<Station>75.</Station>
<FrontDia>50.</FrontDia>
<RearDia>25.</RearDia>
<Len>75.</Len>
<FinishCode>0</FinishCode>
<FrontShoulderLen>0.</FrontShoulderLen>
<RearShoulderLen>0.</RearShoulderLen>
<ConstructionType>0</ConstructionType>
<WallThickness>0.</WallThickness>
<FrontShoulderDia>0.</FrontShoulderDia>
<RearShoulderDia>0.</RearShoulderDia>
<CoreDia>0.</CoreDia>
<ShapeCode>0</ShapeCode>
<ShapeParameter>0.</ShapeParameter>
<EquivNoseLen>150.</EquivNoseLen>
<EquivNoseOffset>75.</EquivNoseOffset>
<AttachedParts>
<CustomFinSet>
<PartMfg>Custom</PartMfg>
<KnownMass>0.</KnownMass>
<Density>128.148</Density>
<Material>Balsa</Material>
<Name>Fin set 2</Name>
<KnownCG>0.</KnownCG>
<UseKnownCG>0</UseKnownCG>
<Xb>0.</Xb>
<CalcMass>2.37494</CalcMass>
<CalcCG>31.6988</CalcCG>
<WettedSurface>0.00343529</WettedSurface>
<PaintedSurface>0.0103059</PaintedSurface>
<GlueJointLength>0.</GlueJointLength>
<DensityType>0</DensityType>
<RadialLoc>0.</RadialLoc>
<RadialAngle>0.</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)|rotate=(0)</Texture>
<Opacity>1.</Opacity>
<Specular>0.</Specular>
<SpecularPower>1.</SpecularPower>
<Ambient>0.</Ambient>
<Diffuse>1.</Diffuse>
<AbientColor>blue</AbientColor>
<DiffuseColor>rgb(126,150,121)</DiffuseColor>
<SpecularColor>white</SpecularColor>
<UseSingleColor>1</UseSingleColor>
<SerialNo>4</SerialNo>
<DisplayFlags>0</DisplayFlags>
<MetricsFlags>0</MetricsFlags>
<LocationMode>0</LocationMode>
<Color>rgb(61,177,187)</Color>
<BarrowmanCNa>13.7877</BarrowmanCNa>
<BarrowmanXN>0.0970988</BarrowmanXN>
<RockSimCNa>36.4242</RockSimCNa>
<RockSimXN>0.097525</RockSimXN>
<SimpleColorModel>1</SimpleColorModel>
<ProduceTemplate>0</ProduceTemplate>
<TemplateUnits>8</TemplateUnits>
<Removed>0</Removed>
<Station>75.</Station>
<FinCount>3</FinCount>
<RootChord>60.</RootChord>
<TipChord>10.84</TipChord>
<SemiSpan>35.</SemiSpan>
<MidChordLen>35.5414</MidChordLen>
<SweepDistance>30.76</SweepDistance>
<Thickness>3.18</Thickness>
<ShapeCode>2</ShapeCode>
<FinishCode>0</FinishCode>
<TipShapeCode>0</TipShapeCode>
<TabLength>30.</TabLength>
<TabDepth>10.</TabDepth>
<TabOffset>0.</TabOffset>
<SweepMode>1</SweepMode>
<SweepAngle>0.</SweepAngle>
<RockSimXNPerFin>0.</RockSimXNPerFin>
<RockSimRadialXNPerFin>42.5214</RockSimRadialXNPerFin>
<RockSimCNaPerFin>21.0295</RockSimCNaPerFin>
<TaperRatio>0.180667</TaperRatio>
<CantAngle>0.</CantAngle>
<CantPivotPoint>0.</CantPivotPoint>
<AverageChord>40.1</AverageChord>
<EffectiveTipChord>10.8353</EffectiveTipChord>
<PointList>60,0|50,30|25,35|0,0|</PointList>
<AutoCalcGridStepX>0,0,0,0,0,0,0</AutoCalcGridStepX>
<GridStepCountX>10,10,10,10,10,10,10</GridStepCountX>
<UseAbsoluteGridStepsX>0,0,0,0,0,0,0</UseAbsoluteGridStepsX>
<GridStepSizeX>0.5,10,0.5,0.5,0.00018939,0.001,1</GridStepSizeX>
<SnapToSizeX>0.25,5,0.1,0.1,0.00018939,0.001,1</SnapToSizeX>
<AutoCalcGridStepY>0,0,0,0,0,0,0</AutoCalcGridStepY>
<GridStepCountY>10,10,10,10,10,10,10</GridStepCountY>
<UseAbsoluteGridStepsY>0,0,0,0,0,0,0</UseAbsoluteGridStepsY>
<GridStepSizeY>0.5,10,0.5,0.5,0.00018939,0.001,1</GridStepSizeY>
<SnapToSizeY>0.25,5,0.1,0.1,0.00018939,0.001,1</SnapToSizeY>
<AttachedParts>
</AttachedParts>
</CustomFinSet>
</AttachedParts>
</Transition>
</Stage3Parts>
<Stage2Parts>
</Stage2Parts>
<Stage1Parts>
</Stage1Parts>
<SideViewDims>
</SideViewDims>
<BaseViewDims>
</BaseViewDims>
<VertViewDims>
</VertViewDims>
</RocketDesign>
</DesignInformation>
<SimulationResultsList>
</SimulationResultsList>
</RockSimDocument>

View File

@ -8,8 +8,12 @@ import java.io.BufferedInputStream;
import java.io.IOException;
import java.io.InputStream;
import net.sf.openrocket.rocketcomponent.FreeformFinSet;
import net.sf.openrocket.rocketcomponent.NoseCone;
import net.sf.openrocket.rocketcomponent.RocketComponent;
import net.sf.openrocket.rocketcomponent.Transition;
import net.sf.openrocket.util.Coordinate;
import net.sf.openrocket.util.MathUtil;
import org.junit.Assert;
import net.sf.openrocket.document.OpenRocketDocument;
@ -53,6 +57,88 @@ public class RockSimLoaderTest extends BaseTestCase {
Assert.assertTrue(loader.getWarnings().size() == 2);
}
@Test
public void testFinsOnTransitions() throws IOException, RocketLoadException {
RockSimLoader loader = new RockSimLoader();
OpenRocketDocument doc = loadRockSimRocket(loader, "FinsOnTransitions.rkt");
Assert.assertNotNull(doc);
Rocket rocket = doc.getRocket();
Assert.assertNotNull(rocket);
Assert.assertEquals("FinsOnTransitions", doc.getRocket().getName());
Assert.assertTrue(loader.getWarnings().isEmpty());
InputStream stream = this.getClass().getResourceAsStream("FinsOnTransitions.rkt");
Assert.assertNotNull("Could not open FinsOnTransitions.rkt", stream);
doc = OpenRocketDocumentFactory.createEmptyRocket();
DocumentLoadingContext context = new DocumentLoadingContext();
context.setOpenRocketDocument(doc);
context.setMotorFinder(new DatabaseMotorFinder());
loader.loadFromStream(context, new BufferedInputStream(stream));
Assert.assertNotNull(doc);
rocket = doc.getRocket();
Assert.assertNotNull(rocket);
Assert.assertEquals(1, rocket.getStageCount());
AxialStage stage1 = (AxialStage) rocket.getChild(0);
RocketComponent transition1 = stage1.getChild(0);
RocketComponent transition2 = stage1.getChild(1);
Assert.assertEquals(" Component should have been transition", Transition.class, transition1.getClass());
Assert.assertEquals(" Component should have been transition", Transition.class, transition2.getClass());
Assert.assertEquals("Transition 1", transition1.getName());
Assert.assertEquals("Transition 2", transition2.getName());
Assert.assertEquals(1, transition1.getChildCount());
Assert.assertEquals(1, transition2.getChildCount());
Assert.assertEquals(" Transition 1 length does not match", 0.075, transition1.getLength(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 1 fore radius does not match", 0.0125,((Transition) transition1).getForeRadius(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 1 aft radius does not match", 0.025, ((Transition) transition1).getAftRadius(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 1 shape does not match", Transition.Shape.CONICAL, ((Transition) transition1).getType());
Assert.assertEquals(" Transition 2 length does not match", 0.075, transition2.getLength(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 2 fore radius does not match", 0.025,((Transition) transition2).getForeRadius(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 2 aft radius does not match", 0.0125, ((Transition) transition2).getAftRadius(), MathUtil.EPSILON);
Assert.assertEquals(" Transition 2 shape does not match", Transition.Shape.CONICAL, ((Transition) transition2).getType());
RocketComponent finSet1 = transition1.getChild(0);
RocketComponent finSet2 = transition2.getChild(0);
Assert.assertEquals(" Component should have been free form fin set", FreeformFinSet.class, finSet1.getClass());
Assert.assertEquals(" Component should have been free form fin set", FreeformFinSet.class, finSet2.getClass());
Assert.assertEquals("Fin set 1", finSet1.getName());
Assert.assertEquals("Fin set 2", finSet2.getName());
FreeformFinSet freeformFinSet1 = (FreeformFinSet) finSet1;
FreeformFinSet freeformFinSet2 = (FreeformFinSet) finSet2;
Assert.assertEquals(3, freeformFinSet1.getFinCount());
Assert.assertEquals(3, freeformFinSet2.getFinCount());
Coordinate[] points1 = freeformFinSet1.getFinPoints();
Coordinate[] expectedPoints1 = new Coordinate[] {
new Coordinate(0.0, 0.0, 0.0),
new Coordinate(0.035, 0.03, 0.0),
new Coordinate(0.07250, 0.03, 0.0),
new Coordinate(0.07500, 0.01250, 0.0)
};
Assert.assertArrayEquals(" Fin set 1 fin points do not match", expectedPoints1, points1);
Assert.assertEquals(" Fin set 1 fin tab length does not match", 0.05, freeformFinSet1.getTabLength(), MathUtil.EPSILON);
Assert.assertEquals(" Fin set 1 fin tab height does not match", 0.0075, freeformFinSet1.getTabHeight(), MathUtil.EPSILON);
Assert.assertEquals(" Fin set 1 fin tab offset does not match", 0.01, freeformFinSet1.getTabOffset(), MathUtil.EPSILON);
Coordinate[] points2 = freeformFinSet2.getFinPoints();
Coordinate[] expectedPoints2 = new Coordinate[] {
new Coordinate(0.0, 0.0, 0.0),
new Coordinate(0.025, 0.035, 0.0),
new Coordinate(0.05, 0.03, 0.0),
new Coordinate(0.06, -0.01, 0.0)
};
Assert.assertArrayEquals(" Fin set 2 fin points do not match", expectedPoints2, points2);
Assert.assertEquals(" Fin set 2 fin tab length does not match", 0.03, freeformFinSet2.getTabLength(), MathUtil.EPSILON);
Assert.assertEquals(" Fin set 2 fin tab height does not match", 0.005, freeformFinSet2.getTabHeight(), MathUtil.EPSILON);
Assert.assertEquals(" Fin set 2 fin tab offset does not match", 0, freeformFinSet2.getTabOffset(), MathUtil.EPSILON);
}
/**
* Method: loadFromStream(InputStream source)
*

View File

@ -321,6 +321,8 @@ public class RocketFigure3d extends JPanel implements GLEventListener {
gl.glEnable(GL.GL_MULTISAMPLE);
gl.glEnable(GLLightingFunc.GL_LIGHTING);
updateFigure();
}
rr.render(drawable, configuration, selection);