Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Potential bug in python pmeshlab.Mesh class __init__ relating to texture coordinates #387

Open
nikolas-claussen opened this issue Aug 16, 2024 · 0 comments

Comments

@nikolas-claussen
Copy link

nikolas-claussen commented Aug 16, 2024

When initialized using a list of faces, (the face_list_of_indices argument), pmeshlab.Mesh mangles texture information (passed via the v_tex_coords_matrix argument). Example:

vertices_test = np.array([0.0,0.0,0])
textures_test = np.array([0.5,0.5])

mesh_test = pymeshlab.Mesh(vertex_matrix=vertices_test, 
                           face_list_of_indices=[],
                           v_tex_coords_matrix=textures_test)

mesh_test.vertex_tex_coord_matrix()

returns array([[0., 0., 0.]])

What erroneous texture is returned by mesh_test.vertex_tex_coord_matrix() appears to depend on the datatype of the provided texture, with results being either 0 or very large numbers.

If you use the face_matrix argument for initialization, there is no problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant