def callback(mesh, k, args):

    # draw a rhino mesh and save in sticky dictionary
    st[rmesh_key] = compas_ghpython.mesh_draw(mesh)

    # update the Gh component
    compas_ghpython.update_component(ghenv, 1)
Exemplo n.º 2
0
    def draw_geometry(self, geometry, name=None, color=None):
        if color:
            color = rgb_to_rgb(color[0], color[1], color[2])

        mesh = mesh_draw(geometry, color=color)

        # Try to fix invalid meshes
        if not mesh.IsValid:
            mesh.FillHoles()

        return mesh
Exemplo n.º 3
0
 def draw_mesh(self, compas_mesh, color=None):
     if color:
         color = rgb_to_rgb(color[0], color[1], color[2])
     return mesh_draw(compas_mesh, color=color)
Exemplo n.º 4
0
 def draw_geometry(self, geometry, color=None):
     if color:
         color = rgb_to_rgb(color[0], color[1], color[2])
     return mesh_draw(geometry, color=color)