修改了中轴线的样式
This commit is contained in:
parent
5ba9f3e08d
commit
13b5a81bee
@ -59,7 +59,7 @@ namespace CadParamPluging.Cad
|
|||||||
case Role.PartContour:
|
case Role.PartContour:
|
||||||
return new LayerSpec { LayerName = "双点划线", DefaultLinetypeName = "PHANTOM", DefaultLineWeight = LineWeight.LineWeight015, DefaultColorIndex = 7 };
|
return new LayerSpec { LayerName = "双点划线", DefaultLinetypeName = "PHANTOM", DefaultLineWeight = LineWeight.LineWeight015, DefaultColorIndex = 7 };
|
||||||
case Role.Centerline:
|
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:
|
case Role.Hidden:
|
||||||
return new LayerSpec { LayerName = "虚线", DefaultLinetypeName = "DASHED", DefaultLineWeight = LineWeight.LineWeight025, DefaultColorIndex = 7 };
|
return new LayerSpec { LayerName = "虚线", DefaultLinetypeName = "DASHED", DefaultLineWeight = LineWeight.LineWeight025, DefaultColorIndex = 7 };
|
||||||
case Role.Hatch:
|
case Role.Hatch:
|
||||||
|
|||||||
@ -1,5 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
using Autodesk.AutoCAD.DatabaseServices;
|
using Autodesk.AutoCAD.DatabaseServices;
|
||||||
using Autodesk.AutoCAD.Geometry;
|
using Autodesk.AutoCAD.Geometry;
|
||||||
using CadParamPluging.Common;
|
using CadParamPluging.Common;
|
||||||
@ -573,7 +574,11 @@ namespace CadParamPluging.Cad
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
private static void DrawRingSymmetryAxis(DrawingContext ctx, double ox, double oy, double height)
|
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.Style?.Apply(line, DrawingStyleManager.Role.Centerline);
|
||||||
ctx.Btr.AppendEntity(line);
|
ctx.Btr.AppendEntity(line);
|
||||||
ctx.Tr.AddNewlyCreatedDBObject(line, true);
|
ctx.Tr.AddNewlyCreatedDBObject(line, true);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user