{"action":"created","issue":{"url":"https://api.github.com/repos/typemytype/booleanOperations/issues/22","repository_url":"https://api.github.com/repos/typemytype/booleanOperations","labels_url":"https://api.github.com/repos/typemytype/booleanOperations/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/typemytype/booleanOperations/issues/22/comments","events_url":"https://api.github.com/repos/typemytype/booleanOperations/issues/22/events","html_url":"https://github.com/typemytype/booleanOperations/pull/22","id":128671065,"number":22,"title":"Fix bug that triggers an assert for paths with an initial move.","user":{"login":"readroberts","id":2856984,"avatar_url":"https://avatars.githubusercontent.com/u/2856984?v=3","gravatar_id":"","url":"https://api.github.com/users/readroberts","html_url":"https://github.com/readroberts","followers_url":"https://api.github.com/users/readroberts/followers","following_url":"https://api.github.com/users/readroberts/following{/other_user}","gists_url":"https://api.github.com/users/readroberts/gists{/gist_id}","starred_url":"https://api.github.com/users/readroberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/readroberts/subscriptions","organizations_url":"https://api.github.com/users/readroberts/orgs","repos_url":"https://api.github.com/users/readroberts/repos","events_url":"https://api.github.com/users/readroberts/events{/privacy}","received_events_url":"https://api.github.com/users/readroberts/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2016-01-25T23:17:50Z","updated_at":"2016-02-23T23:05:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/typemytype/booleanOperations/pulls/22","html_url":"https://github.com/typemytype/booleanOperations/pull/22","diff_url":"https://github.com/typemytype/booleanOperations/pull/22.diff","patch_url":"https://github.com/typemytype/booleanOperations/pull/22.patch"},"body":""},"comment":{"url":"https://api.github.com/repos/typemytype/booleanOperations/issues/comments/187956079","html_url":"https://github.com/typemytype/booleanOperations/pull/22#issuecomment-187956079","issue_url":"https://api.github.com/repos/typemytype/booleanOperations/issues/22","id":187956079,"user":{"login":"readroberts","id":2856984,"avatar_url":"https://avatars.githubusercontent.com/u/2856984?v=3","gravatar_id":"","url":"https://api.github.com/users/readroberts","html_url":"https://github.com/readroberts","followers_url":"https://api.github.com/users/readroberts/followers","following_url":"https://api.github.com/users/readroberts/following{/other_user}","gists_url":"https://api.github.com/users/readroberts/gists{/gist_id}","starred_url":"https://api.github.com/users/readroberts/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/readroberts/subscriptions","organizations_url":"https://api.github.com/users/readroberts/orgs","repos_url":"https://api.github.com/users/readroberts/repos","events_url":"https://api.github.com/users/readroberts/events{/privacy}","received_events_url":"https://api.github.com/users/readroberts/received_events","type":"User","site_admin":false},"created_at":"2016-02-23T23:05:45Z","updated_at":"2016-02-23T23:05:45Z","body":"Hi Frederik;\r\n\r\nThe problem actually isn't about closing paths at all. Open paths are already handled by the code quite well. The problem is that in some cases, Robofont adds an unnecessary initial 'move' to an outline.The current code  triggers an assert that a 'move' cannot be in the path , at line 341 in flatten.py:addPoint().  If you use  flatten.py::.ContourPointDataPen to get the data, then the initial move is deleted in flatten.ContourPointDataPen.getData()  before flatten.py:OutputContour.drawPoints. However, booleanGlypy.py uses robofab.pens.adapterPens.SegmentToPointPen, which does not remove the point. It is clearly a good idea to remove the unnecessary initial move pt, the question is where. I am reluctant to edit robofab.pens.adapterPens.SegmentToPointPen, so it  makes more sense to me to remove it in booleanGlyph. It probably would be cleaner to subclass SegmentToPointPen and add the cleanup code there.\r\n"}}