TimberModel
- class compas_timber.model.TimberModel[source]
Bases:
ModelRepresents a timber model containing different elements such as walls, beams and joints.
The timber model allows expressing the hierarchy and interactions between the different elements it contains.
- Attributes:
- beamslist(
Beam) A list of beams assigned to this model.
- center_of_mass
Point The calculated center of mass of the model.
- jointslist(
Joint) A list of joints assigned to this model.
- topologieslist(dict)
A list of JointTopology for model. dict is: {“detected_topo”: detected_topo, “beam_a_key”: beam_a_key, “beam_b_key”:beam_b_key} See
JointTopology.- volumefloat
The calculated total volume of the model.
- wallslist(:class:~compas_timber.elements.Wall)
A list of walls assigned to this model.
- beamslist(
Methods
Adds a Beam to this model.
Add a joint object to the model.
Adds a Wall to this model.
Get a beam by its unique identifier.
Removes this joint object from the model.
TODO: calculate the topologies inside the model using the ConnectionSolver.
Inherited Methods
Converts the instance to a string.
Add an element to the model.
Add multiple elements to the model.
Add a group to the model.
Add an interaction between two elements of the model.
Add a material to the model.
Assign a material to an element or a list of elements.
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.
Yield all the elements contained in the model.
Find groups of elements connected by a specific type of interaction.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Returns True if the model contains the given element.
Returns True if two elements have an interaction set between them.
Verify that the model contains a specific material.
Yield all interactions between all elements in the model.
Yield all the materials contained in the model.
Remove an element from the model.
Remove the interaction between two elements.
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 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.
Transform the model and all that it contains.
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.
Validate the data against the object's data schema.