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

[原创视频] 【PLM之家NX二次开发自动装配项目】1.6 创建固定约束

[复制链接]

2015-1-30 23:20:00 4287 1

admin 发表于 2015-1-30 23:19:45 |阅读模式

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
6 k/ r& r( s" e! o! ^装配约束的创建过程,如何创建一个对象的约束为固定约束!/ h" K' q2 `$ X

+ Q$ p( a8 b. e9 T

0 p, d9 |" Y- S$ W4 i: Y1 ?9 V+ M3 h4 q2 c  p' m
// 创建固定约束" x# W9 A" }) p/ e- Y# [2 `) ^

4 P( j: N) M) M+ N& M9 @5 A7 c

* _6 B( S, s8 ~3 g9 V        Positioning::ComponentPositioner *componentPositioner1;6 A$ U, }: |# G1 X9 M0 r) p
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
: k2 _& M8 o# a2 ^        componentPositioner1->ClearNetwork();: ?9 i3 p0 L9 _3 X/ s
        componentPositioner1->BeginAssemblyConstraints();
6 d9 I: n+ L, l1 I: @        Positioning::Network *network1;
: {) J3 m& @* C3 R+ i; v        network1 = componentPositioner1->EstablishNetwork();! A/ S' r) ^2 s
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));& }! l8 Y3 Y- F' p- E0 a+ N$ c
        componentNetwork1->SetMoveObjectsState(true);2 t' H' P- R# b& @
        Assemblies::Component *nullAssemblies_Component(NULL);: K# m+ O9 ^1 q3 i5 P6 `2 [8 r" W
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);0 R/ D1 G% V( H
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
4 c; G: J8 Z% k, f* @8 z% |  p        Positioning::Constraint *constraint1;
6 m1 w0 l  Z+ j' G+ m        constraint1 = componentPositioner1->CreateConstraint(true);& D( b0 |; u# r( Q% i
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
* r9 b$ |' R) C" Q; l: O" X        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);7 U7 n) v9 {# x) M" `
        Positioning::ConstraintReference *constraintReference1;
: g; `. u1 Y: y9 l. w        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);& E, y* `) {1 E+ d( ^1 e2 L% Q
        Point3d helpPoint1(0, 0, 0);3 G" t+ R6 k, I7 m+ B
        constraintReference1->SetHelpPoint(helpPoint1);2 X6 c  |) [+ i$ ?0 D% e
        componentNetwork1->Solve();
6 T& [! M  A4 W2 V8 [& y. ?4 I0 y        componentPositioner1->ClearNetwork();
! w' U5 v3 Y9 }  N' m        componentPositioner1->DeleteNonPersistentConstraints();0 S' w$ k3 a  v. v( }% p7 F
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);
& u0 @' H; U- G  n1 e        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);$ W, v8 S# Q: p+ b3 Q! [
        componentPositioner1->EndAssemblyConstraints();
  H* p! a( D; I. h# z  }. F/ X1 |5 n$ }& h
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 www.diantuankj.com/ doTeam.tech
回复

使用道具 举报

全部回复1

admin 发表于 2015-1-30 23:20:00

admin 沙发

2015-1-30 23:20:00

培训VIP可见
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了