找回密码 注册 QQ登录
一站式解决方案

iCAx开思网

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

[求助] 求助。。关于曲面上的曲线偏置

[复制链接]
跳转到指定楼层
1
发表于 2009-3-24 16:10:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式

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

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

x
利用的是函数UF_CURVE_create_ocf_feature();
函数里面的参数有一个是表示偏置曲线的tag_t类型的参数,还有一个是表示曲面的tag_t类型的参数,但是我将曲线曲面的ID带入,怎么都得不到正确的结果。后来在文档中发现表示偏置曲线tag_t类型的参数必须是一个string,而曲面必须是一个face collector。那么如何将曲线的ID转化为string,还有如何将曲面的ID转化为face collector?
谢谢指导!!!!
代码如下(insect_curve 表示需要偏置曲线的ID,FP_surface表示曲面):
UF_CURVE_ocf_data_p_t  offset_data ;
offset_data =(UF_CURVE_ocf_data_s*)malloc(sizeof(UF_CURVE_ocf_data_s));
memset(offset_data,0,sizeof(UF_CURVE_ocf_data_s));
//*******************************************************//
  UF_CURVE_ocf_string_data_p_t real_string_data;
  real_string_data =(UF_CURVE_ocf_string_data_s*)malloc(sizeof(UF_CURVE_ocf_string_data_s));
  memset(real_string_data,0,sizeof(UF_CURVE_ocf_string_data_s));
  real_string_data->string_tag=insect_curve; // (有问题)   
                                           /* Tag of the string to offset */ //??????
  int real_offset_direction=1;
  real_string_data->offset_direction=real_offset_direction;
                                             /* Flag to indicate the offset direction.
                                           The direction can be either 1 or -1 */ //ok
  int real_num_offset=1;
  real_string_data->num_offsets=real_num_offset;
                                           /* Number of offsets to perform for the given string */ //ok
  UF_CURVE_ocf_values_p_t real_offset_distances;
  real_offset_distances =(UF_CURVE_ocf_values_s *)malloc(sizeof(UF_CURVE_ocf_values_s));
  memset(real_offset_distances,0,sizeof(UF_CURVE_ocf_values_s));
  strcpy(real_offset_distances->string,"40.0");
     (real_string_data->offset_distances)=real_offset_distances;
                                           /* <len:num_offsets>An array that holds the offset values for
                                               each of the offset to perform for the given string */ //ok
  offset_data->string_data=real_string_data;
                              /* <len:num_string_data>  An array of strings to  be offset and the data
                              associated with  them, as described in above string data structure*/
  int real_num_string_data=1;
     offset_data->num_string_data=real_num_string_data; /* Size of the string  array */

  UF_CURVE_ocf_face_data_p_t real_face_data;
  real_face_data =(UF_CURVE_ocf_face_data_s*)malloc(sizeof(UF_CURVE_ocf_face_data_s));
  memset(real_face_data,0,sizeof(UF_CURVE_ocf_face_data_s));
  real_face_data->face_tag=FP_surface;
  offset_data->face_data=real_face_data;       /* Face data */

  offset_data->cross_boundary_mode=UF_CURVE_OCF_CROSS_BOUNDARIES_NONE; /* boundary mode method*/ //OK

     offset_data->offset_method=UF_CURVE_OCF_TANGENTIAL;       /* 相切投影 */ //OK

     offset_data->trim_method=UF_CURVE_OCF_NO_EXTENSION;         /* Trimming options for offset */ //OK

     offset_data->span_method=UF_CURVE_OCF_SPAN_QUILT;         /* spanning options  for offset */ //OK

  double real_dist_tol=0.05;
     offset_data->dist_tol=real_dist_tol;            /* distance tolerance */ //OK

  double real_ang_tol=0;
     offset_data->ang_tol=real_ang_tol;             /* angular  tolerance  */  //?

  double real_string_tol=0;
     offset_data->string_tol=real_string_tol;          /* string tolerance */  //?

     tag_t *offset_curve=NULL;//tag_t *  feature Output : offset curve on face feature  //?
  UF_CURVE_create_ocf_feature (offset_data, offset_curve );
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 分享淘帖 赞一下!赞一下!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

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

GMT+8, 2024-9-21 13:26 , Processed in 0.024054 second(s), 11 queries , Gzip On, Redis On.

Powered by Discuz! X3.3

© 2002-2024 www.iCAx.org

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