|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
1 Q. q; e1 I6 O1 J+ `, M' [1 ~: g
; k% ]5 k& v8 x% [3 |4 X" i$ Z
+ |" Z( J% X3 w7 G+ r l+ L2 m( V. N6 s! U5 [+ x6 T2 }
这功能其实很好用,比如选择面,自动显示面的法线等等。
0 @: \ Y4 G$ h0 E- O& g
" D% y, D3 v# z& S) gstatic void do_UGopen_api(void)
! a, F' h& x! \+ A2 k* c& n3 S0 s{
7 f& {2 F- m2 W9 u double pt1[3] = {0.0, 0.0, 0.0};& V! `1 y$ B8 W- \
double pt2[3] = {2.0, 2.0, 2.0};5 q d: `( h e& f1 c2 M2 k% c
double pt3[3] = {-2.0,-2.0,-2.0};0 d- D7 e: f" O5 y
double vect1[3] = {1.0, 1.0, 1.0};4 a6 u0 j7 P7 E' q- R- U
UF_DISP_conehead_attrb_s attrb;' n4 ?" c* E8 y9 f; P& p
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,( o6 f2 n& M6 ]# C& a
pt1, vect1, 1);
! S! s3 U9 y3 L* [. o$ N9 U1 ]% @ /* Example to draw the vector with the base of its staff. Y$ k* J8 o3 x: D
anchored at the origin so that the vector appears to point7 }- ?, I" v' T* B' `# r
away from the origin* k2 a8 P. W4 Q" {. ?2 E8 [1 S
*/
. q" h0 u% K/ u! r# K UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,9 ~. L- c ]& j6 v& W. o* r
pt2, vect1, 0);( R$ [/ W! o+ p& l
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
1 e0 G0 a! l' ~ pt3, vect1, 0, "Normal");
/ A0 ^9 d! U1 ? Z- K7 [ ]! _ UF_DISP_get_conehead_attrb(&attrb);# n5 G) s# N& v% n! R" ~9 `
/* Use color index three */
, z# H9 k; B1 b- _5 H2 A7 F attrb.color = 3;0 m. F/ e" Y" D% ?! S5 \- h2 p# p0 B
/* Update the current attribute settings */; v. B3 y, e) B+ z- l. |% I1 r6 B
UF_DISP_set_conehead_attrb(&attrb);
{, W- O' B- s8 Q printf("\nCurrent conhead display settings:\n");
+ X' T. T2 ]+ N! d/ I printf("\tLength of Staff: %g\n", attrb.staff_length);! [5 E0 s0 @" J- Q' U: ]2 K
printf("\tTotal Length: %g\n", attrb.total_length);+ F* T* }8 w1 S& T
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);! _- V3 }( X# X, [0 W: p
printf("\TColor Index: %d\n", attrb.color);
& k h- `" |+ A0 b9 u2 O printf("\tFont Index: %d\n", attrb.font);
& {; O. \! N& y [ printf("\tDensity Index: %d\n", attrb.density);
0 p+ g1 ~& e% G: Q}+ h2 j, R) W+ _1 B, Q3 \8 e
) Y2 K. l3 |7 y4 X6 r |
|