Path: Adaptive - bugfix

This commit is contained in:
kreso-t
2018-09-01 20:22:01 +02:00
committed by wmayer
parent a980d1e9f1
commit 3928b5c852
2 changed files with 7 additions and 5 deletions

View File

@@ -898,7 +898,7 @@ namespace AdaptivePath {
if(opType==OperationType::otClearingOutside) {
clipof.Clear();
clipof.AddPaths(stockInputPaths,JoinType::jtRound,EndType::etClosedPolygon);
double overshootDistance =2*toolRadiusScaled + toolRadiusScaled*stepOverFactor;
double overshootDistance =2*toolRadiusScaled + toolRadiusScaled*stepOverFactor + OVERSHOOT_ADDON_DIST;
if(forceInsideOut) overshootDistance=0;
Paths stockOvershoot;
clipof.Execute(stockOvershoot,overshootDistance);
@@ -1086,13 +1086,13 @@ namespace AdaptivePath {
// if point is outside the stock
if(PointInPolygon(checkPoint,stockInputPaths.front())==0) {
clipof.Clear();
clipof.AddPaths(toolBoundPaths,JoinType::jtRound,EndType::etClosedPolygon);
clipof.AddPath(pth,JoinType::jtRound,EndType::etClosedPolygon);
Paths sol2;
clipof.Execute(sol2,toolRadiusScaled*stepOverFactor*2);
clipof.Execute(sol2,toolRadiusScaled*stepOverFactor*2 + OVERSHOOT_ADDON_DIST);
clipof.Clear();
clipof.AddPaths(sol2,JoinType::jtRound,EndType::etClosedLine);
clipof.Execute(cleared,toolRadiusScaled);
// trim cleared paths to stock boundary (only outside part remain)
clipof.Execute(cleared,toolRadiusScaled + OVERSHOOT_ADDON_DIST );
clip.Clear();
clip.AddPaths(cleared,PolyType::ptSubject, true);
clip.AddPaths(stockInputPaths,PolyType::ptClip, true);

View File

@@ -124,6 +124,8 @@ namespace AdaptivePath {
const long PASSES_LIMIT = __LONG_MAX__; // limit used while debugging
const long POINTS_PER_PASS_LIMIT = __LONG_MAX__; // limit used while debugging
const time_t PROGRESS_TICKS = CLOCKS_PER_SEC/20; // progress report interval
const long OVERSHOOT_ADDON_DIST=10;
};
}
#endif