|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
" }/ f8 }6 i% e; l& n
7 c' I G3 \' i- x+ ^9 l
, A/ y1 `. a: w* I
0 @+ d: a# g! q1 t3 W
这功能其实很好用,比如选择面,自动显示面的法线等等。- k$ n* [( o5 J t5 F* Y
* ?( ?& a3 Y1 y
static void do_UGopen_api(void)3 x1 ^3 G3 p. k1 N) A# ^4 U+ q
{
% s+ W$ @, n( X4 Q- G- e double pt1[3] = {0.0, 0.0, 0.0};
. T+ q) h: Q: A double pt2[3] = {2.0, 2.0, 2.0};2 k* C. H- G5 a; Y+ L" A1 D
double pt3[3] = {-2.0,-2.0,-2.0};# }( A7 J9 X5 X8 n$ u+ c
double vect1[3] = {1.0, 1.0, 1.0};5 ^4 m! j, S5 ^& W" s( R7 X1 G. U
UF_DISP_conehead_attrb_s attrb;; t% `! e! g, c. ?6 I$ O3 q$ E
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,' s/ }: f+ x. D
pt1, vect1, 1);
8 ? S$ |7 f& d& D5 m y) U /* Example to draw the vector with the base of its staff
; T |$ j* R, m2 q" o6 ]/ @! v5 u1 t2 x anchored at the origin so that the vector appears to point
! x$ F7 c4 H W1 x% p! @ away from the origin
. v: u, [1 U( H' M8 ?- h! d */* O$ ] y$ j a0 x& L" H) T5 p5 i
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,4 h1 `6 t& G' ]2 K
pt2, vect1, 0);
" |1 g. b1 \4 T) b4 k9 C UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,6 f- _: @; w) j" n* S/ ]
pt3, vect1, 0, "Normal");
+ Q$ T' D+ B; }7 _2 y3 q# w UF_DISP_get_conehead_attrb(&attrb);. L5 H3 i8 z2 G9 e! ?
/* Use color index three */
; ?* l1 y4 x% v5 x# H' @ attrb.color = 3;$ ` C! ?) I& ^0 o4 Y. Q* C
/* Update the current attribute settings */9 k H [% i( M5 F5 n
UF_DISP_set_conehead_attrb(&attrb);$ \" v- L* G( x! F( o1 X) e8 t; i
printf("\nCurrent conhead display settings:\n");
2 \/ r: c" o5 j printf("\tLength of Staff: %g\n", attrb.staff_length);
' i) n* C% ?- K9 X! Q, _7 k# ^ printf("\tTotal Length: %g\n", attrb.total_length);
4 v. m: O. J: M0 i* Y printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
5 U3 E1 k! @2 k1 E# ~/ C q) g printf("\TColor Index: %d\n", attrb.color);
6 w9 m. D( Q' V6 K3 w) K. i printf("\tFont Index: %d\n", attrb.font);$ [; s, U$ i' t/ p
printf("\tDensity Index: %d\n", attrb.density);# S2 K5 j8 D3 h3 c+ R- h
}
; p' L. H( U( g- g3 f* F. k2 l2 u7 O+ U/ t/ l, `- i3 F, H. c
|
|