|
马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
tag_t to_part_occ,from_part_occ;
/*--------------------------------------------------*/
tag_t displayed_part=UF_PART[center][/center][center][/center][center][/center][center][/center]_ask_display_part();
tag_t root_tag=UF_ASSEM_ask_root_part_occ(displayed_part);
tag_t from_target_tags[2];
from_target_tags[0]=UF_ASSEM_ask_part_occ_of_inst(root_tag,from);
from_part_occ=from_target_tags[0];
tag_t to_target_tags[2];
to_target_tags[0]=UF_ASSEM_ask_part_occ_of_inst(root_tag,to);
to_part_occ=to_target_tags[0];
tag_t from_inst=UF_ASSEM_ask_inst_of_part_occ(from_part_occ);
/*-------------------------------------------------*/
UF_ASSEM_mating_condition_t ftf;
ftf.mated_object=from_inst;
ftf.name=NULL;
ftf.user_name=FALSE;
ftf.constraints[0].from_status=UF_ASSEM_ok;
ftf.constraints[0].to_status=UF_ASSEM_ok;
ftf.constraints[0].mate_type=UF_ASSEM_v16_mate;
ftf.constraints[0].from_type=UF_ASSEM_planar_face;
ftf.constraints[0].to_type=UF_ASSEM_planar_face;
ftf.constraints[0].from = from_face;
ftf.constraints[0].from_part_occ = from_part_occ;
ftf.constraints[0].to = to_face;
ftf.constraints[0].to_part_occ = to_part_occ;
ftf.constraints[0].offset=NULL_TAG;
ftf.constraints[0].name="face_to_face_mate";
ftf.constraints[0].user_name=TRUE;
ftf.num_constraints=1;
ftf.suppressed=FALSE;
UF_ASSEM_mc_status_t status;
UF_ASSEM_mc_structure_state_t struct_status;
UF_ASSEM_dof_t dof;
double transform[4][4];
int ret=UF_ASSEM_solve_mc([$ftf,&status,&dof,transform)]
if(ret==0 ||status==UF_ASSEM_mc_solved)
{
ret=UF_ASSEM_apply_mc_data([$ftf,&struct_status,&status)]
UF_DISP_refresh();
UF_MODL_update();
} |
|