You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to expand the functionality of PointCloud in python and do so by inheritance however my derived class doesn't behave properly e.g. in open3d.visualization.draw_geometries.
Any help would be appreciated.
I am running python 3.6.5 open3d version 0.11.2
class Custom3D(open3d.geometry.PointCloud):
def __init__(self, init_value=None):
if init_value is None:
super().__init__(open3d.utility.Vector3dVector(np.asarray([[]]).reshape(0, 3)))
elif isinstance(init_value, open3d.utility.Vector3dVector):
super().__init__(init_value)
else:
super().__init__(open3d.utility.Vector3dVector(init_value))
test1 = Custom3D()
test1
Out[11]: PointCloud with 0 points.
points = [[1, 2, 3], [4, 5, 6]]
test2 = Custom3D(points)
test2
Out[16]: PointCloud with 2 points.
open3d.visualization.draw_geometries([test2])
Traceback (most recent call last):
File "C:\Users\User.DESKTOP-OR7URI1\AppData\Roaming\Python\Python36\site-packages\IPython\core\interactiveshell.py", line 3343, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)
File "<ipython-input-17-65e39aeb5468>", line 1, in <module>
open3d.visualization.draw_geometries([test2])
RuntimeError: Tried to call pure virtual function "Geometry3DBase::"
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I would like to expand the functionality of PointCloud in python and do so by inheritance however my derived class doesn't behave properly e.g. in open3d.visualization.draw_geometries.
Any help would be appreciated.
I am running python 3.6.5 open3d version 0.11.2
``
Beta Was this translation helpful? Give feedback.
All reactions