中心线,代码错了,下面那个代码是对了,改不了线型,只有TAG**,找不到他的TAG不会怎么..
//错误代码从这里开始,
void TT_CREATE_CenterLine_TOOL::dosthCLASS_cb()
{
UF_initialize();
std::vector<TaggedObject *>theselectCLASSPros=selectionCLASS->GetProperties()->GetTaggedObjectVector("SelectedObjects");
tag_t classTAG=selectionCLASS->Tag();
if (enumCLASS->GetProperties()->GetEnum("Value")==0)
{
if (enumFACE->GetProperties()->GetEnum("Value")==0)
{
tag_t classTAG=theselectCLASSPros->Tag();
double bounding_Box;
UF_MODL_ask_bounding_box( theselectCLASSPros->Tag(), bounding_Box);
double x = (bounding_Box + bounding_Box)/2;
double y = (bounding_Box + bounding_Box)/2;
double z = (bounding_Box + bounding_Box)/2;
double uv_min_max;
UF_MODL_ask_face_uv_minmax(classTAG, uv_min_max);
double parameter;
/*double ref_pnt={x,y,z};
double face_pnt;
UF_MODL_ask_face_parm(classTAG,ref_pnt,parameter,face_pnt);*/
double point1;
double U1;
double V1;
double U2;
double V2;
double unit_norm;
double radii;
UF_MODL_ask_face_props (classTAG,parameter,point1,U1,V1,U2,V2,unit_norm,radii);
UF_CURVE_line_t Line_coords1;
Line_coords1.start_point =x+(U2+U1)/2;
Line_coords1.start_point =y+(U2+U1)/2;
Line_coords1.start_point =z+(U2+U1)/2;
Line_coords1.end_point =x-(U2+U1)/2;
Line_coords1.end_point =y-(U2+U1)/2;
Line_coords1.end_point =z-(U2+U1)/2;
Line_coords1.start_point =x+(V2+V1)/2;
Line_coords1.start_point =y+(V2+V1)/2;
Line_coords1.start_point =z+(V2+V1)/2;
Line_coords1.end_point = x-(V2+V1)/2;
Line_coords1.end_point = y-(V2+V1)/2;
Line_coords1.end_point =z-(V2+V1)/2;
tag_t Line1;
UF_CURVE_create_line(&Line_coords1, &Line1);
UF_CURVE_create_line(&Line_coords1, &Line1);
这个做出来太长了,中心和线是对的,哪里出错了
另一个用等参数做的,找不到Tag,只有tag**,代码是对的,找不到TAG来改线型
tag_t classTAG=theselectCLASSPros->Tag();
int face_type = 0;
UF_MODL_ask_face_type(classTAG,&face_type);
//分析曲面的u,v参数最大值和最小值
double uv_min_max;
UF_MODL_ask_face_uv_minmax(classTAG, uv_min_max);
//在面上创建等参数曲线
int uv_flag;
uv_flag=1;
uv_flag=2;
double parameter;
parameter = (uv_min_max + uv_min_max)/2;
parameter = (uv_min_max + uv_min_max)/2;
double dist_tol = 0.01;
tag_t* isocurve_id;
int isocurve_cnt = 0;
if (enumFACE->GetProperties()->GetEnum("Value")==1)
{
UF_MODL_create_isocurve(classTAG, uv_flag, parameter, dist_tol, &isocurve_id, &isocurve_cnt);
UF_MODL_create_isocurve(classTAG, uv_flag, parameter, dist_tol, &isocurve_id, &isocurve_cnt);
}
else if (enumFACE->GetProperties()->GetEnum("Value")==2)
{
UF_MODL_create_isocurve(classTAG, uv_flag, parameter, dist_tol, &isocurve_id, &isocurve_cnt);
}
else
{
UF_MODL_create_isocurve(classTAG, uv_flag, parameter, dist_tol, &isocurve_id, &isocurve_cnt);
}
}
帮你顶,坐等高手解答 顶一下,虽然与我无关
页:
[1]