Ejemplo n.º 1
0
def RunCommand(is_interactive):
    try:
        if 'compas_assembly' not in sc.sticky:
            raise Exception('Initialise the Assembly plugin first!')

        assembly = sc.sticky['compas_assembly']['assembly']
        settings = sc.sticky['compas_assembly']['settings']

        keys = AssemblyHelper.select_edges(assembly)
        if not keys:
            return

        if AssemblyHelper.update_edge_attributes(assembly, keys):
            assembly.draw(settings)

    except Exception as error:
        print(error)
        print(traceback.format_exc())
Ejemplo n.º 2
0
 def assembly_update_edge_attr(self):
     keys = AssemblyHelper.select_edges(self.assembly)
     if not keys:
         return
     if AssemblyHelper.update_edge_attributes(self.assembly, keys):
         self.assembly.draw(self.settings['layer'])