경로로직
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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,
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user