From d18b8a1d80185a800e18db935f04dc63cd9e1637 Mon Sep 17 00:00:00 2001 From: jaseg Date: Wed, 2 Jun 2021 11:00:35 +0200 Subject: Finish chain approximation tests --- svg-flatten/src/nopencv.cpp | 94 ++++++++++++++++++++++++++------------------- 1 file changed, 54 insertions(+), 40 deletions(-) (limited to 'svg-flatten/src/nopencv.cpp') diff --git a/svg-flatten/src/nopencv.cpp b/svg-flatten/src/nopencv.cpp index afe4881..2384fcc 100644 --- a/svg-flatten/src/nopencv.cpp +++ b/svg-flatten/src/nopencv.cpp @@ -247,6 +247,7 @@ double k_cos(const Polygon_i &poly, size_t i, size_t k) { return dp / (sqrt(sq_a)*sqrt(sq_b)); } +constexpr bool debug = false; ContourCallback gerbolyze::nopencv::simplify_contours_teh_chin(ContourCallback cb) { return [&cb](Polygon_i &poly, ContourPolarity cpol) { size_t sz = poly.size(); @@ -261,30 +262,32 @@ ContourCallback gerbolyze::nopencv::simplify_contours_teh_chin(ContourCallback c retain[i] = true; } - cerr << endl; - cerr << "Polarity: " << cpol <