|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
, D- L" M# Y9 ?' F6 W2 |. g
6 j; l' o& l# {3 O8 V
0 w1 \/ l6 o. t6 h0 x% L* K% e# R1 |) I8 {5 m
这功能其实很好用,比如选择面,自动显示面的法线等等。) i9 g, P/ D: b; |; @9 ^; d
0 H& }+ i" _( w6 }* d0 b) W% }+ Y, h+ S
static void do_UGopen_api(void)
2 t/ }6 v6 h3 t8 s. J{
: ^5 D% z) g ?. ~2 a: x6 e double pt1[3] = {0.0, 0.0, 0.0};6 X1 t# U" n$ Q: i6 Y+ e. I
double pt2[3] = {2.0, 2.0, 2.0};! C h! |, j# y
double pt3[3] = {-2.0,-2.0,-2.0};" e# T& H1 V4 n1 S6 b
double vect1[3] = {1.0, 1.0, 1.0};
/ p6 a" t, ]" g' D: ^7 O) b UF_DISP_conehead_attrb_s attrb;
4 f" M, k1 `, k7 A UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
# V' e3 K& H7 `! S6 j& F pt1, vect1, 1);$ D y) @. O+ A+ n
/* Example to draw the vector with the base of its staff5 C5 Z4 ~ Q8 y/ R
anchored at the origin so that the vector appears to point
: G1 e% t/ d6 e away from the origin' n; s" Y# [, X$ }4 k
*/
) `+ t! b1 Z. r7 U2 r% r UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
3 X+ y# x" T! l. E pt2, vect1, 0);
1 J- [8 y- a! S" X, j6 ]' | UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
% b8 x, R5 P$ Y6 @ pt3, vect1, 0, "Normal");
/ L7 q C0 {5 ?+ j% C9 W5 a UF_DISP_get_conehead_attrb(&attrb);- ?9 l0 {1 ~3 O8 w- ~- M8 F% v9 Z
/* Use color index three */
0 G8 P8 B$ z! i6 `' m attrb.color = 3;4 _) o# l5 ^: Z4 n5 l
/* Update the current attribute settings */
7 U' L2 |+ q" P& D UF_DISP_set_conehead_attrb(&attrb);
- k$ Q2 }- N- K# T printf("\nCurrent conhead display settings:\n");
1 `# K1 O6 b, _& _( |8 X2 y7 R* i printf("\tLength of Staff: %g\n", attrb.staff_length);
+ \) S/ A7 [/ o# e3 _2 p1 t printf("\tTotal Length: %g\n", attrb.total_length);' D4 |9 z0 S" Z9 i
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
7 l5 J. g" R0 l! H printf("\TColor Index: %d\n", attrb.color);2 |" g% J# X4 x# k/ q8 B% P8 i& D
printf("\tFont Index: %d\n", attrb.font);
0 i+ ]/ g) G2 d printf("\tDensity Index: %d\n", attrb.density);
# Z9 G& Z7 i! S}
6 b! g% t# t% Y/ `" E) s/ v
3 K( b+ K% @4 l |
|