点击查看详细介绍

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

misnn 7年前 523 0

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


函数结构:
UF_DRAW_ask_boundary_curves
(
tag_t view_tag,
double * tolerance,
int * num_curves,
UF_DRAW_view_boundary_t * * boundary_curves
)

函数说明:
检索视图边界曲线,那些聪明的定义点曲线和公差。这些项被用于创建一个任意削波开往视图。

函数参数:
第1个参数为输入:
view_tag代表参数变量,tag_t 为输入参数类型,观其观点边界曲线都可以得到标记。

第2个参数为输出:
输出double * 双精度类型的参数,参数的变量格式为tolerance,链公差用于创建该视图的任意剪裁边界。

第3个参数为输出:
输出int * 整数型的参数,参数的变量格式为num_curves,计数结构。 = 0,如果视图没有定义的任意边界。

第4个参数为输出:
boundary_curves代表参数变量,UF_DRAW_view_boundary_t * * 为输出参数类型,指针查看界面结构。使用UF_DRAW_free_boundary释放指针。如果边界曲线已被删除,其curve_tag将是NULL。

UF_DRAW_ask_boundary_curves函数实例代码演示:
本示例检索边界曲线和智能定义点委员观点,TOP@1。
[quote]
#include <stdlib.h>
#include <stdio.h>
#include <uf_part.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_draw_types.h>
#include <uf_drf_types.h>
#include <uf_view.h>
void ufusr(char *param, int *retcod, int param_len)
{
double tolerance = 0.0;
int ifail = 0;
int num_objects = 0;
tag_t view_tag = NULL_TAG;
tag_t part_tag = NULL_TAG;
char error_message[133];
char * view_name= "TOP@1";
UF_DRAW_view_boundary_t * boundary_curves = NULL;
ifail = UF_initialize();
if( !ifail )
part_tag = UF_PART_ask_display_part();

if( !ifail && part_tag != NULL_TAG )

/* get view tag of TOP view */
ifail = UF_VIEW_ask_tag_of_view_name( view_name,
&view_tag );

if( !ifail && part_tag != NULL_TAG )
ifail = UF_DRAW_ask_boundary_curves( view_tag,
&tolerance,
&num_objects,
&boundary_curves );
printf( "UF_DRAW_ask_boundary_curves " );
if( ifail )
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else if ( part_tag == NULL_TAG )
printf( "fails.\nError is: no active part.\n" );
else
printf( "is successful, %d curves in boundary array\n",
num_objects );
UF_DRAW_free_boundary( num_objects, boundary_curves );

ifail = UF_terminate();
}



[/quote]

0

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