python - 如何在open3D中更新圆柱高度
问题描述
我想改变 open3D 中圆柱体的高度。可能吗?如果是,我该如何进行?我正在使用open3d-python==0.7.0.0
.
import open3d as o3d
cylinder = o3d.geometry.create_mesh_cylinder()
# ...
# doing something and then update here:
谢谢!
解决方案
没有直接的解决方案,想法是使用缩放。然而,提供的缩放功能open3d.geometry.Geometry3D.scale
,沿 3 轴缩放对象。幸运的是,我们可以按照这里的建议更新顶点:
cylinder.vertices = o3d.utility.Vector3dVector(
np.asarray(mesh.vertices) * np.array([1., 1., 2.]) )
推荐阅读
- image - 无论图像大小如何,图像始终只需 5 秒即可加载 (MAMP)
- python - 错误:azure_cosmosdb_container 类型中缺少强制属性值
- c - 为什么包含守卫不需要反斜杠是多行的?
- r - IR,如何自动汇总数字列。谢谢
- kotlin - Kotlin 'where' 关键字与嵌套接口
- php - AJAX - PHP - 上传两个输入文件
- javascript - nodejs Promise.all()在承诺过程后不起作用
- python - VScode:每次我在终端按钮中按运行 python 文件时,总是在 powershell 中运行
- vaadin - 在 Vaadin Flow 中的 Grid 上的 setColumnOrder() 似乎导致 getSortOrder() 列表在排序侦听器的事件中无限增加
- javascript - 缺少“PLAIN”的凭据,并出现 POST 500 http 错误