马上注册登录,享用更多网站功能!
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
我在UISTYLER对话框的一个按钮中调用下边的这个子函数,但是运行了下边的这个函数的相应功能后,随后在这个子函数下边的任何语句就不在执行了,真的好奇怪,下面是我的在按钮中要调用的子函数,我怀疑是这个子函数的问题,请各位高手指点!
static void get_intersect(tag_t curve, tag_t face, double tol)
{
int type;
UF_CALL(UF_MODL_intersect_objects(curve,face,tol,[$num_intersects,&intersect_data))]
printf("\n Number of intersections = %d\n", num_intersects);
for(i = 0; i < num_intersects; i++)
{
type = (intersect_data)->intersect_type;
switch(type)
{
case UF_MODL_INTERSECT_POINT:
printf("\nx,y,z coordinates are: (%f, %f, %f)\n",
(intersect_data)->intersect.point.coords[0],
(intersect_data)->intersect.point.coords[1],
(intersect_data)->intersect.point.coords[2]);
printf("Object 1 UV parameters are: (%f, %f)\n",
(intersect_data)->intersect.point.object_1_u_parm,
(intersect_data)->intersect.point.object_1_v_parm);
printf("Object 2 UV parameters are: (%f, %f)\n",
(intersect_data)->intersect.point.object_2_u_parm,
(intersect_data)->intersect.point.object_2_v_parm);
break;
case UF_MODL_INTERSECT_COINCIDE:
printf("\nCoincident curve tag is: %d\n",
intersect_data->intersect.coincide.identifier);
printf("Object 1 UV parameters are: (%f, %f)\n",
intersect_data->intersect.coincide.object_1_first_parm,
intersect_data->intersect.coincide.object_1_second_parm);
printf("Object 2 UV parameters are: (%f, %f)\n",
intersect_data->intersect.coincide.object_2_first_parm,
intersect_data->intersect.coincide.object_2_second_parm);
break;
case UF_MODL_INTERSECT_CURVE:
UF_CALL(UF_MODL_create_list([$loop_list))]
for(i=0;i<num_intersects;i++)
{
UF_CALL(UF_MODL_put_list_item(loop_list, intersect_data->intersect.curve.identifier));
}
UF_CALL(UF_MODL_create_extruded(loop_list, taper_angle, limit1,
ref_pt, direction, create, [$features))]
UF_CALL(UF_MODL_create_extruded(loop_list, taper_angle, limit1,
ref_pt, direction2, create, [$features2))]
break;
default:
printf("\nSomething went wrong, we shouldn't be here!");
break;
}
/* Free each element of the array. */
UF_free(intersect_data);
}
if(num_intersects != 0)
{
/* Free the array. */
UF_free(intersect_data);
}
} |