NetworkArtist
- class compas_blender.artists.NetworkArtist(item, **kwargs)[source]
Bases:
BlenderArtist
,NetworkArtist
Artist for drawing network data structures in Blender.
- Parameters
network (
Network
) – A COMPAS network.collection (str | bpy.types.Collection) – The name of the collection the object belongs to.
- Attributes
nodecollection (bpy.types.Collection) – The collection containing the nodes.
edgecollection (bpy.types.Collection) – The collection containing the edges.
nodelabelcollection (bpy.types.Collection) – The collection containing the node labels.
edgelabelcollection (bpy.types.Collection) – The collection containing the edge labels.
Examples
Use the Blender artist explicitly.
import compas from compas.datastructures import Network from compas_blender.artists import NetworkArtist network = Network.from_obj(compas.get('lines.obj')) artist = NetworkArtist(network) artist.draw()
Or, use the artist through the plugin mechanism.
import compas from compas.datastructures import Network from compas.artists import Artist network = Network.from_obj(compas.get('lines.obj')) artist = Artist(network) artist.draw()
Methods
Clear all objects contained in the edgelabel collection.
Clear all objects contained in the edge collection.
Clear all objects contained in the nodelabel collection.
Clear all objects contained in the node collection.
Draw the network.
Draw labels for a selection of edges.
Draw a selection of edges.
Draw labels for a selection nodes.
Draw a selection of nodes.
Inherited Methods
Build an artist corresponding to the item type.
Build an artist with the given type.
Clear the nodes and the edges of the network.
Drawing method for drawing an entire collection of objects.
Redraw the view.
Register an artist type to a data type.