MCPcopy Create free account
hub / github.com/InternRobotics/EmbodiedScan / __init__

Method __init__

embodiedscan/utils/line_mesh.py:44–67  ·  view source on GitHub ↗

Creates a line represented as sequence of cylinder triangular meshes. Arguments: points {ndarray} -- Numpy array of ponts Nx3. Keyword Arguments: lines {list[list] or None} -- List of point index pairs denoting line segments. If None,

(self, points, lines=None, colors=[0, 1, 0], radius=0.15)

Source from the content-addressed store, hash-verified

42class LineMesh(object):
43
44 def __init__(self, points, lines=None, colors=[0, 1, 0], radius=0.15):
45 """Creates a line represented as sequence of cylinder triangular
46 meshes.
47
48 Arguments:
49 points {ndarray} -- Numpy array of ponts Nx3.
50
51 Keyword Arguments:
52 lines {list[list] or None} -- List of point index pairs denoting
53 line segments. If None, implicit lines from ordered pairwise
54 points. (default: {None})
55 colors {list} -- list of colors, or single color of the line
56 (default: {[0, 1, 0]})
57 radius {float} -- radius of cylinder (default: {0.15})
58 """
59 self.points = np.array(points)
60 self.lines = np.array(
61 lines) if lines is not None else self.lines_from_ordered_points(
62 self.points)
63 self.colors = np.array(colors)
64 self.radius = radius
65 self.cylinder_segments = []
66
67 self.create_line_mesh()
68
69 @staticmethod
70 def lines_from_ordered_points(points):

Callers

nothing calls this directly

Calls 2

create_line_meshMethod · 0.95

Tested by

no test coverage detected