Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS will be completely phased out by mid-2025. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit 27209c06 authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

plot gear lossman entries in gearbox form

parent 87651da7
No related branches found
No related tags found
No related merge requests found
......@@ -762,6 +762,7 @@ Public Class GearboxForm
If LvGears.Items.Count <= 1 Then Exit Sub
dim lossmap As TransmissionLossMap = Nothing
Try
If LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 0 Then
path = FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.ShiftPolygons).Text, GetPath(_gbxFile))
......@@ -772,6 +773,11 @@ Public Class GearboxForm
End If
If File.Exists(path) Then shiftPolygon = ShiftPolygonReader.ReadFromFile(path)
if LvGears.SelectedItems.Count > 0 AndAlso LvGears.SelectedIndices(0) > 1 Then
lossmap = TransmissionLossMapReader.ReadFromFile(FileRepl(LvGears.SelectedItems(0).SubItems(GearboxTbl.LossMapEfficiency).Text, GetPath(_gbxFile)),
LvGears.SelectedItems(0).SubItems(GearboxTbl.Ratio).Text.ToDouble(),"gear plot")
End If
Catch ex As Exception
......@@ -783,6 +789,16 @@ Public Class GearboxForm
a = New ChartArea
if Not lossmap Is Nothing Then
s = new Series()
s.Points.DataBindXY(lossmap._entries.Select(Function(x) x.InputSpeed.AsRPM).ToArray(),
lossmap._entries.Select(function(y) y.InputTorque.Value()).ToArray())
s.ChartType = SeriesChartType.FastPoint
s.Color = color.ForestGreen
s.Name = "LossMap Entries"
chart.Series.Add(s)
End If
'Shiftpolygons from file
If Not shiftPolygon Is Nothing Then
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment