-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Path.compare() fails with intermediate point added #1223
Comments
Wow, var v1 = [0, 0, 0, 0, 100, 0, 100, 0];
var v2 = [50, 0, 50, 0, 100, 0, 100, 0];
var overlaps = Curve.getOverlaps(v1, v2);
console.log(overlaps); // [ [ 1, 1 ], [ 0.5, 0 ] ] |
Interesting! I just found the same to be a problem. Will changing the overlap sequence have any other impacts? |
I think I've managed to fix this in 8845391, but I found another failing scenario: var circle = new Path.Circle({
center: [100, 100],
radius: 100,
fullySelected: true
});
var circle2 = circle.clone();
circle2.divideAt(50);
circle2.divideAt(100);
console.log(circle.compare(circle2)); // false
console.log(circle2.compare(circle)); // true Note: The example needs the latest develop version for |
c21e19b is the correct fix, and also made the code more readable. This should explain the change:
|
Here is a simple example where
Path.compare()
works only in one direction, but not the other:The paths look like this.
p1:
p2:
The text was updated successfully, but these errors were encountered: