|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向 P) i: ?* |( }* o9 x% @
' X1 e; \& w+ R& R# ~7 I这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新) b$ p p4 ]) Z/ X j7 d3 K, p
, D$ f% W1 q& T k6 g, ]
8 K) e: Q0 _- B" rtag_t featureTag = NULL_TAG;
- n6 L3 k4 U5 Q6 O UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);1 L$ D* {$ A# A, ] z3 ]
NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));
0 \4 v9 s- u7 j) j NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;, y2 H) n- W% v$ s( }
datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);: Q1 \* R- J4 r0 c! T: h
6 x& m2 N. X# S) L1 ]. G8 C
NXOpen::Plane *plane1;, W7 D+ x4 Q1 i2 r
/ p5 x. {: j( g3 U! F
plane1 = datumPlaneBuilder1->GetPlane();
. _8 J8 H2 c+ ^/ X t
' E5 X' C4 V& p2 n+ t6 } //uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);! Q; M0 z4 b, Y
7 F: e5 l+ J4 G6 n
plane1->SetFlip(true);
% E% b) J5 B4 L( Q8 C. F" A8 z: H
' P1 q) C' r' P, u. n" w! I plane1->Evaluate();
$ U. `7 S) y' b. _6 @6 C, a2 g R! M2 V" O
NXOpen::Features::Feature *feature1;/ r, m" B9 I4 A5 ^' i/ e. C1 T
feature1 = datumPlaneBuilder1->CommitFeature();
B+ S7 {3 |' z2 C+ j2 }# t* u# y datumPlaneBuilder1->Destroy();
4 k7 Q; w; w* X, Y4 R' U" X! b# v7 Z# i
|
|