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

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

[复制链接]

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

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

admin 楼主

2015-7-31 09:51:55

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

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

x

$ ]; d0 Q$ [! q( q2 O7 @
' b9 I( f9 j! S& h( D! \
# t; a* G! F, r0 _! E% V# f, w+ b) R) f6 r
这功能其实很好用,比如选择面,自动显示面的法线等等。2 W/ V- Y" w; x. Z* ]9 c
0 ~0 L2 b6 e) U* c1 T' ]
static void do_UGopen_api(void)
9 n. h& H5 m. ]+ `$ A{
0 _0 E( P; m9 K0 T8 a  double pt1[3] = {0.0, 0.0, 0.0};& a* M8 I* x# x: H& @) a5 K9 P; }
  double pt2[3] = {2.0, 2.0, 2.0};
, M+ S+ _2 }  w  s  double pt3[3] = {-2.0,-2.0,-2.0};2 g, P8 ?& [0 e! D
  double vect1[3] = {1.0, 1.0, 1.0};
* b2 o6 t$ q* ~+ H! G5 S* Y  UF_DISP_conehead_attrb_s attrb;/ V1 }0 F& N+ I3 b) t/ b1 v; t/ f
  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,6 S5 S1 r% @% m0 D' a! A% w8 `
                   pt1, vect1, 1);
0 w8 \6 d3 J/ }# d0 `( K$ k% h   /* Example to draw the vector with the base of its staff, S9 G( q$ H" L# B# X! f/ _
      anchored at the origin so that the vector appears to point7 R) B: h0 L7 A
      away from the origin
( H3 J1 k/ U1 f/ r- u   */  ~/ m/ G) _0 `" Q8 K7 x# z
  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
- N5 _! @2 f) Q; q6 u                   pt2, vect1, 0);
$ n! i! z- o" Y/ m: d" u% L  UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
: ?+ O1 t, S" d  N( n" F                           pt3, vect1, 0, "Normal");, V5 F! A  V# R1 d) j+ B. P
  UF_DISP_get_conehead_attrb(&attrb);' E) ]" h2 J' C: T8 T3 Y
  /* Use color index three */9 m( k4 V, ?* l, z' E; s
  attrb.color = 3;
. ~! {: l& U! e% x  /* Update the current attribute settings */  N- F; X: a( g& S6 r  k) K
  UF_DISP_set_conehead_attrb(&attrb);0 {) A) V0 q; Z8 z
  printf("\nCurrent conhead display settings:\n");& C, u( L3 A  ~. L% ~4 T# w
  printf("\tLength of Staff: %g\n", attrb.staff_length);
1 i: x$ k# w1 Q  printf("\tTotal Length: %g\n", attrb.total_length);! C7 q. l  |& z$ r3 e7 l4 n
  printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);7 E) b& s- x; g
  printf("\TColor Index: %d\n", attrb.color);
, Y8 [: o9 ?# ~+ x; l  printf("\tFont Index: %d\n", attrb.font);
: N3 l4 e6 _) N7 K. {  printf("\tDensity Index: %d\n", attrb.density);% l9 \6 r  X3 x3 `3 U
}9 _6 _  M  j% q2 C! Z2 A

9 s  `* W; ^) ^. q2 s$ r( f
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了