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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束  F" y$ b! C! s6 K# l$ c. A
装配约束的创建过程,如何创建一个对象的约束为固定约束!0 B" l+ T2 {! k3 {+ O- u$ l* n
! x* p/ u( X; [& {; x1 ~$ B+ ~/ k
6 b, B' U+ @8 P; V+ }# ]; z

$ p- T- ?5 W% N; i/ D$ v
// 创建固定约束- d9 Y) _5 U$ [1 w& c( T9 \
9 K7 `  w1 x; S9 r! ~

9 j  t" K# W1 m$ V/ m" G        Positioning::ComponentPositioner *componentPositioner1;- K9 {8 S# d- t- \( Q8 k" A
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
/ B; o, ~+ F3 F4 k# o! t: ^4 v        componentPositioner1->ClearNetwork();% m( N/ m/ C5 N5 l- b% E8 @6 B5 Z
        componentPositioner1->BeginAssemblyConstraints();. \" X+ \4 @2 U5 {/ G1 }
        Positioning::Network *network1;' `& I1 R: x% F, W
        network1 = componentPositioner1->EstablishNetwork();! b4 }2 l, `0 T% ]& e
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));! r# n$ @8 l) @, f+ M4 [5 q# _
        componentNetwork1->SetMoveObjectsState(true);
7 T' y6 ~/ A/ t. g6 N1 }* t' n        Assemblies::Component *nullAssemblies_Component(NULL);+ J- ^/ w' B6 s5 m7 E9 Q# K7 w
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);3 s+ s# R  e( L2 ^
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);; ?# N7 e2 V# d+ w$ i9 T
        Positioning::Constraint *constraint1;2 t9 {$ D* k6 W# l5 t  X
        constraint1 = componentPositioner1->CreateConstraint(true);
, Y- s5 J# H1 i: ?! {& M% z" f        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
& V/ N; D, f# i        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);! u" [$ t. I  Y7 f
        Positioning::ConstraintReference *constraintReference1;1 u2 H' T+ j1 F7 Z
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
6 D( L2 ?& y! l  j7 W        Point3d helpPoint1(0, 0, 0);
6 Q: g  X2 J3 m7 H7 }4 l+ P3 [        constraintReference1->SetHelpPoint(helpPoint1);
0 ]% k7 A' |' T7 X3 x        componentNetwork1->Solve();
: B5 X2 S3 Z; n$ }% ]        componentPositioner1->ClearNetwork();* L/ v) `/ O: G6 w: ^% Z) u
        componentPositioner1->DeleteNonPersistentConstraints();/ e) \2 T5 a7 c7 O' ?
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);2 r* p7 s: \; p+ J4 g/ u3 p
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
6 {3 M" f7 D3 X9 g4 z        componentPositioner1->EndAssemblyConstraints();
) E" ?9 N3 F" c% Z+ t# H- W
3 m7 d# q( t) Z
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了