Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.35 KB | None | 0 0
  1. std::vector<mwAdaptiveRoughing::ToolPath> TPCreatorRoughingTriangleBased::ARCreateToolpaths( const std::vector<triax::mwAdaptiveRoughing::Polylines> &softBoundaries, const std::vector<triax::mwAdaptiveRoughing::Polylines> &hardBoundaries )
  2. {
  3.     const int slicesCount = static_cast<int>(softBoundaries.size());
  4.     const double toolDiam = mTool.GetDiameter();
  5.     const double curvatureRadius = GetAdaptiveRoughingCurvatureRadius();
  6.     const double maximalEngagement = mathdef::mw_min(toolDiam, mParam.GetMaxStepoverDistance());
  7.     const double optimalEngagement = 0.8 * maximalEngagement;
  8.     const int machineDirection = ARGetMachDirection();
  9.     const bool rampMovesAllowed = mParam.GetTpCalculationMethodsParams().GetTriangleMeshBasedTpCalcParams().GetCenterCuttingToolFlg();
  10.     const double cutTolerance = mParam.GetCutTolerance();
  11.  
  12.     std::vector<mwAdaptiveRoughing::ToolPath> toolpaths(slicesCount);
  13.    
  14.     #pragma omp parallel for schedule(dynamic, 1)
  15.     for (int i = 0; i < slicesCount; ++i)
  16.     {
  17.         mwAdaptiveRoughing::Point outsidePoint = ARGetOutsidePoint(softBoundaries[i], hardBoundaries[i]);
  18.         mwAdaptiveRoughing aR(
  19.             softBoundaries[i],
  20.             hardBoundaries[i],
  21.             optimalEngagement, maximalEngagement,
  22.             machineDirection, rampMovesAllowed,
  23.             toolDiam*0.5,
  24.             curvatureRadius,
  25.             cutTolerance);
  26.         toolpaths[i] = aR.CreateToolPath(outsidePoint);
  27.     }
  28.  
  29.     return toolpaths;
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement