|
马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
我按照帮助里面的例子修改的,却始终选择不到实体的EDGE!
帮忙看看哪里错了
#include <stdio.h>
#include <uf.h>
#include <uf_ui.h>
#include <uf_object_types.h>
#include <uf_disp.h>
void ufusr(char *param, int *retcod, int param_len)
{
int irc = 0;
char *message = "Select Object";
UF_UI_selection_options_t opts;
UF_UI_mask_t mask;
int response;
tag_t object, view;
double cursor[3];
char error[133];
int unhighlight=0;
UF_initialize();
opts.other_options = 0;
opts.reserved = NULL;
opts.num_mask_triples = 1;
opts.mask_triples = &mask;
/* set up selectable type, subtype, solid type */
opts.mask_triples->object_type = UF_edge_type;
opts.mask_triples->object_subtype = 0;
/* set selection scope to be work part */
opts.scope = UF_UI_SEL_SCOPE_WORK_PART;
irc = UF_UI_select_single(message,&opts,&response,
&object,cursor,&view);
/* if no error, print information about selected object */
if (!irc)
{
printf("response= %d, object tag= %d, view tag= %d, cursor
position= %f %f %f\n", response, object, view, cursor[0],
cursor[1],cursor[2]);
/* unhighlight selected object */
FTN(uf1640)(&object,&unhighlight);
}
else /* else get error message */
{
UF_get_fail_message(irc,error);
printf("ERROR: %s\n",error);
}
UF_terminate();
} |
|