{"action":"created","issue":{"url":"https://api.github.com/repos/CGAL/cgal/issues/978","repository_url":"https://api.github.com/repos/CGAL/cgal","labels_url":"https://api.github.com/repos/CGAL/cgal/issues/978/labels{/name}","comments_url":"https://api.github.com/repos/CGAL/cgal/issues/978/comments","events_url":"https://api.github.com/repos/CGAL/cgal/issues/978/events","html_url":"https://github.com/CGAL/cgal/issues/978","id":145332377,"number":978,"title":"CGAL fails to read OFF file generated by Minkowsky Sum","user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/CGAL/cgal/labels/invalid","name":"invalid","color":"006b75"}],"state":"closed","locked":false,"assignee":{"login":"sloriot","id":1224632,"avatar_url":"https://avatars.githubusercontent.com/u/1224632?v=3","gravatar_id":"","url":"https://api.github.com/users/sloriot","html_url":"https://github.com/sloriot","followers_url":"https://api.github.com/users/sloriot/followers","following_url":"https://api.github.com/users/sloriot/following{/other_user}","gists_url":"https://api.github.com/users/sloriot/gists{/gist_id}","starred_url":"https://api.github.com/users/sloriot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sloriot/subscriptions","organizations_url":"https://api.github.com/users/sloriot/orgs","repos_url":"https://api.github.com/users/sloriot/repos","events_url":"https://api.github.com/users/sloriot/events{/privacy}","received_events_url":"https://api.github.com/users/sloriot/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-04-02T03:56:01Z","updated_at":"2016-04-19T18:25:05Z","closed_at":"2016-04-15T08:48:06Z","body":"I am using CGAL to read OFF files into Nef_Polyhedron_3 and compute the Minkowsky Sum.\r\nAfter computation I store the OFF file to cache the result (i.e. use stored file if it exists to save time on multiple runs of the algorithm).\r\n\r\nWhen trying to read the generated file CGAL fails on some meshes with the following message:\r\n\r\n```\r\nError !!!!!!!!!!!!!!!!!!!!!!!\r\nterminate called after throwing an instance of 'CGAL::Assertion_exception'\r\n  what():  CGAL ERROR: assertion violation!\r\nExpr: pe_prev->is_border() || !internal::Plane_constructor<Plane>::get_plane(pe_prev->facet(),pe_prev->facet()->plane()).is_degenerate()\r\nFile: /usr/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h\r\nLine: 251\r\nAbgebrochen\r\n```\r\n\r\nThere error message comes from here: https://github.com/CGAL/cgal/blob/2ae5d2cef6fd638c7ba81116415fbe4bf601aab7/Nef_3/include/CGAL/Nef_3/polyhedron_3_to_nef_3.h#L105-L107\r\n\r\nI have made a little program to reproduce the issue:\r\n\r\nhttps://gist.github.com/cebe/0dfdecbaf2a799f72f36c01e949da742\r\n\r\nYou can compile and run it like the following:\r\n\r\n```\r\ngit clone https://gist.github.com/cebe/0dfdecbaf2a799f72f36c01e949da742 bug\r\ncd bug\r\nmake\r\n./bug load\r\n# the following can be used to re-generate the mesh file\r\n./bug generate\r\n```\r\n\r\nI have included the generated mesh so you do not have to run the `generate` command and wait for the computation to see the error.\r\n\r\nIt seems the export of the mesh generates facets with zero area. I can fix the mesh with MeshLab using the filter \"Remove zero area faces\". Which results in the removal of one facet from the mesh.\r\nTo make it a closed mesh again I can fix it by merging the equal vertices.\r\n\r\nTo fix this, as far as I see this facet should either not be generated by the export, or not fail on import.\r\n"},"comment":{"url":"https://api.github.com/repos/CGAL/cgal/issues/comments/212055709","html_url":"https://github.com/CGAL/cgal/issues/978#issuecomment-212055709","issue_url":"https://api.github.com/repos/CGAL/cgal/issues/978","id":212055709,"user":{"login":"cebe","id":189796,"avatar_url":"https://avatars.githubusercontent.com/u/189796?v=3","gravatar_id":"","url":"https://api.github.com/users/cebe","html_url":"https://github.com/cebe","followers_url":"https://api.github.com/users/cebe/followers","following_url":"https://api.github.com/users/cebe/following{/other_user}","gists_url":"https://api.github.com/users/cebe/gists{/gist_id}","starred_url":"https://api.github.com/users/cebe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cebe/subscriptions","organizations_url":"https://api.github.com/users/cebe/orgs","repos_url":"https://api.github.com/users/cebe/repos","events_url":"https://api.github.com/users/cebe/events{/privacy}","received_events_url":"https://api.github.com/users/cebe/received_events","type":"User","site_admin":false},"created_at":"2016-04-19T18:25:05Z","updated_at":"2016-04-19T18:25:05Z","body":"Thanks for the detailed answer. did not think about the rounding when saving to a file."}}