【NX二次开发】面分析 UF_MODL_ask_face_data()

面分析

 1 #include "Text.h"
 2 extern DllExport void ufsta(char *param, int *returnCode, int rlen)
 3 {
 4     UF_initialize();
 5     
 6     //44720  平面
 7     //44715  圆柱面
 8     //44718  圆锥面
 9 
10     //参数1:输入面的tag
11     tag_t tagFace = 44718;
12     //参数2:输出面的类型
13     int iFaceType = 0;
14     /*
15     16 = cylinder 圆柱面
16     17 = cone     圆锥面
17     18 = sphere   球面
18     19 = revolved(toroidal) 
19     20 = extruded           
20     22 = bounded plane      有界平面
21     23 = fillet(blend)     
22     43 = b - surface        
23     65 = offset surface     
24     66 = foreign surface    
25     */
26     //参数3:面的参考点
27     double douFacePoint[3];
28     /*
29     Plane = Position in plane   在面上
30     Cylinder= Position on axis  在轴上
31     Cone = Position on axis     在轴上
32     Sphere = Center position    中间位置
33     Torus = Center position     中间位置
34     Revolved = Position on axis 在轴上
35     */
36     //参数4:面的方向
37     /*
38     平面法向
39     柱面轴向
40     锥面轴向 由大圆圆心指向小圆圆心
41     */
42     double douFaceDir[3];
43     
44     //参数5:面box 极点坐标(不准确)
45     double douBox[6];
46     //返回绝对坐标系下的box两个对角点坐标
47     
48     //参数6:半径 圆锥=最小半径 + 最大半径 /2
49     double douRadius; 
50 
51     //参数7:角度 圆锥拔模角度弧度 douRadData*180/PI
52     double douRadData;
53 
54     //参数8: 1:外R角,-1:内R角
55     int iNormDir = 0;
56         
57     UF_MODL_ask_face_data(tagFace, &iFaceType, douFacePoint, douFaceDir, douBox, &douRadius, &douRadData, &iNormDir); // 分析面
58     
59     UF_terminate();
60 }
61 
62 extern int ufusr_ask_unload(void)
63 {
64     return (UF_UNLOAD_IMMEDIATELY);
65 }

 

posted @ 2020-09-29 14:54  王牌飞行员_里海  阅读(190)  评论(0编辑  收藏  举报