|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
- }& Z: V4 ~' a' D& n1 g
: Z9 `/ t& [0 c& g0 l' `
; R: r# [4 z4 e( S8 [0 W) u [, _5 Y
这功能其实很好用,比如选择面,自动显示面的法线等等。% I6 K5 `2 T; h
* H! {% s9 D+ |# H; Z' O Ostatic void do_UGopen_api(void)! v! o0 m! f# I+ ^" @; _3 i
{1 G2 x D& R% r* v% m
double pt1[3] = {0.0, 0.0, 0.0};
. ~7 [+ |4 ]% E) e* P3 |1 ~& ~ double pt2[3] = {2.0, 2.0, 2.0}; t$ v6 B/ f& ?) G& x+ d& f& ]
double pt3[3] = {-2.0,-2.0,-2.0};
/ r( q+ P+ i' b1 _, \ double vect1[3] = {1.0, 1.0, 1.0};8 P) t9 K9 m2 _. D9 B+ B: Z1 |# {
UF_DISP_conehead_attrb_s attrb;
) z% |1 `( h3 n; V) l UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
$ [/ o3 V% A a. d9 ?! b% j pt1, vect1, 1);9 J+ g6 Q2 R- ]9 R
/* Example to draw the vector with the base of its staff, ~) t+ g1 Q* k+ o: C: z
anchored at the origin so that the vector appears to point
Q; ^) x8 c2 O away from the origin+ E o+ v( [ T1 O2 M2 s5 J3 Y
*/& E& P5 v* z5 J8 X6 x+ m) ?
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,. U1 w6 V5 j; Y- x
pt2, vect1, 0);. g8 M4 {, N, h: U7 _/ }7 a
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,; h' i: A# [" p) |( g. }+ F5 d
pt3, vect1, 0, "Normal");
# g& z* G G0 Z9 x8 f UF_DISP_get_conehead_attrb(&attrb);
! W0 P) }4 o1 H/ m) E2 a; p /* Use color index three */9 D( g4 Y! @% N8 { |/ Y3 R4 {
attrb.color = 3;; @- Q* Q# L# s% h W3 V
/* Update the current attribute settings */
9 {" c" s" B( `( O/ _% ^& } UF_DISP_set_conehead_attrb(&attrb);. R3 X/ g6 x0 K+ y; m4 E
printf("\nCurrent conhead display settings:\n");$ P# x. `! B! e! ?+ w
printf("\tLength of Staff: %g\n", attrb.staff_length);+ w( V# O* G! l6 Z [' k
printf("\tTotal Length: %g\n", attrb.total_length);
$ {4 @2 i: C) a9 k$ ` printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);$ z- K& }' V( Q+ ^1 S
printf("\TColor Index: %d\n", attrb.color);
4 I) R {0 d& k# J- a& z1 G printf("\tFont Index: %d\n", attrb.font);
+ D! J" n/ m7 }, i& z6 P printf("\tDensity Index: %d\n", attrb.density);
/ ~. b) h! \8 x4 ~}* m5 a) ~% z f2 I; |1 k+ D8 z
$ ^! u9 L* [' @6 K1 M
|
|