From 47261b4b18a65d366f02e8bbbb3e8e19bc0f075b Mon Sep 17 00:00:00 2001
From: Markus Quaritsch <markus.quaritsch@tugraz.at>
Date: Thu, 30 Mar 2017 18:13:01 +0200
Subject: [PATCH] write shift polygons to file

---
 .../Models/Declaration/ShiftPolygonTest.cs       | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs
index 9c3c38aff7..8327aeb312 100644
--- a/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs
+++ b/VectoCore/VectoCoreTest/Models/Declaration/ShiftPolygonTest.cs
@@ -412,9 +412,23 @@ namespace TUGraz.VectoCore.Tests.Models.Declaration
 			}
 
 			ShiftPolygonDrawer.DrawShiftPolygons(Path.GetDirectoryName(gearboxFile), fullLoadCurves, shiftPolygons,
-				"daimler_fullload_shiftpolygon-test_3.png",
+				"Generic_Class5-shiftlines.png",
 				DeclarationData.Gearbox.TruckMaxAllowedSpeed / rdyn * axlegearRatio * gearboxData.Gears.Last().Ratio, upshiftOrig,
 				downshiftTransformed, downshiftOrig);
+
+			var shiftLines = "";
+			var gear = 1;
+			foreach (var shiftPolygon in shiftPolygons) {
+				shiftLines += "Gear " + gear + "\n";
+				shiftLines += "Upshift\n";
+				foreach (var shiftPolygonEntry in shiftPolygon.Upshift) {
+					shiftLines += string.Format("{0} {1}\n", shiftPolygonEntry.AngularSpeed.AsRPM, shiftPolygonEntry.Torque.Value());
+				}
+				shiftLines += "Downshift\n";
+				foreach (var shiftPolygonEntry in shiftPolygon.Downshift) {
+					shiftLines += string.Format("{0} {1}\n", shiftPolygonEntry.AngularSpeed.AsRPM, shiftPolygonEntry.Torque.Value());
+				}
+			}
 		}
 	}
 
-- 
GitLab