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

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

[复制链接]

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

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

admin 楼主

2015-7-31 09:51:55

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

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

x
1 X/ G7 A7 K+ w
, H, V& l& a- l2 _0 `& ~$ t
1 ^* K' \. C: K" e/ \# x

4 g) B) Q2 T3 A9 O7 g* O这功能其实很好用,比如选择面,自动显示面的法线等等。5 W! |# n& {+ S/ \

: Q+ q7 l+ D; |1 A4 Estatic void do_UGopen_api(void)0 C+ ]( d; b# A/ \5 f+ v6 L  y
{- }8 T% L" Q& V5 m- x# o
  double pt1[3] = {0.0, 0.0, 0.0};2 {7 Y. f4 K) P2 n2 s$ y; s" V% P5 B
  double pt2[3] = {2.0, 2.0, 2.0};
% h4 m* f* J: w9 s" }! o1 _  double pt3[3] = {-2.0,-2.0,-2.0};4 i6 s3 o( P, C
  double vect1[3] = {1.0, 1.0, 1.0};
) C) q& _( n0 U1 ~6 [  s: P  UF_DISP_conehead_attrb_s attrb;2 P3 Z' h4 Z" w' O4 D/ J9 h3 S3 Q8 k
  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS," _& T* U4 {+ U) l
                   pt1, vect1, 1);+ a- }$ d; R" ~7 z- o' {/ G& o8 k
   /* Example to draw the vector with the base of its staff) S. f8 v; U5 y$ j7 E8 Z1 w- U7 v
      anchored at the origin so that the vector appears to point
5 o% t5 R* p- G7 T      away from the origin& e- E/ j" h$ H+ E9 t) z4 c
   */
/ P, X$ R' _" v5 x/ P  l  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
% A0 Q0 T6 X& ?                   pt2, vect1, 0);' N/ D/ k, m& d  ]# z+ @
  UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
7 q3 r% l7 I6 Z, S1 S8 s                           pt3, vect1, 0, "Normal");
3 ]& ]# F$ k! _% P7 E: F  UF_DISP_get_conehead_attrb(&attrb);4 y% d) d- C" w& R
  /* Use color index three */3 ], l& Q: k6 M% w
  attrb.color = 3;8 Z1 l- K2 x/ S2 q  j/ I$ S. G
  /* Update the current attribute settings */( ?* P: N; d8 v+ f( o8 g
  UF_DISP_set_conehead_attrb(&attrb);
% U) w4 l$ o9 Z  printf("\nCurrent conhead display settings:\n");1 R& `( l% g7 p+ F. A' I' ]
  printf("\tLength of Staff: %g\n", attrb.staff_length);
4 c( P6 M: N/ \, Z7 p5 q  printf("\tTotal Length: %g\n", attrb.total_length);5 q- i/ n5 o' O% U
  printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);
5 s! O2 @) ~- J9 L, G4 s9 G  printf("\TColor Index: %d\n", attrb.color);' O4 M( w. ^1 R$ a
  printf("\tFont Index: %d\n", attrb.font);( q6 t- F% R1 Z# B
  printf("\tDensity Index: %d\n", attrb.density);6 k" u$ S$ j8 A5 F# \, z& }; ~
}
# i  J7 m$ c4 w# F6 D; N+ R/ C9 |' z$ w
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

发表回复

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

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

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

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

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

    我知道了