Last active
January 6, 2020 06:49
-
-
Save yongjun823/638e68cc6efacee1fd8f49190cfc8d19 to your computer and use it in GitHub Desktop.
.3dp file viewer + open3d
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import open3d as o3d | |
if __name__ == "__main__": | |
object_txt = np.loadtxt('myfile.3dp') | |
points = object_txt[:, 2:5] | |
colors = object_txt[:, 5:] / 255 | |
pcd = o3d.geometry.PointCloud() | |
pcd.points = o3d.utility.Vector3dVector(points) | |
pcd.colors = o3d.utility.Vector3dVector(colors) | |
o3d.visualization.draw_geometries([pcd]) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment