Exclude 0.749 from minimum diameter display
This commit is contained in:
@@ -47,6 +47,7 @@ namespace DrillTools
|
|||||||
private const int SvsiFocused = 0x10;
|
private const int SvsiFocused = 0x10;
|
||||||
private const int SelectFileFlags = SvsiSelect | SvsiDeselectOthers | SvsiEnsureVisible | SvsiFocused;
|
private const int SelectFileFlags = SvsiSelect | SvsiDeselectOthers | SvsiEnsureVisible | SvsiFocused;
|
||||||
private const double PpSourceDiameter = 3.203;
|
private const double PpSourceDiameter = 3.203;
|
||||||
|
private const double MinDiameterExcludedDiameter = 0.749;
|
||||||
private const int PpSideCoordinateTolerance = 1500;
|
private const int PpSideCoordinateTolerance = 1500;
|
||||||
|
|
||||||
[DllImport("user32.dll")]
|
[DllImport("user32.dll")]
|
||||||
@@ -1863,6 +1864,13 @@ M30";
|
|||||||
// 添加详细的刀具信息日志
|
// 添加详细的刀具信息日志
|
||||||
System.Diagnostics.Debug.WriteLine($"[刀具分析] T{tool.ToolNumber:D2}: 直径={tool.Diameter:F3}, 类型={tool.ToolType}, 尾号类型={tool.ToolSuffixType}, 大类={tool.ToolCategory}");
|
System.Diagnostics.Debug.WriteLine($"[刀具分析] T{tool.ToolNumber:D2}: 直径={tool.Diameter:F3}, 类型={tool.ToolType}, 尾号类型={tool.ToolSuffixType}, 大类={tool.ToolCategory}");
|
||||||
|
|
||||||
|
// 0.749mm 不参与最小孔径显示,刀具本身仍保留在列表和后续业务流程中。
|
||||||
|
if (Math.Abs(tool.Diameter - MinDiameterExcludedDiameter) < 0.001)
|
||||||
|
{
|
||||||
|
System.Diagnostics.Debug.WriteLine($"[最小孔径排除] T{tool.ToolNumber:D2}: 直径={tool.Diameter:F3} 不参与最小直径计算");
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
// 根据刀具类型分类计算最小直径
|
// 根据刀具类型分类计算最小直径
|
||||||
if (tool.ToolType == ToolType.Regular)
|
if (tool.ToolType == ToolType.Regular)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user