Skip to content

Commit c0e54da

Browse files
Refy curve (#356)
* Section on/off in config * Line Select * First Viz line, Start AgIO gfx * Put in vehicle in Draw and headlines * 2 size AB Draw * AB Draw fixes * Add Boundary Tool * Finish up MapToBnd * MapBnd Fixes - simplify * Map2Boundary complete * AB Draw and Headline Zoom * More zoom fixes * reorder left menu * Maximize AB Draw * Size ABDraw
1 parent c7a70c1 commit c0e54da

37 files changed

+4473
-932
lines changed

SourceCode/AgIO/Source/Forms/UDP.designer.cs

Lines changed: 7 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

SourceCode/GPS/AgOpenGPS.csproj

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,12 @@
174174
<Compile Include="Forms\Field\FormEnterFlag.Designer.cs">
175175
<DependentUpon>FormEnterFlag.cs</DependentUpon>
176176
</Compile>
177+
<Compile Include="Forms\Field\FormMapBnd.cs">
178+
<SubType>Form</SubType>
179+
</Compile>
180+
<Compile Include="Forms\Field\FormMapBnd.Designer.cs">
181+
<DependentUpon>FormMapBnd.cs</DependentUpon>
182+
</Compile>
177183
<Compile Include="Forms\FormPan.cs">
178184
<SubType>Form</SubType>
179185
</Compile>
@@ -210,6 +216,12 @@
210216
<Compile Include="Forms\FormYes.designer.cs">
211217
<DependentUpon>FormYes.cs</DependentUpon>
212218
</Compile>
219+
<Compile Include="Forms\Guidance\FormABDraw2.cs">
220+
<SubType>Form</SubType>
221+
</Compile>
222+
<Compile Include="Forms\Guidance\FormABDraw2.Designer.cs">
223+
<DependentUpon>FormABDraw2.cs</DependentUpon>
224+
</Compile>
213225
<Compile Include="Forms\Guidance\FormRecordName.cs">
214226
<SubType>Form</SubType>
215227
</Compile>
@@ -488,6 +500,7 @@
488500
<Compile Include="Forms\Settings\FormSteerWiz.Designer.cs">
489501
<DependentUpon>FormSteerWiz.cs</DependentUpon>
490502
</Compile>
503+
<Compile Include="GlobalSuppressions.cs" />
491504
<Compile Include="gStr.da.Designer.cs">
492505
<DependentUpon>gStr.da.resx</DependentUpon>
493506
<AutoGen>True</AutoGen>
@@ -617,6 +630,9 @@
617630
<EmbeddedResource Include="Forms\Field\FormEnterFlag.resx">
618631
<DependentUpon>FormEnterFlag.cs</DependentUpon>
619632
</EmbeddedResource>
633+
<EmbeddedResource Include="Forms\Field\FormMapBnd.resx">
634+
<DependentUpon>FormMapBnd.cs</DependentUpon>
635+
</EmbeddedResource>
620636
<EmbeddedResource Include="Forms\FormPan.resx">
621637
<DependentUpon>FormPan.cs</DependentUpon>
622638
<SubType>Designer</SubType>
@@ -637,6 +653,9 @@
637653
<EmbeddedResource Include="Forms\FormYes.resx">
638654
<DependentUpon>FormYes.cs</DependentUpon>
639655
</EmbeddedResource>
656+
<EmbeddedResource Include="Forms\Guidance\FormABDraw2.resx">
657+
<DependentUpon>FormABDraw2.cs</DependentUpon>
658+
</EmbeddedResource>
640659
<EmbeddedResource Include="Forms\Guidance\FormRecordName.resx">
641660
<DependentUpon>FormRecordName.cs</DependentUpon>
642661
</EmbeddedResource>
@@ -998,6 +1017,12 @@
9981017
<None Include="btnImages\BoundaryCenter.png" />
9991018
<None Include="btnImages\AutoTrackOff.png" />
10001019
<None Include="btnImages\Images\z_TramOnOff.png" />
1020+
<None Include="btnImages\ZoomOGL.png" />
1021+
<None Include="btnImages\BoundaryReduce.png" />
1022+
<None Include="btnImages\BoundarySmooth.png" />
1023+
<None Include="btnImages\BoundaryMakeLine.png" />
1024+
<None Include="btnImages\APlusPlusA.png" />
1025+
<None Include="btnImages\APlusPlusB.png" />
10011026
<Content Include="Resources\rtk_lost.wav" />
10021027
<None Include="btnImages\BrightnessDn.png" />
10031028
<None Include="btnImages\BrightnessUp.png" />

SourceCode/GPS/Classes/CABCurve.cs

Lines changed: 34 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class CABCurve
2020

2121
public double howManyPathsAway;
2222
public vec2 refPoint1 = new vec2(1, 1), refPoint2 = new vec2(2, 2);
23-
23+
2424
private int A, B, C;
2525
private int rA, rB;
2626

@@ -157,7 +157,7 @@ public void BuildCurveCurrentList(vec3 pivot)
157157
distanceFromRefLine -= (0.5 * widthMinusOverlap);
158158

159159
double RefDist = (distanceFromRefLine + (isHeadingSameWay ? mf.tool.offset : -mf.tool.offset)) / widthMinusOverlap;
160-
160+
161161
if (RefDist < 0) howManyPathsAway = (int)(RefDist - 0.5);
162162
else howManyPathsAway = (int)(RefDist + 0.5);
163163

@@ -167,7 +167,7 @@ public void BuildCurveCurrentList(vec3 pivot)
167167
//build the current line
168168
curList?.Clear();
169169

170-
double distAway = widthMinusOverlap * howManyPathsAway + (isHeadingSameWay ? -mf.tool.offset : mf.tool.offset ) + mf.trk.gArr[idx].nudgeDistance;
170+
double distAway = widthMinusOverlap * howManyPathsAway + (isHeadingSameWay ? -mf.tool.offset : mf.tool.offset) + mf.trk.gArr[idx].nudgeDistance;
171171

172172
distAway += (0.5 * widthMinusOverlap);
173173

@@ -485,7 +485,7 @@ public void GetCurrentCurveLine(vec3 pivot, vec3 steer)
485485
return;
486486
}
487487

488-
SegmentFound:
488+
SegmentFound:
489489

490490
//get the distance from currently active AB line
491491

@@ -671,11 +671,12 @@ public void DrawCurveNew()
671671

672672
public void DrawProposed(int i)
673673
{
674-
GL.LineWidth(4);
674+
GL.LineWidth(8);
675675
GL.Color3(0.3, 0.92f, 0.42f);
676-
GL.Begin(PrimitiveType.LineStrip);
676+
GL.Begin(PrimitiveType.LineStrip);
677677

678678
for (int h = 0; h < mf.trk.gArr[i].curvePts.Count; h++)
679+
679680
GL.Vertex3(
680681
mf.trk.gArr[i].curvePts[h].easting,
681682
mf.trk.gArr[i].curvePts[h].northing,
@@ -706,12 +707,12 @@ public void DrawCurve()
706707
GL.Begin(PrimitiveType.Lines);
707708

708709
for (int h = 0; h < ptCount; h++) GL.Vertex3(
709-
mf.trk.gArr[mf.trk.idx].curvePts[h].easting,
710-
mf.trk.gArr[mf.trk.idx].curvePts[h].northing,
710+
mf.trk.gArr[mf.trk.idx].curvePts[h].easting,
711+
mf.trk.gArr[mf.trk.idx].curvePts[h].northing,
711712
0);
712713

713714
GL.End();
714-
715+
715716
if (mf.font.isFontOn)
716717
{
717718
GL.Color3(0.40f, 0.90f, 0.95f);
@@ -1011,8 +1012,8 @@ public void MakePointMinimumSpacing(ref List<vec3> xList, double minDistance)
10111012
}
10121013

10131014

1014-
//turning the visual line into the real reference line to use
1015-
public void SaveSmoothList()
1015+
//turning the visual line into the real reference line to use
1016+
public void SaveSmoothList()
10161017
{
10171018
//oops no smooth list generated
10181019
if (smooList == null) return;
@@ -1070,7 +1071,7 @@ public void AddFirstLastPoints(ref List<vec3> xList)
10701071
//end
10711072
while (mf.bnd.bndList[0].fenceLineEar.IsPointInPolygon(xList[xList.Count - 1]))
10721073
{
1073-
for (int i = 1; i < 10; i++)
1074+
for (int i = 1; i < 100; i++)
10741075
{
10751076
vec3 pt = new vec3(xList[ptCnt]);
10761077
pt.easting += (Math.Sin(pt.heading) * i);
@@ -1085,7 +1086,7 @@ public void AddFirstLastPoints(ref List<vec3> xList)
10851086

10861087
while (mf.bnd.bndList[0].fenceLineEar.IsPointInPolygon(xList[0]))
10871088
{
1088-
for (int i = 1; i < 10; i++)
1089+
for (int i = 1; i < 100; i++)
10891090
{
10901091
vec3 pt = new vec3(start);
10911092
pt.easting -= (Math.Sin(pt.heading) * i);
@@ -1094,6 +1095,26 @@ public void AddFirstLastPoints(ref List<vec3> xList)
10941095
}
10951096
start = new vec3(xList[0]);
10961097
}
1098+
1099+
for (int i = 1; i < 100; i++)
1100+
{
1101+
vec3 pt = new vec3(xList[ptCnt]);
1102+
pt.easting += (Math.Sin(pt.heading) * i);
1103+
pt.northing += (Math.Cos(pt.heading) * i);
1104+
xList.Add(pt);
1105+
}
1106+
1107+
//and the beginning
1108+
start = new vec3(xList[0]);
1109+
1110+
for (int i = 1; i < 100; i++)
1111+
{
1112+
vec3 pt = new vec3(start);
1113+
pt.easting -= (Math.Sin(pt.heading) * i);
1114+
pt.northing -= (Math.Cos(pt.heading) * i);
1115+
xList.Insert(0, pt);
1116+
}
1117+
10971118
}
10981119
else
10991120
{

SourceCode/GPS/Classes/CABLine.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -372,8 +372,8 @@ public void DrawProposed(int i)
372372
{
373373
GL.LineWidth(4);
374374
//GL.Enable(EnableCap.LineStipple);
375-
GL.Begin(PrimitiveType.Lines);
376375
GL.Color3(0.30f, 0.972f, 0.32f);
376+
GL.Begin(PrimitiveType.Lines);
377377
{
378378
GL.Vertex3(mf.trk.gArr[i].endPtA.easting, mf.trk.gArr[i].endPtA.northing, 0);
379379
GL.Vertex3(mf.trk.gArr[i].endPtB.easting, mf.trk.gArr[i].endPtB.northing, 0);

SourceCode/GPS/Forms/Controls.Designer.cs

Lines changed: 56 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)