xiug修改线条样式

This commit is contained in:
sladro 2025-12-23 19:42:19 +08:00
parent 13b5a81bee
commit cfb6725b47

View File

@ -405,6 +405,9 @@ namespace CadParamPluging.Cad
// === 特征4.1: 剖面线(右半边环形截面) ===
DrawRingSectionHatch(ctx, xInnerRight.Value, ox + R, oy, H);
// 剖面左侧竖线应为粗实线(剖切边界)
DrawSectionInnerBoundaryBold(ctx, xInnerRight.Value, oy, H);
}
// === 特征5: 高度标注 ===
@ -493,6 +496,9 @@ namespace CadParamPluging.Cad
// === 特征4.1: 剖面线(仅剖切端部区域) ===
DrawRingSectionHatch(ctx, xInnerRight.Value, ox + W, oy, H);
// 剖面左侧竖线应为粗实线(剖切边界)
DrawSectionInnerBoundaryBold(ctx, xInnerRight.Value, oy, H);
}
// === 特征5: 高度标注 ===
@ -525,6 +531,21 @@ namespace CadParamPluging.Cad
TryDrawHardnessSymbol(ctx, ox + W, oy, H);
}
private static void DrawSectionInnerBoundaryBold(DrawingContext ctx, double x, double yBottom, double height)
{
try
{
var line = new Line(new Point3d(x, yBottom, 0), new Point3d(x, yBottom + height, 0));
ctx.Style?.Apply(line, DrawingStyleManager.Role.OutlineBold);
ctx.Btr.AppendEntity(line);
ctx.Tr.AddNewlyCreatedDBObject(line, true);
}
catch
{
// ignore
}
}
private static void DrawForgingOuterContour(DrawingContext ctx, double ox, double oy, double width, double height)
{
var poly = new Polyline();