[CONSIDER MERGING] grid check markers are not exactly aligned with vertexes in deep mode

This commit is contained in:
Matthias Koefferlein 2023-01-16 01:35:08 +01:00
parent 70d16425e1
commit db870614ab
2 changed files with 3 additions and 1 deletions

View File

@ -890,6 +890,8 @@ template <class Trans>
void
AsIfFlatRegion::produce_markers_for_grid_check (const db::Polygon &poly, const Trans &tr, db::Coord gx, db::Coord gy, db::Shapes &shapes)
{
Trans tr_inv = tr.inverted ();
gx = std::max (db::Coord (1), gx);
gy = std::max (db::Coord (1), gy);
@ -908,7 +910,7 @@ AsIfFlatRegion::produce_markers_for_grid_check (const db::Polygon &poly, const T
for (db::Polygon::polygon_contour_iterator pt = b; pt != e; ++pt) {
db::Point p = tr * *pt;
if ((p.x () % gx) != 0 || (p.y () % gy) != 0) {
shapes.insert (EdgePair (db::Edge (p, p), db::Edge (p, p)));
shapes.insert (EdgePair (db::Edge (p, p), db::Edge (p, p)).transformed (tr_inv));
}
}

Binary file not shown.