TopologyRule.try_create_joint

TopologyRule.try_create_joint(model, cluster, max_distance=None)[source]

Returns a Joint if the given cluster’s elements comply with this TopologyRule. It checks: that the max_distance is not exceeded, that the joint supports the topology of the elements.

Parameters:
modelTimberModel

The timber model containing the elements.

clusterCluster

The cluster of elements to create the joint from.

max_distancefloat, optional

The maximum distance to consider two elements as intersecting. Defaults to TOL.absolute. This is the general model.max_distance and will be overriden if the rule has a max_distance.

Returns:
Joint or None

The joint created from the elements if the elements comply with the rule,

BeamJoiningError or None

The error raised if the elements do not comply with the rule.