Open szppaks opened 2 months ago
@szppaks - Use o3d.utility.Vector3dVector
. For example:-
import open3d as o3d
pcd = o3d.geometry.PointCloud()
pcd.points=o3d.utility.Vector3dVector(np.array([[1,3,3]]))
See https://www.open3d.org/docs/release/tutorial/geometry/working_with_numpy.html
import open3d as o3d
pcd = o3d.geometry.PointCloud() pcd.points=o3d.utility.Vector3dVector(np.array([[1,3,3]])) Traceback (most recent call last):
File "C:\Users\b0898\AppData\Local\Temp\ipykernel_9748\1296022844.py", line 4, in <cell line: 4> pcd.points=o3d.utility.Vector3dVector(np.array([[1,3,3]]))
AttributeError: 'open3d.cpu.pybind.geometry.PointCloud' object attribute 'points' is read-only
(I have tried Vector3dVector first, and then simple numpy array, but it does not work - nor set the points neither get the points.)
@szppaks Just read again through your original message. This issue is definitely peculiar. Looks like some issue in python bindings not properly mapping points data from C++ to numpy array.
Checklist
main
branch).Describe the issue
The points property is readonly, so I have created the point cloud passing a Vector3dVector(nparray) in the constructor. A point cloud has_points() gives True, te get_minimal_oriented_bounding_box() works well, but the points property stores an empty numpy array.
Steps to reproduce the bug
Error message
No response
Expected behavior
No response
Open3D, Python and System information
Additional information
No response