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:
- beamsGenerator[
Beam] A Generator object of all beams assigned to this model.
- platesGenerator[
Plate] A Generator object of all plates assigned to this model.
- jointsset[
Joint] A set of all actual joints assigned to this model.
- joint_candidatesset[
JointCandidate] A set of all joint candidates in the model.
- wallsGenerator[
Wall] A Generator object of all walls assigned to this model.
- center_of_mass
Point The calculated center of mass of the 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.- tolerance
Tolerance The tolerance configuration used for this model. TOL if none provided.
- volumefloat
The calculated total volume of the model.
- beamsGenerator[
Methods
Add a joint object to the model.
Add a joint candidate to the model.
Connects adjacent plates in the model.
Connects adjacent walls in the model.
Get a beam by its unique identifier.
Get all elements in a group element.
Get all interactions for a given element.
Check if a group with group_element exists in the model.
Process the joinery of the model.
Remove the interaction between two elements.
Removes this joint object from the model.
Removes this joint candidate from the model.
TODO: calculate the topologies inside the model using the ConnectionSolver.
Transform the model and reset all computed properties of all elements.
Inherited Methods
Converts the instance to a string.
Add an element to the model.
Add a list of 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.
Add a modifier between two elements, with one the source of the modifier and the other the target.
Add a material to the model or retrieve an existing instance of the same type.
Assign a material to an element or a list of elements.
Compute the axis-aligned bounding box of the datastructure.
Compute the Bounding Volume Hierarchy (BVH) of the elements for fast collision checks.
Compute the contacts between the block elements of this model.
Compute the KD tree of the elements for fast nearest neighbour queries.
Compute the oriented bounding box of the datastructure.
Make an independent copy of the data object.
Find the nearest neighbours to a root element.
Iterate over the elements contained in the model.
Find all model elements of a given type.
Returns True if the model contains an element with the given name.
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 the model contains an element with the given name.
Returns True if two elements have an interaction set between them.
Verify that the model contains a specific material.
Iterate over the materials stored in the model.
Find the nearest neighbours to a point.
Remove an element from the model.
Remove all model elements of a given type.
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.
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.