购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008 QQ号:85585969
函数结构:UF_DRAW_ask_sxedges_of_sxsolid( tag_t sxsolid_tag, int* num_sxedges, tag_t* * sxedge_tags) 函数说明:
给定一个固体部分的标签,输出相关的数部边缘和它们的部分边缘的标签阵列。
函数参数:
第1个参数为输入:
sxsolid_tag代表参数变量,tag_t 为输入参数类型,固体部分标签
第2个参数为输出:
输出int* 整数型的参数,参数的变量格式为num_sxedges,固体部分的截面边数
第3个参数为输出:
sxedge_tags代表参数变量,tag_t* * 为输出参数类型,部分边缘标签的数组。自由到自由内存使用。
UF_DRAW_ask_sxedges_of_sxsolid函数实例代码演示:
下面这个示例程序演示的使用:UF_DRAW_ask_sxsolids_of_sxview,UF_DRAW_ask_sxedges_of_sxsolid,UF_DRAW_ask_xhatch_of_sxsolid,和UF_DRAW_ask_curve_of_sxedge。
[quote]
#include <stdio.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)
{
int ifail = 0;
int num_sxedges;
int num_sxsolids;
tag_t curve_tag;
tag_t sxview_tag;
tag_t xhatch_tag;
tag_t * sxsolid_tags = NULL;
tag_t * sxedge_tags = NULL;
char error_message[133];
char * sxview1 = "SX@2";
ifail = UF_initialize();
if( !ifail )
{
/* Find the tag of the section view from its name. */
ifail = UF_VIEW_ask_tag_of_view_name( sxview1,
&sxview_tag );
}
if( !ifail )
{
/* Retrieve the section solids associated to the first
leg of the section view. */
ifail = UF_DRAW_ask_sxsolids_of_sxview(
sxview_tag,
UF_DRAW_sxline_leg1,
&num_sxsolids,
&sxsolid_tags );
}
if( !ifail )
{
/* Retrieve the crosshatch associated to the
first section solid. */
ifail = UF_DRAW_ask_xhatch_of_sxsolid( sxsolid_tags[0],
&xhatch_tag );
}
if( !ifail )
{
/* Retrieve the section edges of the first section
solid. */
ifail = UF_DRAW_ask_sxedges_of_sxsolid( sxsolid_tags[0],
&num_sxedges,
&sxedge_tags );
}
if( !ifail )
{
/* Retrieve the curve of the first section edge in the
array. */
ifail = UF_DRAW_ask_curve_of_sxedge( sxedge_tags[0],
&curve_tag );
}
UF_free( sxedge_tags );
UF_free( sxsolid_tags );
printf( "UF_DRAW_ask_sxsolids_of_sxview sample " );
if( ifail )
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else
printf( "is successful.\n" );
ifail = UF_terminate();
}
[/quote]