compas-dev / compas-dev/compas_viewer

Regarding the click event of button usage in compas_viewer, adding geometric shape updates cannot be displayed

Open
#204 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
12
Forks
12
PR merge metrics
No merged PRs in 30d

Description

Why can't I display geometric shapes in compas_viewer when I use the click button to add some geometry. But when I don't use the click event of the button to add display geometry, I can directly compile Compas_viewer to display it. If I use the button to add and import other geometric displays, do I need any other operations to do so?

self.Add_Polygon_Click.triggered.connect(self.addPolygon)

def addPolygon(self):
polygon = Polygon([[0, 0, 0], [0.5, 0.5, 0], [1, 0, 0], [1, 1, 0], [0, 1, 0]])
self.viewer.scene.add(polygon)
self.viewer.renderer.update()#NO display in compas_viewer Why????

#self.sidebar.update()
#self.viewer.scene.draw()
# self.viewer.renderer.update()
# self.sidebar.update()

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.