对,谢谢MIZZLE,
我用的也是也是函数,但是老是不成功,
主要代码如下:
//////////////////////////////////////////////////////////
/////////118上午Jambo 探测小球 START
UF_FEATURE_SIGN sign_sphere=UF_NULLSIGN;
tag_t sphere_tag[2];
double diadou=100;
char diam[15];
sprintf(diam,"%f",diadou);
double center_1[3]={-740,0,-51};
double center_4[3]={-834,0,217};
UF_MODL_create_sphere1(sign_sphere, center_1,diam, [$sphere_tag[0] )]
UF_MODL_create_sphere1(sign_sphere, center_4,diam, [$sphere_tag[1] )]
/////////118上午Jambo 探测小球 END
////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////
////////////217 Jambo 查询最小距离 START
double guess1[ 3 ]={-750,0,10};
double guess2[ 3 ]={-830,0,100};
double min_dist,min_dist1;
double pt_on_ent1[ 3 ];
double pt_on_ent2[ 3 ];
int dec,sign;
int guess1_given,guess2_given;
guess1_given=0;
guess2_given=0;04-12-20 添加变量
int a=UF_MODL_ask_minimum_dist(sphere_tag[0],sphere_tag[1],guess1_given,guess1,guess2_given,guess2,
[$min_dist, pt_on_ent1,pt_on_ent2)]
char Error_message[133];
sprintf(Error_message,"%f",min_dist);
uc1601(Error_message,1);
char Error_mess[133];
UF_get_fail_message(a, Error_mess);//说明UF_MODL_ask_minimum_dist调用出错
uc1601(Error_mess,0);
////////////217 Jambo 查询最小距离 END
////////////////////////////////////////////////////////////
运行后状态栏显示错误信息为:Internal error;
想同过弹出信息框输出该最小距离信息,如下图:弹出信息框输出的min_dist也明显不对, |