点击查看详细介绍

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

misnn 10年前 584 0

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


函数结构:
UF_DRAW_ask_curve_of_sxedge
(
tag_t sxseg_tag,
tag_t* curve_tag
)

函数说明:
给定一个部分边缘的标签,其输出曲线的标签。 注意从一个剖面线的弯曲段,导致部分边不有一个相关的曲线标签。如果从一个弯曲段的截面边缘输入这个功能,curve_tag返回的指针为空标签。

函数参数:
第1个参数为输入:
sxseg_tag代表参数变量,tag_t 为输入参数类型,部分边缘标签

第2个参数为输出:
curve_tag代表参数变量,tag_t* 为输出参数类型,部分边缘曲线标签

UF_DRAW_ask_curve_of_sxedge函数实例代码演示:
下面这个示例程序演示的使用: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]

0

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