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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束
2 u( N4 R- [6 z& ^装配约束的创建过程,如何创建一个对象的约束为固定约束!
7 m* y7 ?  I: e# s1 T; @3 B
5 m: T2 z) }! e. Q/ p3 V  e8 F9 U
" Z1 _; j7 u$ k9 C" G1 u0 |4 {
5 T" i% b+ c' f, f7 Z# Y9 i
// 创建固定约束( K, ~7 L3 Q" C* a0 q8 ]1 A8 u; I
) b* ]& n$ a' d  H* c+ e
7 I( |& I; A4 \* w
        Positioning::ComponentPositioner *componentPositioner1;
, c- s6 O8 j# k4 I5 T& q        componentPositioner1 = workPart->ComponentAssembly()->Positioner();/ i# d# L4 |' w# T9 Z! N  K6 P
        componentPositioner1->ClearNetwork();: x2 \: u' {1 Y3 ?1 x
        componentPositioner1->BeginAssemblyConstraints();2 b! r( E1 E8 H: P% L" W
        Positioning::Network *network1;6 z# n7 n" d& a! G8 A" q, B5 j& i
        network1 = componentPositioner1->EstablishNetwork();1 r( {) F# f3 [: e" e9 V
        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));
" e3 _, e/ a) p& a$ L+ |" H9 p        componentNetwork1->SetMoveObjectsState(true);
  s$ i: D; a0 m( _9 @2 T. I0 k* }% M& ^        Assemblies::Component *nullAssemblies_Component(NULL);6 i  a! T! ^+ V8 U; N6 S# }
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);& E( Q' M0 {. V! @) z+ E
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);
& Q, K, `  A& J+ ~        Positioning::Constraint *constraint1;
" x! q3 n% e% A8 y5 A+ Y        constraint1 = componentPositioner1->CreateConstraint(true);
7 M& v  z# E8 Y1 X) A        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
; f4 h; J  P, f) d# q7 z! I5 b2 A        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);- S$ W0 ^  }: \
        Positioning::ConstraintReference *constraintReference1;
# N- K4 W! p/ z7 Y; \7 y% ~        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);0 p# N0 S: g: F% \" a+ \
        Point3d helpPoint1(0, 0, 0);! f* Q. J8 x$ T! @
        constraintReference1->SetHelpPoint(helpPoint1);; H2 }5 e. L. _( O0 i
        componentNetwork1->Solve();4 `1 E9 d; ]5 e2 @7 z7 a
        componentPositioner1->ClearNetwork();
0 B% l5 j5 t# |  N( Q3 M        componentPositioner1->DeleteNonPersistentConstraints();
! s" o) G1 {8 |, r        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);" O: x, h' p$ u* \
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
2 [" L8 h# s; M        componentPositioner1->EndAssemblyConstraints();
$ g4 U( |* o9 h& j6 m" u
2 J1 f7 z. x6 T8 c6 L" ?
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了