PLM之家PLMHome-工业软件践行者

[二次开发源码] UGNX二次开发源码分享:关于显示UG NX临时箭头功能

[复制链接]

2015-7-31 09:51:55 3391 0

admin 发表于 2015-7-31 09:51:55 |阅读模式

admin 楼主

2015-7-31 09:51:55

请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!

您需要 登录 才可以下载或查看,没有账号?注册

x

5 q2 l  l/ O5 x7 ?) Z* \" L0 l5 G( Z7 z- Z2 t. [/ U, a$ {9 x
4 q/ R  N5 g5 p( z3 Q" C

" s5 _* b4 R0 R这功能其实很好用,比如选择面,自动显示面的法线等等。
5 r/ b+ O2 C0 ]3 T% M# ~
  K( N+ d4 y; S. b1 Istatic void do_UGopen_api(void)
% _6 d5 f5 j4 Q$ ]3 b{4 }4 u7 l4 m$ g! K( F/ E4 F
  double pt1[3] = {0.0, 0.0, 0.0};
: k' }$ ^* j; T+ ?  F  double pt2[3] = {2.0, 2.0, 2.0};4 G4 C: r' S+ t, s) h2 c
  double pt3[3] = {-2.0,-2.0,-2.0};" g0 M3 d8 x& f* _; P8 y. S+ q
  double vect1[3] = {1.0, 1.0, 1.0};1 o7 p4 Y! w# F: T) z1 L
  UF_DISP_conehead_attrb_s attrb;
- _+ K9 `) W0 V2 n9 o5 g. r- V  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
4 b! Y7 |% D- D; T; Z2 n) j                   pt1, vect1, 1);
: j4 O; i8 V3 P$ v- m$ f   /* Example to draw the vector with the base of its staff3 X+ a: k7 F+ A" x  I
      anchored at the origin so that the vector appears to point
( A' D9 P8 K1 e1 g1 D      away from the origin
; \5 s) t% K$ x* Y, }7 O/ u   */
) x  i& H5 e% B* h) Y% E  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS," q: D; R- u* `% [  ?
                   pt2, vect1, 0);
- _! j: t/ s# i, _8 F: F* x  UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
( u  a1 v: n' q- j8 m: P. i                           pt3, vect1, 0, "Normal");
$ u1 E; A! Q8 o- b/ _% K, L  UF_DISP_get_conehead_attrb(&attrb);
+ M7 R: a& W) |) }8 ]  /* Use color index three */2 ~; m& `9 Q8 ?
  attrb.color = 3;, z2 M% |9 h2 |& c3 ?+ E4 D
  /* Update the current attribute settings *// J: b% G8 V- s  Z& }/ q
  UF_DISP_set_conehead_attrb(&attrb);
4 [+ A& h% i9 x: J& c  printf("\nCurrent conhead display settings:\n");
( U& o* S) Y. }) u8 Z7 ~  printf("\tLength of Staff: %g\n", attrb.staff_length);( ]9 f5 J0 @+ X. E+ ~7 o
  printf("\tTotal Length: %g\n", attrb.total_length);9 m- H* @: V$ K: ?% n
  printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);' G# k' M0 h; ]+ h* [
  printf("\TColor Index: %d\n", attrb.color);$ y: Y  L9 g% f8 o5 G* `
  printf("\tFont Index: %d\n", attrb.font);
( p3 d. z; }% ]7 L  r4 Q* Y" _% J* ~  printf("\tDensity Index: %d\n", attrb.density);
0 v& F/ Q# e3 d7 j4 Z7 w0 U3 I, p}- [  w( C) `: `, G7 V
/ A% K# h, ~9 n& L
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 注册

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

    本网站(plmhome.com)为PLM之家工业软件学习官网站

    展示的视频材料全部免费,需要高清和特殊技术支持请联系 QQ: 939801026

    PLM之家NX CAM二次开发专题模块培训报名开始啦

    我知道了