TimberModel.add_element
- TimberModel.add_element(element, parent=None, material=None)[source]
Add an element to the model.
- Parameters:
- element
Element
The element to add.
- parent
GroupNode
, optional The parent group node of the element. If
None
, the element will be added directly under the root node.- material
Material
, optional A material to assign to the element. Note that the material should have already been added to the model before it can be assigned.
- element
- Returns:
Elementnode
The tree node containing the element in the hierarchy.
- Raises:
- ValueError
If the parent node is not a GroupNode.
- ValueError
If a material is provided that is not part of the model.