修改了中轴线的样式

This commit is contained in:
sladro 2025-12-23 19:33:36 +08:00
parent 5ba9f3e08d
commit 13b5a81bee
2 changed files with 7 additions and 2 deletions

View File

@ -59,7 +59,7 @@ namespace CadParamPluging.Cad
case Role.PartContour:
return new LayerSpec { LayerName = "双点划线", DefaultLinetypeName = "PHANTOM", DefaultLineWeight = LineWeight.LineWeight015, DefaultColorIndex = 7 };
case Role.Centerline:
return new LayerSpec { LayerName = "中心线", DefaultLinetypeName = "Continuous", DefaultLineWeight = LineWeight.LineWeight015, DefaultColorIndex = 7 };
return new LayerSpec { LayerName = "中心线", DefaultLinetypeName = "CENTER", DefaultLineWeight = LineWeight.LineWeight015, DefaultColorIndex = 7 };
case Role.Hidden:
return new LayerSpec { LayerName = "虚线", DefaultLinetypeName = "DASHED", DefaultLineWeight = LineWeight.LineWeight025, DefaultColorIndex = 7 };
case Role.Hatch:

View File

@ -1,5 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using Autodesk.AutoCAD.DatabaseServices;
using Autodesk.AutoCAD.Geometry;
using CadParamPluging.Common;
@ -573,7 +574,11 @@ namespace CadParamPluging.Cad
/// </summary>
private static void DrawRingSymmetryAxis(DrawingContext ctx, double ox, double oy, double height)
{
var line = new Line(new Point3d(ox, oy - 10, 0), new Point3d(ox, oy + height + 10, 0));
// 直接使用“高度标注”的两端点(锻件外轮廓的上下边),不做上下延长,避免越过图框上边界。
var y0 = oy;
var y1 = oy + height;
var line = new Line(new Point3d(ox, y0, 0), new Point3d(ox, y1, 0));
ctx.Style?.Apply(line, DrawingStyleManager.Role.Centerline);
ctx.Btr.AppendEntity(line);
ctx.Tr.AddNewlyCreatedDBObject(line, true);