int type = 1;//solid body
int units = 1;
double density = 1;
int accuracy = 1;// Use Accuracy
double acc_value[11] = {1.0,0,0,0,0,0,0,0,0,0,0};
double mass_props[47];//output
double statistics[13];//output
int ret = UF_MODL_ask_mass_props_3d(objects,count,type,units,density,
accuracy,acc_value,mass_props,statistics);
if(ret == 0)
{
CString volume ;
volume.Format("%.1f",mass_props[1]);
SetDlgItemText(IDC_VOLUMEEDIT, volume);
}
else
AfxMessageBox("计算体积错误!");作者: 深夜摔键盘 时间: 2005-8-12 09:40
int units Input Units of mass and length
1 = Pounds and inches
2 = Pounds and feet
3 = Grams and centimeters
4 = Kilograms and meters 作者: shaoxjin 时间: 2005-8-12 09:59
非常感谢键盘大哥~~!