diff --git a/src/Formplot/FileFormat/FormplotConverter.cs b/src/Formplot/FileFormat/FormplotConverter.cs index 088be00..b23a7e3 100644 --- a/src/Formplot/FileFormat/FormplotConverter.cs +++ b/src/Formplot/FileFormat/FormplotConverter.cs @@ -396,8 +396,8 @@ private static CurveProfilePlot ConvertToCurveProfile( StraightnessPlot source ) foreach( var point in segment.Points ) { var curvePoint = new CurvePoint( - source.Actual.Position + ( source.Actual.Direction * point.Position * source.Actual.Length ), - source.Actual.Deviation, + new Vector( point.Position * source.Actual.Length ), + new Vector( 0, 1 ), point.Deviation ); CopyDefaults( point, curvePoint ); diff --git a/src/Tests/FileFormat/FormplotConverterTest.cs b/src/Tests/FileFormat/FormplotConverterTest.cs index 638be66..a02b1e4 100644 --- a/src/Tests/FileFormat/FormplotConverterTest.cs +++ b/src/Tests/FileFormat/FormplotConverterTest.cs @@ -51,10 +51,10 @@ public void Test_Convert_Straightness_To_Curve() var points = curve.Points.ToArray(); - Assert.That( points[ 0 ].Position, Is.EqualTo( new Vector( 3, 3, 3 ) ) ); + Assert.That( points[ 0 ].Position, Is.EqualTo( new Vector( 0, 0, 0 ) ) ); Assert.That( points[ 0 ].Direction, Is.EqualTo( new Vector( 0, 1 ) ) ); Assert.That( points[ 0 ].Deviation, Is.EqualTo( 0.1 ) ); - Assert.That( points[ 1 ].Position, Is.EqualTo( new Vector( 3, 3, 5 ) ) ); + Assert.That( points[ 1 ].Position, Is.EqualTo( new Vector( 2, 0, 0 ) ) ); Assert.That( points[ 1 ].Direction, Is.EqualTo( new Vector( 0, 1 ) ) ); Assert.That( points[ 1 ].Deviation, Is.EqualTo( 0.2 ) ); Assert.That( points[ 1 ].Tolerance, Is.EqualTo( new Tolerance( 0, 0.3 ) ) );