{"action":"created","issue":{"url":"https://api.github.com/repos/paperjs/paper.js/issues/875","labels_url":"https://api.github.com/repos/paperjs/paper.js/issues/875/labels{/name}","comments_url":"https://api.github.com/repos/paperjs/paper.js/issues/875/comments","events_url":"https://api.github.com/repos/paperjs/paper.js/issues/875/events","html_url":"https://github.com/paperjs/paper.js/issues/875","id":124249053,"number":875,"title":"Path disappears during substract() operation","user":{"login":"iconexperience","id":2122773,"avatar_url":"https://avatars.githubusercontent.com/u/2122773?v=3","gravatar_id":"","url":"https://api.github.com/users/iconexperience","html_url":"https://github.com/iconexperience","followers_url":"https://api.github.com/users/iconexperience/followers","following_url":"https://api.github.com/users/iconexperience/following{/other_user}","gists_url":"https://api.github.com/users/iconexperience/gists{/gist_id}","starred_url":"https://api.github.com/users/iconexperience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iconexperience/subscriptions","organizations_url":"https://api.github.com/users/iconexperience/orgs","repos_url":"https://api.github.com/users/iconexperience/repos","events_url":"https://api.github.com/users/iconexperience/events{/privacy}","received_events_url":"https://api.github.com/users/iconexperience/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/paperjs/paper.js/labels/boolean-operations","name":"boolean-operations","color":"fef2c0"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-12-29T18:17:40Z","updated_at":"2015-12-29T18:26:39Z","closed_at":null,"body":"This one is bizarre. In the subtract operation of the following example, the original path (the small orange circle) is deleted, although it does not even touch the path that is subtracted.\r\n\r\n<a href=\"http://sketch.paperjs.org/#S/dVHLbsIwEPwVy6dUDVZIIIFUnLijSj0mORhnG6IYO1qb9oD499oQ2vCo5V3Z3pnxPo5U8T3QnH50YMWOhlTo2t+/OBLRkxVR8E3eud0FRwPNHpQ1eVFiqYhbxXS+YFlIksWSJSGJznsyY8t5SLyvQnIPnUUZi39BI+wTRpay9J4x9pN/GEM6D9BnjJsCbrC+muoKdBwhtYE6t3iA08ubD4ieGYu6g7WWGl2vSqqRqwZKeo57830ct5GtWxQSgjh1+kns3DSKLnI9+2yl/NNCqAchL+Lf/IeHrUUubNAPOWhltAQmdRMgE5Ibs3ETJa9OIHfmDsiuk7tQ3JC3CLzrdeveaF5Upx8=\"> Here is the sketch</a>\r\n\r\n```javascript\r\nvar cp = new Path({segments:[\r\n    [158.7, 389.3, 0, 0, -4.95, 4.95], \r\n    [158.7, 407.2, -4.95, -4.95, 4.95, 4.95], \r\n    [176.6, 407.2, -4.95, 4.95, 4.95, -4.95], \r\n    [176.6, 389.3, 4.95, 4.95, -4.95, -4.95], \r\n    [158.7, 389.3, 4.95, -4.95, 0, 0]\r\n    ], closed:true});\r\ncp.strokeColor = \"orange\";\r\n\r\nvar p = new Path.Circle(260, 320, 100);\r\np.fillColor = \"red\";\r\nvar r = cp.subtract(p);\r\nconsole.log(r.className + \": \" + r.segments);\r\n```\r\n\r\n![image](https://cloud.githubusercontent.com/assets/2122773/12039383/43164778-ae60-11e5-9d5e-12da04f7802e.png)\r\n\r\nThe result of the subtraction is an empty path.\r\n\r\nThis has something to do with the shape of the original path, but there is nothing special that I can see. If I set the handles of the first segment from 4.95 to 5, everything works.\r\n\r\nBTW, this bug is not new to me. I have seen it for a while, but I was sure it was caused by my code, so I did not examine it until now.\r\n"},"comment":{"url":"https://api.github.com/repos/paperjs/paper.js/issues/comments/167848471","html_url":"https://github.com/paperjs/paper.js/issues/875#issuecomment-167848471","issue_url":"https://api.github.com/repos/paperjs/paper.js/issues/875","id":167848471,"user":{"login":"iconexperience","id":2122773,"avatar_url":"https://avatars.githubusercontent.com/u/2122773?v=3","gravatar_id":"","url":"https://api.github.com/users/iconexperience","html_url":"https://github.com/iconexperience","followers_url":"https://api.github.com/users/iconexperience/followers","following_url":"https://api.github.com/users/iconexperience/following{/other_user}","gists_url":"https://api.github.com/users/iconexperience/gists{/gist_id}","starred_url":"https://api.github.com/users/iconexperience/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iconexperience/subscriptions","organizations_url":"https://api.github.com/users/iconexperience/orgs","repos_url":"https://api.github.com/users/iconexperience/repos","events_url":"https://api.github.com/users/iconexperience/events{/privacy}","received_events_url":"https://api.github.com/users/iconexperience/received_events","type":"User","site_admin":false},"created_at":"2015-12-29T18:26:39Z","updated_at":"2015-12-29T18:26:39Z","body":"Hmm, after `preparePath()` the first segment has a handle-in and the last segment has a handle-out added. Not sure if this is correct."}}