马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我看了,求曲线厂度的UF_CURVE_ask_arc_length这个函数,但是我写了后却没有用啊,求指教,我是新手,也不知道程序对还是不对,
UpdateData(true);
tag_t part_tag;
UF_PART_new("1",1,&part_tag);
tag_t line_tag;
UF_CURVE_line_t line_coords;
line_coords.start_point[0]=x0;
line_coords.start_point[1]=y0;
line_coords.start_point[2]=z0;
line_coords.end_point[0]=x1;
line_coords.end_point[1]=y1;
line_coords.end_point[2]=z1;
UF_CURVE_create_line(&line_coords,&line_tag);//生成直线
char buffer[UF_UI_MAX_STRING_LEN];
double parm;
parm=0;
double point[3];
point[0]=x0;
point[1]=y0;
point[2]=z0;
double tangent[3], p_norm[3], b_norm[3], torsion, rad_of_cur;
UF_MODL_ask_curve_props(line_tag,parm,point,tangent,p_norm,b_norm,&torsion,&rad_of_cur);
double point1[3];
point1[0]=x1;
point1[1]=y1;
point1[2]=z1;
UF_MODL_ask_curve_props(line_tag,parm,point1,tangent,p_norm,b_norm,&torsion,&rad_of_cur);
tag_t curve_tag;
curve_tag=line_tag;
double start_param;
start_param=0.0;
double end_param;
end_param=1.0;
UF_MODL_units_t unit_flag;
unit_flag=UF_MODL_UNITS_PART;
double *arc_length;
UF_CURVE_ask_arc_length(curve_tag,start_param,end_param,unit_flag,arc_length);//计算曲线长度
char meassage[133];
sprintf(meassage, "%f\n",arc_length);
UF_UI_write_listing_window(meassage);
ShowWindow(SW_MINIMIZE);
该贴已经同步到 水果df的微博 |