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

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

[复制链接]

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

2471

主题

1276

回帖

8万

积分

管理员

PLM之家站长

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

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
+ i; H4 \9 @" N+ r1 {4 r" C装配约束的创建过程,如何创建一个对象的约束为固定约束!& C+ K" s- D; M* {

0 J( |6 N, `+ G$ Q) H& |
8 ]  |) j  L9 d5 o( g
1 j# g  d$ m3 ^# z, N
// 创建固定约束3 g5 s$ A  U% D" B. R- F
+ A; ~( |5 D9 F4 O& b; J$ S7 }

6 J* G- p+ G' f        Positioning::ComponentPositioner *componentPositioner1;( ~, M' \2 x  G% S$ l) S
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
1 y8 l1 g6 E6 I/ `$ @        componentPositioner1->ClearNetwork();1 k2 X, H! e# U, E
        componentPositioner1->BeginAssemblyConstraints();
% J4 m- t% I0 z6 E* L. J& h9 j        Positioning::Network *network1;
5 H* g4 Z8 n$ J4 }        network1 = componentPositioner1->EstablishNetwork();0 d7 R- t7 _- D+ l
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
# ~# o1 }( x6 Y  B0 e8 v0 f        componentNetwork1->SetMoveObjectsState(true);; `# M; d$ a, s3 f, n
        Assemblies::Component *nullAssemblies_Component(NULL);
6 `/ n8 s; M( [/ h) A        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
: t) O6 t4 v4 b, ^" }+ o$ V        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
: ~) T3 r) R  Z! @1 g0 N. ~' @' s        Positioning::Constraint *constraint1;  G4 E) T' [5 _! s
        constraint1 = componentPositioner1->CreateConstraint(true);, `: i+ n: E/ H7 A
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));5 j5 `; j' P& \: E% f6 H
        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);, Z" x$ ]& r. a  W
        Positioning::ConstraintReference *constraintReference1;
4 O4 c' \) W2 |/ q' Z' Z4 O, R0 i        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);% s0 y) [: W% V. Y
        Point3d helpPoint1(0, 0, 0);
9 I# [5 K9 ]  [" ?. N0 i( r7 G        constraintReference1->SetHelpPoint(helpPoint1);1 o+ x9 Q( e7 @6 W( a( P
        componentNetwork1->Solve();
9 C& h9 D: G$ W5 [, T        componentPositioner1->ClearNetwork();
* X& P) ?4 ?4 s" D/ f        componentPositioner1->DeleteNonPersistentConstraints();, j' Y. `! @$ Z* u
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);2 M1 v& M1 w# r; v
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
4 j$ s$ B4 v, l  a6 m        componentPositioner1->EndAssemblyConstraints();
" n# r$ t: ?( @; Z" M4 N
3 l2 G* g8 l- z/ t6 F2 j, g3 N2 W
上海点团信息科技有限公司,承接UG NX,CATIA,CREO,Solidworks 等CAx软件,Teamcenter,3D Experience等PLM软件,工业4.0数字化软件的实施\二次开发\培训相关业务,详情QQ 939801026 Tel 18301858168 网址 doTeam.tech
回复

使用道具 举报

全部回复1

2471

主题

1276

回帖

8万

积分

管理员

PLM之家站长

积分
82201
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二次开发专题模块培训报名开始啦

    我知道了