Skip to content

Commit

Permalink
odb: polygon will be correct for decomp, so no need to go additional …
Browse files Browse the repository at this point in the history
…checks which incorrectly reserve the points order

Signed-off-by: Peter Gadfort <[email protected]>
  • Loading branch information
gadfort committed Aug 14, 2024
1 parent 66854d2 commit 4a90f23
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions src/odb/src/db/dbPolygon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,22 +261,8 @@ Polygon _dbPolygon::checkPolygon(std::vector<Point> polygon)

void _dbPolygon::decompose()
{
std::vector<Point> polygon = polygon_.getPoints();

if (polygon[0] == polygon[polygon.size() - 1]) {
polygon.pop_back();
}

if (polygon.size() < 4) {
return;
}

if (!polygon_is_clockwise(polygon)) {
std::reverse(polygon.begin(), polygon.end());
}

std::vector<Rect> rects;
decompose_polygon(polygon, rects);
decompose_polygon(polygon_.getPoints(), rects);

std::vector<Rect>::iterator itr;

Expand Down

0 comments on commit 4a90f23

Please sign in to comment.