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

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

[复制链接]

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

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

积分
82162
QQ
发表于 2015-1-30 23:19:45 | 显示全部楼层 |阅读模式

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
0 k- @( e: V; F/ V9 K8 g装配约束的创建过程,如何创建一个对象的约束为固定约束!1 r: R7 H1 \. H; w; V" Y
8 V9 i- x4 V; g/ F4 P- t- E
% x3 \0 L; a* U+ q0 g
0 c# A4 F6 C: J0 B$ ^: _$ L3 C% m9 [
// 创建固定约束; q: \' N, x3 V" n% F
7 R5 x& c& M5 S' I% s
) g+ \# M( x  v* x  U* o* k
        Positioning::ComponentPositioner *componentPositioner1;' j$ c- Y  B; o3 _+ Q. Y5 m
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();  y) M' a% a" O7 ^& ~; N
        componentPositioner1->ClearNetwork();6 X+ L- @0 V  M3 o, W% B8 f' S) A$ l$ a" @( R
        componentPositioner1->BeginAssemblyConstraints();  }2 \# P9 {' ^3 \# n- E
        Positioning::Network *network1;" E9 e' c0 ?" J9 k! _3 P
        network1 = componentPositioner1->EstablishNetwork();4 @1 F; w9 J1 W, A. G
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));$ W: Z. J. {7 |- J
        componentNetwork1->SetMoveObjectsState(true);, D% F4 n- J5 E% G
        Assemblies::Component *nullAssemblies_Component(NULL);  E" b% N& `+ ]9 V# G% @
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
7 t- b4 D% U* @: p# a        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
' @, w- Z/ F+ U* K. j# w6 E        Positioning::Constraint *constraint1;- M) G0 n* z" j# W( v* K$ @
        constraint1 = componentPositioner1->CreateConstraint(true);! P9 V' F, L; }! D# p* t: w9 \5 k
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
" q* N/ w7 R. \  c# v        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
1 D5 W  i& y1 _" G8 B7 o2 A7 |8 l        Positioning::ConstraintReference *constraintReference1;1 y' ^9 T3 v* M9 l; ?: D
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);
4 [! U+ W5 h2 W6 h* D        Point3d helpPoint1(0, 0, 0);
0 e) D/ O+ x+ c% h" {; u) ]        constraintReference1->SetHelpPoint(helpPoint1);
9 u) L' F3 [6 X, W        componentNetwork1->Solve();. }5 m- g2 A3 v( e
        componentPositioner1->ClearNetwork();7 w! m9 @9 ?( e, N1 V
        componentPositioner1->DeleteNonPersistentConstraints();9 g& t& [. [9 M% H
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);$ Y# _* E4 E4 ?5 ^/ U4 g
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
) |6 q& H. e6 l7 t: I        componentPositioner1->EndAssemblyConstraints();  q; H9 x. u) v3 M2 l

1 X, _: v3 [7 G" k9 d
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

2470

主题

1275

回帖

8万

积分

管理员

PLM之家站长

积分
82162
QQ
 楼主| 发表于 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二次开发专题模块培训报名开始啦

    我知道了