From 7e4f7b1f0c85e732c2327e3d8b56e3a9822dd6f2 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Mon, 23 Sep 2019 07:37:07 -0400 Subject: [PATCH] Create PLY files that VTK 8.1.2 can load VTK 8.1.2 crashes on loading PLY files with newlines within the data for each face. NOTE - VTK 8.1.2 does not properly handle texture coordinates per face. So VTK 8.1.2 cannot display the textures as created here. But with the patch, at least VTK 8.1.2 can load the geometry. VTK 8.2 should be able to display the textures created here using texture coordinates per face. But VTK 8.1.2 is the latest available in pypi --- FullTextureMapper.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/FullTextureMapper.py b/FullTextureMapper.py index cc6be9d..e096007 100644 --- a/FullTextureMapper.py +++ b/FullTextureMapper.py @@ -536,7 +536,7 @@ def write_textured_trimesh(trimesh_obj, mesh_facets, facet_uv_coords, face_str = '{}'.format(np.uint8(len(face))) for vertex_idx in face: face_str += ' {}'.format(np.int32(vertex_idx)) - face_str += '\n' + face_str += ' ' texcoord_str = '{}'.format(np.uint8(len(face) * 2)) for uv in uv_coords: