iCAx开思工具箱

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 25075|回复: 2
打印 上一主题 下一主题

大家帮看我程序哪里错了

[复制链接]
跳转到指定楼层
楼主
发表于 2008-3-30 10:53:26 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
在打开的零件上生成截面线,现在平面生成了 但截面线不出来 斑竹能帮我看看哪个地方不对吗?
void ufusr(char *param, int *retcode, int param_len)
{
  if (!UF_CALL(UF_initialize()))
  {
    char            part_fspec[MAX_FSPEC_SIZE+1];
  int             curr_part, num_parts;
  int             type;
  int             count_1;
  tag_t           part;
  tag_t           feature;

  /* Get the total number of loaded parts. */
  num_parts = UF_PART_ask_num_parts();
  for ( curr_part=0 ; curr_part < num_parts ; curr_part++ )
  {
    /* Get the part tag for the current part number of the
       loaded part and get its part name.
    */
    part = UF_PART_ask_nth_part( curr_part );
    UF_PART_ask_part_name( part, part_fspec );
    printf( title0, part_fspec );
    count_1 = 0;
    type = UF_feature_type;
    feature = NULL_TAG;
    /* Start the cycling process by passing in a NULL_TAG. */
    UF_OBJ_cycle_objs_in_part( part, type, &feature );
    /* Keep cycling until there are no more features to cycle. */
    while ( feature != NULL_TAG )
    {
      count_1++;
      UF_OBJ_cycle_objs_in_part( part, type, &feature );

FILE *fp3;


   if((fp3=fopen("e:\\my_source\\line4.txt","w"))==NULL)
   {
             printf("could not open data file.");
             exit(0);
   }
fprintf(fp3,"UF_OBJ_cycle_objs_in_part shows features is %d \n",&feature);
    }

FILE *fp2;


   if((fp2=fopen("e:\\my_source\\line3.txt","w"))==NULL)
   {
             printf("could not open data file.");
             exit(0);
   }

   fprintf(fp2,"UF_OBJ_cycle_objs_in_part shows %d features\n",count_1);

  }

  double  origin_point[3];
  double  pl1_normal[3];
  
  origin_point[0] = 0.0;
  origin_point[1] = 40.0;
  origin_point[2] = 30.0;
  
  pl1_normal[0] = 0.0;
  pl1_normal[1] = 0.0;
  pl1_normal[2] = 1.0;

tag_t   plane1_tag;
  tag_t  objects[1], planes[1];
  
UF_CALL(UF_MODL_create_plane(origin_point, pl1_normal, &plane1_tag));


    double                           point_data[3];
    UF_CURVE_line_t                  line_data;
    UF_CURVE_section_general_data_t  general_data;
    UF_CURVE_section_planes_data_t   planes_data;
    UF_CURVE_section_parallel_data_t parallel_data;
    UF_CURVE_section_radial_data_t   radial_data;
    UF_CURVE_section_perpcrv_data_t  perpcrv_data;


  tag_t       section_curves_feature;       
   objects[0] = feature;
    planes[0] = plane1_tag;
    general_data.associate     = 1;
    general_data.objects       = objects;
    general_data.num_objects   = 1;
    general_data.grouping      = 0;
    general_data.join_type     = 0;
    general_data.tolerance     = 0.0254;

    planes_data.planes         = planes;
    planes_data.num_planes     = 1;

   
UF_CURVE_section_from_planes (&general_data, &planes_data,
                   &section_curves_feature);

    UF_CALL(UF_terminate());
  }
}
int ufusr_ask_unload(void)
{
  return (UF_UNLOAD_IMMEDIATELY);
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 支持支持
沙发
 楼主| 发表于 2008-3-31 10:51:46 | 只看该作者

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

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

x
板凳
 楼主| 发表于 2008-4-1 15:17:41 | 只看该作者

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

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

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

本版积分规则

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

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

GMT+8, 2024-5-20 20:08 , Processed in 0.018423 second(s), 18 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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