{"action":"created","issue":{"url":"https://api.github.com/repos/mikedh/trimesh/issues/18","repository_url":"https://api.github.com/repos/mikedh/trimesh","labels_url":"https://api.github.com/repos/mikedh/trimesh/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/mikedh/trimesh/issues/18/comments","events_url":"https://api.github.com/repos/mikedh/trimesh/issues/18/events","html_url":"https://github.com/mikedh/trimesh/issues/18","id":158423796,"number":18,"title":"Rezeroing some meshes causes mesh to become non-watertight","user":{"login":"Marviel","id":2037165,"avatar_url":"https://avatars.githubusercontent.com/u/2037165?v=3","gravatar_id":"","url":"https://api.github.com/users/Marviel","html_url":"https://github.com/Marviel","followers_url":"https://api.github.com/users/Marviel/followers","following_url":"https://api.github.com/users/Marviel/following{/other_user}","gists_url":"https://api.github.com/users/Marviel/gists{/gist_id}","starred_url":"https://api.github.com/users/Marviel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Marviel/subscriptions","organizations_url":"https://api.github.com/users/Marviel/orgs","repos_url":"https://api.github.com/users/Marviel/repos","events_url":"https://api.github.com/users/Marviel/events{/privacy}","received_events_url":"https://api.github.com/users/Marviel/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-06-03T18:14:11Z","updated_at":"2016-06-11T04:53:23Z","closed_at":"2016-06-11T04:53:23Z","body":"Weird example here.\r\n\r\nI have a particular mesh that is watertight pre-rezero, and non-watertight post-rezero.\r\n\r\nI'm not sure why this would occur!  It seems that other meshes I try do not have this problem.\r\n\r\nHere's the code:\r\n\r\n    import trimesh\r\n    import numpy as np\r\n\r\n    def main():\r\n      m = trimesh.load_mesh(\"rezero-test.stl\")\r\n      watertight_rezero_test(m)\r\n\r\n    def watertight_rezero_test(m):\r\n      print(m.is_watertight)\r\n\r\n      m.rezero()\r\n\r\n      print(m.is_watertight)\r\n  \r\n  \r\n    main()\r\n\r\n\r\nThe .stl file is here: https://drive.google.com/open?id=0B18jNduc8kjlQXROOVNCMlRENFU\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/mikedh/trimesh/issues/comments/225336911","html_url":"https://github.com/mikedh/trimesh/issues/18#issuecomment-225336911","issue_url":"https://api.github.com/repos/mikedh/trimesh/issues/18","id":225336911,"user":{"login":"mikedh","id":1403074,"avatar_url":"https://avatars.githubusercontent.com/u/1403074?v=3","gravatar_id":"","url":"https://api.github.com/users/mikedh","html_url":"https://github.com/mikedh","followers_url":"https://api.github.com/users/mikedh/followers","following_url":"https://api.github.com/users/mikedh/following{/other_user}","gists_url":"https://api.github.com/users/mikedh/gists{/gist_id}","starred_url":"https://api.github.com/users/mikedh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikedh/subscriptions","organizations_url":"https://api.github.com/users/mikedh/orgs","repos_url":"https://api.github.com/users/mikedh/repos","events_url":"https://api.github.com/users/mikedh/events{/privacy}","received_events_url":"https://api.github.com/users/mikedh/received_events","type":"User","site_admin":false},"created_at":"2016-06-11T04:53:23Z","updated_at":"2016-06-11T04:53:23Z","body":"Upon reflection, those faces should really have been removed in initial processing. There is already a remove_degenerate_faces function called in there, however it was only covering the case where a face has two of the same vertex (aka [0,1,0]), not the case where there were three unique vertices that all happened to be colinear. I pushed a fix in https://github.com/mikedh/trimesh/commit/d0685acda74b2037fb3cde3e398bb1af4eee966c which is slower than the old function, but its like .015 -> .023s on my machine, which is probably worth it for being more robust. "}}
{"actor":{"display_login":"mikedh"}}