fix: draw rapid move to hole center before sub-program lead-in
The rapid from the previous feature to the hole center is implied by the SubProgramCall offset but wasn't being drawn. Now DrawRapids renders this traverse before recursing into the sub-program. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -433,7 +433,15 @@ namespace OpenNest.Controls
|
|||||||
if (program != null)
|
if (program != null)
|
||||||
{
|
{
|
||||||
var savedPos = pos;
|
var savedPos = pos;
|
||||||
pos = new Vector(savedPos.X + subpgm.Offset.X, savedPos.Y + subpgm.Offset.Y);
|
var holePos = new Vector(savedPos.X + subpgm.Offset.X, savedPos.Y + subpgm.Offset.Y);
|
||||||
|
|
||||||
|
// Draw rapid from current position to hole center
|
||||||
|
if (!(skipFirstRapid && !firstRapidSkipped))
|
||||||
|
DrawLine(g, pos, holePos, view.ColorScheme.RapidPen);
|
||||||
|
else
|
||||||
|
firstRapidSkipped = true;
|
||||||
|
|
||||||
|
pos = holePos;
|
||||||
DrawRapids(g, program, ref pos);
|
DrawRapids(g, program, ref pos);
|
||||||
pos = savedPos;
|
pos = savedPos;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user