Skip to content

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

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()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions