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来做,直接录制一下就可以了: ...
随机推荐
- asp.net core Mvc 增删改查
1.创建项目 创建Data文件夹 创建实体类Students/cs public class Students { public Guid Id { get; set; } public string ...
- leetcode-161周赛-5248-统计【优美子数组】
题目描述: 自己的提交:超时: class Solution: def numberOfSubarrays(self, nums, k: int) -> int: dp = [0]* (len( ...
- 【前端技术】一篇文章搞掂:JS
待补充 //以下等价 if(val) if(val!=null&&val!=undefined&&val!="") //以下等价 if(!val) ...
- 听说这个FFT跑得巨jb快
#pragma GCC target ("avx2") #include <immintrin.h> #include<bits/stdc++.h> usi ...
- mac下nginx
配置文件位置 /usr/local/etc/nginx/nginx.conf 简单命令 nginx -s quit 退出 nginx -s reload 重新加载 nginx -t 测试nginx.c ...
- Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click
Pycharm设置 Pycharm总是很多的拼写检查波拉线 Spellchecker inspection helps locate typos and misspelling in your cod ...
- 31. Flexible static memory controller (FSMC)
31.1 FSMC main features FSMC块能够与同步和异步内存和16位PC存储卡.其主要目的是: 将AHB事务转换为适当的外部设备协议 满足外部设备的访问定时要求 所有外部存储器与控制 ...
- PAT_A1012#The Best Rank
Source: PAT A1012 The Best Rank (25 分) Description: To evaluate the performance of our first year CS ...
- 利用mysql数据库日志文件获得webshell
查看配置 show variables like '%general%'; 开启日志功能 set GLOBAL general_log='ON'; 设置日志存储路径 SET GLOBAL genera ...
- 记录阿里云ECS搭建Wordpress(Centos7+LAMP)
占位 改变wordpress文件夹属主属组 cd /var/www/html chown -R apache:apache wordpress <VirtualHost *:> Docum ...