X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fbezier.h;h=03e789cf64af4b17352254d6f62d1d75c6c6707a;hp=99530b3d985682c9ed2d2f5256b53acd34dc09d3;hb=d272af0f7f981cea9d1024b6a730be73dd22276a;hpb=3172dd5af487e0f8a6e5cd5439dea594b9cbd7c9 diff --git a/src/bezier.h b/src/bezier.h index 99530b3..03e789c 100644 --- a/src/bezier.h +++ b/src/bezier.h @@ -291,7 +291,7 @@ namespace IPDF Debug("Found %d intersections.\n", x_intersection.size()); std::vector all_beziers; - if (x_intersection.empty()) + if (x_intersection.size() <= 2) { all_beziers.push_back(*this); return all_beziers; @@ -304,7 +304,7 @@ namespace IPDF Debug(" -- t0: %f to t1: %f", t0, t1); Real ptx, pty; Evaluate(ptx, pty, ((t1 + t0) / Real(2))); - if (r.PointIn(ptx, pty)) + if (true || r.PointIn(ptx, pty)) { all_beziers.push_back(this->ReParametrise(t0, t1)); }