def clear_edges(self, keys=None): if not keys: name = '{}.edge.*'.format(self.mesh.attributes['name']) guids = compas_rhino.get_objects(name=name) else: guids = [] for u, v in keys: name = '{}.edge.{}-{}'.format(self.attributes['name'], u, v) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_vertices(self, keys=None): if not keys: name = '{}.vertex.*'.format(self.mesh.attributes['name']) guids = compas_rhino.get_objects(name=name) else: guids = [] for key in keys: name = '{}.vertex.{}'.format(self.attributes['name'], key) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_vertexlabels(self, keys=None): if not keys: name = '{}.vertex.label.*'.format(self.datastructure.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for key in keys: name = self.datastructure.vertex_label_name(key) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_edges(self, keys=None): if not keys: name = '{}.edge.*'.format(self.datastructure.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for u, v in keys: name = self.datastructure.edge_name(u, v) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_facenormals(self, keys=None): """Clear the normals of all faces previously drawn by the ``FaceArtist``. Parameters ---------- keys : list, optional The keys of a specific set of faces of which the normals should be cleared. Default is to clear the normals of all faces. """ if not keys: name = '{}.face.normal.*'.format(self.datastructure.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for key in keys: name = self.datastructure.face_name(key) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_edges(self, keys=None): """Clear all edges previously drawn by the ``EdgeArtist``. Parameters ---------- keys : list, optional The keys of a specific set of edges that should be cleared. Default is to clear all edges. """ if not keys: name = '{}.edge.*'.format(self.datastructure.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for u, v in keys: name = self.datastructure.edge_name(u, v) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_vertexlabels(self, keys=None): """Clear all vertex labels previously drawn by the ``VertexArtist``. Parameters ---------- keys : list, optional The keys of a specific set of vertex labels that should be cleared. Default is to clear all vertex labels. """ if not keys: name = '{}.vertex.label.*'.format(self.datastructure.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for key in keys: name = self.datastructure.vertex_label_name(key) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
def clear_normals(self, keys=None): """Clear all normals previously drawn by the ``MeshArtist``. Parameters ---------- keys : list, optional The keys of a specific set of normals that should be cleared. Default is to clear all normals. """ if not keys: name = '{}.normal.*'.format(self.mesh.name) guids = compas_rhino.get_objects(name=name) else: guids = [] for key in keys: name = '{}.normal.{}'.format(self.mesh.name, key) guid = compas_rhino.get_object(name=name) guids.append(guid) compas_rhino.delete_objects(guids)
from __future__ import absolute_import