halfedge attributes cause rendering error
minimal reproducible example:
import meshvis
import openmesh as om
m = om.PolyMesh()
om.read_mesh(m, 'models/model_mixed_valence.obj')
mesh = meshvis.Mesh(m.points(), m.face_vertex_indices())
# (a) This works:
mesh.colors = meshvis.FaceAttribute(np.random.rand(m.n_faces(), 3))
# (b) This doesn't:
# mesh.colors = meshvis.HalfEdgeAttribute(np.random.rand(m.n_halfedges(), 3))
# (c) This doesn't work either:
# mesh.colors = meshvis.HalfEdgeAttribute(np.random.rand(m.n_halfedges(), 3), range(m.n_halfedges()))
ctx = meshvis.Context()
ctx.draw(mesh)
ctx.display()
meshvis.HalfEdgeAttribute(np.random.rand(m.n_halfedges(), 3))
doesn't work because the HalfEdgeAttribute
constructor is missing the default argument for the second parameter (line (b)). If I provide it manually (line (c)), I get a error in draw
.