Use this beautiful intersection library. With this you can do things like this:
var shape1 = new Path(pathElement1), shape2 = new Path(pathElement2); var inter = Intersection.intersectShapes(shape1, shape2); if(inter.points.length > 0) {
The inter object in my example contains other useful materials.
swenedo
source share