|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
×
( P* @3 f: C" L% O3 }$ _& w5 D' M. ?
6 n' M" o" \& X6 a% E" |
f4 \; d+ B) |) d
- l; v5 D1 A9 [$ ^: B. J1 b
这功能其实很好用,比如选择面,自动显示面的法线等等。
4 \4 ~/ ]3 m. `' I- {! e; G' a; r% x3 m- ~- l/ T7 i$ `
static void do_UGopen_api(void)
" L* R+ `# l3 f1 r7 ]{
( _* N5 l: V4 }( p double pt1[3] = {0.0, 0.0, 0.0};8 w+ e/ n8 F) c$ ]6 Q( _
double pt2[3] = {2.0, 2.0, 2.0};9 `+ l. \" N' W, Q# @3 l
double pt3[3] = {-2.0,-2.0,-2.0};. \+ U. r/ I: l6 c
double vect1[3] = {1.0, 1.0, 1.0};2 C- [/ d" T* U4 f, Z+ l9 u. i4 d
UF_DISP_conehead_attrb_s attrb;* ]; D, `4 k. E1 s! j5 [
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,7 Q2 J$ y/ H0 `& N
pt1, vect1, 1);
6 i$ F1 \: q8 ?9 k- n( ^ /* Example to draw the vector with the base of its staff" ]* h% Q8 d0 f' M! ^
anchored at the origin so that the vector appears to point
! U$ w8 e! f1 S" [" B; `1 {1 K away from the origin. w0 i. I$ X( \$ c" G" E
*/* ^" c3 }. R! U) S
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,( d7 D$ x8 I0 N/ P/ M2 Y3 P
pt2, vect1, 0);) K) X/ h0 }! e M
UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
r1 N5 }; K" ^+ h* T6 s1 \! n. X pt3, vect1, 0, "Normal");6 @ l$ e) R/ D
UF_DISP_get_conehead_attrb(&attrb);! Z8 @% G( T6 |3 J) L
/* Use color index three */
h1 u$ {. ~; b" ? attrb.color = 3;
6 R9 I- Y1 [! ^8 o4 ^ /* Update the current attribute settings */+ E8 g9 \! I1 T
UF_DISP_set_conehead_attrb(&attrb);+ e* z0 L2 s5 J5 U: G, e
printf("\nCurrent conhead display settings:\n");
+ W' i3 P" m9 Y _( Q5 S printf("\tLength of Staff: %g\n", attrb.staff_length);
! h1 q1 E. z: ]0 z printf("\tTotal Length: %g\n", attrb.total_length);/ w; E3 I: N+ z2 P
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);/ `: M ]8 J# }" P# P/ S
printf("\TColor Index: %d\n", attrb.color);
" d5 |2 o# ]3 }7 Z% z printf("\tFont Index: %d\n", attrb.font);
# V* m; G: o- o printf("\tDensity Index: %d\n", attrb.density);
! F) ?! ?7 Y$ j: @7 J s}
' ^+ K) G, E$ `$ f9 C5 R
3 W0 x7 T/ Q/ A1 E6 Y( u |
|