|
发表于 2021-10-26 19:10:31
|
显示全部楼层
tag_t classTAG=theselectCLASSPros[0]->Tag();
double bounding_Box[6];
UF_MODL_ask_bounding_box( theselectCLASSPros[0]->Tag(), bounding_Box);
double x = (bounding_Box[3] + bounding_Box[0])/2;
double y = (bounding_Box[4] + bounding_Box[1])/2;
double z = (bounding_Box[5] + bounding_Box[2])/2;
double uv_min_max[4];
UF_MODL_ask_face_uv_minmax(classTAG, uv_min_max);
double parameter[2];
/* double ref_pnt[3]={x,y,z};
double face_pnt[3];
UF_MODL_ask_face_parm(classTAG,ref_pnt,parameter,face_pnt); */
double point1[3];
double U1[3];
double V1[3];
double U2[3];
double V2[3];
double unit_norm[3];
double radii[2];
UF_MODL_ask_face_props (classTAG,parameter,point1,U1,V1,U2,V2,unit_norm,radii);
UF_CURVE_line_t Line_coords1[2];
Line_coords1[0].start_point[0] =x+(U2[0]+U1[0])/2;
Line_coords1[0].start_point[1] =y+(U2[1]+U1[1])/2;
Line_coords1[0].start_point[2] =z+(U2[2]+U1[2])/2;
Line_coords1[0].end_point[0] =x-(U2[0]+U1[0])/2;
Line_coords1[0].end_point[1] =y-(U2[1]+U1[1])/2;
Line_coords1[0].end_point[2] =z-(U2[2]+U1[2])/2;
Line_coords1[1].start_point[0] =x+(V2[0]+V1[0])/2;
Line_coords1[1].start_point[1] =y+(V2[1]+V1[1])/2;
Line_coords1[1].start_point[2] =z+(V2[2]+V1[2])/2;
Line_coords1[1].end_point[0] = x-(V2[0]+V1[0])/2;
Line_coords1[1].end_point[1] = y-(V2[1]+V1[1])/2;
Line_coords1[1].end_point[2] =z-(V2[2]+V1[2])/2;C:\Users\LLVSOO\Desktop\_model1.png
tag_t Line1[2];
UF_CURVE_create_line(&Line_coords1[0], &Line1[0]);
UF_CURVE_create_line(&Line_coords1[1], &Line1[1]); |
|