|
请使用QQ关联注册PLM之家,学习更多关于内容,更多精彩原创视频供你学习!
您需要 登录 才可以下载或查看,没有账号?注册
x
NX二次开发源码分享: 根据 datum plane 更新 datum 法相方向
O& N9 d8 O3 ^6 E }+ S* l8 n, i; z; @! F
这里用到了 ufun函数,通过对象获取特征,然后通过特征进行更新1 O+ W5 {! o, m, }1 w b8 h
# R$ B! K+ n, X ?* o8 {
! b+ z* ]6 }6 D* ?% O- S X, O3 d3 atag_t featureTag = NULL_TAG;
1 X# g, N b: v: Y' T9 a7 q# s UF_MODL_ask_object_feat(DpX->Tag(),&featureTag);; u' [, [" Q7 D0 \: U
NXOpen::Features::DatumPlaneFeature *datumPlaneFeature1(dynamic_cast<NXOpen::Features::DatumPlaneFeature *>(NXObjectManager::Get(featureTag)));
0 |+ B2 R1 u+ C0 X8 d* ^ NXOpen::Features::DatumPlaneBuilder *datumPlaneBuilder1;
. a1 T. q' n/ c/ l datumPlaneBuilder1 = workPart->Features()->CreateDatumPlaneBuilder(datumPlaneFeature1);
+ W- T) u1 X* @5 Z8 f5 f+ v5 a
3 a' ]( v& b' X% { NXOpen::Plane *plane1;. X7 j' f: n6 `# J3 C
9 ?* E5 }( J, T3 \7 X plane1 = datumPlaneBuilder1->GetPlane();
( g) t7 L8 Q: h# b7 F- \2 W7 e: f4 F; f/ C+ i* u3 H
//uc1601(datumPlaneFeature1->GetFeatureName().GetUTF8Text(),1);/ q6 G* p8 S$ r* |, U
- Q/ _3 h- y0 x8 a" e1 r
plane1->SetFlip(true);
z1 q5 q% W! {. f& u" Z$ D1 K/ h' }( ? ~+ Y
plane1->Evaluate();
/ F- u% {- `- h1 h
4 c; P/ a) x) {& |7 ~6 h2 F$ ` NXOpen::Features::Feature *feature1;5 z3 c+ Q. w8 i
feature1 = datumPlaneBuilder1->CommitFeature();) q" Z- m$ o/ I( g: h
datumPlaneBuilder1->Destroy();
- o0 p' y* {# I; M
- Y# ?& {! }8 E/ c' ]0 @) G |
|