I am trying to use the numpy-stl library to rotate a triangular mesh, but the process keeps failing. For reference, this is the code I am running:
我正尝试使用Numpy-stl库旋转一个三角形网格,但该过程一直失败。作为参考,以下是我正在运行的代码:
from stl import mesh
import math
sphere = mesh.Mesh.from_file('bones.stl')
sphere.rotate([0.0, 1, 0.0], math.radians(90), [0,0,0])
print(sphere.points[0])
But it never gets to print the result. Instead it gives out this message:
但它从来没有打印出结果。相反,它发出了这样的信息:
Process finished with exit code -1066598274 (0xC06D007E)
Why is this? I am unable to find any similar issues online, and I have tried loading different files to no avail.
这是为什么?我在网上找不到任何类似的问题,我已经尝试加载不同的文件,但都无济于事。
更多回答
优秀答案推荐
This may be caused by unmatched version of numpy
and other libraries. Try reinstall all dependencies.
这可能是由于NumPy和其他库的版本不匹配造成的。尝试重新安装所有依赖项。
更多回答
我是一名优秀的程序员,十分优秀!