马上注册,结交更多同行朋友,交流,分享,学习。
您需要 登录 才可以下载或查看,没有帐号?注册
x
实体是在草图画好后拉伸的,不是程序生成的,现在要用程序把这个实体旋转一个角度,该怎么实现啊?我写的程序如下,但是运行后没有反应。编译没有问题的,求给为大神指点
tag_t displayed_part;
displayed_part = UF_PART_ask_display_part();
int type1;
tag_t solid;
type1 = UF_solid_type;
solid = NULL_TAG;
tag_t tag_solid[4];
char mess[133];
int i=4;
do
{
UF_OBJ_cycle_objs_in_part(displayed_part,type1,&solid );
int type2,subtype,body_type;
UF_OBJ_ask_type_and_subtype(solid, &type2, &subtype);
if(subtype == UF_solid_body_subtype)
{
UF_MODL_ask_body_type (solid, &body_type);
if (body_type==UF_MODL_SOLID_BODY)
{
tag_solid[i]=solid;
sprintf(mess,"%d",tag_solid[i]);
i++;
}
}
} while (solid != NULL_TAG); //获取图中的部件
double origin[3]={0.0,0.0,0.0};
double direction[3]={1.0,0.0,0.0};
double degrees_rotation=45;
double matrix[16];
int status;
FTN(uf5945)(origin,direction,°rees_rotation,matrix,&status);
int ip3=1;
int ip4=1;
int ip5=-1;
int ip6=1;
int ir9;
tag_t nr7,nr8;
const tag_t np2[1]={solid};
FTN(uf5947)(matrix,&solid,&ip3, & ip4, &ip5, & ip6, &nr7, &nr8, &ir9); |