修改完成了毛料态/轧制/环形模板
This commit is contained in:
parent
bef27c05fb
commit
a34730cc34
@ -705,15 +705,21 @@ namespace CadParamPluging.Cad
|
||||
|
||||
|
||||
// === 特征9: 硬度符号 ===
|
||||
var hardnessVal = bag.GetString(KeyHardness);
|
||||
if (!string.IsNullOrWhiteSpace(hardnessVal))
|
||||
// 仅在“毛料态-轧制-环形”模板(applyUnspecifiedFillet=true)中显示
|
||||
if (applyUnspecifiedFillet)
|
||||
{
|
||||
// 指向锻件剖面图的右下角 (白色边框)
|
||||
// 坐标: xOuterRight, yBottom
|
||||
double xCorner = ox + visualOuterR;
|
||||
double yCorner = oy;
|
||||
|
||||
DrawHardnessSymbol(ctx, xCorner, yCorner);
|
||||
var hardnessVal = bag.GetString(KeyHardness);
|
||||
if (!string.IsNullOrWhiteSpace(hardnessVal))
|
||||
{
|
||||
// 指向锻件剖面图的底部边框的中间位置
|
||||
// 坐标: mid X, yBottom
|
||||
double xLoopInner = ox + visualInnerR;
|
||||
double xLoopOuter = ox + visualOuterR;
|
||||
double xStart = (xLoopInner + xLoopOuter) / 2.0;
|
||||
double yStart = oy;
|
||||
|
||||
DrawHardnessSymbol(ctx, xStart, yStart);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -2801,10 +2807,8 @@ namespace CadParamPluging.Cad
|
||||
poly.AddVertexAt(2, new Point2d(p3.X, p3.Y), 0, 0, 0);
|
||||
|
||||
ctx.Style?.Apply(poly, DrawingStyleManager.Role.Dimension); // 使用 Dimension 角色
|
||||
// 确保此时是白色(颜色7) 或 按照标注颜色(青色 or Green?) 图片看起来像青色(Cyan)或白色
|
||||
// 用户截图看起来是青色/绿色(标注层颜色). Apply logic usually handles layer/color.
|
||||
// 我们显式设为青色(4)或者跟随标注层
|
||||
poly.ColorIndex = 4;
|
||||
// 用户要求改为绿色 (ColorIndex 3)
|
||||
poly.ColorIndex = 3;
|
||||
|
||||
ctx.Btr.AppendEntity(poly);
|
||||
ctx.Tr.AddNewlyCreatedDBObject(poly, true);
|
||||
@ -2814,7 +2818,7 @@ namespace CadParamPluging.Cad
|
||||
double radius = 4.0;
|
||||
var center = new Point3d(p3.X + radius, p3.Y, 0);
|
||||
var circle = new Circle(center, Vector3d.ZAxis, radius);
|
||||
circle.ColorIndex = 4;
|
||||
circle.ColorIndex = 3;
|
||||
|
||||
ctx.Btr.AppendEntity(circle);
|
||||
ctx.Tr.AddNewlyCreatedDBObject(circle, true);
|
||||
@ -2823,7 +2827,7 @@ namespace CadParamPluging.Cad
|
||||
var text = new DBText();
|
||||
text.TextString = "HB";
|
||||
text.Height = 3.5;
|
||||
text.ColorIndex = 4;
|
||||
text.ColorIndex = 3;
|
||||
text.HorizontalMode = TextHorizontalMode.TextCenter;
|
||||
text.VerticalMode = TextVerticalMode.TextVerticalMid;
|
||||
text.AlignmentPoint = center;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user