ElementObject
- class compas_model.scene.ElementObject(item=None, **kwargs)
Bases:
SceneObjectBase class for all element scene objects.
- Parameters:
- element
compas_model.elements.Element A COMPAS element.
- element
- Attributes:
- element
compas_model.elements.Element The element.
- color
compas.colors.Color The base RGB color of the element.
- vertexcolor
compas.colors.ColorDict Vertex colors.
- edgecolor
compas.colors.ColorDict Edge colors.
- facecolor
compas.colors.ColorDict Face colors.
- vertexsizefloat
The size of the vertices. Default is
1.0.- edgewidthfloat
The width of the edges. Default is
1.0.- show_verticesUnion[bool, sequence[float]]
Flag for showing or hiding the vertices, or a list of keys for the vertices to show. Default is
False.- show_edgesUnion[bool, sequence[tuple[int, int]]]
Flag for showing or hiding the edges, or a list of keys for the edges to show. Default is
True.- show_facesUnion[bool, sequence[int]]
Flag for showing or hiding the faces, or a list of keys for the faces to show. Default is
True.
- element
See also
compas.scene.GraphObjectcompas.scene.VolElementObject
Methods
Clear all components of the element.
draw the element.
Inherited Methods
Converts the instance to a string.
Add a child item to the scene object.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Remove a child node from this node.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Traverse the tree from this node.
Validate the data against the object's data schema.