Skip to content
This repository was archived by the owner on Oct 24, 2024. It is now read-only.
This repository was archived by the owner on Oct 24, 2024. It is now read-only.

Bug in vertex color #212

Open
Open
@ZacZhangzhuo

Description

@ZacZhangzhuo

else:
points = [vertex_xyz[vertex] for vertex in vertices]
c = centroid_points(points)
for a, b in pairwise(points + points[:1]):
positions.append(a)
positions.append(b)
positions.append(c)
if self.use_vertex_color:
colors.append(vertex_color[a])
colors.append(vertex_color[b])
colors.append(vertex_color[c])
else:
colors.append(color)
colors.append(color)
colors.append(color)
elements.append([i + 0, i + 1, i + 2])
i += 3
return positions, colors, elements

There is likely a bug. If you run:

from compas.datastructures import Mesh
from compas_view2 import app

viewer = app.App()

mesh = Mesh.from_polyhedron(12)

viewer.add(mesh)
viewer.show()

with use_vertex_color enabled, the error will pop up.

This might also affect the viewer.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions