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

[二次开发源码] 二次开发源码分享: 镜像体

[复制链接]

2018-2-11 15:40:42 2164 1

admin 发表于 2018-2-10 13:38:12 |阅读模式

admin 楼主

2018-2-10 13:38:12

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

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

x
9 ^7 U* M, c/ L/ r3 Y6 ~# \
3 F2 R8 j( x/ `3 x
二次开发源码分享: 镜像体 % O6 [5 j6 C/ }
. I8 F$ d5 G$ U) P8 X
[mw_shl_code=cpp,true]int IR9027488::apply_cb()$ t! ^% i1 l6 K  A
{" i) w$ a* t: n! @, t, A
    int errorCode = 0;
- P2 u" H  a( w0 T  B    try/ n- W# V  X* s# y: s; r0 j
    {# [, J: q7 E& w' b
        // AIW - Begin( Q2 h' F6 r% G! \0 v
        tag_t body = selection0->GetSelectedObjects()[0]->Tag();
# L' n6 _/ M& T! h* d9 R& k: H        Plane *thePlane = dynamic_cast<lane*>(plane0->GetSelectedObjects()[0]);! n) @$ z8 k2 g3 D- ~1 P

% O% ^; m5 f1 G' |+ g& ?$ t        NXOpen::Features::Feature *nullNXOpen_Features_Feature(NULL);- I: P9 C- }. K. C& i. Z( d
        NXOpen::Features:atumPlaneBuilder *datumPlaneBuilder1;
  q% y! s* _, n1 B        datumPlaneBuilder1 = theSession->arts()->Work()->Features()->CreateDatumPlaneBuilder(nullNXOpen_Features_Feature);9 x! v& D- D8 `$ O6 d+ C

0 c7 A, N& N, A' _" S" S3 V# k        NXOpen:lane *plane1;( `# z- {6 V, a2 e1 J3 Q- ]
        plane1 = datumPlaneBuilder1->GetPlane();
, @# k) y  t) A% |0 C8 W' R" T
: Z2 t% s0 Y6 U! V0 t        plane1->SynchronizeToPlane(thePlane);  // this is new in NX11.0.1
" C  p2 N* O1 M        plane1->Evaluate();
% {  y1 |. b0 _5 k, a3 o2 |  r; s+ F3 b1 O3 l. v, E) ?
        NXOpen::Features::Feature *feature1;) L% P5 Q. ?- b9 J' \' a
        feature1 = datumPlaneBuilder1->CommitFeature();  s* x' z7 Y9 `( m8 y, s

2 n( h, c# d' p3 |, Q* b        NXOpen::Features:atumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features:atumPlaneFeature *>(feature1));- L  `; P; Q9 e
        NXOpen:atumPlane *datumPlane1;
, d8 {5 l6 |" X* ~. i        datumPlane1 = datumPlaneFeature1->DatumPlane();0 g1 [) P  x2 {/ ~- q

5 U1 o" d) [! j        tag_t mirror_feat;% O8 g- S0 L  U  x$ B
        errorCode = UF_initialize();
. S2 ^) @+ }- s  @, u6 w: L% E        if (errorCode != 0) throw NXOpen::NXException::Create(errorCode);2 f5 A0 p) f; y, s

/ }/ T; c# Y  e7 X# @        errorCode = UF_MODL_create_mirror_body(body, datumPlane1->Tag(), &mirror_feat);
# L- k  G, v' m" Q5 i' N; \$ ^        if (errorCode != 0) throw NXOpen::NXException::Create(errorCode);6 w+ \1 x5 [' h% {2 X! Q
        // AIW - End
$ x  N! y# o% k5 Q" [- @2 M    }
& \' v& I7 }, L& t; ?    caTCh(exception& ex)/ S/ w! I, [! e; m
    {" V; _* P0 ]0 C& a$ _2 ^7 s
        //---- Enter your exception handling code here -----
6 S6 J/ p1 W( ^/ g2 `3 c" v        errorCode = 1;5 Q& N% p! L2 h1 w9 ?* V1 W) i
        IR9027488::theUI->NXMessageBox()->Show("Block Styler", NXOpen::NXMessageBox:ialogTypeError, ex.what());
" I; I1 @8 J: N7 d- y    }
  R' p7 B( [+ r1 W    return errorCode;5 G$ l2 F, s* t9 [& f
}[/mw_shl_code]9 ]# \) X/ n/ w
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

全部回复1

popc 发表于 2018-2-11 15:40:42

popc 沙发

2018-2-11 15:40:42

dm.jpg er.jpg shu1.jpg
& Y2 F6 s0 l% d: d
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了