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

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

[复制链接]

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

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

admin 楼主

2015-1-30 23:19:45

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

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

x
PLM之家NX二次开发自动装配项目】1.6 创建固定约束& j& g& Z  N' B4 i* w3 S# x0 ~
装配约束的创建过程,如何创建一个对象的约束为固定约束!
3 ]8 F9 Q; ?1 x& i7 ^/ x2 j+ t+ {3 h5 W3 c

1 `! F1 p; Z$ M
4 u1 I. A9 ~. Z3 K5 l6 w
// 创建固定约束
! Q/ a& T; I( x! _" C' m
, M0 n' _3 x- X! M

4 h8 v% {+ @# Y        Positioning::ComponentPositioner *componentPositioner1;
2 U& R+ t6 \- ]1 P        componentPositioner1 = workPart->ComponentAssembly()->Positioner();% @' D6 u) k' e# D. @$ i
        componentPositioner1->ClearNetwork();  Y" K; q8 Q4 ~4 T, o+ R9 t
        componentPositioner1->BeginAssemblyConstraints();; k- L+ w8 I% j
        Positioning::Network *network1;
% s! b$ i' S6 y# ~5 k  B        network1 = componentPositioner1->EstablishNetwork();
, N( d8 V: y) Z$ ~0 {: q2 Q        Positioning::ComponentNetwork *componentNetwork1(dynamic_cast<Positioning::ComponentNetwork *>(network1));; y8 T% [) ^8 W
        componentNetwork1->SetMoveObjectsState(true);
' K  o, T, O% `: `: z  t. K        Assemblies::Component *nullAssemblies_Component(NULL);7 J7 u+ O/ L! P: b. Z
        componentNetwork1->SetDisplayComponent(nullAssemblies_Component);$ d; p9 p( G. L% E7 |2 p
        componentNetwork1->SetNetworkArrangementsMode(Positioning::ComponentNetwork::ArrangementsModeExisting);1 \$ q" }8 J0 M) j/ F0 s- l! `: i
        Positioning::Constraint *constraint1;; e+ b! X/ o! B
        constraint1 = componentPositioner1->CreateConstraint(true);$ T+ k8 ]2 h2 ^* Z/ D
        Positioning::ComponenTConstraint *componentConstraint1(dynamic_cast<Positioning::ComponentConstraint *>(constraint1));
6 B: i7 k- Y$ d/ G  M0 x        componentConstraint1->SetConstraintType(Positioning::Constraint::TypeFix);
1 h! V; Q+ y' {) u, f7 R        Positioning::ConstraintReference *constraintReference1;
1 T$ w) d( `; p4 w. y1 L$ c        constraintReference1 = componentConstraint1->CreateConstraintReference(component1, component1, false, false, false);$ X7 o* T7 t( N3 H' o/ t2 _
        Point3d helpPoint1(0, 0, 0);! V1 T! z2 Y0 \+ H& V# m
        constraintReference1->SetHelpPoint(helpPoint1);
0 }# k- u9 {/ k+ U7 C7 m        componentNetwork1->Solve();
, Z- a2 F+ \+ Z1 G4 e$ N        componentPositioner1->ClearNetwork();
6 O7 Z. _8 g# T' Z        componentPositioner1->DeleteNonPersistentConstraints();1 h- z3 A! l0 L
        Assemblies::Arrangement *nullAssemblies_Arrangement(NULL);, h3 `; z7 o: }/ P
        componentPositioner1->SetPrimaryArrangement(nullAssemblies_Arrangement);
' B1 V! F1 ~" Q1 _! s2 r7 W        componentPositioner1->EndAssemblyConstraints();2 p! z: B/ ~  m2 e  {. J# k6 V4 n

  g0 a6 f% b. X, M* F$ d$ a* U
上海点团信息科技有限公司,承接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二次开发专题模块培训报名开始啦

    我知道了