|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向
0 b* k* M, u6 |0 W4 N. ^
5 O4 d; u# [* S" {: i这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新1 _# O0 e1 U( j( M
( N2 f+ ^% t9 M1 f4 D" A
5 N# ^( `/ A1 I; L3 [tag_t featureTag = NULL_TAG;
# ^0 v2 e2 [1 s" G9 s UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);/ Q6 r! C8 f3 j5 S- {7 g
NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));
, v3 a; s0 O0 v- P3 k4 |3 m NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;* c% [' B: P. R6 P4 Q
datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);
& h1 u! ^+ v6 e; |$ `- R
9 \ A: N( w% c+ h" E NXOpen::Plane *plane1;
! k! C- B3 d& y$ i! U8 R* n f! A. ?* J# \$ ~1 l# W; a8 s+ S; H
plane1 = datumPlaneBuilder1->GetPlane();
) {+ X# D# m- Q# k$ X$ O+ a {% _8 B G
//uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);8 K4 W% }2 |# O. F! B6 m6 [
9 {* U2 U- t8 w- A3 W2 o' d plane1->SetFlip(true);) g% j7 @/ o: A; ^$ J/ f' L4 T
: k4 Q% P! Q7 S plane1->Evaluate();
% k" }2 x" C$ M0 v( y+ i( `- u8 j' ~; v+ V3 x2 X: D. d9 o1 _
NXOpen::Features::Feature *feature1;
' u4 J) |; t& d feature1 = datumPlaneBuilder1->CommitFeature();1 y9 N1 s4 \9 W. k
datumPlaneBuilder1->Destroy();
% X+ F$ M5 U7 G3 M( f
# {3 z. r( D/ o4 Z7 r9 K7 B' ~ |
|