iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 25478|回复: 15
打印 上一主题 下一主题

请深夜摔键盘帮助

[复制链接]
跳转到指定楼层
楼主
发表于 2005-5-25 20:41:53 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

马上注册登录,享用更多网站功能!

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

x
你好
我正在做个课题,要通过交互方式,选择工程图中的线或圆
但我用uf_ui_select_with_dialog怎么试都不行。
你能帮帮我吗?
你个问题已经困我二周了。
多谢了
以下是我的程序
void ufusr(char *param, int *retcode, int param_len)
{
  
  if(!UF_initialize())
  {
    GetPoint();
    UF_terminate();
  }
}
  
void GetPoint()
{
  int res;
  int num_intersects;
  int type;
  int n_visible,display = 1;
  int n_clipped;
  int i,j;
  
  tag_t *visible;
  tag_t *clipped;
  tag_t view_tag;
  tag_t line_tag;
  
  double point[3],dp[3];
  double z_vec[3];
  double viewmatrix[9];
  double firstp[3],secondp[3];
  double my_point[3];
  
  char view_name[100],mes[133];
  int response,count;
  tag_p_t objects;
  res = UF_UI_select_with_class_dialog("no cur","this",UF_UI_SEL_SCOPE_WORK_PART_AND_OCC, NULL,NULL,[$response, &count, &objects)]
    if(res)
    {
      UF_get_fail_message(res,mes);
      uc1601(mes,1);
    }
}
int ufusr_ask_unload(void)
{
    return (UF_UNLOAD_IMMEDIATELY);
}
static int init_proc(
    UF_UI_selection_p_t select,
    void *user_data)
{
  int res;
    UF_UI_mask_t mask_triples[] = {
      {UF_circle_type,UF_all_subtype,UF_OBJ_no_property},
    {UF_line_type,UF_all_subtype,UF_OBJ_no_property},
    {UF_solid_type,UF_solid_edge_subtype,UF_OBJ_solid_body_property},
      {UF_drafting_entity_type,UF_draft_note_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_label_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_id_symbol_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_fpt_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_cntrline_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_linear_cntrln_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_full_cir_cntrln_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_part_cir_cntrln_subtype,UF_OBJ_no_property},//
      {UF_drafting_entity_type,UF_draft_full_blt_circle_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_part_blt_circle_subtype,UF_OBJ_no_property},//
      {UF_drafting_entity_type,UF_draft_offset_cntrpt_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_cyl_cntrln_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_sym_cntrln_subtype,UF_OBJ_no_property},//
      {UF_drafting_entity_type,UF_draft_crosshatch_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_area_fill_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_solid_fill_subtype,UF_OBJ_no_property},//
      {UF_drafting_entity_type,UF_draft_intersection_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_target_point_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_user_defined_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_draft_assorted_parts_subtype,UF_OBJ_no_property},
      {UF_drafting_entity_type,UF_all_subtype,UF_OBJ_no_property},
      {UF_group_type,UF_all_subtype,UF_OBJ_no_property},
      {UF_view_type,UF_all_subtype,UF_OBJ_no_property},
    {UF_user_defined_object_type,UF_all_subtype,UF_OBJ_no_property}};
    res = UF_UI_set_sel_mask(select,UF_UI_SEL_MASK_CLEAR_AND_ENABLE_SPECIFIC,27,mask_triples);
    if(res)
    {
      return (UF_UI_SEL_FAILURE);
    }
    return (UF_UI_SEL_SUCCESS);
}
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
发表于 2005-5-25 20:56:33 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
板凳
发表于 2005-5-25 21:05:20 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
地板
 楼主| 发表于 2005-5-25 22:06:29 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
5
 楼主| 发表于 2005-5-25 22:07:50 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
6
发表于 2005-5-25 22:55:12 | 只看该作者

马上注册登录,享用更多网站功能!

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

x

3135530-1-embed.jpg (35.85 KB, 下载次数: 12)

阅读权限: 1

3135530-1-embed.jpg
7
 楼主| 发表于 2005-5-26 21:16:03 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
8
发表于 2005-5-27 08:31:28 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
9
 楼主| 发表于 2005-5-27 15:10:47 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
10
发表于 2005-5-27 16:10:33 | 只看该作者

马上注册登录,享用更多网站功能!

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

x
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手板模型制作,在线3D打印服务

QQ|小黑屋|手机版|开思工具箱 CAD工具箱_CAM工具箱  

GMT+8, 2024-6-27 03:10 , Processed in 0.018055 second(s), 8 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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