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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束$ h8 m% g5 [* U" E% y. V
装配约束的创建过程,如何创建一个对象的约束为固定约束!
' L8 `& Q$ r* F( f
+ z7 ^: B. x% I3 I3 d; U* y! i

2 @/ \- j( y7 c' q9 F) R6 d2 X( t5 V0 i, b: ~
// 创建固定约束
9 n9 Q) p/ e8 K& i; t- |+ E' n$ T/ X3 ]$ h9 J  n6 d/ b2 M

2 g( }- C4 D9 H        Positioning::ComponentPositioner *componentPositioner1;) ]3 y) {  J4 i" F8 _7 x; M
        componentPositioner1 = workPart->ComponentAssembly()->Positioner();
! O) a; B& c  y) h5 b( {- a        componentPositioner1->ClearNetwork();: Z# k" O3 e% _: s2 S
        componentPositioner1->BeginAssemblyConstraints();' Z$ c7 d7 v2 t. E
        Positioning::Network *network1;
3 P# P( l+ t2 Z: Z* x2 o# b5 J        network1 = componentPositioner1->EstablishNetwork();8 ?2 g0 O8 [+ ^
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
$ w9 Q  _3 c+ F+ S- Z        componentNetwork1->SetMoveObjectsState(true);# |4 o0 q7 k- l
        Assemblies::Component *nullAssemblies_Component(NULL);: {: d& L/ i! Q
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);
2 N, q* i! W( h) _0 N* r        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);! }+ Z$ R% k1 ]# Q2 ]3 h) Q6 y: e
        Positioning::Constraint *constraint1;. s, F2 ~8 S2 H8 f% G
        constraint1 = componentPositioner1->CreateConstraint(true);
3 I' B5 v' s+ l3 z, ?% G3 [, e        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
8 W' }8 M' J9 l2 ]- ~        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
, Z1 O* k" X: c9 E: `, `* `        Positioning::ConstraintReference *constraintReference1;+ P' s! v* E2 j5 K, T8 z( k" j& u
        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);3 d! ^! o5 f4 B* z& V2 ^" e
        Point3d helpPoint1(0, 0, 0);
0 P% g9 L/ D- r6 p        constraintReference1->SetHelpPoint(helpPoint1);
5 Y3 \: G6 m% c8 P( E/ D7 _# \        componentNetwork1->Solve();
9 o1 K# ~3 ^  W        componentPositioner1->ClearNetwork();- T4 q9 o: M5 f9 C( @
        componentPositioner1->DeleteNonPersistentConstraints();  u5 [: Q* x# S6 p) m
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);4 N) ?6 A" D/ l" I5 R6 N% V
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);0 E/ `6 x+ L* T' H0 l" F; U
        componentPositioner1->EndAssemblyConstraints();
: G3 D2 O; l' e$ W* X
- x; O- s( N! U1 Y+ L5 n
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了