点击查看详细介绍

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

misnn 7年前 675 0

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


函数结构:
UF_DRAW_ask_sxsolids_of_sxview
(
tag_t sxview_tag,
UF_DRAW_sxline_leg_t leg_num,
int* num_sxsolids,
tag_t* * sxsolid_tags
)

函数说明:
返回由切片创建的数量和固体部分的阵列的输入脚。根据剖面视图是否正在旋转或非旋转键入以下描述将适用:对于非旋转剖面视图给定一个剖面图输出的标签固体部分标记数组被剖开的输入剖面图。对于旋转剖面视图给定的截面图的标签和腿数,输出的阵列这是在输入部分观点的切片固体部分标签剖面视图的剖面线的腿。

函数参数:
第1个参数为输入:
sxview_tag代表参数变量,tag_t 为输入参数类型,的剖视图标签

第2个参数为输入:
leg_num代表参数变量,UF_DRAW_sxline_leg_t 为输入参数类型,腿数之切,UF_DRAW_sxline_leg1或UF_DRAW_sxline_leg2的。只有当sxview_tag从两足旋转剖面线创建必需的。

第3个参数为输出:
输出int* 整数型的参数,参数的变量格式为num_sxsolids,由输入腿的切片在固体切片的数量。

第4个参数为输出:
sxsolid_tags代表参数变量,tag_t* * 为输出参数类型,由输入滞后的切片创建固体部分的数组。自由到自由内存使用。

UF_DRAW_ask_sxsolids_of_sxview函数实例代码演示:
下面这个示例程序演示的使用: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)
请登录后发表新帖