//定义圆弧坐标系及相关东西
double matrix_values[9]={1,0,0,0,0,1,0,-1,0};
tag_t matrix_tag;
UF_CURVE_arc_t line4;
//定义直线
UF_CURVE_line_t line1,line2,line3;
tag_t line1_tag,line2_tag,line3_tag,line4_tag;
tag_t generator[4];
//画半圆弧,圆心为(e,h4,b/2),半径为r,
line4.start_angle = 180.0*DEGRA;
line4.end_angle = 360.0 * DEGRA;
line4.arc_center[0] =e;
line4.arc_center[1] =h4;
line4.arc_center[2] =b/2;
line4.radius = r;
UF_CALL(UF_CSYS_create_matrix(matrix_values, &matrix_tag));
line4.matrix_tag=matrix_tag;
UF_CALL(UF_CURVE_create_arc(&line4,&line4_tag));
//画直线,起点为(r+e,-b/2,h4),终点为(r+e,-b/2,h4+r+15)
line1.start_point[0] =r+e;
line1.start_point[1] =-b/2;
line1.start_point[2] =h4;
line1.end_point[0] =r+e;
line1.end_point[1] =-b/2;
line1.end_point[2] =h4+r+15;
UF_CALL(UF_CURVE_create_line(&line1, &line1_tag));
//画直线,起点为(r+e,-b/2,h4+r+15),终点为(e-r,-b/2,h4+r+15)
line2.start_point[0] =r+e;
line2.start_point[1] =-b/2;
line2.start_point[2] =h4+r+15;
line2.end_point[0] =e-r;
line2.end_point[1] =-b/2;
line2.end_point[2] =h4+r+15;
UF_CALL(UF_CURVE_create_line(&line2, &line2_tag));
//画直线,起点为(e-r,-b/2,h4+r+15),终点为(e-r,-b/2,h4)
line3.start_point[0] =e-r;
line3.start_point[1] =-b/2;
line3.start_point[2] =h4+r+15;
line3.end_point[0] =e-r;
line3.end_point[1] =-b/2;
line3.end_point[2] =h4;
UF_CALL(UF_CURVE_create_line(&line3, &line3_tag));
generator[0]=line1_tag;
generator[1]=line2_tag;
generator[2]=line3_tag;
generator[3]=line4_tag;
其中e,h4,b,r那些变量都是从对话框控件中所获得的值, |