PLM之家PLMHome-国产软件践行者

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

[复制链接]

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

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

admin 楼主

2015-7-31 09:51:55

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

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

x
! V/ }5 F  `0 N  f/ z6 e

- Q! n; d9 q/ |6 x7 o/ O; o: V. Z
3 s0 ?" |4 ?% @  C% Z, y5 \, q" L8 E4 C4 t9 I. l% R6 J7 _
这功能其实很好用,比如选择面,自动显示面的法线等等。
4 \/ r- c1 z  r9 `2 Y6 a! {" f
# ]% k1 R# ^+ O' ^% |) Astatic void do_UGopen_api(void)2 Y8 g) e1 [0 y/ y* C
{
5 Z& O0 G6 s3 @7 g3 H$ {  double pt1[3] = {0.0, 0.0, 0.0};
! ?1 o6 r2 S/ @  double pt2[3] = {2.0, 2.0, 2.0};, g4 t' i+ x1 Y0 i
  double pt3[3] = {-2.0,-2.0,-2.0};8 m# v0 ^' H+ [/ y' V
  double vect1[3] = {1.0, 1.0, 1.0};
: o. ]2 l; N- b1 `/ Q9 U  UF_DISP_conehead_attrb_s attrb;
, j7 R* u1 w9 }  n+ L  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,2 A" G3 |2 Y* L" _; M
                   pt1, vect1, 1);0 L2 |3 P" L: [% y: S
   /* Example to draw the vector with the base of its staff  ~  E; i# [: m" c' c
      anchored at the origin so that the vector appears to point
" Q. @# ]0 ~4 k; T' B+ z* u      away from the origin( q7 s/ P0 f- E. t+ h5 J- X' ]
   */
8 g+ b, ~( ^6 x/ M' R# k1 |  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,5 O% K& X1 G5 H. ]
                   pt2, vect1, 0);
. V/ l& x9 d9 c. h* o  UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
# `# c) U3 c, s+ i5 ?. H  j; Y                           pt3, vect1, 0, "Normal");# r) p# i" g/ N
  UF_DISP_get_conehead_attrb(&attrb);
9 N; ?" L4 a& l. d1 u* ]  /* Use color index three */& o7 a3 i; K" x& n  x
  attrb.color = 3;7 Q+ c7 t) j9 t* p
  /* Update the current attribute settings */
; @& W7 b! `' g  UF_DISP_set_conehead_attrb(&attrb);" D9 `' B! c$ T
  printf("\nCurrent conhead display settings:\n");
- R/ j4 V8 t! ~- X) d, g& A; C: l  printf("\tLength of Staff: %g\n", attrb.staff_length);1 D& K3 Y, d0 N$ o9 e5 ^4 w0 }
  printf("\tTotal Length: %g\n", attrb.total_length);- ?; q. k0 w0 Q( x. _
  printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
2 `# \7 d1 T' d6 d, z  printf("\TColor Index: %d\n", attrb.color);
8 F1 ~/ O% k0 j7 C. Y, F9 i  printf("\tFont Index: %d\n", attrb.font);
' i7 E2 T* X$ Z% @. p& ^6 h* B  printf("\tDensity Index: %d\n", attrb.density);
, C3 G4 P; C; o}
- U: N) h& ]2 `' V2 g$ x& M, n! H+ l! F! V' s
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了