点击查看详细介绍

UF_UI_specify_plane() 函数的参数解释说明、函数详细用法,以及实例代码演示

misnn 7年前 873 0

购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008  QQ号:85585969  


函数结构:
UF_UI_specify_plane
(
char * message,
int * mode,
int display,
int * response,
double orientation [ 9 ],
double origin [ 3 ],
tag_t * plane_eid
)

函数说明:
允许您选择飞机的子功能,默认模式。临时平面从指定的子功能创建的。

函数参数:
第1个参数为输入:
输入char * 字符类型的参数,参数的变量格式为message,提示线消息(80个字符最大值)

第2个参数为输入:
输入int * 整数型的参数,参数的变量格式为mode,在输入默认的平面子功能。在输出平面子功能实际使用:-1=不启用默认选择0 =禁止默认选择1 =三点2 = 2线3 =点,PERP曲线4=圆弧/圆锥的平面5 =平面WCS6=平面OK CSYS的7=主平面8 =现有平面9=两个切面10 =点,切线面11=12系数=并行直通铂13=并联的DIST14 = PERP,直通线

第3个参数为输入:
输入int 整数型的参数,参数的变量格式为display,0=显示临时平面中的所有活动的意见1=不显示临时飞机

第4个参数为输出:
输出int * 整数型的参数,参数的变量格式为response,1 =2返回=取消3= OK

第5个参数为输入:
输入double 双精度类型的参数,参数的变量格式为orientation [ 9 ],在绝对坐标平面取向

第6个参数为输入:
输入double 双精度类型的参数,参数的变量格式为origin [ 3 ],平面原点的绝对坐标

第7个参数为输出:
plane_eid代表参数变量,tag_t * 为输出参数类型,平面的对象标识符,如果8模式选择空TAG其他模式。

UF_UI_specify_plane函数实例代码演示:
以下示例选择了三分默认模式,然后创建在由三个指定的临时平面的平面选定点。
[quote]
#include <uf.h>
#include <uf_ui.h>
#include <uf_modl.h>
void ufusr(char *param, int *retcod, int param_len)
{
double orientation[9] = {0,0,0,0,0,0,0,0,0};
double origin[3] = {0,0,0};
double pts[6] = {0,0,0,0,0,0};
int i, error_code = 0;
int mode, display, response;
tag_t plane_eid;
mode = 1; /* set mode to Three Points */
display = 0; /* display temporary plane */
UF_initialize();
error_code = UF_UI_specify_plane(
"Click OK to accept Three Points default mode", &mode, displa
y,
&response, orientation, origin, &plane_eid);
/* if there's no error in specifying plane and the response */
/* wasn't BACK or CANCEL, then create a plane from the */
/* specified temporary plane */
if ( !error_code && response != 1 && response != 2)
{
/* get a point on the X-axis */
for (i=0; i<3; i++)
pts[i] = origin[i] + orientation[i];
/* get a point on the Y-axis */
for (i=3; i<6; i++)
pts[i] = origin[i-3] + orientation[i];
FTN(uf5374)(origin,pts,&pts[3],&plane_eid);
}
UF_terminate();
}




[/quote]

0

最新回复 (0)
请登录后发表新帖