购买与咨询 NX 二次开发视频教程,请联系微信号:13890821008 QQ号:85585969
函数结构:UF_DRAW_ask_xhatch_of_sxsolid( tag_t sxsolid_tag, tag_t* xhatch_tag) 函数说明:
给定一个固体部分的标签,其相关的输出标签剖面线实体。注意,如果一个截面视图有其剖面线偏好关闭,一个标签,一个没有线交叉线实体信息将被输出。
函数参数:
第1个参数为输入:
sxsolid_tag代表参数变量,tag_t 为输入参数类型,部分固体标签
第2个参数为输出:
xhatch_tag代表参数变量,tag_t* 为输出参数类型,十字线标记
UF_DRAW_ask_xhatch_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]