|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
3 A) K( O' [# q& r9 M4 h7 M2 h* y7 U/ a, ]& l2 D2 X) K- I
% Z+ w9 j- Q6 P3 q/ O! L
8 E8 a) D: I' K. p/ |这功能其实很好用,比如选择面,自动显示面的法线等等。/ m. z: N2 \9 Q/ K
) q) t* N! p* z' h% b( k) \! I
static void do_UGopen_api(void)
]% i9 b+ n R! A) w' o* X{- l5 V# r/ o5 U6 ]+ |4 T2 o
double pt1[3] = {0.0, 0.0, 0.0};* E9 t. r! ^2 e$ C) x
double pt2[3] = {2.0, 2.0, 2.0};
2 R, ^0 y& s' d! P4 h double pt3[3] = {-2.0,-2.0,-2.0};7 c' |4 e5 s' g5 x# j) X
double vect1[3] = {1.0, 1.0, 1.0};
7 y) z: u, K$ {& L$ H% e* V4 t UF_DISP_conehead_attrb_s attrb;+ W4 m9 [/ w. Y
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS," \ Y. V& R/ |. g
pt1, vect1, 1);- D8 Y2 D+ r. l4 }7 g- h
/* Example to draw the vector with the base of its staff: @8 I7 C& R4 g- @( d5 K- Q7 {
anchored at the origin so that the vector appears to point
* D9 E; X0 `; \. }2 J# @6 e away from the origin' T' q5 s6 |3 D2 w. E8 @
*/
3 B+ j% I7 x6 x UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
8 G6 i+ @3 |( p( C pt2, vect1, 0);
1 G4 h' K. ]: d4 `; y UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
* M+ ~9 n8 E9 t/ r8 R, g8 \$ D1 _ pt3, vect1, 0, "Normal");" u+ \6 F7 s5 D# m+ ?4 r) g
UF_DISP_get_conehead_attrb(&attrb);
' \) K8 F4 p4 D; v$ n /* Use color index three */
$ y* n1 S c- _$ b4 p2 @1 D7 c attrb.color = 3;2 A' r9 W ~; E
/* Update the current attribute settings */( ?" b' w6 j, Q; x l
UF_DISP_set_conehead_attrb(&attrb);; L/ r1 }1 g& k, l
printf("\nCurrent conhead display settings:\n");6 J, ?4 q! e+ U7 e
printf("\tLength of Staff: %g\n", attrb.staff_length);$ i5 `1 ]; S$ i9 r& A: a
printf("\tTotal Length: %g\n", attrb.total_length);. D" i* d: I; P3 F; W# g' T0 y
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);8 s1 @( B W0 K' z6 n% z
printf("\TColor Index: %d\n", attrb.color);! d6 I% T7 w( b7 \( F" O
printf("\tFont Index: %d\n", attrb.font);7 R. C! }0 D/ X& i
printf("\tDensity Index: %d\n", attrb.density); ^6 \0 [7 l! s4 Y, R& \
}' f/ H O* [* E* z# G. I2 A$ G3 Z
! R& C; u2 K1 i2 U0 }
|
|