前言
在安装手物交互的代码时报了以下错误:

sp_m.add_mesh_with_normals(m.v.astype(np.float32),m.estimate_vertex_normals().astype(np.float32),m.f,m.vc.astype(np.float32))
TypeError: add_mesh_with_normals(): incompatible function arguments. The following argument types are supported:
1. (self: scenepic._scenepic.Mesh, vertices: numpy.ndarray[numpy.float32[m, 3], flags.c_contiguous], normals: numpy.ndarray[numpy.float32[m, 3], flags.c_contiguous], triangles: numpy.ndarray[numpy.uint32[m, 3], flags.c_contiguous], colors: numpy.ndarray[numpy.float32[m, 3], flags.c_contiguous] = array([], shape=(0, 3), dtype=float32), uvs: numpy.ndarray[numpy.float32[m, 2], flags.c_contiguous] = array([], shape=(0, 2), dtype=float32), transform: numpy.ndarray[numpy.float32[4, 4]] = array([[1., 0., 0., 0.],
[0., 1., 0., 0.],
[0., 0., 1., 0.],
[0., 0., 0., 1

文章讲述了在使用ScenePic库时,遇到add_mesh_with_normals函数报错的问题,原因是numpy版本1.23与pybind11的不兼容。解决办法是通过pip将numpy降级到1.22版本。
最低0.47元/天 解锁文章
4412

被折叠的 条评论
为什么被折叠?



