PLM之家PLMHome-工业软件践行者

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
, }5 {' n2 ^% K3 J& Y* U装配约束的创建过程,如何创建一个对象的约束为固定约束!$ n1 \" W- q: x6 {! A4 Z

, E5 A. W/ f1 O% c, O8 q
: |% i2 B$ G) H. V/ e

7 Q! e! i+ k6 ?- D& W
// 创建固定约束/ K: i$ R' Q# C: x6 R
3 A3 e" U* b3 W$ R. g" X/ z

% [( e: ^' B, S! E+ f6 O7 O2 l        Positioning::ComponentPositioner *componentPositioner1;
! B1 v7 q) z" z2 I% I5 x, z        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
5 ]; m2 i/ n1 ~4 o4 [' B1 U% V4 G        componentPositioner1->ClearNetwork();
1 {# J6 J. T% e/ u" _        componentPositioner1->BeginAssemblyConstraints();  W1 H( P: Z( c6 p5 _6 v( e
        Positioning::Network *network1;
% V+ Q- B. o' T$ ?# i% J# D        network1 = componentPositioner1->EstablishNetwork();% {0 X( k* C. F2 W# c
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
! F# b4 _# l0 a* z7 |8 m        componentNetwork1->SetMoveObjectsState(true);
" @7 `* v+ I' J# ~  E8 S3 ]        Assemblies::Component *nullAssemblies_Component(NULL);4 ^% ?. B* [1 q
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
! u; I% m! i, ~/ \# t5 j        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
  |. I% m$ F5 b" O8 @        Positioning::Constraint *constraint1;
# ?8 G& r# j* _: J        constraint1 = componentPositioner1->CreateConstraint(true);
8 ]- _8 [# s4 d3 v1 C        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));1 k; l4 N7 I% h& z
        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);% l1 @& ~0 T0 F$ v& w' I8 d
        Positioning::ConstraintReference *constraintReference1;
* p' {) C  p7 d0 M        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
2 `$ J) z' o3 f5 j        Point3d helpPoint1(0, 0, 0);
# V: s0 P- j* g' P* j, p, `4 U        constraintReference1->SetHelpPoint(helpPoint1);
' @0 O2 p" w' x; J. ?: ^/ {& x) |        componentNetwork1->Solve();
  W: `4 m; U. B        componentPositioner1->ClearNetwork();
) j$ P: N( p9 R        componentPositioner1->DeleteNonPersistentConstraints();' I8 B/ d3 s$ s5 a$ {+ u, j7 d, Y
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);
+ R. a; v: b5 }+ {' t        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
% k# U$ n( w$ f* z. T, T( V* B3 L        componentPositioner1->EndAssemblyConstraints();. w. m' J) E2 b% S2 L2 C# q8 t* l

% N! K  K/ }" V
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了