Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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 join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant