上等兵
UID3014915
U币1
G币146
技术0
主题3
精华0
阅读权限20
注册时间2017-12-21
最后登录2020-10-20
在线时间13 小时
上等兵
|
NXOpen::Face *frontface = dynamic_cast<NXOpen::Face *>(frontf[0]);
NXOpen::Curve * frontupline = dynamic_cast<NXOpen::Curve *>(frontupl[0]);
//上视角线与偏置面B的交点
NXOpen::Point3d pointone(0.000000, 0.00000, 0.0000);
tag_t tag1 = frontupline->Tag();
tag_t tag2 = frontface->Tag();
int num_intersections = 0;
int type = 0;
UF_MODL_intersect_info_p_t *intersections = NULL;
UF_MODL_intersect_objects(tag1, tag2, 0.01, &num_intersections, &intersections);
type = intersections[0]->intersect_type;
if (type == UF_MODL_INTERSECT_POINT){
(&pointone)->X = intersections[0]->intersect.point.coords[0];
(&pointone)->Y = intersections[0]->intersect.point.coords[1];
(&pointone)->Z = intersections[0]->intersect.point.coords[2];
}
UF_free(intersections);
调试的结果num_intersections一直是0,图上显示就是线贯穿曲面的,有一个交点,求解决方案
|
|