void AttrTool2::CalculateMinBoundingBox(tag_t tagTarget,ALLDATA &alldata)
{
if (alldata.have_calculated==true)
{
return;
}
else
{
alldata.have_calculated = true;
}
//print(111);
alldata.body_tag = tagTarget;
alldata.Qtall = Qtall;
double box[6];
PK_TRANSF_t tf = NULL;
tag_t a1 = 0; PK_ENTITY_t b1 = 0;
UF_PS_ask_ps_tag_of_object(tagTarget, &a1);
PK_TOPOL_find_nabox_o_t options; PK_TOPOL_find_nabox_o_m(options);
PK_NABOX_sf_t nabox;
PK_TOPOL_t topols = (PK_TOPOL_t)a1;
double dOrigin[3] = { 0 };
double dis[3];
map<double, tag_t>face_map;
map<double,double*>cly_map;
for (int i = 0; i < alldata.BodyData.face_num; i++)
{
double s=0;
tag_t facetag;
UF_PS_ask_object_of_ps_tag(alldata.BodyData.face[i],&facetag);
int type = 0;
UF_MODL_ask_face_type(facetag,&type);
if (type == UF_MODL_PLANAR_FACE)
{
s=GetFaceArea(face
获取最小包络框(包容柱)改良版
于 2024-03-18 14:33:20 首次发布