获取 LineSet 对象的几何类型,返回字符串 "LineSet"。
def get_geometry_type(self) -> str
无。
返回字符串类型的几何类型,即 "LineSet"。
import open3d as o3d
import numpy as np
lines = [[0, 1], [1, 2], [2, 3]]
colors = [[1, 0, 0] for i in range(len(lines))]
line_set = o3d.geometry.LineSet(
points=o3d.utility.Vector3dVector(np.zeros((4, 3))),
lines=o3d.utility.Vector2iVector(lines),
)
line_set.colors = o3d.utility.Vector3dVector(colors)
print(line_set.get_geometry_type())
输出结果为:
LineSet
无。