blend:
参数:
/*8倒角的参数*/
/*取圆柱体1的平面,判断参数*/
int num_faces,ii,num_mao,num_edge;
double face_param[2],face_point[3],face_u_deriv1[3];
double face_v_deriv1[3],face_u_deriv2[3],face_v_deriv2[3];
double face_normal[3],face_radii[2];
uf_list_p_t face_list;
//tag_t place_face[1];
tag_t face_tag, mao_tag,edge_tag,edge_obj_cir;
//tag_t top_face[1],
uf_list_p_t cy1_edge_list, blend1_edge_list;
int edge_type;
const char * blend1_radius = "0.2";
// uf_list_p_t blend1_edge_list;
int blend1_smooth_overflow = 0;
int blend1_cliff_overflow = 0;
int blend1_notch_overflow = 0;
double blend1_vrb_tool = 0;
tag_t blend1_feature_obj_1;
实现:
//从体取面
UF_MODL_ask_feat_faces(mao_tag , [$face_list)]
UF_MODL_ask_list_count(face_list, [$num_faces)]
face_param[0] = 0.5;
face_param[1] = 0.5;
for (ii = 0;ii < num_faces;ii++)
{
UF_MODL_ask_list_item(face_list, ii, [$face_tag)]
UF_MODL_ask_face_props(face_tag,
face_param,
face_point,
face_u_deriv1,face_v_deriv1,
face_u_deriv2,face_v_deriv2,
face_normal,face_radii);
// if (face_normal[2] > 0.75)
// place_face[0] = face_tag;
// if (face_normal[1] < -0.75)
// top_face[0] = face_tag;
}
//从面取线
UF_MODL_ask_face_edges (face_tag, [$cy1_edge_list)]
UF_MODL_ask_list_count(cy1_edge_list, [$num_edge)]
for(ii=0;ii<num_edge;ii++)
{
UF_MODL_ask_list_item(cy1_edge_list, ii, [$edge_tag)]
UF_MODL_ask_edge_type (
edge_tag,
[$edge_type)]
if(edge_type == UF_MODL_CIRCULAR_EDGE)
{
edge_obj_cir = edge_tag;
}
// sprintf(temp,"vertex_count=%f\n",point1[2]);
// UF_UI_write_listing_window(temp);
}
UF_MODL_create_list([$blend1_edge_list)]
UF_MODL_put_list_item(blend1_edge_list, edge_obj_cir);
UF_MODL_create_blend (blend1_radius, blend1_edge_list, blend1_smooth_overflow, blend1_cliff_overflow, blend1_notch_overflow, blend1_vrb_tool, [$blend1_feature_obj_1)] |