Python 在open3d中沿单轴缩放

Python 在open3d中沿单轴缩放,python,scale,open3d,Python,Scale,Open3d,是否有函数仅在创建网格后沿y轴缩放网格(左) 我尝试了open3d.geometry.Geometry3D.scale函数,但它沿3轴伸缩(右) 提前谢谢 首先将网格顶点转换为numpy数组。缩放后转换回 cylinder.Vertexs=o3d.utility.Vector3dVector( np.asarray(圆柱体顶点)*np.array([1,1,2.])) 谢谢,它很有效!只需编辑您的解决方案,用圆柱体替换网格即可!再次感谢。 import open3d as o3d cylind

是否有函数仅在创建网格后沿y轴缩放网格(左)

我尝试了
open3d.geometry.Geometry3D.scale
函数,但它沿
3轴伸缩(右)


提前谢谢

首先将网格顶点转换为numpy数组。缩放后转换回

cylinder.Vertexs=o3d.utility.Vector3dVector(
np.asarray(圆柱体顶点)*np.array([1,1,2.]))

谢谢,它很有效!只需编辑您的解决方案,用圆柱体替换网格即可!再次感谢。
import open3d as o3d
cylinder = o3d.geometry.create_mesh_cylinder(radius=1, height=3)
cylinder_scaled.scale(2) # I got the cylinder on the left.