MCPcopy Create free account
hub / github.com/OpenMeshLab/MeshXL / write_path

Function write_path

utils/ply_helper.py:179–198  ·  view source on GitHub ↗
(points, color, output_file)

Source from the content-addressed store, hash-verified

177
178
179def write_path(points, color, output_file):
180
181 radius = 0.03
182 offset = [0,0,0]
183 verts = []
184 indices = []
185 colors = []
186
187 for start, end in zip(points[:-1], points[1:]):
188 cyl_verts, cyl_ind = create_cylinder_mesh(radius, start, end)
189 cur_num_verts = len(verts)
190 cyl_color = [[c / 255 for c in color] for _ in cyl_verts]
191 cyl_verts = [x + offset for x in cyl_verts]
192 cyl_ind = [x + cur_num_verts for x in cyl_ind]
193 verts.extend(cyl_verts)
194 indices.extend(cyl_ind)
195 colors.extend(cyl_color)
196
197 write_ply(verts, colors, indices, output_file)
198 return

Callers

nothing calls this directly

Calls 2

create_cylinder_meshFunction · 0.85
write_plyFunction · 0.85

Tested by

no test coverage detected