Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否有在y-axis创建网格后仅沿(左)缩放网格的功能?
y-axis
我尝试了该open3d.geometry.Geometry3D.scale功能,但它沿3-axis(右)缩放。
open3d.geometry.Geometry3D.scale
3-axis
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.
提前致谢!
首先将网格顶点转换为 numpy 数组。缩放后转换回来。
cylinder.vertices = o3d.utility.Vector3dVector( np.asarray(cylinder.vertices) * np.array([1., 1., 2.]) )