PLM之家PLMHome-工业软件与AI结合践行者

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束% {+ x5 d0 o3 O# g* Q, j
装配约束的创建过程,如何创建一个对象的约束为固定约束!6 o9 P! n* Z4 C3 P1 v8 [% u
& q; ^+ J& X% y* T0 ]

9 ?% D1 y& Z9 H* }  j- L
4 f3 j* C4 f6 j# g- O2 A
// 创建固定约束" S0 L, G( w4 y
2 e. Y- u# D/ B0 s" j, p8 `" v* H

9 E7 G/ }5 e$ Z0 d; R; h        Positioning::ComponentPositioner *componentPositioner1;
) ?  Z' X( l5 O5 g6 E        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
9 Z5 D6 u0 T6 X/ t/ y' M        componentPositioner1->ClearNetwork();, B9 K' ?0 }* H: Q& B3 N/ p9 n4 d) B
        componentPositioner1->BeginAssemblyConstraints();$ H2 U, l& ^$ ^. I5 Q
        Positioning::Network *network1;
$ f+ e0 `7 V. v4 o$ R        network1 = componentPositioner1->EstablishNetwork();4 c7 F% a3 g/ i
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));" e" V! d1 c0 X, C" k; Q
        componentNetwork1->SetMoveObjectsState(true);
0 ~( P3 d2 |2 E        Assemblies::Component *nullAssemblies_Component(NULL);7 j9 o/ B4 t% h
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);* D. \2 j) n# V1 Z- I
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
) |2 C, @* k/ M1 b        Positioning::Constraint *constraint1;
$ |% K3 F$ Y3 M1 E* i5 \: T        constraint1 = componentPositioner1->CreateConstraint(true);# z) E$ F  O- j9 T/ K" x8 j" f
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));% f. G" x& |2 W8 l" ]% ?* Z
        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
* d8 _; u6 m' P- b) l- _7 \        Positioning::ConstraintReference *constraintReference1;" l. u6 ^4 U6 x5 V2 {
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
' K# x1 Q! k. U  F$ _8 y        Point3d helpPoint1(0, 0, 0);
1 M5 ]/ I0 J3 c* z% Z- v        constraintReference1->SetHelpPoint(helpPoint1);" \8 a3 e. o# P& W4 v
        componentNetwork1->Solve();+ R) @3 ~6 u5 m% J  Z& K2 p
        componentPositioner1->ClearNetwork();
- \  \) u% b' {6 E" y5 o' {        componentPositioner1->DeleteNonPersistentConstraints();
1 C3 ]5 q( f, c- t% P% o2 P        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);9 S* j$ S8 F9 g" D6 a
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
* f8 F8 e8 ^0 `        componentPositioner1->EndAssemblyConstraints();5 {! K: I6 w) [8 M4 m

4 u7 L2 _( ~# ~- D( v) `8 V2 B% W
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了