高亮节点、取消前面的[n]序号、参考位置,保存位置,参数区为只读

This commit is contained in:
zhengxuan.zhang
2026-04-24 10:44:22 +08:00
parent 9911566675
commit f3e77562b1
5 changed files with 245 additions and 13 deletions
+11 -1
View File
@@ -366,11 +366,21 @@ namespace XplorePlane.Services.Cnc
var result = new List<CncNode>(nodes.Count);
for (int i = 0; i < nodes.Count; i++)
{
result.Add(nodes[i] with { Index = i });
result.Add(ApplyDefaultNodeName(nodes[i] with { Index = i }, i));
}
return result.AsReadOnly();
}
private static CncNode ApplyDefaultNodeName(CncNode node, int index)
{
return node switch
{
ReferencePointNode referencePointNode => referencePointNode with { Name = $"参考点_{index}" },
SavePositionNode savePositionNode => savePositionNode with { Name = $"保存位置_{index}" },
_ => node
};
}
/// <summary>创建参考点节点 | Create reference point node</summary>
private ReferencePointNode CreateReferencePointNode(Guid id, int index)
{