码迷,mamicode.com
首页 > 其他好文 > 详细

NX-二次开发删除对象UF_OBJ_delete_object

时间:2019-05-31 21:26:40      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:开发   类型   class   二次   false   start   info   ali   creat   

 1     NX9+VS2012
 2 
 3     #include <uf.h>
 4     #include <uf_curve.h>
 5     #include <uf_obj.h>
 6 
 7     
 8     UF_initialize();
 9 
10     //起点
11     double ArcStartPoint[3];
12     ArcStartPoint[0] = 0.0;
13     ArcStartPoint[1] = 0.0;
14     ArcStartPoint[2] = 0.0;
15     tag_t ArcStartPointTag = NULL_TAG;
16     UF_CURVE_create_point(ArcStartPoint, &ArcStartPointTag);
17 
18     //终点
19     double ArcEndPoint[3];
20     ArcEndPoint[0] = 100.0;
21     ArcEndPoint[1] = 0.0;
22     ArcEndPoint[2] = 0.0;
23     tag_t ArcEndPointTag = NULL_TAG;
24     UF_CURVE_create_point(ArcEndPoint, &ArcEndPointTag);
25 
26     //第三点
27     double Arc3Point[3];
28     Arc3Point[0] = 50.0;
29     Arc3Point[1] = 50.0;
30     Arc3Point[2] = 0.0;
31     tag_t Arc3PointTag = NULL_TAG;
32     UF_CURVE_create_point(Arc3Point, &Arc3PointTag);
33 
34     //设置类型
35     UF_CURVE_limit_t limit[2];
36     UF_CURVE_limit_p_t pLimit[2] = { &limit[0], &limit[1] };
37     limit[0].limit_type = UF_CURVE_limit_to_entity;
38     limit[0].limiting_obj = ArcStartPointTag;//按点
39     limit[1].limit_type = UF_CURVE_limit_to_entity;
40     limit[1].limiting_obj = ArcEndPointTag;//按点
41 
42     tag_t SupportPlane = NULL_TAG;//放置平面
43     tag_t ArcTag = NULL_TAG;
44     UF_CURVE_create_arc_3point(ArcStartPointTag, ArcEndPointTag, Arc3PointTag, pLimit, SupportPlane, FALSE, &ArcTag);
45 
46     //删除圆弧端点
47     UF_OBJ_delete_object(ArcStartPointTag);
48     UF_OBJ_delete_object(ArcEndPointTag);
49     UF_OBJ_delete_object(Arc3PointTag);
50 
51     UF_terminate();

技术图片

NX-二次开发删除对象UF_OBJ_delete_object

标签:开发   类型   class   二次   false   start   info   ali   creat   

原文地址:https://www.cnblogs.com/nxopen2018/p/10957327.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!