UG NX二次开发源码分享:CAM加工中获取加工时间
UG NX二次开发源码分享:CAM加工中获取加工时间
CAM::CAMSetup *camSetup = displayPart->CAMSetup();
CAM::OperationCollection *operColl = camSetup->CAMOperationCollection();
CAM::OperationCollection::iterator it = operColl->begin();
while( it != operColl->end() )
{
CAM::Operation *oper = (CAM::Operation*)(*it);
ostringstream out;
out << oper->Name().GetText() << endl;
out << " Toolpath Length: " << oper->GetToolpathLength() << endl;
out << " Toolpath Time: " << oper->GetToolpathTime() << endl;
out << " Toolpath Cutting Length: " << oper->GetToolpathCuttingLength() << endl;
out << " Toolpath Cutting Time: " << oper->GetToolpathCuttingTime() << endl;
print(out.str().c_str());
it++;
}
页:
[1]