|
|
@@ -1126,11 +1126,10 @@ namespace o0.Project
|
|
|
}
|
|
|
}
|
|
|
var (interA, interB) = FindInterLinePair(new LineGuess(screenLocateMatList, gradientLength * 2, minLength), interSelectable, 12);
|
|
|
- if (interA != null && interB != null) // 替换上一步筛选的结果中的一对边,得到最终的结果
|
|
|
- {
|
|
|
+ if (interA != null) // 替换上一步筛选的结果中的部分边,得到最终的结果
|
|
|
resultAuto[interA.ScreenLineIndex] = interA;
|
|
|
+ if (interB != null)
|
|
|
resultAuto[interB.ScreenLineIndex] = interB;
|
|
|
- }
|
|
|
|
|
|
return (resultSemiAuto.ToList(), resultAuto.ToList());
|
|
|
}
|
|
|
@@ -1152,13 +1151,22 @@ namespace o0.Project
|
|
|
if (count++ >= maxCountToSelect)
|
|
|
break;
|
|
|
}
|
|
|
- if (selected[0] != null && selected[1] != null && selected[2] != null && selected[3] != null)
|
|
|
+ var selectedList = new List<LineIdentified>();
|
|
|
+ foreach (var i in selected)
|
|
|
+ {
|
|
|
+ if (i != null)
|
|
|
+ selectedList.Add(i);
|
|
|
+ }
|
|
|
+
|
|
|
+ if (selectedList.Count == 4)
|
|
|
{
|
|
|
if (selected[0].ZIMGradient + selected[2].ZIMGradient > selected[1].ZIMGradient + selected[3].ZIMGradient)
|
|
|
return (selected[0], selected[2]);
|
|
|
else
|
|
|
return (selected[1], selected[3]);
|
|
|
}
|
|
|
+ else if (selectedList.Count == 1)
|
|
|
+ return (selectedList[0], null);
|
|
|
else if (selected[0] != null && selected[2] != null)
|
|
|
return (selected[0], selected[2]);
|
|
|
else if (selected[1] != null && selected[3] != null)
|