|
|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
" b1 a0 U' `* f" g; N4 k8 U$ H
+ U7 G' O- }! J# G* n; Q9 P8 ~3 m" `0 e( X8 Q% D! E7 E4 k+ ^1 s% q, r
$ l9 a* x& f D2 ?$ U& f这功能其实很好用,比如选择面,自动显示面的法线等等。
7 C3 P9 x* D& t2 z: v6 F6 X
+ K7 K0 n" V5 Ostatic void do_UGopen_api(void)7 f3 S, B/ ^5 Y5 |/ P; H
{
G5 s' S; {1 t4 n C6 E" F b, m double pt1[3] = {0.0, 0.0, 0.0};; D4 q. }- h' m; Y% [/ v
double pt2[3] = {2.0, 2.0, 2.0};
+ u' h% v. H3 T+ E$ b double pt3[3] = {-2.0,-2.0,-2.0};9 c: }5 C* ?" O
double vect1[3] = {1.0, 1.0, 1.0}; u& ]0 p( S# l. i* y# k
UF_DISP_conehead_attrb_s attrb;
' V( ^* e* H' o4 h UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
# C) f! M; p/ B6 U, q, Z# L7 ~5 [& } pt1, vect1, 1);
" G% |0 a" l' u6 | /* Example to draw the vector with the base of its staff- O2 r v; S. N
anchored at the origin so that the vector appears to point5 O0 T% i3 ] Q( s. w. I
away from the origin8 h" A4 Q# E2 Q. F; l
*/$ U8 Q4 R" V1 U- y1 X: e
UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
) U1 d& d, b& a: f* x pt2, vect1, 0);
; \+ R& O Y" c+ k4 L UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,& ~: X, g) H+ I" g/ f
pt3, vect1, 0, "Normal");0 M) P+ T" \9 F4 C/ M" }# b) z
UF_DISP_get_conehead_attrb(&attrb);' Z$ k. l* j) F: j
/* Use color index three */. [& b% ?1 Q$ k, _3 r& R
attrb.color = 3;) y l. u- L+ G! A, N& B, J, f, N! f
/* Update the current attribute settings */
+ p" C- u; B, |3 q UF_DISP_set_conehead_attrb(&attrb);- v _- Q( A" P9 ]) D1 ?
printf("\nCurrent conhead display settings:\n");& q2 I9 v% U/ d& h2 J8 Y' @/ m" }
printf("\tLength of Staff: %g\n", attrb.staff_length);
/ e5 t- J4 E% Q& [" N printf("\tTotal Length: %g\n", attrb.total_length);" n: L% C* C9 _3 y3 N4 ?! \4 }
printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);7 [) q) _: F5 q) Y
printf("\TColor Index: %d\n", attrb.color);
5 Z$ Z0 B0 n2 y printf("\tFont Index: %d\n", attrb.font);
3 ^: a4 p5 T4 P3 C printf("\tDensity Index: %d\n", attrb.density);
' o0 \- |1 {( L2 P6 ]( j}3 V$ u6 q* K$ b& ~
0 V. a, e) R& B/ X& X" K- t
|
|