|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
5 q2 l l/ O5 x7 ?) Z* \" L0 l5 G( Z7 z- Z2 t. [/ U, a$ {9 x
4 q/ R N5 g5 p( z3 Q" C
" s5 _* b4 R0 R这功能其实很好用,比如选择面,自动显示面的法线等等。
5 r/ b+ O2 C0 ]3 T% M# ~
K( N+ d4 y; S. b1 Istatic void do_UGopen_api(void)
% _6 d5 f5 j4 Q$ ]3 b{4 }4 u7 l4 m$ g! K( F/ E4 F
double pt1[3] = {0.0, 0.0, 0.0};
: k' }$ ^* j; T+ ? F double pt2[3] = {2.0, 2.0, 2.0};4 G4 C: r' S+ t, s) h2 c
double pt3[3] = {-2.0,-2.0,-2.0};" g0 M3 d8 x& f* _; P8 y. S+ q
double vect1[3] = {1.0, 1.0, 1.0};1 o7 p4 Y! w# F: T) z1 L
UF_DISP_conehead_attrb_s attrb;
- _+ K9 `) W0 V2 n9 o5 g. r- V UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
4 b! Y7 |% D- D; T; Z2 n) j pt1, vect1, 1);
: j4 O; i8 V3 P$ v- m$ f /* Example to draw the vector with the base of its staff3 X+ a: k7 F+ A" x I
anchored at the origin so that the vector appears to point
( A' D9 P8 K1 e1 g1 D away from the origin
; \5 s) t% K$ x* Y, }7 O/ u */
) x i& H5 e% B* h) Y% E UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS," q: D; R- u* `% [ ?
pt2, vect1, 0);
- _! j: t/ s# i, _8 F: F* x UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
( u a1 v: n' q- j8 m: P. i pt3, vect1, 0, "Normal");
$ u1 E; A! Q8 o- b/ _% K, L UF_DISP_get_conehead_attrb(&attrb);
+ M7 R: a& W) |) }8 ] /* Use color index three */2 ~; m& `9 Q8 ?
attrb.color = 3;, z2 M% |9 h2 |& c3 ?+ E4 D
/* Update the current attribute settings *// J: b% G8 V- s Z& }/ q
UF_DISP_set_conehead_attrb(&attrb);
4 [+ A& h% i9 x: J& c printf("\nCurrent conhead display settings:\n");
( U& o* S) Y. }) u8 Z7 ~ printf("\tLength of Staff: %g\n", attrb.staff_length);( ]9 f5 J0 @+ X. E+ ~7 o
printf("\tTotal Length: %g\n", attrb.total_length);9 m- H* @: V$ K: ?% n
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);' G# k' M0 h; ]+ h* [
printf("\TColor Index: %d\n", attrb.color);$ y: Y L9 g% f8 o5 G* `
printf("\tFont Index: %d\n", attrb.font);
( p3 d. z; }% ]7 L r4 Q* Y" _% J* ~ printf("\tDensity Index: %d\n", attrb.density);
0 v& F/ Q# e3 d7 j4 Z7 w0 U3 I, p}- [ w( C) `: `, G7 V
/ A% K# h, ~9 n& L
|
|