|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
* t6 S4 M5 S+ ?: @
" \1 L5 _3 U% T9 K2 A8 r
& n0 V8 ^; Z# R* R E% x- o, j
这功能其实很好用,比如选择面,自动显示面的法线等等。
. m1 R0 G: \$ }3 r4 D$ ^
$ q0 {$ D8 |$ c0 @9 k6 Estatic void do_UGopen_api(void)
: A- e+ F; S/ }7 o# s+ E( q7 E{
, X' N8 ]& G) I e6 j6 L; D double pt1[3] = {0.0, 0.0, 0.0};) j. V, t- R" \6 f$ `, N! P
double pt2[3] = {2.0, 2.0, 2.0};
z- |; l- } V" q" z9 n9 }6 n2 D, N double pt3[3] = {-2.0,-2.0,-2.0};
' s6 X5 @; c) o, R5 _; v3 J double vect1[3] = {1.0, 1.0, 1.0};
1 b0 R5 d' V+ C | UF_DISP_conehead_attrb_s attrb;
" C( |! C* _. V. E! x% D UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,. J! D) a/ q* Z& c" G3 p
pt1, vect1, 1);
+ r/ c8 i0 N e /* Example to draw the vector with the base of its staff
2 R1 s% r3 V! d( C! K: _ anchored at the origin so that the vector appears to point; t1 \. v, \. u
away from the origin* R/ _. u! a% t5 Q
*/) o" K# D8 j+ ~" e- G/ g: q
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
4 {- L2 P9 k/ ^. A7 ?2 G4 m pt2, vect1, 0);
# ?! y- Q" A# ^2 h& X$ s' Q8 }1 \ UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,1 ^- f8 c6 S8 p, b# Q9 k2 h+ m
pt3, vect1, 0, "Normal");) s8 q: _; }0 S0 r
UF_DISP_get_conehead_attrb(&attrb);8 ~1 P- W; _2 g) q/ T& w3 H7 a
/* Use color index three */5 q9 v. c2 }( [' Z g1 L0 W
attrb.color = 3;# Q a" u" `! @! c. F
/* Update the current attribute settings */
2 G" @! T9 q' l4 l; S UF_DISP_set_conehead_attrb(&attrb);
# D' B! q/ q% k }' j% C" {% S printf("\nCurrent conhead display settings:\n");% a# }0 o* y& X) }: V4 ^
printf("\tLength of Staff: %g\n", attrb.staff_length);
; O! s9 n' [& S printf("\tTotal Length: %g\n", attrb.total_length);
) e) d7 f) a1 b: |) O) k" g printf("\tRadius of Cone Base: %g\n", attrb.cone_radius); B0 r! I4 l, @, m9 i# \: c6 l
printf("\TColor Index: %d\n", attrb.color); y6 R) F! n; H( I7 R/ B# Y
printf("\tFont Index: %d\n", attrb.font);; }5 }2 i" ^- N: j, N
printf("\tDensity Index: %d\n", attrb.density);: v- z/ j' I* N- k
}
9 v `, A* V9 O
. E1 `7 C9 x. o, s) D" H5 |' Q |
|