From 78e0bae6aae34dbc16fa423a8a884524dc929eca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=BCrg=20Lehni?= Date: Wed, 9 Sep 2015 08:24:02 +0200 Subject: [PATCH] Activate code that handles self-intersection directly now. Relates to #765, #761 --- src/path/PathItem.Boolean.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/path/PathItem.Boolean.js b/src/path/PathItem.Boolean.js index 039c5abb..35e64017 100644 --- a/src/path/PathItem.Boolean.js +++ b/src/path/PathItem.Boolean.js @@ -76,20 +76,22 @@ PathItem.inject(new function() { _path2.reverse(); // Split curves at intersections on both paths. Note that for self // intersection, _path2 will be null and getIntersections() handles it. - splitPath(Curve._filterIntersections( - _path1._getIntersections(_path2, null, []), true)); - /* - console.time('inter'); + + // Without support for self-intersection + // splitPath(Curve._filterIntersections( + // _path1._getIntersections(_path2, null, []), true)); + + // console.time('inter'); var locations = _path1._getIntersections(_path2, null, []); - console.timeEnd('inter'); + // console.timeEnd('inter'); if (_path2 && false) { - console.time('self'); + // console.time('self'); _path1._getIntersections(null, null, locations); _path2._getIntersections(null, null, locations); - console.timeEnd('self'); + // console.timeEnd('self'); } splitPath(Curve._filterIntersections(locations, true)); - */ + var chain = [], segments = [], // Aggregate of all curves in both operands, monotonic in y