From 09ab4cff9e1b9e6eb12b39b1c5ab9f00d015e98f Mon Sep 17 00:00:00 2001 From: sladro Date: Fri, 27 Feb 2026 11:22:54 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20add=20drawing=20modules=20for=E7=8E=AF?= =?UTF-8?q?=E5=BD=A2=E6=AF=9B=E6=96=99=E8=87=AA=E7=94=B1=E9=94=BB=E4=BB=B6?= =?UTF-8?q?,=20distinguishing=20between=20center=20punch=20and=20non-cente?= =?UTF-8?q?r=20punch=20conditions.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../RingRawFreeForgeCenterPunchDrawer.cs | 20 +++++++++---------- .../RingRawFreeForgeNonCenterPunchDrawer.cs | 14 ++++++++----- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Cad/Drawers/RingRawFreeForgeCenterPunchDrawer.cs b/Cad/Drawers/RingRawFreeForgeCenterPunchDrawer.cs index 7f6be30..c21ea0d 100644 --- a/Cad/Drawers/RingRawFreeForgeCenterPunchDrawer.cs +++ b/Cad/Drawers/RingRawFreeForgeCenterPunchDrawer.cs @@ -157,12 +157,6 @@ namespace CadParamPluging.Cad.Drawers // Right Side of Right Section is Outer -> outerFilletR DrawSectionWithAsymmetricFillets(ctx, xInnerRightVal, ox + W, oy, H, innerFilletR, outerFilletR); - if (innerFilletR > 0) - { - double cxRight = xInnerRightVal + innerFilletR; - double cyRight = oy + H - innerFilletR; - DrawInnerRadiusLeader(ctx, cxRight, cyRight, innerFilletR, false); - } // Draw Connecting Lines (Hole Back View) - Top and Bottom // Extend into the inner fillet radius @@ -246,11 +240,15 @@ namespace CadParamPluging.Cad.Drawers { if (xInnerRight.HasValue) { - FeatureDrivenDrawer.DrawMinWallThicknessNote(ctx, xInnerRight.Value, ox + W, oy, minWallThickness.Value); - } - if (xInnerLeft.HasValue) - { - FeatureDrivenDrawer.DrawMinWallThicknessNote(ctx, ox, xInnerLeft.Value, oy, minWallThickness.Value); + var val = ctx.OriginalBag?.GetDoubleOrNull(FeatureDrivenDrawer.KeyMinWallThickness) ?? minWallThickness.Value; + var dimText = $"{FeatureDrivenDrawer.FormatDimNumber(val)}min"; + FeatureDrivenDrawer.AddLinearDim( + ctx, + new Point3d(xInnerRight.Value, oy + innerFilletR, 0), + new Point3d(ox + W, oy + outerFilletR, 0), + new Point3d((xInnerRight.Value + ox + W) / 2, oy + innerFilletR - 25, 0), + 0, + dimText); } } diff --git a/Cad/Drawers/RingRawFreeForgeNonCenterPunchDrawer.cs b/Cad/Drawers/RingRawFreeForgeNonCenterPunchDrawer.cs index 92cd8f8..9ed5ad4 100644 --- a/Cad/Drawers/RingRawFreeForgeNonCenterPunchDrawer.cs +++ b/Cad/Drawers/RingRawFreeForgeNonCenterPunchDrawer.cs @@ -265,11 +265,15 @@ namespace CadParamPluging.Cad.Drawers { if (xInnerRight.HasValue) { - FeatureDrivenDrawer.DrawMinWallThicknessNote(ctx, xInnerRight.Value, ox + W, oy, minWallThickness.Value); - } - if (xInnerLeft.HasValue) - { - FeatureDrivenDrawer.DrawMinWallThicknessNote(ctx, ox, xInnerLeft.Value, oy, minWallThickness.Value); + var val = ctx.OriginalBag?.GetDoubleOrNull(FeatureDrivenDrawer.KeyMinWallThickness) ?? minWallThickness.Value; + var dimText = $"{FeatureDrivenDrawer.FormatDimNumber(val)}min"; + FeatureDrivenDrawer.AddLinearDim( + ctx, + new Point3d(xInnerRight.Value, oy + sectionFilletR, 0), + new Point3d(ox + W, oy + sectionFilletR, 0), + new Point3d((xInnerRight.Value + ox + W) / 2, oy + sectionFilletR - 25, 0), + 0, + dimText); } }