diff --git a/Cad/FeatureDrivenDrawer.cs b/Cad/FeatureDrivenDrawer.cs index 0314f98..4eae711 100644 --- a/Cad/FeatureDrivenDrawer.cs +++ b/Cad/FeatureDrivenDrawer.cs @@ -1905,7 +1905,7 @@ namespace CadParamPluging.Cad TrySetDimProp(dim, "Dimasz", 2.5); TrySetDimProp(dim, "Dimgap", 1.0); TrySetDimProp(dim, "Dimexe", 1.0); - TrySetDimProp(dim, "Dimexo", 1.0); + TrySetDimProp(dim, "Dimexo", 0.0); // Updated based on user request TrySetDimProp(dim, "Dimtofl", true); // Draw dim line between ext lines diff --git a/Cad/TemplateDrawingService.cs b/Cad/TemplateDrawingService.cs index ce00fec..b6e8f23 100644 --- a/Cad/TemplateDrawingService.cs +++ b/Cad/TemplateDrawingService.cs @@ -1605,7 +1605,12 @@ namespace CadParamPluging.Cad var isBottomEdge = Math.Abs(startPt.Y - layout.MinPoint.Y) < tolerance; if (isTopEdge || isBottomEdge) { - return true; + // 增加长度判断:防止误删位于边界上的短线(如标题栏边框) + // 只有长度超过布局宽度 50% 的线才认为是外框 + if (Math.Abs(startPt.X - endPt.X) > layoutWidth * 0.5) + { + return true; + } } } @@ -1618,7 +1623,11 @@ namespace CadParamPluging.Cad var isRightEdge = Math.Abs(startPt.X - layout.MaxPoint.X) < tolerance; if (isLeftEdge || isRightEdge) { - return true; + // 增加长度判断 + if (Math.Abs(startPt.Y - endPt.Y) > layoutHeight * 0.5) + { + return true; + } } } }