|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
大家好,我想实现拉伸功能(先选择线框,然后拉伸),但是按类选择对话框打不开。。代码如下:
int Project_Model_Create_Extrustion(ModelMandrelParameter *p_mandrel_para,tag_t *p_ext_tag)
{
uf_list_p_t loop_list,features;
char *taper_angle="0.0",*limit[2],limit1[2][30];
double ref_pt[3];
double direction[3] = {0.0,0.0,1.0};
int i,err;
char cue[] = "选择型材线框";
char title[] = "按类选择对话框";
int response, count;
tag_p_t objects;
char message[200];
sprintf(taper_angle,"%lf",p_mandrel_para->A);
sprintf(limit1[0],"%lf",p_mandrel_para->S);
sprintf(limit1[1],"%lf",p_mandrel_para->E);
limit[0]=limit1[0];limit[1]=limit1[1];
UF_MODL_create_list(&loop_list);
if((UF_CALL(UF_UI_select_with_class_dialog(
cue, title, UF_UI_SEL_SCOPE_WORK_PART,
NULL, NULL, &response, &count, &objects))) == 0)
{
printf("object count = %d\n",count);
if (response == UF_UI_OK && count > 0)
{
for (i=0; i<count; i++)
{
UF_DISP_set_highlight(objects[i], 0);
UF_MODL_put_list_item(loop_list,objects[i]);
}
UF_free(objects);
}
}
err=UF_MODL_create_extruded(loop_list, taper_angle, limit,
ref_pt, direction, UF_NULLSIGN,&features);
if(err!=0)
{
UF_get_fail_message( err,message);
uc1601(message,1);
return err;
}
UF_MODL_ask_list_item(features,0,p_ext_tag);
UF_MODL_delete_list(&features);
return err;
}
|
|