NX二次开发-UFUN特征找xxx UF_MODL_ask_feat_xxx等函数(待补充)
2024-09-06 06:57:57
NX9+VS2012 #include <uf.h>
#include <uf_modl.h>
#include <uf_obj.h>
#include <uf_ui.h> UF_initialize(); //创建块
UF_FEATURE_SIGN Sign = UF_NULLSIGN;
double CornerPt[] = {0.0, 0.0, 0.0};
char *EdgeLen[] = {"", "", ""};
tag_t BlkTag = NULL_TAG;
UF_MODL_create_block1(Sign, CornerPt, EdgeLen, &BlkTag); //============================================== //特征找体
tag_t BodyTag = NULL_TAG;
UF_MODL_ask_feat_body(BlkTag, &BodyTag); //把体设置成红色
UF_OBJ_set_color(BodyTag, ); //================================================
/*
//特征找边
uf_list_p_t EdgeList;
UF_MODL_ask_feat_edges(BlkTag, &EdgeList); //获取链表数量
int Count;
UF_MODL_ask_list_count(EdgeList, &Count); UF_UI_open_listing_window();
char msg[256];
sprintf_s(msg, "当前体有%d条边\n", Count);
UF_UI_write_listing_window(msg); for (int i = 0; i < Count; i++)
{
tag_t EdgeTAG = NULL_TAG;
UF_MODL_ask_list_item(EdgeList, i, &EdgeTAG);//获得每条边的tag
sprintf_s(msg, "tag=%d\n", EdgeTAG);
UF_UI_write_listing_window(msg);
}
//删除链表
UF_MODL_delete_list(&EdgeList);
*/
//===========================================
/*
//特征找方向
double DirX[3];
double DirY[3];
UF_MODL_ask_feat_direction(BlkTag, DirX, DirY); UF_UI_open_listing_window();
char msg[256];
sprintf_s(msg, "%f, %f, %f\n%f, %f, %f", DirX[0], DirX[1], DirX[2], DirY[0], DirY[1], DirY[2]);
UF_UI_write_listing_window(msg);
*/
//==============================================
/*
//特征找面
uf_list_p_t FaceList;
UF_MODL_ask_feat_faces(BlkTag, &FaceList); //获取链表数量
int Count;
UF_MODL_ask_list_count(FaceList, &Count); UF_UI_open_listing_window();
char msg[256];
sprintf_s(msg, "当前体有%d个面\n", Count);
UF_UI_write_listing_window(msg); for (int i = 0; i < Count; i++)
{
tag_t FaceTAG = NULL_TAG;
UF_MODL_ask_list_item(FaceList, i, &FaceTAG);//获得每个面的tag
sprintf_s(msg, "tag=%d\n", FaceTAG);
UF_UI_write_listing_window(msg);
}
//删除链表
UF_MODL_delete_list(&FaceList);
*/
//================================================
/*
//获取特征的时间戳记名字
char *FeatureName;
UF_MODL_ask_feat_name(BlkTag, &FeatureName); UF_UI_open_listing_window();
UF_UI_write_listing_window(FeatureName); UF_free(FeatureName);
*/
UF_terminate();
最新文章
- 管理者与下属谈话的技巧及注意点[持续更新ing]
- CFURLCreateStringByAddingPercentEscapes与CFURLCreateStringByReplacingPercentEscapesUsingEncoding
- iOS多线程实现4-NSOperation
- servlet配置restful
- Skeljs – 用于构建响应式网站的前端开发框架
- Sql Server优化之索引提示----我们为什么需要查询提示,Sql Server默认情况下优化策略选择的不足
- 自定义View完全解析
- bug:[NSKeyedUnarchiver initForReadingWithData:]: data is NULL
- UVa 1347 Tour
- 【蛙蛙推荐】Lucene.net试用
- SQLServer2008 行转列2
- Java 数组倒序
- break continue return 区别
- 【转载】跟我一起学习VIM - vim插件
- jQuery的deferred对象解析
- For each...in / For...in / For...of 的解释与例子
- mockjs,json-server一起搭建前端通用的数据模拟框架
- ImportError: No module named simplejson.scanner
- CSP中的选择
- [Tomcat]The JRE_HOME environment variable is not defined correctly