CategoryRule.try_create_joint

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

Returns a Joint if the given cluster’s elements comply with this CategoryRule.

Parameters:
modelTimberModel

The model to which the elements and this joint belong.

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.