创建块并且指定一条边倒圆角

 /* TODO: Add your application code here */


char length[256]="100";
char width[256]="50";
char higth[256]="20";

double tolerance_mold;
UF_MODL_ask_distance_tolerance(&tolerance_mold);//获取系统设置中的公差


char char_radius[256]="5";

double double_length=atof(length);
double double_width=atof(width); 
double double_higth=atof(higth); 

double corner_pt[3]={0,0,0};      //定位原点
char * edge_len[3]={length,width,higth}; //大小(x,y,z)
tag_t blk_tag;
UF_MODL_create_block1(UF_NULLSIGN,corner_pt,edge_len,&blk_tag);  //创建方体


tag_t face1,face2;

tag_t obj=NULL_TAG;
uf_list_p_t face_list;
UF_MODL_create_list(&face_list);//创建链表
UF_MODL_ask_feat_faces(blk_tag,&face_list);//将所有面的tag值放入链表中。
int count=0;
UF_MODL_ask_list_count(face_list,&count);//查询链表中的面的数量
for(int i=0;i<count;i++)
{
UF_MODL_ask_list_item(face_list,i,&obj);//查询列表中的对象 上面的facelist
int type;
double point [3] ;
double dir [3] ;
double box [6] ;
double radius;
double  rad_data;
int  norm_dir ;
UF_MODL_ask_face_data(obj,&type,point,dir,box,&radius,&rad_data,&norm_dir);//查询与面有关的数据,输入obj,输出type
if(type==22)//“22”代表有界平面
    {
                  if(fabs(point[2]-double_higth)<tolerance_mold)
                  {
                      face1=obj;
                  }
                        if(fabs(point[0]-double_length)<tolerance_mold)
                  {
                      face2=obj;
                  }
         int typel;
         UF_MODL_ask_face_type(obj,&typel);

         if(typel==UF_MODL_PLANAR_FACE )
         {
         uf_list_p_t blend_face;
         UF_MODL_create_list(&blend_face);
         UF_MODL_ask_shared_edges(face1,face2,&blend_face);//查新面的交线
            const char * radius=char_radius;
             int smooth_overflow=0;
             int cliff_overflow=0;
             int notch_overflow=0;
             double vrb_tool=3;
             tag_t feature_obj_id;
             UF_MODL_create_blend(radius, blend_face, smooth_overflow, cliff_overflow, notch_overflow, vrb_tool, &feature_obj_id );
         }
    }
}

    /* Terminate the API environment */

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

小中百买鸡蛋

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值