|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向$ N* c1 R/ @9 B
: R j5 o& m0 v0 S4 L
这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新4 `% w# W: L3 X* A1 u
3 [; W, U' ?/ S3 o- N- E' }7 Z M& G: o, J" C' Z8 c6 O
tag_t featureTag = NULL_TAG;
6 v" n* {0 e b( S& }8 K UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);$ y! W4 C9 B# A
NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));
( E6 c: j$ r/ u7 g+ l, d NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;9 g$ G: N& M* h" d% }0 h0 N
datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);
* X' j1 w3 c/ `: F8 {& N j" R- v3 L: i4 T
NXOpen::Plane *plane1;2 a& t! E- p7 V7 k
, I' @% E& M1 z) m) ` plane1 = datumPlaneBuilder1->GetPlane();- l3 z: R: E4 n+ n9 D9 i$ ? Z
; m# e( P, s3 I2 L- c //uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);) }- N, T$ P/ c
* u0 e% Q* _$ e) H% g7 ` v plane1->SetFlip(true);
5 J; `9 G; T4 o
O! M1 e8 H4 N$ t plane1->Evaluate();; J0 U& Y1 K6 V, e3 S
1 l# V, c" S& f4 W3 Z7 o$ d0 w# ^ NXOpen::Features::Feature *feature1;
( o5 d. y' g6 a7 L2 `% J feature1 = datumPlaneBuilder1->CommitFeature();* ~$ Y' E: x1 p, I M
datumPlaneBuilder1->Destroy();
' b( {0 [4 n% ^7 w& ~
3 L" Z5 e( E( G- B+ B+ @# C |
|