iCAx开思工具箱
标题:
扩大一个片体并消参
[打印本页]
作者:
蓝摩羯
时间:
2013-3-12 19:07
标题:
扩大一个片体并消参
char *message="选择";
char *title="选择";
int scope=UF_UI_SEL_SCOPE_NO_CHANGE;
int response;
tag_t object_tag;
double cursor[3];
tag_t view;
int type=0;
char * percent_size[4]={"0","0","0","0"};
double tolerance=0.02;
tag_t feat_obj_tag;
UF_UI_select_with_single_dialog (message,title,scope,set_selection_filter,NULL,&response,&object_tag,cursor,&view );
UF_DISP_set_highlight(object_tag,0);
UF_MODL_create_enlarge(object_tag,type,percent_size,tolerance,&feat_obj_tag );
但是创建完之后怎么把获得的片体消参。。。。、???求帮助。。谢谢了
作者:
zhangcanwei
时间:
2013-3-13 19:40
在ug中录制一段代码就行了,NXOPEN是将来的发展方向
作者:
zhangcanwei
时间:
2013-3-13 19:43
extern "C" DllExport void ufusr(char *param, int *retCode, int paramLen)
{
Session *theSession = Session::GetSession();
Part *workPart(theSession->Parts()->Work());
Part *displayPart(theSession->Parts()->Display());
// ----------------------------------------------
// Menu: Edit->Feature->Remove Parameters...
// ----------------------------------------------
Session::UndoMarkId markId1;
markId1 = theSession->SetUndoMark(Session::MarkVisibilityVisible, "Start");
Features::RemoveParametersBuilder *removeParametersBuilder1;
removeParametersBuilder1 = workPart->Features()->CreateRemoveParametersBuilder();
theSession->SetUndoMarkName(markId1, NXString("Remove Parameters \345\257\271\350\257\235\346\241\206", NXString::UTF8));
Body *body1(dynamic_cast<Body *>(workPart->Bodies()->FindObject("UNPARAMETERIZED_FEATURE(0)")));
bool added1;
added1 = removeParametersBuilder1->Objects()->Add(body1);
Session::UndoMarkId markId2;
markId2 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Remove Parameters");
theSession->DeleteUndoMark(markId2, NULL);
Session::UndoMarkId markId3;
markId3 = theSession->SetUndoMark(Session::MarkVisibilityInvisible, "Remove Parameters");
NXObject *nXObject1;
nXObject1 = removeParametersBuilder1->Commit();
theSession->DeleteUndoMark(markId3, NULL);
theSession->SetUndoMarkName(markId1, "Remove Parameters");
removeParametersBuilder1->Destroy();
// ----------------------------------------------
// Menu: Tools->Journal->Stop Recording
// ----------------------------------------------
}
作者:
zhangcanwei
时间:
2013-3-13 19:43
去掉其中的无用代码就行了
作者:
蓝摩羯
时间:
2013-3-13 20:31
zhangcanwei 发表于 2013-3-13 19:43
去掉其中的无用代码就行了
谢谢,但是有没有c语言函数?录制的是c++
作者:
procamcae
时间:
2013-4-2 21:25
高手,学习了~~
作者:
蓝摩羯
时间:
2013-4-6 11:38
自己结贴,消参得获取到目标体的tag值,将feat_obj_tag转化为tag
作者:
zjq850426
时间:
2013-6-23 16:06
谢谢楼主,支持!!!!
作者:
zjq850426
时间:
2013-6-23 16:33
谢谢楼主,支持!!!!
欢迎光临 iCAx开思工具箱 (https://t.icax.org/)
Powered by Discuz! X3.3