Path: Adaptive - bugfix
fix for path cleaning, related to uncleared regions
This commit is contained in:
@@ -35,7 +35,7 @@ namespace AdaptivePath
|
||||
{
|
||||
using namespace ClipperLib;
|
||||
using namespace std;
|
||||
#define SAME_POINT_TOL_SQRD_SCALED 16.0
|
||||
#define SAME_POINT_TOL_SQRD_SCALED 4.0
|
||||
#define UNUSED(expr) (void)(expr)
|
||||
|
||||
//*****************************************
|
||||
@@ -416,6 +416,13 @@ void CleanPath(const Path &inp, Path &outpt, double tolerance)
|
||||
outpt.push_back(tmp.at(index));
|
||||
}
|
||||
|
||||
|
||||
if(DistanceSqrd(outpt.front(),inp.front()) > SAME_POINT_TOL_SQRD_SCALED)
|
||||
outpt.insert(outpt.begin(), inp.front());
|
||||
|
||||
if(DistanceSqrd(outpt.back(),inp.back()) > SAME_POINT_TOL_SQRD_SCALED)
|
||||
outpt.push_back( inp.back());
|
||||
|
||||
}
|
||||
|
||||
bool Circle2CircleIntersect(const IntPoint &c1, const IntPoint &c2, double radius, pair<DoublePoint, DoublePoint> &intersections)
|
||||
|
||||
Reference in New Issue
Block a user