|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
0 q$ i4 }/ q) H+ L2 ^
& J T) I* r2 B8 Q+ l
7 p5 t7 w2 `" M* c' H% l( h+ Y
) T2 j4 y0 ]: X2 z这功能其实很好用,比如选择面,自动显示面的法线等等。$ Q7 u- k: o6 r' J7 g
/ U' @2 b3 R1 o* T# U* a
static void do_UGopen_api(void)' I/ w* K7 W9 T7 b
{
1 o* i% |. ~. E8 D: m double pt1[3] = {0.0, 0.0, 0.0};
0 ~' F$ W/ a* a) A double pt2[3] = {2.0, 2.0, 2.0};: s9 ~8 g; [, f/ T
double pt3[3] = {-2.0,-2.0,-2.0};
% D( h. `! x. L" s, K1 } double vect1[3] = {1.0, 1.0, 1.0};7 }: R) c0 U0 b4 ~7 k
UF_DISP_conehead_attrb_s attrb;
. d/ U+ N0 a3 ` _' W$ H UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,/ Z0 t. Z2 V" _5 J
pt1, vect1, 1);
# u# U m4 ~4 J- _' F- c /* Example to draw the vector with the base of its staff! }) u* t( K% x5 B p8 N) ~7 q
anchored at the origin so that the vector appears to point
: |0 t1 K6 T) J# a9 _ away from the origin% }( F% {. k# l
*/
[! S& h( o- G) S UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
: j! B# Y J8 [1 Z/ t X6 ` pt2, vect1, 0);
8 i, _0 e- Y4 n/ B UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,8 w# y$ ?+ V+ W) n7 T$ I% D. w( c
pt3, vect1, 0, "Normal");
. c- ~; C1 J0 \) ?" _6 `" L UF_DISP_get_conehead_attrb(&attrb);
* f, P0 K5 c9 v: U# L+ q' C4 C: }5 G /* Use color index three */
$ [8 e4 B! |, W, ~ e$ R attrb.color = 3;
; x! y$ K. I' f /* Update the current attribute settings */
( C2 G3 `$ W% w" d UF_DISP_set_conehead_attrb(&attrb);
( g2 y) q. u# s6 c' U- P) j+ q printf("\nCurrent conhead display settings:\n");
; e" \+ S9 F7 V) u! [7 C printf("\tLength of Staff: %g\n", attrb.staff_length);
\+ K8 _* S$ }7 x printf("\tTotal Length: %g\n", attrb.total_length);
) w9 p1 ~/ A' d3 K1 r printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
" w7 [! Z9 T& @6 o- y/ l- o printf("\TColor Index: %d\n", attrb.color);
. j8 q0 {7 Q: b printf("\tFont Index: %d\n", attrb.font);
+ v8 N& G }1 |- q# c* I$ J) T printf("\tDensity Index: %d\n", attrb.density);
4 ~. Z" e V, S1 F q# L5 f6 v}
* `, X! ?6 R1 g9 l& S! S, L+ @2 n6 \3 _( Z- `* w/ Z& C
|
|