|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
! a( x6 O$ m& \$ Z" `
( F" F" m! G m, V+ V. r" W9 P
9 w- B/ u4 Z, b) \) I
! q/ M5 J" D6 k* J' s这功能其实很好用,比如选择面,自动显示面的法线等等。
. N, h8 U$ i) @
: F1 x _2 _' l- ^static void do_UGopen_api(void)6 [5 J p% `+ U% W
{
/ l8 i5 S3 k+ T* C3 Y double pt1[3] = {0.0, 0.0, 0.0};/ y$ Y! B. Y5 I0 n% U/ W9 ~
double pt2[3] = {2.0, 2.0, 2.0};9 y5 V, ^' w7 a. C/ \$ I Y
double pt3[3] = {-2.0,-2.0,-2.0};3 E1 R) K' }) J$ F9 y
double vect1[3] = {1.0, 1.0, 1.0};$ F& @1 c0 x `$ f
UF_DISP_conehead_attrb_s attrb;
7 G7 y! A' U$ m3 M5 l UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,% i$ x; @& E& w$ R8 @3 w, Q5 ~
pt1, vect1, 1);
3 K& D9 m5 ^, j' L6 c! y# u /* Example to draw the vector with the base of its staff
8 ?% }, r: s5 Y. s5 @- u: w- E+ | anchored at the origin so that the vector appears to point
- u5 J& M% k# e6 F& I, N* R away from the origin% d9 g8 w0 @9 J
*/
. u# z) m5 E8 Q# k* X2 n8 Q) h UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
$ f* O" U2 B5 @& t- |' T pt2, vect1, 0);/ `; L; e5 ~1 F9 g1 [
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,. `+ ^; q+ Z$ X6 D. _0 s% z# d
pt3, vect1, 0, "Normal");
; Y' X. F1 W" R0 X Q UF_DISP_get_conehead_attrb(&attrb);( \: ~% c/ B# e2 j) S/ F
/* Use color index three */
^! I$ L. K6 w+ {7 o attrb.color = 3;
7 M0 R7 Z' k7 ]( u; C$ s9 d+ @, _ /* Update the current attribute settings */
1 G/ t/ b/ \5 U, k. h UF_DISP_set_conehead_attrb(&attrb);
: l6 a% l. q$ N& ? printf("\nCurrent conhead display settings:\n");. h4 Y* v7 W9 H) z
printf("\tLength of Staff: %g\n", attrb.staff_length);+ v7 J5 H0 _0 h7 P, M
printf("\tTotal Length: %g\n", attrb.total_length);
& W0 }! z4 ^5 b+ ^% q2 | printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
/ g. o1 y) H) U$ j# f. P% k printf("\TColor Index: %d\n", attrb.color);
0 l [& y' r5 p3 D% E$ y printf("\tFont Index: %d\n", attrb.font);
, |* M1 [% m' Q( w1 p7 ` printf("\tDensity Index: %d\n", attrb.density);! r( {0 M, B: a, r- [0 A i
}
1 E4 j1 L5 [6 |9 p2 n( @7 F: x: v9 ], V9 k2 r4 j9 p
|
|