|
|
|
@ -8,10 +8,11 @@ type EntityType = "Entity" | "ExtrudeSolid" | "Board" | "Template" | "EntityTree
|
|
|
|
|
// pt为点坐标,bul为弯曲度(区间-1~1),俗称弓弦比
|
|
|
|
|
// bul为0时为直线,bul为0.5时为半圆,正负为上下弯曲的方向
|
|
|
|
|
// bul值为(弧线两点直线的中点到弧线中点的距离)除以(弧线两点直线的中点到弧线起点的距离)
|
|
|
|
|
type PolylineContour = { pt: [number, number], bul: 0; }[]; //多段线轮廓
|
|
|
|
|
type CircleContour = { Radius: number, Center: [number, number, number]; }; //圆形轮廓
|
|
|
|
|
|
|
|
|
|
type ExtrudeContour = PolylineContour | CircleContour;
|
|
|
|
|
type ICFPolylineContour = { pt: [number, number], bul: 0; }[]; //多段线轮廓
|
|
|
|
|
type ICFCircleContour = { Radius: number, Center: [number, number, number]; }; //圆形轮廓
|
|
|
|
|
|
|
|
|
|
type ICFExtrudeContour = ICFPolylineContour | ICFCircleContour;
|
|
|
|
|
图纸结构
|
|
|
|
|
|
|
|
|
|
1.模型空间 ModelSpace 结构
|
|
|
|
@ -73,7 +74,7 @@ type ExtrudeContour = PolylineContour | CircleContour;
|
|
|
|
|
Width?: number; //宽
|
|
|
|
|
Height?: number; //高
|
|
|
|
|
// Or
|
|
|
|
|
ContourCurve?: ExtrudeContour; //轮廓曲线
|
|
|
|
|
ContourCurve?: ICFExtrudeContour; //轮廓曲线
|
|
|
|
|
|
|
|
|
|
Thickness?: number; //厚度
|
|
|
|
|
GroovesAddLength?: number; //槽加长
|
|
|
|
@ -354,7 +355,7 @@ type ExtrudeContour = PolylineContour | CircleContour;
|
|
|
|
|
Comments?: string; //备注
|
|
|
|
|
|
|
|
|
|
Contour?: { pt: [number, number], bul: 0; }[]; //横截面轮廓曲线
|
|
|
|
|
PathCurve?: ExtrudeContour; //绘制路径曲线
|
|
|
|
|
PathCurve?: ICFExtrudeContour; //绘制路径曲线
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
例1:
|
|
|
|
|