iCAx开思工具箱
标题:
求各位指点旋转的程序!
[打印本页]
作者:
水果df
时间:
2011-11-17 14:16
标题:
求各位指点旋转的程序!
实体是在草图画好后拉伸的,不是程序生成的,现在要用程序把这个实体旋转一个角度,该怎么实现啊?我写的程序如下,但是运行后没有反应。编译没有问题的,求给为大神指点
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);
作者:
qindongjun88
时间:
2011-11-17 18:40
要把草图一起旋转才行,要么旋转前先去参数!
作者:
水果df
时间:
2011-11-17 18:59
qindongjun88 发表于 2011-11-17 18:40
要把草图一起旋转才行,要么旋转前先去参数!
怎么才能把草图一起旋转呢?
或者去除参数怎么实现?谢谢了
作者:
qindongjun88
时间:
2011-11-18 10:44
去除参数UF_MODL_delete_body_parms()
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3