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

Bug in vertex color #212

Open
ZacZhangzhuo opened this issue Dec 23, 2023 · 0 comments · May be fixed by #213
Open

Bug in vertex color #212

ZacZhangzhuo opened this issue Dec 23, 2023 · 0 comments · May be fixed by #213
Assignees
Labels
bug Something isn't working

Comments

@ZacZhangzhuo
Copy link
Collaborator

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.

@ZacZhangzhuo ZacZhangzhuo added the bug Something isn't working label Dec 23, 2023
@ZacZhangzhuo ZacZhangzhuo self-assigned this Dec 23, 2023
@ZacZhangzhuo ZacZhangzhuo linked a pull request Jan 12, 2024 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant