mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-01 02:38:43 -05:00
Self-Intersections: Restore the logic issues while cleaning up
This commit is contained in:
parent
49ddfafe4d
commit
9e799d09eb
1 changed files with 3 additions and 2 deletions
|
@ -97,8 +97,9 @@ var PathItem = Item.extend(/** @lends PathItem# */{
|
|||
// intersects each other. We cannot have a self intersection
|
||||
// within this curve if they don't intersect due to convex-hull
|
||||
// property.
|
||||
if (new Line(seg1._point.subtract(h1), h1, true).intersect(
|
||||
new Line(seg2._point.subtract(h2), h2, true), false)) {
|
||||
if (new Line(seg1._point.subtract(h1), h1.multiply(2), true)
|
||||
.intersect(new Line(seg2._point.subtract(h2),
|
||||
h2.multiply(2), true), false)) {
|
||||
// Self intersectin is found by dividng the curve in two and
|
||||
// and then applying the normal curve intersection code.
|
||||
var parts = Curve.subdivide(values1),
|
||||
|
|
Loading…
Reference in a new issue