1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 6 7 UF_initialize(); 8 9 //创建块 10 UF_FEATURE_SIGN Sign = UF_NULLSIGN; 11 double CornerPt[3] = {0.0, 0.0, 0.0}; 12 char* EdgeLen[3] = {"100", "100", "100"}; 13 tag_t BlkTag = NULL_TAG; 14 UF_MODL_create_block1(Sign, CornerPt, EdgeLen, &BlkTag); 15 16 //特征找边 17 uf_list_p_t EdgeList; 18 UF_MODL_ask_feat_edges(BlkTag, &EdgeList); 19 20 //获取链表数量 21 int Count; 22 UF_MODL_ask_list_count(EdgeList, &Count); 23 24 25 //创建倒角 26 //(倒角类型:1==单个偏置,2==双偏置,3==偏置角度,4=自由曲面单偏置,5=自由曲面双偏置) 27 //第一偏置距离 28 //第二偏置距离 29 //倒角角度 30 tag_t ChamferTag; 31 UF_MODL_create_chamfer(1, "10", "0", "45", EdgeList, &ChamferTag); 32 33 //删除链表 34 UF_MODL_delete_list(&EdgeList); 35 36 UF_terminate();