|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
2 D0 Z, J H$ u: F1 {5 B
, F* U7 Y7 b7 u; A& K
$ ]( ^0 q0 x$ o T2 R8 E3 j
1 _- W4 {0 Z/ u# b; Q5 W这功能其实很好用,比如选择面,自动显示面的法线等等。
( S1 d7 r5 @% R9 r" q% o
0 P# v G1 S x+ Pstatic void do_UGopen_api(void)
8 t2 ~. X* F0 u) ?( R{
5 I' G I; v6 h2 c" ~ double pt1[3] = {0.0, 0.0, 0.0};
$ I! i7 o( r: e- @5 a2 E' ? double pt2[3] = {2.0, 2.0, 2.0};; j5 I! W, n9 X4 w4 t
double pt3[3] = {-2.0,-2.0,-2.0};% s8 x3 }' v E$ n; H
double vect1[3] = {1.0, 1.0, 1.0};9 Z( L5 } w8 f3 Q5 m+ G
UF_DISP_conehead_attrb_s attrb;
" X9 r7 i$ W i4 s9 Q) n UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
1 y% [- t' Y3 W% ^ pt1, vect1, 1);
% [- C+ C! h5 F( i: w2 t5 \( _ /* Example to draw the vector with the base of its staff
" a) u8 T2 b* U7 l' W) |' G1 u anchored at the origin so that the vector appears to point+ ]. B6 w+ S" Y$ ~5 U! H
away from the origin* y8 B! |+ N0 Q& s8 t, M
*/
3 j* q. s* D. [# b8 { UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,2 Z8 g5 p0 n; J& Q! J
pt2, vect1, 0);
" U/ Z2 L, } l/ e UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
: f$ ] ~# C& c3 x, B. m pt3, vect1, 0, "Normal");5 U" @ i0 p l
UF_DISP_get_conehead_attrb(&attrb);+ a- l" Q: b$ f
/* Use color index three */3 M6 U( P6 i; v% b
attrb.color = 3;
: D1 Q( ?6 g* K9 E8 N) D /* Update the current attribute settings */
2 x& M0 G$ x3 @ UF_DISP_set_conehead_attrb(&attrb);- {' L/ `4 ]3 P& M" a% ?
printf("\nCurrent conhead display settings:\n");
/ [% e# K8 H: R! Z printf("\tLength of Staff: %g\n", attrb.staff_length);
4 \8 S) t9 Q: f5 D' S$ \ printf("\tTotal Length: %g\n", attrb.total_length);
: H) g) w2 [( e$ Q8 u( m3 A. ~ printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);9 D+ S1 ]$ F" R% j% q1 n# F, |) c. a
printf("\TColor Index: %d\n", attrb.color);
: k, p" v( X3 j. G2 g printf("\tFont Index: %d\n", attrb.font);
5 k" p" b6 K+ }$ p( ?5 ? printf("\tDensity Index: %d\n", attrb.density);
% J# k: F' ?% e, J: X}0 l' L6 P: t; E( M0 O' N- ?
9 L, G/ H9 ^$ b4 X' ^1 j+ C! } |
|