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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
! h7 G- d0 b8 o1 m7 `0 W- l装配约束的创建过程,如何创建一个对象的约束为固定约束!
- H4 g  z! a+ c, [6 I  A6 Q  ~& m  d& u/ R7 C( T$ {; }* [; z! J

9 c( i( Y2 @( A4 T3 U
: g6 `5 s9 c9 G; o: I
// 创建固定约束
7 o3 D. I. }! _! n. p. R3 y# b6 k' Y% D5 V& g
7 U0 s9 e2 T% o# V! [" B" H& X+ {
        Positioning::ComponentPositioner *componentPositioner1;8 R+ q9 q" a- b' ?: ?+ {
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
6 p9 [' J5 g8 B* H% S* |0 r        componentPositioner1->ClearNetwork();
" t0 S5 |: ]+ r1 d& e        componentPositioner1->BeginAssemblyConstraints();
  T2 Q0 p% l1 C: e7 Z        Positioning::Network *network1;
5 l1 N( Z" _3 D        network1 = componentPositioner1->EstablishNetwork();1 \  r# F6 `+ U9 K5 U% g
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
% C# B( z- G7 T- i. i2 f1 f        componentNetwork1->SetMoveObjectsState(true);+ Y4 L. H# F$ L# @
        Assemblies::Component *nullAssemblies_Component(NULL);( j. S& y$ J" `! f& s6 H
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
' I; G  N0 l  R% n# Z) G; \/ }        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
/ E% Q. p9 j. f2 ~. V* K* H        Positioning::Constraint *constraint1;
# e3 u/ Q% S) @4 n        constraint1 = componentPositioner1->CreateConstraint(true);
4 f% k; p) M: r' _. m: c        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));" B( I& d7 T6 F/ S
        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
+ }6 ?, a( x1 @/ s        Positioning::ConstraintReference *constraintReference1;
. X. S% t& r4 H9 L" R3 [        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
# A8 m0 ?5 E5 b  D& j# }        Point3d helpPoint1(0, 0, 0);! H5 v! l% F9 Y9 R! b" X2 u; o
        constraintReference1->SetHelpPoint(helpPoint1);
' K, H( U! {2 l        componentNetwork1->Solve();( j' s3 c8 [, z4 y+ f0 K
        componentPositioner1->ClearNetwork();7 u; z! T  S1 I& r1 r: B
        componentPositioner1->DeleteNonPersistentConstraints();
! r$ r, G& D' i; e& |& }; N        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);" d2 |6 }* [( m* e
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
, N. D* y1 T" |1 B- ]6 G; f) M7 e        componentPositioner1->EndAssemblyConstraints();" X5 h( a& I$ ?6 E6 Q7 n

9 d  F7 Q6 t3 o( @# M  O" A& t. O
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了