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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束4 ~( W! W- |( e  r
装配约束的创建过程,如何创建一个对象的约束为固定约束!' ~6 K1 n5 G8 E3 u: j
& K. D$ F) _. K! b- Y" z* a+ w

- k1 M( W( M" x- O" b0 ~2 u1 j
1 {5 P4 o0 P6 a5 O3 h
// 创建固定约束
* r6 U7 ?. E  |5 Y3 [/ D; N
4 D9 S6 e0 o8 v9 b+ Y' r
  v( N5 ^: R- a  O& u* A' V
        Positioning::ComponentPositioner *componentPositioner1;
8 T% g5 K, {) x- w        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
' z1 ?0 g! O- P* w1 }" J! t  |        componentPositioner1->ClearNetwork();
9 x& V& \+ z) y: f8 [        componentPositioner1->BeginAssemblyConstraints();
8 L. K% N" j7 ]* F1 e/ P6 e1 y        Positioning::Network *network1;; o* s4 D" _% q& U
        network1 = componentPositioner1->EstablishNetwork();6 K6 w. u9 o# W7 e' I3 ^/ H  N
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
7 I- S, C0 a% M, G* I        componentNetwork1->SetMoveObjectsState(true);! t! t' X: r4 v! p6 q8 R
        Assemblies::Component *nullAssemblies_Component(NULL);
+ N. @7 j5 h: w9 |        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
( P: K" P  Z- F( x1 s8 _; h        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
1 C& l' I3 h, \( B6 ]3 z        Positioning::Constraint *constraint1;
4 y$ q' f5 h: R4 B        constraint1 = componentPositioner1->CreateConstraint(true);  Q! e0 G/ w1 U- G* x$ E' W
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
9 D4 F/ \5 \) e- G  o! N        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);- U3 L/ J/ s/ B" n! y
        Positioning::ConstraintReference *constraintReference1;/ o$ L% `. V6 U; r, `
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);  E% K, |! W3 S7 F
        Point3d helpPoint1(0, 0, 0);: [/ P0 f3 i& h: _2 Z+ F' r2 g
        constraintReference1->SetHelpPoint(helpPoint1);3 ]0 o1 o# J3 C
        componentNetwork1->Solve();
. W% p6 p7 J6 a( r% N6 S        componentPositioner1->ClearNetwork();" W0 W. L; H8 @( p0 R) r* n
        componentPositioner1->DeleteNonPersistentConstraints();
% s( e" e* i1 m. `* A% d) i        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);
' o% V- m$ B7 E8 p        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);3 b" g& \* M4 G9 |/ S2 |1 [$ T
        componentPositioner1->EndAssemblyConstraints();
. C2 o4 i! e) _/ |6 a7 Z/ w0 W6 G) x0 x, 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二次开发专题模块培训报名开始啦

    我知道了