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.

max_distancefloat, optional

The maximum distance to consider two elements as intersecting.

kwargsdict

The keyword arguments to be passed to the joint.

Methods

ToString

comply

Checks if the given elements comply with this CategoryRule. It checks: that the elements have the expected category attribute, that the max_distance is not exceeded, that the joint supports the topology of the elements.

reorder

Returns the given elements in a sorted order.

Inherited Methods

get_category_rules

get_direct_rules

get_topology_rules

joints_from_beams_and_rules

processes joint rules into joint definitions.