Initial commit

This commit is contained in:
sladro 2025-12-25 15:13:29 +08:00
parent cfb6725b47
commit c3188c9c0b
2 changed files with 5 additions and 7 deletions

View File

@ -428,7 +428,7 @@ namespace CadParamPluging.Common
Type = ParamValueType.Double, Type = ParamValueType.Double,
Required = false, Required = false,
DefaultValue = "", DefaultValue = "",
Hint = "自动计算T=(Φ1-b1+Φ2-a2)/2", Hint = "自动计算T=((Φ1+b1)-(Φ2+a2))/2",
Order = 590, Order = 590,
Group = "尺寸-环形" Group = "尺寸-环形"
}, },

View File

@ -512,7 +512,7 @@ namespace CadParamPluging.UI
if (_ctrlMinWallThickness != null) if (_ctrlMinWallThickness != null)
{ {
_toolTip.SetToolTip(_ctrlMinWallThickness, "自动计算: T=(Φ1-b1+Φ2-a2)/2\n(根据外径Φ1、外径下差b1、内径Φ2、内径上差a2)"); _toolTip.SetToolTip(_ctrlMinWallThickness, "自动计算: T=((Φ1+b1)-(Φ2+a2))/2\n(根据外径Φ1、外径下差b1、内径Φ2、内径上差a2)");
} }
} }
else else
@ -545,13 +545,11 @@ namespace CadParamPluging.UI
var phi2 = GetNumericValue(KeyInnerDiameter2); var phi2 = GetNumericValue(KeyInnerDiameter2);
var a2 = GetNumericValue(KeyInnerDiameter2TolPlus); var a2 = GetNumericValue(KeyInnerDiameter2TolPlus);
// T = (Φ1 - b1 + Φ2 - a2) / 2
// 注意b1通常为负数如-0.5a2通常为正数如0.5 // 注意b1通常为负数如-0.5a2通常为正数如0.5
// 实际最小壁厚 = ((外径最小) - (内径最大)) / 2 // 最小壁厚径向T = ((外径最小) - (内径最大)) / 2
// 外径最小 = Φ1 + b1内径最大 = Φ2 + a2 // 外径最小 = Φ1 + b1内径最大 = Φ2 + a2
// 最小壁厚 = (Φ1 + b1 - Φ2 - a2) / 2 // T = ((Φ1 + b1) - (Φ2 + a2)) / 2
// 但用户公式为 T=(Φ1-b1+Φ2-a2)/2按此公式计算 var t = ((phi1 + b1) - (phi2 + a2)) / 2.0;
var t = (phi1 - b1 + phi2 - a2) / 2.0;
if (_ctrlMinWallThickness is NumericUpDown num) if (_ctrlMinWallThickness is NumericUpDown num)
{ {