fix: 맵 에디터 연결 버그 수정 및 기능 개선
주요 변경사항: - ConnectedMapNodes 속성 추가로 런타임 객체 참조 지원 - 이미지 에디터 UI 개선 (ImageEditorCanvas 추가) - 연결 생성 버그 수정: 양방향 연결 생성 - 연결 삭제 버그 수정: 양방향 모두 제거 - CleanupDuplicateConnections 비활성화 (단방향 변환 버그) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -319,11 +319,16 @@ namespace AGVSimulator.Forms
|
||||
// 고급 경로 계획 사용 (노드 객체 직접 전달)
|
||||
var advancedResult = _advancedPathfinder.FindPath_test(startNode, targetNode, prevNode, prevDir, currentDirection);
|
||||
|
||||
_simulatorCanvas.FitToNodes();
|
||||
if (advancedResult.Success)
|
||||
{
|
||||
// 도킹 검증이 없는 경우 추가 검증 수행
|
||||
if (advancedResult.DockingValidation == null || !advancedResult.DockingValidation.IsValidationRequired)
|
||||
{
|
||||
if(advancedResult.Path.Count < 1)
|
||||
{
|
||||
|
||||
}
|
||||
advancedResult.DockingValidation = DockingValidator.ValidateDockingDirection(advancedResult, _mapNodes);
|
||||
}
|
||||
|
||||
@@ -606,7 +611,7 @@ namespace AGVSimulator.Forms
|
||||
_rfidTextBox.Text = ""; // 입력 필드 초기화
|
||||
|
||||
// 시뮬레이터 캔버스의 해당 노드로 이동
|
||||
_simulatorCanvas.PanToNode(targetNode.NodeId);
|
||||
//_simulatorCanvas.PanToNode(targetNode.NodeId);
|
||||
|
||||
// 시작 노드 콤보박스를 현재 위치로 자동 선택
|
||||
SetStartNodeToCombo(targetNode.NodeId);
|
||||
@@ -1414,13 +1419,12 @@ namespace AGVSimulator.Forms
|
||||
|
||||
foreach (var nodeA in _mapNodes)
|
||||
{
|
||||
if (nodeA.ConnectedNodes == null || nodeA.ConnectedNodes.Count == 0)
|
||||
if (nodeA.ConnectedMapNodes == null || nodeA.ConnectedMapNodes.Count == 0)
|
||||
continue;
|
||||
|
||||
// 연결된 노드 ID를 실제 MapNode 객체로 변환
|
||||
foreach (var connectedNodeId in nodeA.ConnectedNodes)
|
||||
// 연결된 노드 객체 순회
|
||||
foreach (var nodeB in nodeA.ConnectedMapNodes)
|
||||
{
|
||||
var nodeB = _mapNodes.FirstOrDefault(n => n.NodeId == connectedNodeId);
|
||||
if (nodeB == null)
|
||||
continue;
|
||||
|
||||
@@ -1428,7 +1432,7 @@ namespace AGVSimulator.Forms
|
||||
var pairKey1 = $"{nodeA.NodeId}→{nodeB.NodeId}";
|
||||
var pairKey2 = $"{nodeB.NodeId}→{nodeA.NodeId}";
|
||||
|
||||
if (!processedPairs.Contains(pairKey1) && !processedPairs.Contains(pairKey2))
|
||||
if (nodeA.HasRfid() && nodeB.HasRfid() && !processedPairs.Contains(pairKey1) && !processedPairs.Contains(pairKey2))
|
||||
{
|
||||
pairs.Add((nodeA, nodeB));
|
||||
processedPairs.Add(pairKey1);
|
||||
|
||||
Reference in New Issue
Block a user