我现在有一个 stl 文件作为一个小块和一个 x、y 和 z 位置的 csv。目标是将每个块放置到位置并生成组合的 stl 文件。
现在我开始使用 numpy-stl 包,并成功生成了模式。
问题是我的输出文件太大。
# copy the amount of positions of blocks
output = [mesh.Mesh.from_file('block.stl') for _ in range(positions)]
# rearrange all the blocks
for index, shape in enumerate(output):
print(index)
shape.x += positions.loc[index,'x']
shape.y += positions.loc[index,'y']
shape.z += positions.loc[index,'z']
combined = mesh.Mesh(np.concatenate([m.data for m in output]))
combined.save(save_path)
我是 stl 文件的新手,我认为问题出在空间和向量上?有没有办法实现这一点并减少文件大小?
提前致谢。