NX二次开发-UFUN获取边的端点UF_MODL_ask_edge_verts
NX9+VS2012
#include <uf.h>
#include <uf_modl.h>
#include <uf_ui.h>
#include <uf_disp.h>
#include <uf_obj.h>
#include <NXOpen/Annotations.hxx>
UF_initialize();
//创建块
UF_FEATURE_SIGN Sign = UF_NULLSIGN;
double Corner_Pt[] = {25.0, 37.0, 48.0};
char *Edge_Len[] = {"", "", ""};
tag_t BlkTag = NULL_TAG;
UF_MODL_create_block1(Sign, Corner_Pt, Edge_Len, &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);
//转换
char msg1[];
sprintf_s(msg1, "当前体有%d条边\n每条边的两个端点如下:\n", Count);
//打印
UF_UI_open_listing_window();
UF_UI_write_listing_window(msg1);
for (int i = ; i < Count; i++)
{
//获取链表里的tag
tag_t Edge_Tag = NULL_TAG;
UF_MODL_ask_list_item(EdgeList, i, &Edge_Tag);
//高亮所有边
UF_DISP_set_highlight(Edge_Tag, );
//获取边的端点
double Point1[];
double Point2[];
int PointNum;
UF_MODL_ask_edge_verts(Edge_Tag, Point1, Point2, &PointNum);
//转换
char msg2[];
sprintf_s(msg2, "X坐标:%.0f, Y坐标:%.0f, Z坐标:%.0f\nX坐标:%.0f, Y坐标:%.0f, Z坐标:%.0f\n", Point1[], Point1[], Point1[], Point2[], Point2[], Point2[]);
//打印
UF_UI_write_listing_window(msg2);
}
UF_terminate();

NX二次开发-UFUN获取边的端点UF_MODL_ask_edge_verts的更多相关文章
- NX二次开发-UFUN获取NX系统默认导出CGM的选项设置UF_CGM_ask_default_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取当前导出CGM选项设置UF_CGM_ask_session_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取环境变量路径,将环境变量转换为字符串,字符串拼接UF_translate_variable
NX9+VS2012 #include <uf.h> UF_initialize(); //UFUN获取环境变量路径 //将环境变量转换为字符串 char* GetName = NULL; ...
- NX二次开发-UFUN获取系统相关信息UF_ask_system_info
NX9+VS2012 #include <uf.h> UF_initialize(); UF_system_info_t Info; UF_ask_system_info(&Inf ...
- NX二次开发-UFUN获取当前所在的模块UF_ask_application_module
NX9+VS2012 #include <uf.h> #include <NXOpen/UI.hxx> #include <NXOpen/MenuBar_MenuBarM ...
- NX二次开发-UFUN获取显示在NX交互界面的对象UF_OBJ_is_displayable
NX9+VS2012 #include <uf.h> #include <uf_disp.h> #include <uf_obj.h> #include <u ...
- NX二次开发-UFUN获取直线的两个端点UF_CURVE_ask_line_data
NX9+VS2012 #include <uf.h> #include <uf_obj.h> #include <uf_ui.h> UF_initialize(); ...
- NX二次开发-UFUN获取工程图的数量和tag UF_DRAW_ask_drawings
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> #include < ...
- NX二次开发-UFUN获取工程图详细信息UF_DRAW_ask_drawing_info
NX9+VS2012 #include <uf.h> #include <uf_draw.h> #include <uf_part.h> UF_initialize ...
随机推荐
- vue X-Template
<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title> ...
- weex初始化启动webpack.common.conf.js中的...报语法错误
使用Babel转码 // 最新转码规则 $ npm install --save-dev-g babel-preset-env // react转码规则 $ npm install --save-de ...
- ansible-继续普通用户权限运行
ansible 远程以普通用户执行命令 1. ansible 10.0.0.1 -m raw -a "date" -u www 2.在ansible的主机配置文件中指定ssh_ ...
- Tomcat免安装版踩坑
下载解压 从官网下载Tomcat的压缩包解压到硬盘上(这里用的是toncat7),解压之后目录如下(Windows) bin 存放tomcat的一些命令脚本 conf 存放配置文件 lib 存放运行时 ...
- MySQL - primary key PK unique key,key PK index
primary key PK unique key 总结 primary key = unique + not null 主键不能为空每个字段值都不重复,unique可以为空,非空字段不重复 uniq ...
- php随机生成数字加字母的字符串
function getRandomString($len, $chars=null) { if (is_null($chars)) { $chars = "ABCDEFGHIJKLMNOP ...
- 自定义checkbox,radio样式
input[type=radio] { margin-right: 5px; cursor: pointer; font-size: 14px; width: 15px; height: 15px; ...
- php-数据库-分页类-上传类
config.ini.php <?php header("content-type:text/html;charset=utf-8"); //项目的根目录 define(&q ...
- 10、TestNG 的 FixTrue用法一
Fixture 是指一个测试运行所需的固定环境,通俗来说 ,为测试用例所准备的环境. 以下是TestNG中可用的注释及其属性的简要概述. 我们先演示@BeforeClass.@AfterClass.@ ...
- jsp2自定义标签开篇
在JSP2中开发标签库需要以下几个步骤: 1.开发自定义标签处理类: 2.建立一个*.tld文件,每个*.tld文件对应一个标签库,每个标签库可包含多个标签: 3.在JSP文件中使用自定义标签. 第一 ...