fix a gap fill/thin wall artifact

This commit is contained in:
supermerill 2021-05-27 19:01:23 +02:00
parent a560103ce2
commit d10e5531c0

View File

@ -206,7 +206,7 @@ MedialAxis::validate_edge(const VD::edge_type* edge, Lines &lines, std::map<cons
// discard edge if it lies outside the supplied shape // discard edge if it lies outside the supplied shape
// this could maybe be optimized (checking inclusion of the endpoints // this could maybe be optimized (checking inclusion of the endpoints
// might give false positives as they might belong to the contour itself) // might give false positives as they might belong to the contour itself)
if (line.a.coincides_with(line.b)) { if (line.a.coincides_with_epsilon(line.b)) {
// in this case, contains(line) returns a false positive // in this case, contains(line) returns a false positive
if (!this->expolygon.contains(line.a)) return false; if (!this->expolygon.contains(line.a)) return false;
} else { } else {