点击查看详细介绍

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

misnn 8年前 752 0

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


函数结构:
UF_DRAW_move_sxline_rotpt
(
tag_t sxline_tag,
UF_DRF_object_p_t new_object
)

函数说明:
移动的截面线旋转点到由输入定义的位置新的对象,然后更新所有的部分生产线的相关部分的意见位于当前图形上。不相关的部分意见在当前图形标记过时。要执行的编辑部分线路没有更新,请使用抑制视图更新功能在UF_DRF_set_suppress_view_update提供。

函数参数:
第1个参数为输入:
sxline_tag代表参数变量,tag_t 为输入参数类型,旋转剖面线标签

第2个参数为输入:
new_object代表参数变量,UF_DRF_object_p_t 为输入参数类型,新对象副旋转点

UF_DRAW_move_sxline_rotpt函数实例代码演示:
下面的示例检索一个旋转部分线路的信息,然后通过移动旋转点编辑截面线。
[quote]
#include <stdio.h>
#include <string.h>
#include <uf.h>
#include <uf_defs.h>
#include <uf_draw.h>
#include <uf_draw_types.h>
#include <uf_drf.h>
#include <uf_drf_types.h>
#include <uf_obj.h>
void ufusr(char *param, int *retcod, int param_len)
{
int ifail = 0;
int numchrs;
int num_sxviews;
int num_sxsegs;
int num_leg1_sxsegs;
tag_p_t sxview_tags = NULL;
tag_p_t sxseg_tags = NULL;
tag_t sxline_tag;
tag_t pview_tag;
char error_message[133];
char * sxline = "rev_sxline1";
double step_dir[3];
double arrow_dir[3];
UF_DRAW_sxline_leg_t cut_plane_leg;
UF_DRAW_sxline_status_t sxline_status;
UF_DRF_object_t old_rotpt_object;
UF_DRF_object_t rotpt_object;
ifail = UF_initialize();
if( !ifail )
{
/* Get the tag of a section line named rev_sxline1. */
numchrs = strlen( sxline );
ifail = uc5028( sxline, numchrs, &sxline_tag );
}
if( !ifail )
{
ifail = UF_DRAW_ask_revolved_sxline( sxline_tag,
step_dir, arrow_dir, &pview_tag, &old_rotpt_object,
&num_sxviews, &sxview_tags, &num_sxsegs,
&num_leg1_sxsegs, &cut_plane_leg, &sxseg_tags,
&sxline_status );
}
if( !ifail )
{
ifail = UF_DRF_init_object_structure( &rotpt_object );
}
if( !ifail )
{
/* Change the rotpt_object. */
rotpt_object.object_assoc_type = UF_DRF_dwg_pos;
rotpt_object.assoc_dwg_pos[0] =
old_rotpt_object.assoc_dwg_pos[0] + .05;
rotpt_object.assoc_dwg_pos[1] =
old_rotpt_object.assoc_dwg_pos[1] + .05;
ifail = UF_DRAW_move_sxline_rotpt( sxline_tag,
&rotpt_object );
}
UF_free( sxview_tags );
UF_free( sxseg_tags );
printf( "UF_DRAW_move_sxline_rotpt sample " );
if( ifail )
{
ifail = UF_get_fail_message( ifail, error_message );
printf( "fails.\nError is: %s\n", error_message );
}
else
printf( "is successful.\n" );
UF_terminate();
}



[/quote]

0

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