购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008 QQ号:85585969
函数结构:UF_DRAW_free_boundary( int curve_count, UF_DRAW_view_boundary_p_t boundary_curves) 函数说明:
释放了在边界曲线结构的存储器。
函数参数:
第1个参数为输入:
输入int 整数型的参数,参数的变量格式为curve_count,算上曲线中的曲线
第2个参数为输入:
boundary_curves代表参数变量,UF_DRAW_view_boundary_p_t 为输入参数类型,指针曲线列表中,即含有边界曲线结构和它们的限定点的阵列。
UF_DRAW_free_boundary函数实例代码演示:
本例中使用的部分和一个叫圆形边缘,“BAND OBJ”来定义边界限制。
[quote]
#include <stdlib.h>
#include <stdio.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_obj.h>
#include <uf_part.h>
#include <uf_view.h>
void ufusr(char *param, int *retcod, int param_len)
{
int ifail = 0;
tag_t object_tag = NULL_TAG;
tag_t view_tag = NULL_TAG;
tag_t part_tag = NULL_TAG;
char error_message[133];
char * view_name = "TOP@1";
char * object_name = "BNDOBJ";
ifail = UF_initialize();
if( !ifail )
part_tag = UF_PART_ask_display_part();
if( !ifail && part_tag != NULL_TAG )
ifail = UF_VIEW_ask_tag_of_view_name( view_name,
&view_tag );
if( !ifail && part_tag != NULL_TAG &&
view_tag != NULL_TAG )
/* retrieve tag of circle to define view boundary */
/* this example uses a part with a named object */
ifail = UF_OBJ_cycle_by_name( object_name,
&object_tag );
if( !ifail && part_tag != NULL_TAG &&
view_tag != NULL_TAG && object_tag != NULL_TAG)
ifail = UF_DRAW_define_bound_by_objects( view_tag,
1,
&object_tag );
printf( "UF_DRAW_define_bound_by_objects " );
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 if ( object_tag == NULL_TAG )
printf( "fails.\nError is: named object not found.\n");
else if ( view_tag == NULL_TAG )
printf( "fails.\nError is: view not found.\n");
else
printf( "is successful.\n" );
ifail = UF_terminate();
}
[/quote]