From 364daff4c7c55365612acecd5e43c012a16c05a2 Mon Sep 17 00:00:00 2001 From: kreso-t Date: Sat, 1 Sep 2018 10:22:06 +0200 Subject: [PATCH] Path: Adaptive - bugfix --- src/Mod/Path/libarea/Adaptive.cpp | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/libarea/Adaptive.cpp b/src/Mod/Path/libarea/Adaptive.cpp index 0677c18217..dc02117c2c 100644 --- a/src/Mod/Path/libarea/Adaptive.cpp +++ b/src/Mod/Path/libarea/Adaptive.cpp @@ -855,9 +855,20 @@ namespace AdaptivePath { } SimplifyPolygons(inputPaths); - clipof.Clear(); - clipof.AddPaths(inputPaths,JoinType::jtRound,EndType::etClosedPolygon); - clipof.Execute(inputPaths,-stockToLeave*scaleFactor-1); + if(stockToLeave>NTOL) { + clipof.Clear(); + clipof.AddPaths(inputPaths,JoinType::jtRound,EndType::etClosedPolygon); + clipof.Execute(inputPaths,-stockToLeave*scaleFactor); + } else { + // fix for clipper glitches + clipof.Clear(); + clipof.AddPaths(inputPaths,JoinType::jtRound,EndType::etClosedPolygon); + clipof.Execute(inputPaths,-1); + clipof.Clear(); + clipof.AddPaths(inputPaths,JoinType::jtRound,EndType::etClosedPolygon); + clipof.Execute(inputPaths,1); + } + // ******************************* // Resolve hierarchy and run processing