TimberAssembly

class compas_timber.assembly.TimberAssembly[source]

Bases: Assembly

Represents a timber assembly containing beams and joints etc.

Attributes:
beamslist(Beam)

A list of beams assigned to this assembly.

jointslist(Joint)

A list of joints assigned to this assembly.

part_keyslist(int)

A list of the keys of the parts included in this assembly.

beam_keyslist(int)

A list of the keys of the beams included in this assembly.

joint_keyslist(int)

A list of the keys of the joints included in this assembly.

topologieslist(dict)

A list of JointTopology for assembly. dict is: {“detected_topo”: detected_topo, “beam_a_key”: beam_a_key, “beam_b_key”:beam_b_key} See JointTopology.

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.

set_topologies

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.

compute_aabb

Compute the axis-aligned bounding box of the datastructure.

compute_obb

Compute the oriented bounding box of the datastructure.

connections

Iterate over the connections between the parts.

copy

Make an independent copy of the data object.

delete_connection

Delete a connection between two parts.

delete_part

Remove a part from the assembly.

find

Find a part in the assembly by its GUID.

find_by_key

Find a part in the assembly by its key.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

parts

The parts of the assembly.

rotate

Rotate the datastructure.

rotated

Returns a rotated copy of this geometry.

scale

Scale the datastructure.

scaled

Returns a scaled copy of this geometry.

sha256

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

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transform

Transforms the data structure.

transform_numpy

Transforms the data structure.

transformed

Returns a transformed copy of this data structure.

transformed_numpy

Returns a transformed copy of this data structure.

translate

Translate the datastructure.

translated

Returns a translated copy of this geometry.

validate_data

Validate the data against the object's data schema.