diff --git a/src/Formplot/FileFormat/FormplotConverter.cs b/src/Formplot/FileFormat/FormplotConverter.cs index 80d6767..088be00 100644 --- a/src/Formplot/FileFormat/FormplotConverter.cs +++ b/src/Formplot/FileFormat/FormplotConverter.cs @@ -362,11 +362,11 @@ private static CurveProfilePlot ConvertToCurveProfile( CylindricityPlot source ) var resultSegment = new Segment( segment.Name, segment.SegmentType ); foreach( var point in segment.Points ) { - var x = Math.Cos( point.Angle ) * source.Nominal.Radius; - var y = Math.Sin( point.Angle ) * source.Nominal.Radius; + var x = Math.Cos( point.Angle ) * source.Actual.Radius; + var y = Math.Sin( point.Angle ) * source.Actual.Radius; var curvePoint = new CurvePoint( - new Vector( x, y, point.Height * source.Nominal.Height ), + new Vector( x, y, point.Height * source.Actual.Height ), new Vector( x, y ).Normalized(), point.Deviation ); @@ -396,8 +396,8 @@ private static CurveProfilePlot ConvertToCurveProfile( StraightnessPlot source ) foreach( var point in segment.Points ) { var curvePoint = new CurvePoint( - source.Nominal.Position + ( source.Nominal.Direction * point.Position * source.Nominal.Length ), - source.Nominal.Deviation, + source.Actual.Position + ( source.Actual.Direction * point.Position * source.Actual.Length ), + source.Actual.Deviation, point.Deviation ); CopyDefaults( point, curvePoint ); @@ -425,8 +425,8 @@ private static CurveProfilePlot ConvertToCurveProfile( RoundnessPlot source ) var resultSegment = new Segment( segment.Name, segment.SegmentType ); foreach( var point in segment.Points ) { - var x = Math.Cos( point.Angle ) * source.Nominal.Radius; - var y = Math.Sin( point.Angle ) * source.Nominal.Radius; + var x = Math.Cos( point.Angle ) * source.Actual.Radius; + var y = Math.Sin( point.Angle ) * source.Actual.Radius; var curvePoint = new CurvePoint( new Vector( x, y ), @@ -460,7 +460,7 @@ private static CurveProfilePlot ConvertToCurveProfile( FlatnessPlot source ) foreach( var point in segment.Points ) { var curvePoint = new CurvePoint( - new Vector( point.Coordinate1 * source.Nominal.Length1, point.Coordinate2 * source.Nominal.Length2 ), + new Vector( point.Coordinate1 * source.Actual.Length1, point.Coordinate2 * source.Actual.Length2 ), new Vector( 0, 0, 1 ), point.Deviation ); diff --git a/src/Tests/FileFormat/FormplotConverterTest.cs b/src/Tests/FileFormat/FormplotConverterTest.cs index b6b3393..638be66 100644 --- a/src/Tests/FileFormat/FormplotConverterTest.cs +++ b/src/Tests/FileFormat/FormplotConverterTest.cs @@ -26,7 +26,7 @@ public void Test_Convert_Straightness_To_Curve() { var straightness = new StraightnessPlot { - Nominal = + Actual = { Position = new Vector( 3, 3, 3 ), Direction = new Vector( 0, 0, 1 ), @@ -65,7 +65,7 @@ public void Test_Convert_Roundness_To_Curve() { var roundness = new RoundnessPlot { - Nominal = + Actual = { Radius = 2 } @@ -101,7 +101,7 @@ public void Test_Convert_Cylindricity_To_Curve() { var cylindricity = new CylindricityPlot { - Nominal = + Actual = { Height = 3, Radius = 2 @@ -137,7 +137,7 @@ public void Test_Convert_Flatness_To_Curve() { var flatness = new FlatnessPlot { - Nominal = + Actual = { Length1 = 4, Length2 = 3