NXOpen-设置刀轨为最接近、最短刀轨、主方向

    NXOpen::Session *theSession = NXOpen::Session::GetSession();
    NXOpen::Part* workPart = theSession->Parts()->Work();
    NXOpen::CAM::HoleDrilling* holeDrilling = dynamic_cast<NXOpen::CAM::HoleDrilling*>(NXObjectManager::Get(operation));
    NXOpen::CAM::HoleDrillingBuilder* holeDrillingBuilder = workPart->CAMSetup()->CAMOperationCollection()->CreateHoleDrillingBuilder(holeDrilling);
	
    NXOpen::CAM::FBM::FeatureGeometry *featureGeometry = holeDrillingBuilder->GetFeatureGeometry();
    featureGeometry->ReorderFeatures(NXOpen::CAM::FBM::FeatureGeometry::SortOrderClosest);//SortOrderShortestPath最短刀轨,SortOrderPrimaryDirection主方向
posted @ 2020-12-25 14:07  YellowBoss  阅读(711)  评论(0)    收藏  举报