import open3d as o3d;
import numpy as np;
mesh_coord_frame = o3d.geometry.TriangleMesh.create_coordinate_frame(size=0.125, origin=[0, 0, 0])
mesh_coord_frame = mesh_coord_frame.translate((0.16, 0.15, 0))
mesh_box = o3d.geometry.TriangleMesh.create_box(width=0.4,
height=0.6,
depth=0.11)
mesh_box.compute_vertex_normals()
mesh_box.paint_uniform_color([0.9, 0.1, 0.1])
volume = mesh_box.get_volume()
area = mesh_box.get_surface_area()
print(f"volume {volume} area {area}")
Open3D创建矩形并计算体积和面积
最新推荐文章于 2024-08-25 10:16:33 发布