购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008 QQ号:85585969
函数结构:UF_DRAW_ask_stepped_sxline( tag_t sxline_tag, double step_dir [ 3 ], double arrow_dir [ 3 ], tag_t * pview_tag, int * num_sxviews, tag_p_t * sxview_tags, int * num_sxsegs, tag_p_t * sxseg_tags, UF_DRAW_sxline_status_t * sxline_status) 函数说明:
检索台阶线的信息,给出的标签剖面线。注:如果部分行有无效的部分线路状态它单独不引起的返回代码被设置为非零 值。
函数参数:
第1个参数为输入:
sxline_tag代表参数变量,tag_t 为输入参数类型,台阶线标签查询
第2个参数为输出:
输出double 双精度类型的参数,参数的变量格式为step_dir [ 3 ],步骤方向矢量(单元化)相对于所述附图中:步骤目录[0] = x值step_dir[1] = y值step_dir[2] = z值为
第3个参数为输出:
输出double 双精度类型的参数,参数的变量格式为arrow_dir [ 3 ],箭头方向矢量(单元化)相对于所述附图中:箭头目录[0] = x值箭头目录[1] = y值arrow_dir[2] = z值为
第4个参数为输出:
pview_tag代表参数变量,tag_t * 为输出参数类型,父视图标签
第5个参数为输出:
输出int * 整数型的参数,参数的变量格式为num_sxviews,相关章节线的剖视图数
第6个参数为输出:
sxview_tags代表参数变量,tag_p_t * 为输出参数类型,部分线剖视图阵列。自由到自由内存使用。
第7个参数为输出:
输出int * 整数型的参数,参数的变量格式为num_sxsegs,部分的线段的数
第8个参数为输出:
sxseg_tags代表参数变量,tag_p_t * 为输出参数类型,部分线段标记的数组。使用UF_free来释放内存。
第9个参数为输出:
sxline_status代表参数变量,UF_DRAW_sxline_status_t * 为输出参数类型,部分线路状态
UF_DRAW_ask_stepped_sxline函数实例代码演示:
下面的示例检索有关阶梯段信息 线。
[quote]
#include <stdio.h>
#include <string.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_draw_types.h>
#include <uf_drf_types.h>
#include <uf_obj.h>
void ufusr(char *param, int *retcod, int param_len)
{
int ifail = 0;
int numchrs;
int num_sxviews;
int num_sxsegs;
tag_t sxline1_tag;
tag_t pview_tag;
tag_t * sxview_tags = NULL;
tag_t * sxseg_tags = NULL;
double step_dir[3];
double arrow_dir[3];
char error_message[133];
char * sxline1 = "step_sxline1";
UF_DRAW_sxline_status_t sxline_status;
ifail = UF_initialize();
if( !ifail )
{
/* Find the tag of the section line from its name. */
numchrs = strlen( sxline1 );
ifail = uc5028( sxline1, numchrs, &sxline1_tag );
}
if( !ifail )
{
/* Retrieve stepped section line information. */
ifail = UF_DRAW_ask_stepped_sxline( sxline1_tag,
step_dir, arrow_dir, &pview_tag, &num_sxviews,
&sxview_tags, &num_sxsegs, &sxseg_tags,
&sxline_status );
UF_free( sxview_tags );
UF_free( sxseg_tags );
}
printf( "UF_DRAW_ask_stepped_sxline sample " );
if( ifail )
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else
printf( "is successful.\n" );
UF_terminate();
}
[/quote]