for(index = 0; index < edge_count; index++)
{
printf("\nInfo for edge number: %d\n", index);
UF_MODL_ask_list_item(edge_list, index, [$edge_id)]
UF_MODL_ask_edge_verts(edge_id, p1, p2, [$vertex)]
printf("The number of vertices is: %d\n", vertex);
switch(vertex)
{
case 0:
printf("There are no vertices on this edge.\n");
break;
case 1:
printf("The X value of P1 is: %f\n", p1[0]);
printf("The Y value of P1 is: %f\n", p1[1]);
printf("The Z value of P1 is: %f\n", p1[2]);
break;
case 2:
printf("The X value of P1 is: %f\n", p1[0]);
printf("The Y value of P1 is: %f\n", p1[1]);
printf("The Z value of P1 is: %f\n", p1[2]);
printf("The X value of P2 is: %f\n", p2[0]);
printf("The Y value of P2 is: %f\n", p2[1]);
printf("The Z value of P2 is: %f\n", p2[2]);
break;
default:
break;
}
}
}
printf("Total number of faces: %d\n", face_count);
}while((response == 4) || (response ==5));
}
/*ARGSUSED*/
void ufusr(char *param, int *retcode, int param_len)
{
if (!UF_CALL(UF_initialize()))
{
do_ugopen_api();
UF_CALL(UF_terminate());
}
}
int ufusr_ask_unload(void)
{
return (UF_UNLOAD_IMMEDIATELY);
}作者: along533 时间: 2005-9-7 11:28
当然不行了
你把你的
printf("The X value of P1 is: %f\n", p1[0]);
改成
sprintf(buffer,"The X value of P1 is: %f\n", p1[0]);
UF_UI_write_listing_window(buffer);
再在前面适当的地方添加一行:
UF_UI_open_listing_window();
再在定义变量的地方添加一行:
char buffer[256]="";
就行了作者: shuoqi 时间: 2005-9-7 16:34
这位仁兄,我这样做了,也是没有任何反映啊?作者: along533 时间: 2005-9-7 16:47
这样只是打开UG信息窗口,没有其它动作的作者: along533 时间: 2005-9-7 16:49
你把你的每个
printf("The X value of P1 is: %f\n", p1[0]);
都改成:
sprintf(buffer,"The X value of P1 is: %f\n", p1[0]);
UF_UI_write_listing_window(buffer);