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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束7 h3 }  n4 u7 |, ^
装配约束的创建过程,如何创建一个对象的约束为固定约束!2 x7 k0 y0 c' T
0 k8 O2 J1 g# V' S( s+ G

7 ?2 u' @, Q7 j! f% k, t5 Y# }& A
// 创建固定约束3 P; ]# O5 A& z) N8 I
2 ]7 u" a3 {# j1 {8 @' ~

( y) T- B4 G) o& c( x( d        Positioning::ComponentPositioner *componentPositioner1;5 L9 s7 w( x/ u& p5 F
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();8 a5 t+ Y& {' f
        componentPositioner1->ClearNetwork();' Q9 ]) m* D/ L* f: J6 H
        componentPositioner1->BeginAssemblyConstraints();- p) p6 r( K  h& o6 p7 Y! e3 y% F
        Positioning::Network *network1;8 N. l# ]& G9 A5 p$ o& U
        network1 = componentPositioner1->EstablishNetwork();8 X+ `, H: A( C; c# w6 t
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
# X3 e  @. v, [9 |- }        componentNetwork1->SetMoveObjectsState(true);
9 j7 j) p1 r" l) T        Assemblies::Component *nullAssemblies_Component(NULL);4 }8 M% U& v) y4 L  a& j
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
# \$ p) p4 U3 ^, H/ f9 s# m        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
9 a) L  M) E. T; ^$ j2 L        Positioning::Constraint *constraint1;
% F( E) B; R" T7 ~1 G. _& W        constraint1 = componentPositioner1->CreateConstraint(true);8 I" s6 Z) ?1 N# v+ O
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
0 g+ D( N) r7 s  K' u+ Z$ _# a        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
# ~1 a2 X/ {; z% j$ B- G/ k2 \- ~        Positioning::ConstraintReference *constraintReference1;
) T/ f8 m/ C0 X# }        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);+ h0 @1 {- d1 K0 q
        Point3d helpPoint1(0, 0, 0);
' \8 v- K) N4 V' W0 B' W        constraintReference1->SetHelpPoint(helpPoint1);2 [* g2 K6 j: Z9 M
        componentNetwork1->Solve();& v7 y  M5 k  |6 K* u( Y- a7 V
        componentPositioner1->ClearNetwork();+ J3 r- [4 W7 c4 a. T9 n1 F* w
        componentPositioner1->DeleteNonPersistentConstraints();  X1 l) [  N) H0 q7 a$ V
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);
/ P6 i+ M) k" _& W, V! U        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
4 g( [: v" A8 w2 ^. h, E8 _3 \        componentPositioner1->EndAssemblyConstraints();2 C# c# A& P3 @1 ?
4 D, N+ z2 m9 |: |
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 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 网址 doTeam.tech
回复 支持 反对

使用道具 举报

发表回复

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

返回列表 本版积分规则

  • 发布新帖

  • 在线客服

  • 微信

  • 客户端

  • 返回顶部

  • x
    温馨提示

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

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

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

    我知道了