opened
iconexperience
username_0
Here is a simple example where `Path.compare()` works only in one direction, but not the other:

```
var p1 = new paper.Path({segments: [[100, 100], [150, 100], [200, 100], [200, 200], [100, 200]], closed: true});
var p2 = new paper.Path({segments: [[100, 100], [200, 100], [200, 200], [100, 200]], closed: true});
console.log(p1.compare(p2)); // true
console.log(p2.compare(p1)); // false
```
The paths look like this.

p1:
![image](https://cloud.githubusercontent.com/assets/2122773/21417468/ffaa1d40-c81a-11e6-9d2c-18877a027555.png)

p2:
![image](https://cloud.githubusercontent.com/assets/2122773/21417478/164d3b0e-c81b-11e6-9989-bea4e5c36806.png)
Path.compare() fails with intermediate point added
issue
created
iconexperience
username_0
Wow, `Curve.getOverlaps()` returns the overlaps in the wrong order:

```javascript
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 ] ]
```
comment
created
lehni
username_1
Interesting! I just found the same to be a problem. Will changing the overlap sequence have any other impacts?
comment
created
lehni
username_1
I think I've managed to fix this in 88453914e5843409f585ac196d954d3ee4b915c6, but I found another failing scenario (example needs latest develop version for `Path#divideAt()`):

```js
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
```
comment
closed
lehni
username_1
issue
created
lehni
username_1
c21e19b303852f405df835ac7cb7b8063baaa6d1 is the correct fix, and also made the code more readable. This should explain the change:

            // Iterate through all end points:
            // First p1 of curve 1 & 2, then p2 of curve 1 & 2.
comment