경로로직

This commit is contained in:
backuppc
2026-03-03 17:29:27 +09:00
parent 1a4b8a6a54
commit 30e1ce41ee
17 changed files with 462 additions and 598 deletions

View File

@@ -424,7 +424,7 @@ namespace AGVMapEditor.Forms
var nodeId = GenerateNodeId();
var position = new Point(100 + this._mapCanvas.Nodes.Count * 50, 100 + this._mapCanvas.Nodes.Count * 50);
var node = new MapNode(nodeId, position, StationType.Normal);
var node = new MapNode(nodeId, position, Station.Normal);
this._mapCanvas.Nodes.Add(node);
_hasChanges = true;
@@ -850,9 +850,9 @@ namespace AGVMapEditor.Forms
case NodeType.Normal:
var item = node as MapNode;
if (item.StationType == StationType.Normal)
if (item.StationType == Station.Normal)
foreColor = Color.DimGray;
else if (item.StationType == StationType.Charger)
else if (item.StationType == Station.Charger)
foreColor = Color.Red;
else
foreColor = Color.DarkGreen;

View File

@@ -980,7 +980,7 @@ namespace AGVNavigationCore.Controls
{
case NodeType.Normal:
var item = _selectedNode as MapNode;
if (item.StationType == StationType.Charger)
if (item.StationType == Station.Charger)
DrawTriangleGhost(g, ghostBrush);
else
DrawPentagonGhost(g, ghostBrush);
@@ -1169,16 +1169,16 @@ namespace AGVNavigationCore.Controls
switch (node.StationType)
{
case StationType.Loader:
case StationType.Cleaner:
case StationType.Plating:
case StationType.Buffer:
case Station.Loder:
case Station.Cleaner:
case Station.Plating:
case Station.Buffer:
DrawPentagonNodeShape(g, node, brush);
break;
case StationType.Charger:
case Station.Charger:
DrawTriangleNodeShape(g, node, brush);
break;
case StationType.Limit:
case Station.Lmt:
DrawRectangleNodeShape(g, node, brush);
break;
default:
@@ -1616,20 +1616,20 @@ namespace AGVNavigationCore.Controls
Color bgColor = Color.White;
switch (node.StationType)
{
case StationType.Charger:
case Station.Charger:
fgColor = Color.White;
bgColor = Color.Tomato;
break;
case StationType.Buffer:
case Station.Buffer:
fgColor = Color.Black;
bgColor = Color.White;
break;
case StationType.Plating:
case Station.Plating:
fgColor = Color.Black;
bgColor = Color.DeepSkyBlue;
break;
case StationType.Loader:
case StationType.Cleaner:
case Station.Loder:
case Station.Cleaner:
fgColor = Color.Black;
bgColor = Color.Gold;
break;
@@ -1915,18 +1915,18 @@ namespace AGVNavigationCore.Controls
switch (node.StationType)
{
case StationType.Normal:
case Station.Normal:
if (node.CanTurnLeft || node.CanTurnRight)
bgColor = Color.Violet;
else
bgColor = Color.DeepSkyBlue;
break;
case StationType.Charger: bgColor = Color.Tomato; break;
case StationType.Loader:
case StationType.Cleaner: bgColor = Color.Gold; break;
case StationType.Plating: bgColor = Color.DeepSkyBlue; break;
case StationType.Buffer: bgColor = Color.WhiteSmoke; break;
case StationType.Limit: bgColor = Color.Red; break;
case Station.Charger: bgColor = Color.Tomato; break;
case Station.Loder:
case Station.Cleaner: bgColor = Color.Gold; break;
case Station.Plating: bgColor = Color.DeepSkyBlue; break;
case Station.Buffer: bgColor = Color.WhiteSmoke; break;
case Station.Lmt: bgColor = Color.Red; break;
default: bgColor = Color.White; break;
}

View File

@@ -582,12 +582,12 @@ namespace AGVNavigationCore.Controls
{
switch (node.StationType)
{
case StationType.Loader:
case StationType.Cleaner:
case StationType.Plating:
case StationType.Buffer:
case Station.Loder:
case Station.Cleaner:
case Station.Plating:
case Station.Buffer:
return IsPointInPentagon(point, node);
case StationType.Charger:
case Station.Charger:
return IsPointInTriangle(point, node);
default:
return IsPointInCircle(point, node);

View File

@@ -58,14 +58,14 @@ namespace AGVNavigationCore.Models
/// <summary>
/// 장비 타입 열거형
/// </summary>
public enum StationType
public enum Station
{
/// <summary>
/// 일반노드
/// </summary>
Normal,
/// <summary>로더</summary>
Loader,
Loder,
/// <summary>클리너</summary>
Plating,
/// <summary>오프로더</summary>
@@ -78,7 +78,7 @@ namespace AGVNavigationCore.Models
/// <summary>
/// 끝점(더이상 이동불가)
/// </summary>
Limit,
Lmt,
}

View File

@@ -17,18 +17,18 @@ namespace AGVNavigationCore.Models
public StationType StationType { get; set; }
public Station StationType { get; set; }
[Browsable(false)]
public bool CanDocking
{
get
{
if (StationType == StationType.Buffer) return true;
if (StationType == StationType.Loader) return true;
if (StationType == StationType.Cleaner) return true;
if (StationType == StationType.Plating) return true;
if (StationType == StationType.Charger) return true;
if (StationType == Station.Buffer) return true;
if (StationType == Station.Loder) return true;
if (StationType == Station.Cleaner) return true;
if (StationType == Station.Plating) return true;
if (StationType == Station.Charger) return true;
return false;
}
}
@@ -111,7 +111,7 @@ namespace AGVNavigationCore.Models
Type = NodeType.Normal;
}
public MapNode(string nodeId, Point position, StationType type) : base(nodeId, position)
public MapNode(string nodeId, Point position, Station type) : base(nodeId, position)
{
Type = NodeType.Normal;
}
@@ -122,9 +122,9 @@ namespace AGVNavigationCore.Models
{
get
{
if (StationType == StationType.Charger || StationType == StationType.Buffer ||
StationType == StationType.Plating || StationType == StationType.Loader ||
StationType == StationType.Cleaner) return true;
if (StationType == Station.Charger || StationType == Station.Buffer ||
StationType == Station.Plating || StationType == Station.Loder ||
StationType == Station.Cleaner) return true;
return false;
}
}

View File

@@ -367,7 +367,7 @@ namespace AGVNavigationCore.Models
//도킹노드라면 markstop 을 나머지는 바로 스탑한다.
eAGVCommandReason reason = eAGVCommandReason.MarkStop;
if (TargetNode.StationType == StationType.Normal || TargetNode.StationType == StationType.Limit)
if (TargetNode.StationType == Station.Normal || TargetNode.StationType == Station.Lmt)
{
//일반노드는 마크스탑포인트가 없으니 바로 종료되도록 한다
reason = eAGVCommandReason.Complete;

View File

@@ -1598,7 +1598,7 @@ namespace AGVSimulator.Forms
MotorDirection = directionName,
CurrentPosition = GetNodeDisplayName(currentNode),
TargetPosition = GetNodeDisplayName(targetNode),
DockingPosition = (targetNode.StationType == StationType.Charger) ? "충전기" : "장비"
DockingPosition = (targetNode.StationType == Station.Charger) ? "충전기" : "장비"
};
if (calcResult.Success)