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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to access nx, ny, nz fields #1425

Open
SyZbidi opened this issue Jul 28, 2023 · 0 comments
Open

How to access nx, ny, nz fields #1425

SyZbidi opened this issue Jul 28, 2023 · 0 comments

Comments

@SyZbidi
Copy link

SyZbidi commented Jul 28, 2023

Hi,
I've been trying to convert the x, y, z, nx, ny, nz fields of a ply file from double to float. I managed to do that to x,y,z but I didn't know how to retrieve the normals nx, ny, nz.
Any suggestion on how to do that? 馃檹
Thank you in advance,

#!/usr/bin/env python3

import meshio
import numpy as np

mesh_path = "/workspace/object_reconstruction_ws/src/blade.ply"  # double
mesh = meshio.read(mesh_path)

mesh.points[:] = mesh.points.astype(np.float32)
# convert nx,ny,nz ?
mesh.write("mesh-float.ply")
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