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

iCAx开思网

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

UF_CSYS_ask_matrix_of_object?请键盘兄看看

[复制链接]
跳转到指定楼层
1
发表于 2005-8-18 21:22:05 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
static void do_ugopen_api(void)
{
    char cue[] = "Select Objects";
    char title[] = "User Title";
    int response, count, i;
    tag_p_t objects;
  tag_t matrix;
  double values[9];
  
    /* Use multiple class selection with scope set to any object
       in the work part and without using an initialization procedure.
    */
    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++)
             {
                 printf("object tag = %d\n", objects);
                 UF_DISP_set_highlight(objects, 0);
             }
         }
    }
  
    UF_CSYS_ask_matrix_of_object(objects[0],[$matrix)]
    UF_CSYS_ask_matrix_values(matrix,values);
        UF_free(objects);
      
  UF_UI_open_listing_window();
  for(i=0;i<=9;i++)
  {
    sprintf(buf,"%f\n",values);
    UF_UI_write_listing_window(buf);
  }
  
出来的数值:
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559631349317831000000000000000000000000000000000000000000000.000000
-92559592117431994000000000000000000000000000000000000000000000.000000
不知道哪里错了
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
2
发表于 2005-8-18 21:54:42 | 只看该作者
检查 一下UF_CSYS_ask_matrix_of_object(objects[0],[$matrix)] 得到的matrix是不是NULL_TAG
3
发表于 2005-8-18 22:26:51 | 只看该作者
因为你这个对象没有matrix
4
发表于 2005-8-19 11:26:24 | 只看该作者
点了一个block实体也不行吗
5
发表于 2005-8-20 09:28:30 | 只看该作者
好好的研究一下文档啊。文档里说的很清楚,有些对象是永远都没有Matrix的,有些对象你并没有将矩阵与它相连接,这些对象,你调用这个函数只能得到NULL_TAG;
  
Gets the matrix identifier attached to an object. An object does not
necessarily have an matrix attached to it, and some objects can never have
a matrix attached. This routine will return a NULL_TAG for the matrix
identifier if the object does not have a matrix attached to it, even if the
object can never have a matrix attached to it.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

GMT+8, 2024-12-26 14:39 , Processed in 0.036342 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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