Activate code that handles self-intersection directly now.

Relates to #765, #761
This commit is contained in:
Jürg Lehni 2015-09-09 08:24:02 +02:00
parent abf70378fe
commit 78e0bae6aa

View file

@ -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