得到一条直线与一个曲面的交点UF_MODL_intersect_objects()函数得不到交点
NXOpen::Face *frontface = dynamic_cast<NXOpen::Face *>(frontf);NXOpen::Curve * frontupline = dynamic_cast<NXOpen::Curve *>(frontupl);
//上视角线与偏置面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->intersect_type;
if (type == UF_MODL_INTERSECT_POINT){
(&pointone)->X = intersections->intersect.point.coords;
(&pointone)->Y = intersections->intersect.point.coords;
(&pointone)->Z = intersections->intersect.point.coords;
}
UF_free(intersections);
调试的结果num_intersections一直是0,图上显示就是线贯穿曲面的,有一个交点,求解决方案
现成的命令为何不用? 用这个:UF_MODL_intersect_curve_to_face bingbwang 发表于 2017-12-29 17:28
现成的命令为何不用?
现成的命令?难道这个函数还不是现成的?指导下咯,大神 Jefft* 发表于 2017-12-29 19:55
用这个:UF_MODL_intersect_curve_to_face
这个函数也试了下,里面的num_intersection还是0,后面data也是空
页:
[1]