ElementTree
- class compas_model.models.ElementTree(name=None)
Bases:
Tree
Class representing the hierarchy of elements in a model through a tree.
- Parameters:
- model
compas_model.model.Model
The parent model of the element tree.
- namestr, optional
The name of the tree.
- model
- Attributes:
- model
compas_model.model.Model
The parent model of the tree.
- groupslist[
GroupNode
], read-only The groups contained in the tree.
- elementslist[
Element
], read-only The elements contained in the tree
- model
Methods
Find the node containing the element.
Inherited Methods
Converts the instance to a string.
Add a node to the tree.
Compute the axis-aligned bounding box of the datastructure.
Compute the oriented bounding box of the datastructure.
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.
Return string representation for the spatial hierarchy of the tree.
Get a node by its name.
Get all nodes by their name.
Remove a node from the tree.
Rotate the datastructure.
Returns a rotated copy of this geometry.
Scale the datastructure.
Returns a scaled copy of this geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert the tree to a graph.
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.
Transforms the data structure.
Transforms the data structure.
Returns a transformed copy of this data structure.
Returns a transformed copy of this data structure.
Translate the datastructure.
Returns a translated copy of this geometry.
Traverse the tree from the root node.
Validate the data against the object's data schema.