TimberAssembly

class compas_timber.assembly.TimberAssembly(*args, **kwargs)[source]

Bases: Assembly

Represents a timber assembly containing beams and joints etc.

Attributes:
  • beams (list(Beam)) – A list of beams assigned to this assembly.

  • joints (list(Joint)) – A list of joints assigned to this assembly.

  • part_keys (list(int)) – A list of the keys of the parts included in this assembly.

  • beam_keys (list(int)) – A list of the keys of the beams included in this assembly.

  • joint_keys (list(int)) – A list of the keys of the joints included in this assembly.

Methods

add_beam

Adds a Beam to this assembly.

add_joint

Add a joint object to the assembly.

are_parts_joined

Checks if there is already a joint defined for the same set of parts.

contains

Returns True if this assembly contains the given object, False otherwise.

remove_joint

Removes this joint object from the assembly.

Inherited Methods

ToString

Converts the instance to a string.

add_connection

Add a connection between two parts.

add_part

Add a part to the assembly.

connections

Iterate over the connections between the parts.

copy

Make an independent copy of the data object.

find

Find a part in the assembly by its GUID.

find_by_key

Find a part in the assembly by its key.

from_data

Construct an object of this type from the provided data.

from_json

Construct an object from serialized data contained in a JSON file.

from_jsonstring

Construct an object from serialized data contained in a JSON string.

parts

The parts of the assembly.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_data

Convert an object to its native data representation.

to_json

Serialize the data representation of an object to a JSON file.

to_jsonstring

Serialize the data representation of an object to a JSON string.

validate_data

Validate the object's data against its data schema.

validate_json

Validate the object's data against its json schema.