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 Origin[] = {0.0, 0.0, 0.0};
char *Height = "";
char *Diam = "";
double Direction[] = {0.0, 0.0, 1.0};
tag_t CylTag = NULL_TAG;
UF_MODL_create_cyl1(Sign, Origin, Height, Diam, Direction, &CylTag); //特征找体
tag_t BodyTag = NULL_TAG;
UF_MODL_ask_feat_body(CylTag, &BodyTag); //体找面
uf_list_p_t FaceList;
UF_MODL_ask_body_faces(BodyTag, &FaceList); //获取链表数量
int Count;
UF_MODL_ask_list_count(FaceList, &Count); UF_UI_open_listing_window();
//获取链表里的tag
for (int i = ; i < Count; i++)
{
tag_t FaceTag = NULL_TAG;
UF_MODL_ask_list_item(FaceList, i, &FaceTag); //获取面的法向
int Type;
double Point[];
double Dir[];
double Box[];
double Radius[];
double RadData[];
int NormDir;
UF_MODL_ask_face_data(FaceTag, &Type, Point, Dir, Box, Radius, RadData, &NormDir); //找圆柱侧面
if (Type == )//对比面的类型
{
//对圆柱侧面设置颜色
UF_OBJ_set_color(FaceTag, ); //打印面的法向方向
char msg[];
sprintf_s(msg, "面的法向方向为:\nX:%.0f\nY:%.0f\nZ:%.0f\n", Dir[], Dir[], Dir[]);
UF_UI_write_listing_window(msg);
}
} //释放内存
UF_MODL_delete_list(&FaceList); UF_terminate();

NX二次开发-UFUN创建圆柱UF_MODL_create_cyl1的更多相关文章

  1. NX二次开发-UFUN获取圆柱的参数UF_MODL_ask_cylinder_parms

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> #include <uf_ui.h> UF_initialize( ...

  2. NX二次开发-UFUN创建工程图注释UF_DRF_create_note

    NX9+VS2012 #include <uf.h> #include <uf_drf.h> #include <NXOpen/Annotations_Note.hxx& ...

  3. NX二次开发-UFUN创建球UF_MODL_create_sphere1

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建球 UF_FEATURE_SIGN ...

  4. NX二次开发-UFUN创建圆锥UF_MODL_create_cone1

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建圆锥 UF_FEATURE_SIGN ...

  5. NX二次开发-UFUN创建镜像体UF_MODL_create_mirror_body

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN ...

  6. NX二次开发-UFUN创建固定的基准平面UF_MODL_create_fixed_dplane

    NX11+VS2013 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN ...

  7. NX二次开发-UFUN创建倒圆UF_MODL_create_blend

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN S ...

  8. NX二次开发-UFUN创建倒角UF_MODL_create_chamfer

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建块 UF_FEATURE_SIGN S ...

  9. NX二次开发-UFUN创建基准平面UF_MODL_create_plane

    NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //创建基准平面 ] = {0.0, 0.0, ...

随机推荐

  1. 使用Git实现Laravel项目的自动化部署

    简介 不知道大家一开始是怎么使用 git 进行开发的,反正我个人是先将代码提交到 github 仓库,然后用 SSH 登录到服务器,然后进行克隆或者版本更新.听起来就很麻烦,当然实际操作中也很麻烦,那 ...

  2. vue-cli下的vuex的极简Demo(实现加1减1操作)

    1.vue-cli搭建好项目之后,使用npm安装vuex npm install vuex --save 2.在项目目录中构建vuex目录(这里我新建了store的文件夹,里面新建了store.js文 ...

  3. Python读取文件时出现UnicodeDecodeError: 'gbk' codec can't decode byte 0x80 in position xx: 解决方案

    Python在读取文件时 with open('article.txt') as f: # 打开新的文本 text_new = f.read() # 读取文本数据 出现错误: UnicodeDecod ...

  4. docker安装(4)

    centos6 docker安装 wget -P /etc/yum.repos.d/ http://mirrors.aliyun.com/repo/epel-6.repo yum install -y ...

  5. NAT和路由器 基本概念

    NAT(Network Address Translation, 网络地址转换)是1994年提出的.当在专用网内部的一些主机本来已经分配到了本地IP地址(即 仅在本专用网内使用的专用地址),但现在又想 ...

  6. java8的正确使用姿势

    ackage com.expgiga.Java8; import java.util.ArrayList; import java.util.Arrays; import java.util.List ...

  7. smf和mmf分别是什么?

    单模光纤/缩写SMF(single mode fiber) 多模光纤/缩写MMF(multi mode (optical) fibre)

  8. Python脚本轻松实现批量图片重命名

    ************************************************************************** 摘要:网上爬取的图片名字很混乱,格式也比较多,需要 ...

  9. MacOS安装npm全局包的权限问题

    MacOS,安装npm全局包提示没有写入权限: npm WARN checkPermissions Missing write access to /usr/local/lib/node_module ...

  10. 【转】深入理解Linux修改hostname

    当我觉得对Linux系统下修改hostname已经非常熟悉的时候,今天碰到了几个个问题,这几个问题给我好好上了一课,很多知识点,当你觉得你已经掌握的时候,其实你了解的还只是皮毛.技术活,切勿浅尝则止! ...