{"action":"created","issue":{"url":"https://api.github.com/repos/mikedh/trimesh/issues/74","repository_url":"https://api.github.com/repos/mikedh/trimesh","labels_url":"https://api.github.com/repos/mikedh/trimesh/issues/74/labels{/name}","comments_url":"https://api.github.com/repos/mikedh/trimesh/issues/74/comments","events_url":"https://api.github.com/repos/mikedh/trimesh/issues/74/events","html_url":"https://github.com/mikedh/trimesh/issues/74","id":252688181,"number":74,"title":"OBJ file loading support","user":{"login":"oortlieb","id":3278489,"avatar_url":"https://avatars0.githubusercontent.com/u/3278489?v=4","gravatar_id":"","url":"https://api.github.com/users/oortlieb","html_url":"https://github.com/oortlieb","followers_url":"https://api.github.com/users/oortlieb/followers","following_url":"https://api.github.com/users/oortlieb/following{/other_user}","gists_url":"https://api.github.com/users/oortlieb/gists{/gist_id}","starred_url":"https://api.github.com/users/oortlieb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oortlieb/subscriptions","organizations_url":"https://api.github.com/users/oortlieb/orgs","repos_url":"https://api.github.com/users/oortlieb/repos","events_url":"https://api.github.com/users/oortlieb/events{/privacy}","received_events_url":"https://api.github.com/users/oortlieb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-08-24T18:21:47Z","updated_at":"2017-08-24T18:26:20Z","closed_at":null,"body":"I'm using `trimesh.load_mesh` to load in files of different types and export them to stl. Right now we're only interested in converting .OBJ files.\r\n\r\nIt seems that OBJ files are not correctly loaded in all cases. It looks to me like the OBJ loader may not be correctly loading OBJ files that contain faces with more than 3 vertices (I haven't been able to verify this in the trimesh source code). I've attached a file that reflects this issue -- loading it with `trimesh.load_mesh` and then exporting it as an STL gives the following results. The viewer I'm using is Makerbot Desktop.\r\n\r\nThe OBJ:\r\n![image](https://user-images.githubusercontent.com/3278489/29681973-6c0bfe36-88d7-11e7-88bc-61821f0aee15.png)\r\n\r\n![image](https://user-images.githubusercontent.com/3278489/29681920-48ee7104-88d7-11e7-99c6-b4522484ea13.png)\r\n\r\nConverting the file to STL before loading it into trimesh fixes the issue, but that's the functionality we're hoping to get from trimesh.\r\n"},"comment":{"url":"https://api.github.com/repos/mikedh/trimesh/issues/comments/324717601","html_url":"https://github.com/mikedh/trimesh/issues/74#issuecomment-324717601","issue_url":"https://api.github.com/repos/mikedh/trimesh/issues/74","id":324717601,"user":{"login":"oortlieb","id":3278489,"avatar_url":"https://avatars0.githubusercontent.com/u/3278489?v=4","gravatar_id":"","url":"https://api.github.com/users/oortlieb","html_url":"https://github.com/oortlieb","followers_url":"https://api.github.com/users/oortlieb/followers","following_url":"https://api.github.com/users/oortlieb/following{/other_user}","gists_url":"https://api.github.com/users/oortlieb/gists{/gist_id}","starred_url":"https://api.github.com/users/oortlieb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oortlieb/subscriptions","organizations_url":"https://api.github.com/users/oortlieb/orgs","repos_url":"https://api.github.com/users/oortlieb/repos","events_url":"https://api.github.com/users/oortlieb/events{/privacy}","received_events_url":"https://api.github.com/users/oortlieb/received_events","type":"User","site_admin":false},"created_at":"2017-08-24T18:26:20Z","updated_at":"2017-08-24T18:26:20Z","body":"I ran the mesh through `assimp info` and got some new clues:\r\n\r\nMemory consumption: 2376704 B\r\nNodes:              95\r\nMaximum depth       2\r\nMeshes:             94\r\nAnimations:         0\r\nTextures (embed.):  0\r\nMaterials:          1\r\nCameras:            0\r\nLights:             0\r\nVertices:           19932\r\nFaces:              33942\r\nBones:              0\r\nAnimation Channels: 0\r\nPrimitive Types:    triangles\r\nAverage faces/mesh  361\r\nAverage verts/mesh  212\r\nMinimum point      (-87.639748 -0.144633 -16.867111)\r\nMaximum point      (87.640060 185.275253 21.341709)\r\nCenter point       (0.000156 92.565308 2.237299)\r\n\r\nNamed Materials:\r\n    'DefaultMaterial'\r\n\r\nNode hierarchy:\r\n'MALE3D low.OBJ', meshes: 0\r\n-- 'Group19193', meshes: 1\r\n-- 'Group19208', meshes: 1\r\n-- 'Group19253', meshes: 1\r\n-- 'Group19268', meshes: 1\r\n-- 'Group19283', meshes: 1\r\n-- 'Group19298', meshes: 1\r\n-- 'Group19313', meshes: 1\r\n-- 'Group19253', meshes: 1\r\n-- 'Group19358', meshes: 1\r\n-- 'Group19373', meshes: 1\r\n-- 'Group19253', meshes: 1\r\n-- 'Group19958', meshes: 1\r\n-- 'Group19973', meshes: 1\r\n-- 'Group19988', meshes: 1\r\n-- 'Group20003', meshes: 1\r\n-- 'Group20018', meshes: 1\r\n-- 'Group19958', meshes: 1\r\n-- 'Group19973', meshes: 1\r\n-- 'Group19988', meshes: 1\r\n-- 'Group20003', meshes: 1\r\n-- 'Group20018', meshes: 1\r\n-- 'Group20033', meshes: 1\r\n-- 'Group20048', meshes: 1\r\n-- 'Group20063', meshes: 1\r\n-- 'Group20078', meshes: 1\r\n-- 'Group20093', meshes: 1\r\n-- 'Group20033', meshes: 1\r\n-- 'Group20048', meshes: 1\r\n-- 'Group20063', meshes: 1\r\n-- 'Group20078', meshes: 1\r\n-- 'Group20093', meshes: 1\r\n-- 'Group20108', meshes: 1\r\n-- 'Group20123', meshes: 1\r\n-- 'Group20138', meshes: 1\r\n-- 'Group20153', meshes: 1\r\n-- 'Group20108', meshes: 1\r\n-- 'Group20138', meshes: 1\r\n-- 'Group20123', meshes: 1\r\n-- 'Group20168', meshes: 1\r\n-- 'Group20183', meshes: 1\r\n-- 'Group20198', meshes: 1\r\n-- 'Group20213', meshes: 1\r\n-- 'Group20228', meshes: 1\r\n-- 'Group20183', meshes: 1\r\n-- 'Group20213', meshes: 1\r\n-- 'Group20198', meshes: 1\r\n-- 'Group20243', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20273', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20288', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20303', meshes: 1\r\n-- 'Group20318', meshes: 1\r\n-- 'Group20303', meshes: 1\r\n-- 'Group20318', meshes: 1\r\n-- 'Group20258', meshes: 1\r\n-- 'Group20303', meshes: 1\r\n-- 'Group20318', meshes: 1\r\n-- 'Group19193', meshes: 1\r\n-- 'Group19208', meshes: 1\r\n-- 'Group20468', meshes: 1\r\n<--\r\n\r\nassimp is able to correctly convert the file, even though it has a number of groups defined."}}
{"actor":{"display_login":"oortlieb"}}