|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向
; w& F. B \6 ^0 B" w/ N% `* I# J' | L
这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新4 X* T. x9 Q! h# z, p2 S
- S6 [, }! e c/ k% |5 [& _/ L2 R, t& `+ U8 j1 B& V Z
tag_t featureTag = NULL_TAG;0 D! U" g! u& ^ y9 v
UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);8 _4 }1 q/ L' @+ N) m' V
NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));+ F: P$ o* B' P3 ?
NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;1 T$ y/ H0 f" s3 m
datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);5 x3 m# j9 m3 c3 {( t, @- q
6 X$ }8 i( s' N, a/ P8 s
NXOpen::Plane *plane1;
9 _$ @! ]7 P; N5 v X; n \( C" P$ _. z( J7 i+ R" [- ^
plane1 = datumPlaneBuilder1->GetPlane();+ D7 F8 p. j1 D1 l) |) W
9 j* \" C6 U# g3 q7 U //uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);
% R. Q* _+ o- `+ X( h. R3 x2 n& E: p7 U0 E$ @
plane1->SetFlip(true);
( D' S* T- X" T# A1 \0 Q' r3 W5 s9 r4 l% ] I$ W2 \
plane1->Evaluate();3 B' C7 I- u5 R0 T1 D% g
2 b+ q3 k, P$ `( l
NXOpen::Features::Feature *feature1;( M4 j* [5 \1 x l M8 N
feature1 = datumPlaneBuilder1->CommitFeature();* h) l$ M- r/ l# ^" r/ J
datumPlaneBuilder1->Destroy();* M1 c9 Y7 |0 B$ f7 q5 v( L' g
2 M4 N* g* \- b f
|
|