描述错误
我无法运行示例half_edge_mesh.py
。 #1218之后总是抛出
RPly: Unable to open file
[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply
Traceback (most recent call last):
File "examples/Python/Basic/half_edge_mesh.py", line 28, in <module>
mesh = mesh.crop(bbox)
TypeError: crop(): incompatible function arguments. The following argument types are supported:
1. (self: open3d.open3d.geometry.TriangleMesh, min_bound: numpy.ndarray[float64[3, 1]], max_bound: numpy.ndarray[float64[3, 1]]) -> open3d.open3d.geometry.TriangleMesh
Invoked with: geometry::TriangleMesh with 0 points and 0 triangles., geometry::AxisAlignedBoundingBox
在#1218(仍为0.8.0版本)之前,它抛出
RPly: Unable to open file
[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply
Traceback (most recent call last):
File "examples/Python/Basic/half_edge_mesh.py", line 26, in <module>
het_mesh = o3d.geometry.HalfEdgeTriangleMesh.create_from_triangle_mesh(mesh)
AttributeError: type object 'open3d.open3d.geometry.HalfEdgeTriangleMesh' has no attribute 'create_from_triangle_mesh'
再现
重现行为的步骤:
预期行为
这个例子应该有效。
环境(请填写以下信息):
附加上下文
我试图将示例文件half_edge_mesh.py
到与TestData/sphere.ply
相同的文件夹并编辑路径。 警告[Open3D WARNING] Read PLY failed: unable to open file: ../../TestData/sphere.ply
消失了,但 TypeError 或 AttributeError 仍然存在。
我无法使用 master 的代码进行复制。 您是否在Open3D/examples/Python/Basic
运行脚本?
@griegler是的,我做了,但同样的错误。 我能做些什么来找到更多线索吗?
好的,我知道了。 您正在使用来自使用AxisAlignedBoundingBox
的 master 分支的示例代码,但您使用的 open3d 源似乎比 master 分支更旧(请参阅第一个输出片段中的方法签名)。
要么将 open3d 更新为当前主版本并自行编译,要么使用v0.8.0
分支(https://github.com/intel-isl/Open3D/tree/v0.8.0)中的示例。
最有用的评论
好的,我知道了。 您正在使用来自使用
AxisAlignedBoundingBox
的 master 分支的示例代码,但您使用的 open3d 源似乎比 master 分支更旧(请参阅第一个输出片段中的方法签名)。要么将 open3d 更新为当前主版本并自行编译,要么使用
v0.8.0
分支(https://github.com/intel-isl/Open3D/tree/v0.8.0)中的示例。