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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
$ l3 I: f% ~  r装配约束的创建过程,如何创建一个对象的约束为固定约束!
' [! m1 q& U+ R- c2 q& ~/ v, u& V6 C9 h  g9 t' S& P7 S

" j) `" a$ [3 [8 y* m
$ `3 r, c! M: C. F& H) i) t
// 创建固定约束" {9 m1 }& g+ [
& m( B  b) B1 c1 @6 G+ d

& F( }8 F. b1 L/ v" j        Positioning::ComponentPositioner *componentPositioner1;5 p- [5 K' Z8 Q/ K: O
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
! ^# F8 C9 m$ s( r4 g( w3 c! U        componentPositioner1->ClearNetwork();, m7 }7 A6 a( g7 R& g
        componentPositioner1->BeginAssemblyConstraints();
1 j% y4 n3 Y/ s7 I( s* ^  x$ K' t        Positioning::Network *network1;; [  M/ K: r! _9 {# y: c* b
        network1 = componentPositioner1->EstablishNetwork();
) _  @' ^; m4 o        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
) S4 l/ ^9 o! F" q2 m        componentNetwork1->SetMoveObjectsState(true);0 K7 _* h  T" |3 }
        Assemblies::Component *nullAssemblies_Component(NULL);
$ A& D0 W$ _4 l( E6 E6 N( w        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);+ R! Y* ]( x% \6 @
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
9 J1 A- t& p& `9 N7 ^6 l        Positioning::Constraint *constraint1;6 D1 B4 i! G- u2 X
        constraint1 = componentPositioner1->CreateConstraint(true);
  N9 B9 O3 ]# i        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
6 l& K& F6 C5 g$ i" O/ N8 \& N0 M        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);5 V9 s; ]' p2 D1 U2 J  l
        Positioning::ConstraintReference *constraintReference1;
+ a& |1 L, j0 U# G; s        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
7 G# f) b- x7 x$ t5 G# I5 I7 A        Point3d helpPoint1(0, 0, 0);6 r1 U7 G8 F) G8 R& Z. N7 i, {
        constraintReference1->SetHelpPoint(helpPoint1);
1 [( f! F% Z2 X* G- l4 A        componentNetwork1->Solve();
! b' Q/ _2 k, ?        componentPositioner1->ClearNetwork();
' X5 u( \: y, M- p% q        componentPositioner1->DeleteNonPersistentConstraints();
+ F9 ~" [2 F+ O1 H  `0 g        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);# x4 J  x+ h& r  U5 Z& k9 S
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);3 I' P$ ^. C& w" A$ V7 J
        componentPositioner1->EndAssemblyConstraints();& v9 H' ]3 Q6 O3 W

1 f$ B0 N1 g( z
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了