beam_ref_side_incidence

compas_timber.connections.beam_ref_side_incidence(beam_a, beam_b, ignore_ends=True)[source]

Returns a map of ref_side indices of beam_b and the angle of their normal with beam_a’s centerline.

This is used to find a cutting plane when joining the two beams.

Compared to beam_side_incidence, this function considers the ref_sides and not faces and forms part of the transition to the new implementation system

Parameters:
beam_aBeam

The beam that attaches with one of its ends to the side of beam_b.

beam_bBeam

The other beam.

ignore_endsbool, optional

If True, only the first four ref_sides of beam_b are considered. Otherwise all ref_sides are considered.

Returns:
dict(int, float)

A map of ref_side indices of beam_b and their respective angle with beam_a’s centerline.

Examples

>>> ref_side_angles = Joint.beam_side_incidence(beam_a, beam_b)
>>> closest_ref_side_index = min(ref_side_angles, key=ref_side_angles.get)
>>> cutting_plane = beam_b.ref_sides[closest_ref_side_index]