def RunCommand(is_interactive): if "FoFin" not in sc.sticky: raise Exception("Initialise the plugin first!") cablenet = sc.sticky["FoFin"]['cablenet'] settings = sc.sticky["FoFin"]['settings'] if not cablenet: return if compas_rhino.update_settings(settings): artist = CablenetArtist(cablenet, layer=settings['layer']) artist.clear_layer() artist.draw_mesh() artist.draw_vertices() artist.draw_edges() artist.redraw()
def RunCommand(is_interactive): if "FoFin" not in sc.sticky: raise Exception("Initialise the plugin first!") settings = sc.sticky["FoFin"]['settings'] filepath = compas_rhino.browse_for_file() if not filepath: return if not filepath.endswith('.json'): return cablenet = Cablenet.from_json(filepath) sc.sticky["FoFin"]["cablenet"] = cablenet artist = CablenetArtist(cablenet, layer=settings['layer']) artist.clear_layer() artist.draw_mesh() artist.draw_vertices() artist.draw_edges() artist.redraw()