PLM之家PLMHome-工业软件与AI结合践行者

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

[复制链接]

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

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

admin 楼主

2015-7-31 09:51:55

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

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

x
' e/ Y4 L+ [1 w8 l& D  W/ M

/ I! P  z! ?/ H# p8 q' X5 Z  j( p& T' A7 Z$ c6 Y& F5 ?
9 [5 ]# l& K  l4 o% V
这功能其实很好用,比如选择面,自动显示面的法线等等。
, }6 z& J  ^: e. \
  X3 o' s0 Y4 R1 l  _3 Z, Istatic void do_UGopen_api(void)1 F" T7 p+ u1 A" n1 J! \
{
0 I1 j* J, l+ O0 S* [: v% {7 a  double pt1[3] = {0.0, 0.0, 0.0};
# r- Y" |7 j3 v' h; {$ e' M  double pt2[3] = {2.0, 2.0, 2.0};
. y- O' B% f6 z4 M  double pt3[3] = {-2.0,-2.0,-2.0};
4 Z! D4 H6 \8 f  double vect1[3] = {1.0, 1.0, 1.0};
$ T/ U' E& C2 k6 Z0 |) [, K  UF_DISP_conehead_attrb_s attrb;& c, }! K: Z) o7 X: V8 o
  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
: N. l. s+ `2 |$ H1 k. Z, g                   pt1, vect1, 1);
+ O8 N9 k. M) U6 N+ ?4 q9 h3 y4 \   /* Example to draw the vector with the base of its staff& ^9 g, a! w5 S0 Z6 t
      anchored at the origin so that the vector appears to point+ ]: D% Y: Q1 A4 v8 g* M
      away from the origin% C, c  ?) S  S2 W0 W
   */5 _' Q/ J' g8 _
  UF_DISP_conehead(UF_DISP_ALL_ACTIVE_VIEWS,
% {4 Z0 D% v! O# o) Z                   pt2, vect1, 0);
. t% N' m3 i5 a3 F9 e  UF_DISP_labeled_conehead(UF_DISP_ALL_ACTIVE_VIEWS,1 p' X3 |, w8 H% {7 M: X$ B$ e
                           pt3, vect1, 0, "Normal");, @& Y2 S" L, {
  UF_DISP_get_conehead_attrb(&attrb);
7 y4 {! h$ S8 z% z- t  /* Use color index three */
! c: C6 g) X' k% k/ B2 R% m: _  attrb.color = 3;2 [1 X. M" q' r7 w! ]* A: U7 I- o6 z
  /* Update the current attribute settings */
% d5 q* b6 X" O+ F# r3 H& a  UF_DISP_set_conehead_attrb(&attrb);
, a- g" i3 q! `" \  printf("\nCurrent conhead display settings:\n");
% f: y. m! E. J  printf("\tLength of Staff: %g\n", attrb.staff_length);
; \2 c0 J* j$ Z) v' g/ g  printf("\tTotal Length: %g\n", attrb.total_length);7 t; c7 m4 B2 }+ s, Q
  printf("\tRadius of Cone Base: %g\n", attrb.cone_radius);  v8 Y) X1 e! K6 V& d
  printf("\TColor Index: %d\n", attrb.color);0 l$ g" |6 A6 t
  printf("\tFont Index: %d\n", attrb.font);, C; \$ K! M9 _( e
  printf("\tDensity Index: %d\n", attrb.density);
; O/ v* m9 K/ m0 L% V/ v}8 V  |7 \. J+ ~
- c+ _8 N6 j# g7 k" x- \, O
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了