feat: 添加了自由锻无圆头毛坯的绘图功能。
This commit is contained in:
parent
fe4ac75f67
commit
2ccdc970ce
@ -147,14 +147,14 @@ namespace CadParamPluging.Cad
|
|||||||
|
|
||||||
// 绘制左侧框线(连接左端圆弧和中间剖面框)
|
// 绘制左侧框线(连接左端圆弧和中间剖面框)
|
||||||
// 用户需求:
|
// 用户需求:
|
||||||
// 1. 去掉最外侧的圆角 -> filletR 传入 0
|
// 1. 去掉最外侧的圆角 -> filletR 传入 innerFilletR (Updated per requirement)
|
||||||
// 2. 横向闭合:水平线需延伸到中间框圆角结束的地方 (xSectionLeft + innerFilletR) 以实现无缝连接
|
// 2. 横向闭合:水平线需延伸到中间框圆角结束的地方 (xSectionLeft + innerFilletR) 以实现无缝连接
|
||||||
// 3. 竖向不闭合:DrawBoxSideFrame 内部不 Closed,且不画连接处的竖线
|
// 3. 竖向不闭合:DrawBoxSideFrame 内部不 Closed,且不画连接处的竖线 (Now Closed=true in Helper)
|
||||||
DrawBoxSideFrame(ctx, xInnerLeft, xSectionLeft + innerFilletR, oy, H, 0, isLeft: true);
|
DrawBoxSideFrame(ctx, xInnerLeft, xSectionLeft + innerFilletR, oy, H, innerFilletR, isLeft: true);
|
||||||
|
|
||||||
// 绘制右侧框线
|
// 绘制右侧框线
|
||||||
// 类似的,水平线起点延伸到 (xSectionRight - innerFilletR)
|
// 类似的,水平线起点延伸到 (xSectionRight - innerFilletR)
|
||||||
DrawBoxSideFrame(ctx, xSectionRight - innerFilletR, xInnerRight, oy, H, 0, isLeft: false);
|
DrawBoxSideFrame(ctx, xSectionRight - innerFilletR, xInnerRight, oy, H, innerFilletR, isLeft: false);
|
||||||
|
|
||||||
// 3. 剖面填充 - 只在中间区域
|
// 3. 剖面填充 - 只在中间区域
|
||||||
if (innerFilletR > 0.01)
|
if (innerFilletR > 0.01)
|
||||||
@ -242,7 +242,8 @@ namespace CadParamPluging.Cad
|
|||||||
double xOuterRight = ox + visualTotalW;
|
double xOuterRight = ox + visualTotalW;
|
||||||
|
|
||||||
// 修正:由于去掉了最外侧圆角,标注界线起点直接对齐最外侧边界
|
// 修正:由于去掉了最外侧圆角,标注界线起点直接对齐最外侧边界
|
||||||
double xDimOrigin = xOuterRight;
|
// Refinment: 减去倒角半径,使尺寸界线能够接触到直边,避免因为圆角产生悬空
|
||||||
|
double xDimOrigin = xOuterRight - innerFilletR;
|
||||||
|
|
||||||
AddLinearDim(
|
AddLinearDim(
|
||||||
ctx,
|
ctx,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user