|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
* u; Q& [; q7 u- [: `/ T9 j) ]
8 @3 ^( e3 }; F" ^# Z# h6 S5 K, D
& o. Z% Q. d8 ~* f7 [$ J1 F( t! o
6 u& Q% x4 ], B. `9 H- o3 `! V这功能其实很好用,比如选择面,自动显示面的法线等等。
" W0 [" Q. l5 f- f2 v: V0 k* p& n( D: K9 o. l
static void do_UGopen_api(void)
. C% X. n l; }. V{+ L8 ^( X; u U' y3 h( p6 B3 n
double pt1[3] = {0.0, 0.0, 0.0};
4 x+ e, B6 v l2 G. q1 G5 o/ q double pt2[3] = {2.0, 2.0, 2.0};
1 }* g' I9 ~# l4 B double pt3[3] = {-2.0,-2.0,-2.0};
. @! O6 Y" e* y$ L2 G! n double vect1[3] = {1.0, 1.0, 1.0};
0 ]: Q, F0 Z. s; t: [( ~ UF_DISP_conehead_attrb_s attrb;' E( n$ V5 t, o( F" s' k
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,0 I, R, F+ Z6 ?) |! i8 @ w9 q
pt1, vect1, 1);' R& }2 ?6 D! }9 O# _' [. m& {* C
/* Example to draw the vector with the base of its staff2 n& D- l1 s h
anchored at the origin so that the vector appears to point3 s+ h0 i3 Y7 S2 D T2 ~
away from the origin
6 w6 G5 K; t- l5 P9 o' O */) a" g4 v4 x* W R1 r% [, I
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,: Z$ M# s: [. ?: \7 K2 O
pt2, vect1, 0);6 r" @& O+ _) y9 x$ q. T
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,+ @6 O% {( I+ I
pt3, vect1, 0, "Normal");
7 q! U3 F+ q4 X/ x, Z) s UF_DISP_get_conehead_attrb(&attrb);2 P/ N2 J# j0 o
/* Use color index three */' z' Y! O: ~+ v
attrb.color = 3;5 l& o$ c, p* u5 [3 [2 x P0 g
/* Update the current attribute settings */. i! o- I+ A3 g! n9 \
UF_DISP_set_conehead_attrb(&attrb);# z' t" m. w; N0 \- x: y5 c' M3 T
printf("\nCurrent conhead display settings:\n");
9 l1 g) V0 j8 N7 _' c4 |$ X/ `) J: k printf("\tLength of Staff: %g\n", attrb.staff_length);
4 j4 w1 \) `. `( f6 d printf("\tTotal Length: %g\n", attrb.total_length);1 Q. g5 Q6 g7 B7 A7 Y) A
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);+ {3 Z6 A% j' R& o5 Q
printf("\TColor Index: %d\n", attrb.color);- K2 [4 q5 C# w* m! y
printf("\tFont Index: %d\n", attrb.font);* a$ g7 u* I! y: E i' E/ h
printf("\tDensity Index: %d\n", attrb.density);1 i* ?7 F$ ]% [" T1 v# Z
}
* C3 W$ A/ Q1 h; N3 V+ h v7 q; [! j0 J \9 z1 ~* R' K' g
|
|