iCAx开思工具箱
标题:
点云数据在UG界面上的显示的问题
[打印本页]
作者:
libo_reverse
时间:
2006-4-15 12:17
标题:
点云数据在UG界面上的显示的问题
我最近在UG平台上做逆向工程的二次开发,需要把点云数据显示在UG界面上,怎么做都显示不出来,实在想不出来办法了,所以在这里向各位高手请教,帮我看一下下面的一段程序:谢谢!
我的邮箱:
libo_conquer@163.com
void DisplayDialog()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
FILE *myfile;
double solid_pnts_in[3];
double solid_pnts_out[3];
tag_t point;
tag_t points;
tag_t feature_tag;
myfile = fopen("D:\\a1.dat", "r+"); // 打开文件
rewind(myfile);
while (!feof(myfile))
{
fscanf(myfile, "%f %f %f\n", &solid_pnts_in[0], &solid_pnts_in[1],
&solid_pnts_in[2]);
solid_pnts_out[0] = (double)solid_pnts_in[0];
solid_pnts_out[1] = (double)solid_pnts_in[1];
solid_pnts_out[2] = (double)solid_pnts_in[2];
UF_CURVE_create_point(solid_pnts_out, &point);
UF_MODL_create_points_feature(1,&points, &feature_tag);
}
fclose(myfile);
}
作者:
ywsqq
时间:
2006-4-17 00:42
呵呵,我做的东西和楼上差不多,也没有解决这个问题,希望能得到高手指点,楼上大哥如果先解决了这个问题的话,能否也告诉我一下呢?谢谢哦!我的信箱
ywsqq@hotmail.com
作者:
libo_reverse
时间:
2006-4-18 22:51
我已经实现了这段程序了:
FILE *myfile;
float fx,fy,fz;
int count;
tag_t Point, feature_tag;
double P[3];
count = 0;
myfile = fopen("D:\\Start.dat", "r.");
rewind(myfile);
while(!feof(myfile))
{
fscanf(myfile, "%f %f %f\n", &fx, &fy, &fz);
count++;
}
fclose(myfile);
myfile = fopen("D:\\Start.dat", "r.");
rewind(myfile);
for (int i=0; i<count; i++)
{
fscanf(myfile, "%f %f %f\n", &fx, &fy, &fz);
P[0] = (double)fx;
P[1] = (double)fy;
P[2] = (double)fz;
UF_CURVE_create_point (P, &Point);
UF_MODL_create_points_feature (1, &Point, &feature_tag );
}
fclose(myfile);
uc1601("ok",1);
}
作者:
ywsqq
时间:
2006-4-19 08:54
呵呵,好啊!谢谢!我试试!
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3