NX二次开发-UFUN拉伸函数UF_MODL_create_extruded2
NX9+VS2012
//NX二次开发中常用拉伸函数为UF_MODL_create_extruded2,但是此函数不能拉伸片体,
//想要拉伸片体用函数UF_MODL_create_extruded。 #include <uf.h>
#include <uf_curve.h>
#include <uf_modl.h>
#include <uf_obj.h> UF_initialize(); //创建直线1
UF_CURVE_line_t LineCoords1;
LineCoords1.start_point[] = 0.0;
LineCoords1.start_point[] = 0.0;
LineCoords1.start_point[] = 0.0;
LineCoords1.end_point[] = 0.0;
LineCoords1.end_point[] = 100.0;
LineCoords1.end_point[] = 0.0;
tag_t LineTag[];
UF_CURVE_create_line(&LineCoords1, &LineTag[]); //创建直线2
UF_CURVE_line_t LineCoords2;
LineCoords2.start_point[] = 0.0;
LineCoords2.start_point[] = 100.0;
LineCoords2.start_point[] = 0.0;
LineCoords2.end_point[] = 100.0;
LineCoords2.end_point[] = 100.0;
LineCoords2.end_point[] = 0.0;
UF_CURVE_create_line(&LineCoords2, &LineTag[]); //创建直线3
UF_CURVE_line_t LineCoords3;
LineCoords3.start_point[] = 100.0;
LineCoords3.start_point[] = 100.0;
LineCoords3.start_point[] = 0.0;
LineCoords3.end_point[] = 100.0;
LineCoords3.end_point[] = 0.0;
LineCoords3.end_point[] = 0.0;
UF_CURVE_create_line(&LineCoords3, &LineTag[]); //创建直线4
UF_CURVE_line_t LineCoords4;
LineCoords4.start_point[] = 100.0;
LineCoords4.start_point[] = 0.0;
LineCoords4.start_point[] = 0.0;
LineCoords4.end_point[] = 0.0;
LineCoords4.end_point[] = 0.0;
LineCoords4.end_point[] = 0.0;
UF_CURVE_create_line(&LineCoords4, &LineTag[]); //创建链表
uf_list_p_t LineList;
UF_MODL_create_list(&LineList); //插入对象到链表
for (int i = ; i < ; i++)
{
UF_MODL_put_list_item(LineList, LineTag[i]);
} //函数1
//创建拉伸(UF_MODL_create_extruded2)
//备注:此函数不能做拉伸片体,只能拉伸封闭的线。拉伸片体用UF_MODL_create_extruded
char *TaperAngle = "0.0";
char *Limit[] = {"0.0", "50.0"};
double Point1[] = {0.0, 0.0, 0.0};
double Direction[] = {0.0, 0.0, 1.0};
UF_FEATURE_SIGN Sign = UF_NULLSIGN;
uf_list_p_t Features1;
UF_MODL_create_extruded2(LineList, TaperAngle, Limit, Point1, Direction, Sign, &Features1); //特征找体
tag_t BodyTag = NULL_TAG;
UF_MODL_ask_feat_body(Features1->eid, &BodyTag); //将拉伸设置成红色
UF_OBJ_set_color(BodyTag,); //释放内存
UF_MODL_delete_list(&LineList); //创建直线
UF_CURVE_line_t LineCoords5;
LineCoords5.start_point[] = 0.0;
LineCoords5.start_point[] = -10.0;
LineCoords5.start_point[] = 0.0;
LineCoords5.end_point[] = 0.0;
LineCoords5.end_point[] = -100.0;
LineCoords5.end_point[] = 0.0;
tag_t LineTag5 = NULL_TAG;
UF_CURVE_create_line(&LineCoords5, &LineTag5); //创建链表
uf_list_p_t LineList1;
UF_MODL_create_list(&LineList1); //插入对象到链表
UF_MODL_put_list_item(LineList1, LineTag5); //函数2
//创建拉伸(UF_MODL_create_extruded)
char *TaperAngle1 = "0.0";
char *Limit1[] = {"0.0", "50.0"};
double Point2[] = {0.0, 0.0, 0.0};
double Direction1[] = {0.0, 0.0, 1.0};
UF_FEATURE_SIGN Sign1 = UF_NULLSIGN;
uf_list_p_t Features2;
UF_MODL_create_extruded(LineList1, TaperAngle1, Limit1, Point2, Direction1, Sign1, &Features2); //特征找体
tag_t BodyTag1 = NULL_TAG;
UF_MODL_ask_feat_body(Features2->eid, &BodyTag1); //将拉伸设置成蓝色
UF_OBJ_set_color(BodyTag1,); //释放内存
UF_MODL_delete_list(&LineList1); UF_terminate();

NX二次开发-UFUN拉伸函数UF_MODL_create_extruded2的更多相关文章
- NX二次开发-UFUN拉伸函数UF_MODL_create_extruded
NX9+VS2012 //NX二次开发中常用拉伸函数为UF_MODL_create_extruded2,但是此函数不能拉伸片体, //想要拉伸片体用函数UF_MODL_create_extruded. ...
- NX二次开发-UFUN发射线函数UF_MODL_trace_a_ray的用法
今天是国庆节,放假休息懒得动,没有出去玩,在家研究一下发射线函数UF_MODL_trace_a_ray.小弟以前在软件公司混的时候,当时我做的那个项目就用到了UF_MODL_trace_a_ray,当 ...
- NX二次开发-UFUN计时函数UF_begin_timer
NX9+VS2012 #include <uf.h> #include <uf_modl.h> UF_initialize(); //计时开始 UF_timer_t Timer ...
- NX二次开发-UFUN计时函数UF_end_timer
1 NX9+VS2012 2 3 #include <uf.h> 4 #include <uf_modl.h> 5 6 7 UF_initialize(); 8 9 //计时开 ...
- NX二次开发-UFUN遍历函数UF_OBJ_cycle_objs_in_part
NX11+VS2013 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include < ...
- NX二次开发-UFUN遍历函数UF_OBJ_cycle_all
NX11+VS2013 #include <uf.h> #include <uf_obj.h> #include <uf_modl.h> #include < ...
- 【NX二次开发】拉伸面、拉伸封闭曲线成片体UF_MODL_create_extrusion
用那几个拉伸,不能将封闭的曲线拉伸成片体,用UF_MODL_create_extrusion函数是可以的,下面是例子. 帮助上说拉伸片体不能有拔模角度,应该是错误的,下面是一个封闭曲线带拔模角度拉伸片 ...
- NX二次开发-UFUN将工程图转成CGM和PDF文件UF_CGM_export_cgm
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
- NX二次开发-UFUN获取NX系统默认导出CGM的选项设置UF_CGM_ask_default_export_options
文章转载自唐康林NX二次开发论坛,原文出处: http://www.nxopen.cn/thread-126-1-1.html 刚才有同学问到这个问题,如果是用NXOpen来做,直接录制一下就可以了: ...
随机推荐
- 注册Bean
<spring源码深度解析>笔记 1.给容器中注册组件 (1).包扫描+组件注解: (2).@Bean(导入第三方包里面的组件): (3).@Import给容器中快速的导入一个组件: 2. ...
- 深入理解Magento - 第五章 Magento资源配置
对于任何一个更新频繁的项目来说,保持开发环境和生产环境的数据库同步是件很头疼的事情.Magento提供了一套系统,用版本化的资源迁移脚本来解决这个问题. 上一章,我们为 Helloworld Blog ...
- Delphi 鼠标控制函数GetCursorPos、SetCursorPos
GetCursorPos函数 获取鼠标的位置 var P: TPoint; begin GetCursorPos(P); //获取鼠标位置 end; SetCursorPos函数 设置鼠标的位置 v ...
- 【Flutter学习】之VSCode下Flutter常用终端命令行
Flutter 常用命令行 相关项目操作 查看Flutter版本 查看当前版本 flutter --version 查看所有版本 flutter version 打印所有命令行用法信息 flutter ...
- Android中的Toast重复显示的问题
Toast是Android中用来显示信息的一种机制,和Dialog不一样的是,Toast是没有焦点,而且Toast显示的时间有限,过一定的时间就会自动消失. Toast一般用来提示用户的误操作.但是如 ...
- 使用Objective-C的+(void)initialize初始化static变量
在<Objective C类方法load和initialize的区别>一文中,我介绍了Objective-C对待+(void)initialize和+(void)load两个方法在编译和执 ...
- mac 安装 pymssql 报错
报错信息 _mssql.c:346:10: fatal error: 'sqlfront.h' file not found #include "sqlfront.h" ^~~~~ ...
- error LNK2019: 无法解析的外部符号 "__declspec(dllimport) long __stdcall RtlGetVersion(struct _OSVERSIONINFOW
虽然ntdll.lib库也引用了,但还是提示找不到RtlGetVersion函数定义,工程中头文件的定义如下: NTSYSAPI NTSTATUS NTAPI RtlGetVersion( _ ...
- 校验文件是否是同一个文件,以及mac中使用MD5命令
背景 sz了war包,因为查看不到里面的内容,并不确定是否是同一个文件. 解决 通过MD5校验 md5sum xxxx 但是在mac中是没有这个命令的下载半天没下载下来,下面是快捷操作. 1.打开终端 ...
- C++——数据结构之链表
直接上例子 int main() { ,,}; ,,}; Listnode *head=NULL,*temp; head=(Listnode*)malloc(sizeof(Listnode));//头 ...