feat: 铆钉孔孔径新增4.503mm — IsSpecialFixedDiameter 增加 4.503,固定为圆孔且不参与叠板/最小刀径计算
This commit is contained in:
11
ToolItem.cs
11
ToolItem.cs
@@ -232,15 +232,20 @@ namespace DrillTools
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// PP定位孔(3.203)、外围参考孔(3.175)、Mark孔(1.049)、机台码(0.499)等特殊孔径。
|
||||
/// PP定位孔(3.203)、外围参考孔(3.175)、Mark孔(1.049)、机台码(0.499)、铆钉孔(4.503)等特殊孔径。
|
||||
/// 不按尾号归类,且不参与叠板块数计算。
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// 4.503mm 为铆钉孔:尾号 3 原本会归为粉尘刀(DustSlot),此处固定为圆孔(Drill),
|
||||
/// 且不参与最小刀径与叠板计算。
|
||||
/// </remarks>
|
||||
public static bool IsSpecialFixedDiameter(double diameter)
|
||||
{
|
||||
return Math.Abs(diameter - 1.049) < 0.001
|
||||
|| Math.Abs(diameter - 3.175) < 0.001
|
||||
|| Math.Abs(diameter - 3.203) < 0.001
|
||||
|| Math.Abs(diameter - 0.499) < 0.001;
|
||||
|| Math.Abs(diameter - 0.499) < 0.001
|
||||
|| Math.Abs(diameter - 4.503) < 0.001;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -250,7 +255,7 @@ namespace DrillTools
|
||||
/// <returns>刀具尾号类型</returns>
|
||||
public static ToolSuffixType GetToolSuffixType(double diameter)
|
||||
{
|
||||
// 特殊孔径优先判断
|
||||
// 特殊孔径优先判断(含铆钉孔 4.503:尾号3原本归粉尘刀,此处固定为圆孔)
|
||||
if (IsSpecialFixedDiameter(diameter))
|
||||
{
|
||||
System.Diagnostics.Debug.WriteLine($"[尾号类型判断] 直径={diameter:F3}: 特殊孔径,尾号类型=钻针");
|
||||
|
||||
Reference in New Issue
Block a user