CategoryRule

class compas_timber.design.CategoryRule[source]

Bases: JointRule

Based on the category attribute attached to the elements, this rule assigns

Parameters:
joint_typecls(Joint)

The joint type to be applied to the elements.

category_astr

The category of the first element.

category_bstr

The category of the second element.

toposlist(JointTopology), optional

The topologies that are supported by this rule. TODO: reconsider how to implement this. was meant to filter/override joint application based on topology.

max_distancefloat, optional

The maximum distance to consider two elements as intersecting.

kwargsdict

The keyword arguments to be passed to the joint.

Methods

ToString

try_create_joint

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