//********************优化面********************************
void MOLDBASE::updateFaces(std::vector<NXOpen::Face*> facesVec)
{
Session* theSession = Session::GetSession();
Part* workPart(theSession->Parts()->Work());
Part* displayPart(theSession->Parts()->Display());
Features::OptimizeFaceBuilder* optimizeFaceBuilder1;
optimizeFaceBuilder1 = workPart->Features()->CreateOptimizeFaceBuilder();
optimizeFaceBuilder1->SetDistanceTolerance(0.001);
optimizeFaceBuilder1->SetReport(false);//不显示报告
FaceDumbRule* faceDumbRule1;
faceDumbRule1 = workPart->ScRuleFactory()->CreateRuleFaceDumb(facesVec);
std::vector<SelectionIntentRule*> rules1(1);
rules1[0] = faceDumbRule1;
optimizeFaceBuilder1->FacesToOptimize()->ReplaceRules(rules1, false);
NXObject* nXObject1;
nXObject1 = optimizeFaceBuilder1->Commit();
optimizeFaceBuilder1->Destroy();
}
【UG\NX二次开发-NXOPEN】优化面
最新推荐文章于 2024-07-15 10:45:00 发布