|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向/ E6 G. v$ p0 o, U8 |, T& D2 q% _7 F
7 M7 j$ e7 q; q: W0 d4 b这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新
6 V$ \% k# @8 {9 q, v0 Z" E
0 o. m8 v; o. U4 c7 w( V- O: ^# S9 ~$ H
tag_t featureTag = NULL_TAG;
3 k" I0 ~* e( H+ Y$ h UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);
0 ? z3 } Z/ }: x NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));
9 q' a' u* E$ d: d& N NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;
4 U. `& G1 `& O. J datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);1 \# _( B6 p! E7 B* C [* @
M, V0 f- g% F( Y# L3 Z- w2 e& g8 N NXOpen::Plane *plane1;9 h5 A9 g. p8 X7 s* P: w: @1 i& K
" }8 t! m2 P( I/ q2 f7 r+ w2 D0 a
plane1 = datumPlaneBuilder1->GetPlane();
5 B Q6 @- {$ e; J1 O( x; k, p
9 ~6 ?. K6 f2 ~% o" k/ c& x8 X //uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);
" |5 W6 ^+ N) H) k y& G" F# L% I& ]1 m5 I
plane1->SetFlip(true);4 T- `& j0 c1 c2 q6 a, i2 v
8 l+ O$ s. M) h1 a
plane1->Evaluate();
+ k( T! d, B& u7 E; z( d1 O* C& X) j
NXOpen::Features::Feature *feature1;2 T7 n0 I* C9 R3 Z R0 _. G
feature1 = datumPlaneBuilder1->CommitFeature();
. V/ G, T2 \# ~# Z* C. { datumPlaneBuilder1->Destroy();
, j: _' c$ |4 [! n2 F& b0 j& ^9 j+ |* q# x
|
|