NetworkObject
- class compas.scene.NetworkObject[source]
Bases:
SceneObject
Scene object for drawing network data structures.
- Parameters:
- network
compas.datastructures.Network
A COMPAS network.
- network
- Attributes:
- network
compas.datastructures.Network
The COMPAS network associated with the scene object.
- node_xyzdict[hashable, list[float]]
Mapping between nodes and their view coordinates. The default view coordinates are the actual coordinates of the nodes of the network.
- nodecolor
compas.colors.ColorDict
Mapping between nodes and RGB color values.
- edgecolor
compas.colors.ColorDict
Mapping between edges and colors.
- nodesizefloat
The size of the nodes. Default is
1.0
.- edgewidthfloat
The width of the edges. Default is
1.0
.- show_nodesbool
Flag for showing or hiding the nodes. Default is
True
.- show_edgesbool
Flag for showing or hiding the edges. Default is
True
.
- network
Methods
Clear the nodes and the edges of the network.
Clear the edges of the network.
Clear the nodes of the network.
Draw the edges of the network.
Draw the nodes of the network.
Inherited Methods
Add a child item to the scene object.
The main drawing method.