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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
0 u. m" {* V; G( D/ n4 i' s装配约束的创建过程,如何创建一个对象的约束为固定约束!( {$ P/ ?0 X" \5 J: u  X/ _) ^7 L

4 v' a7 b  {  r& F$ m$ p" @
2 E0 H  S( _* l+ C3 `9 n
  o) M2 ^% c) O
// 创建固定约束# z# f9 e. ]3 `6 g

% m5 A2 J8 V' ~$ G, n: t

# N) p/ n6 j5 N0 j7 S        Positioning::ComponentPositioner *componentPositioner1;  C: r' P2 G, Y* m4 C1 {
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
, Q( j4 |$ Y# Y        componentPositioner1->ClearNetwork();
2 d5 p; \; B7 g        componentPositioner1->BeginAssemblyConstraints();
- g2 ^/ @1 L0 |7 p, z6 W5 Q        Positioning::Network *network1;
! g0 T7 O. F2 x        network1 = componentPositioner1->EstablishNetwork();% Q* E2 w' ?0 g: W
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));, g9 z8 U* [4 \8 H
        componentNetwork1->SetMoveObjectsState(true);# E' H: v' @/ h* p7 ]1 C& B9 a
        Assemblies::Component *nullAssemblies_Component(NULL);
9 i# [9 f. \' L" e8 O! G7 Y# B        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);& A/ ~# ~) C2 l& Z: L0 ]
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
; G8 Y) ^; z* M2 I) s2 V6 E( Q7 Z$ V1 D        Positioning::Constraint *constraint1;+ K- M9 C) U! F, ~: ]* R, A6 }
        constraint1 = componentPositioner1->CreateConstraint(true);3 @, \* s0 ?. h2 w+ R9 N- H
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));: E$ Q( `) Q1 q: t& @: w' E
        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);6 C+ s3 J7 J# r( R5 d6 Y
        Positioning::ConstraintReference *constraintReference1;$ g2 F. z/ H4 n5 z$ t+ x
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
$ i1 A7 ~/ d3 N2 C0 Z7 J) Q! N& X        Point3d helpPoint1(0, 0, 0);
' D6 j4 ?  n0 j4 W5 O; t% c6 E        constraintReference1->SetHelpPoint(helpPoint1);
. l6 V& F% X  d        componentNetwork1->Solve();' g0 [' w# J" Y- u5 o- P9 E0 L
        componentPositioner1->ClearNetwork();
2 P% i) y7 M3 U! Q- D% O5 U6 B        componentPositioner1->DeleteNonPersistentConstraints();
2 z' U% t( }3 `" J6 u' w% m        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);2 s/ E, J, K! F5 N% q
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);8 V( E3 c- e' b% `
        componentPositioner1->EndAssemblyConstraints();$ v6 g' D- P# s9 Z% x
1 e9 p+ F8 Z, }9 e
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了