def RunCommand(is_interactive): if "FoFin" not in sc.sticky: raise Exception("Initialise the plugin first!") settings = sc.sticky["FoFin"] compas_rhino.update_settings(settings)
def update_attributes(self): """Update the attributes of the data structure through a Rhino dialog. Returns ------- bool True if the update was successful. False otherwise. """ return compas_rhino.update_settings(self.datastructure.attributes)
def RunCommand(is_interactive): if "FOFIN" not in sc.sticky: print("Initialise the plugin first!") return FOFIN = sc.sticky["FOFIN"] if compas_rhino.update_settings(FOFIN["settings"]): if FOFIN["cablenet"]: FOFIN["cablenet"].draw(layer=FOFIN["settings"]["layer"], clear_layer=True, settings=FOFIN["settings"])
def RunCommand(is_interactive): if 'TNA' not in sc.sticky: raise Exception("Initialise the plugin first!") TNA = sc.sticky['TNA'] form = TNA['form'] force = TNA['force'] if compas_rhino.update_settings(TNA['settings']): if form: form.draw(layer=TNA['settings']['layer.form'], clear_layer=True, settings=TNA['settings']) if force: force.draw(layer=TNA['settings']['layer.force'], clear_layer=True)
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 update_cablenet_attributes(cablenet, settings): return compas_rhino.update_settings(cablenet.attributes)