Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions meshplot/Viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,10 @@ def reset(self):
def update_object(self, oid=0, vertices=None, colors=None, faces=None):
obj = self.__objects[oid]
if type(vertices) != type(None):
if vertices.shape[1] == 2:
vertices3 = np.zeros((vertices.shape[0],3))
vertices3[:,:2] = vertices
vertices = vertices3
if obj["coloring"] == "FaceColors":
f = obj["arrays"][1]
verts = np.zeros((f.shape[0]*3, 3), dtype="float32")
Expand Down