找回密码 注册 QQ登录
开思网工业级高精度在线3D打印服务

iCAx开思网

CAD/CAM/CAE/设计/模具 高清视频【积分说明】如何快速获得积分?快速3D打印 手板模型CNC加工服务在线3D打印服务,上传模型,自动报价
查看: 16485|回复: 9
打印 上一主题 下一主题

【求助】ugopen如何选择一条线

[复制链接]
跳转到指定楼层
1
发表于 2004-6-25 14:29:10 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册,结交更多同行朋友,交流,分享,学习。

您需要 登录 才可以下载或查看,没有帐号?注册

x
使用如下方式,可以选择面  
  UF_UI_selection_options_t opts;
  UF_UI_mask_t mask;
  int response;
  tag_t object, view;
  opts.other_options=0;
  opts.reserved=NULL;
  opts.num_mask_triples=1;
  opts.mask_triples=[$mask]
  
  opts.mask_triples->object_type=UF_face_type;
  
  opts.mask_triples->object_subtype=UF_all_subtype;
opts.mask_triples->solid_type=UF_UI_SEL_FEATURE_ANY_FACE;
  
    opts.scope=UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY;
int irc=UF_UI_select_single(message, [$opts, &response, &object, cursor, &view)]
  
使用同样的方法,将opts.mask_triples->object_type=UF_face_type;
改为opts.mask_triples->object_type=UF_line_type;
  
来选择线,就不行.请问,改如何才能选到线?
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
发表于 2004-7-8 09:01:25 | 只看该作者
UF_Line_type
UF_SPline_type
...
3
发表于 2004-7-12 13:58:57 | 只看该作者
好像不行了阿。
4
发表于 2004-7-13 19:11:16 | 只看该作者
UG自带的例子,好好看看
  
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_solid_type;
opts.mask_triples->object_subtype = 0;
opts.mask_triples->solid_type = UF_UI_SEL_FEATURE_BODY;
/* 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();
}
5
发表于 2004-7-13 22:14:21 | 只看该作者
UF_line_type和UF_spline_type?中间两个字母应该小写吧
6
发表于 2004-7-22 14:48:40 | 只看该作者
这些都没有问题啊,可是为什么我设置了还是不可以啊?
  
  UF_UI_selection_options_t opts;  
  UF_UI_mask_t mask;  
  int response;  
  tag_t object, view;  
  opts.other_options=0;  
  opts.reserved=NULL;  
  opts.num_mask_triples=1;  
  opts.mask_triples=[$mask]  
  
  opts.mask_triples->object_type=UF_edge_type;  
  
  opts.mask_triples->object_subtype=UF_all_subtype;  
opts.mask_triples->solid_type=UF_UI_SEL_FEATURE_ANY_EDGE;  
  
    opts.scope=UF_UI_SEL_SCOPE_ANY_IN_ASSEMBLY;  
int irc=UF_UI_select_single(message, [$opts, &response, &object, cursor, &view)]
7
发表于 2004-7-22 15:33:07 | 只看该作者
直接用UF_edge_type, 0, 0吧。
8
发表于 2004-7-23 22:01:40 | 只看该作者
opts.mask_triples->solid_type=UF_UI_SEL_FEATURE_ANY_EDGE
!!!错误,solid_type只用在solid  type上,其它为0。
9
发表于 2004-7-24 17:45:48 | 只看该作者
能不能将你的那个选择面的程序给我看看,详细的,完整的?谢谢!
10
发表于 2004-7-25 09:58:07 | 只看该作者
十分感谢
您需要登录后才可以回帖 登录 | 注册

本版积分规则

3D打印手板模型快速制作服务,在线报价下单!

QQ 咨询|手机版|联系我们|iCAx开思网  

GMT+8, 2025-2-7 07:30 , Processed in 0.027321 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2025 www.iCAx.org

快速回复 返回顶部 返回列表