expand cleared area by a small buffer to cover numeric errors

This commit is contained in:
David Kaufman
2024-01-05 11:46:39 -05:00
parent ea1c9e4c57
commit 2a9ce21c81

View File

@@ -662,7 +662,6 @@ std::shared_ptr<Area> Area::getClearedAreaFromPath(const Toolpath *path, double
const double roundPrecision = myParams.Accuracy;
const double buffer = 2 * roundPrecision;
(void)buffer;
(void)JoinType;
(void)EndType;
@@ -679,7 +678,7 @@ std::shared_ptr<Area> Area::getClearedAreaFromPath(const Toolpath *path, double
printf("\n");
printf("GCode walker:\n");
ClearedAreaSegmentVisitor visitor(zmax, diameter);
ClearedAreaSegmentVisitor visitor(zmax, diameter + buffer);
PathSegmentWalker walker(*path);
walker.walk(visitor, Base::Vector3d(0, 0, zmax + 1));
printf("Count: %d\n", visitor.count);