Skip to content

timber_design.workflow ¤

Classes¤

CategoryRule ¤

CategoryRule(
    joint_type, category_a, category_b, topos=None, max_distance=None, **kwargs
)

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

Parameters:

  • joint_type (cls(:class:`~compas_timber.connections.Joint`)) –

    The joint type to be applied to the elements.

  • category_a (str) –

    The category of the first element.

  • category_b (str) –

    The category of the second element.

  • topos (list(:class:`~compas_timber.connections.JointTopology`), default: None ) –

    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_distance (float, default: None ) –

    The maximum distance to consider two elements as intersecting.

  • kwargs (dict, default: {} ) –

    The keyword arguments to be passed to the joint.

Methods:¤

try_create_joint ¤
try_create_joint(model, cluster, max_distance=None)

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

Parameters:

  • model (:class:`~compas_timber.model.TimberModel`) –

    The model to which the elements and this joint belong.

  • cluster (:class:`~compas_timber.connections.Cluster`) –

    The cluster of elements to create the joint from.

  • max_distance (float, default: None ) –

    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:

  • class:`~compas_timber.connections.Joint` or None

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

  • class:`~compas_timber.errors.BeamJoiningError` or None

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

CollectionDef ¤

CollectionDef(objs)

Todo

this should be removed since it's essentially a list.

ContainerDefinition ¤

ContainerDefinition(panel, config_set=None)

Holds a pair of panel and its configuration set if available.

DebugInfomation ¤

DebugInfomation()

Container for debugging information allowing visual inspection of joint and features related errors.

Attributes:

  • feature_errors (list(:class:`~compas_timber.consumers.FeatureApplicationError`)) –

    List of errors that occured during the application of features.

  • joint_errors (list(:class:`~compas_timber.connections.BeamJoiningError`)) –

    List of errors that occured during the joining of beams.

See Also

:class:~compas_timber.consumers.FeatureApplicationError :class:~compas_timber.connections.BeamJoiningError

DirectRule ¤

DirectRule(joint_type, elements, max_distance=None, **kwargs)

Creates a Joint Rule that directly joins multiple elements. This essentially replaces the JointDefinition.

Parameters:

  • joint_type (cls(:class:`~compas_timber.connections.Joint`)) –

    The joint type to be applied to the elements.

  • elements (list(:class:`~compas_timber.elements.TimberElement`)) –

    The elements to be joined.

  • max_distance (float, default: None ) –

    The maximum distance to consider two elements as intersecting. This will override the global max_distance.

  • kwargs (dict, default: {} ) –

    The keyword arguments to be passed to the joint.

Methods:¤

try_create_joint ¤
try_create_joint(model, cluster, max_distance=None)

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

Parameters:

  • model (:class:`~compas_timber.model.TimberModel`) –

    The model to which the elements and this joint belong.

  • cluster (:class:`~compas_timber.connections.Cluster`) –

    The cluster of elements attemped to be joined.

  • max_distance (float, default: None ) –

    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:

  • class:`~compas_timber.connections.Joint`

    The joint created from the elements and the joint type.

  • class:`~compas_timber.errors.BeamJoiningError` or None

    Error that occurred during joint creation.

JointRule ¤

JointRule(joint_type, max_distance=None, **kwargs)

Represents a rule for creating joints between timber elements.

Parameters:

  • joint_type (:class:`~compas_timber.joints.JointType`) –

    The type of joint to create.

  • max_distance (float, default: None ) –

    The maximum distance to consider when creating joints. This will override the global max_distance.

  • **kwargs (dict, default: {} ) –

    Additional keyword arguments to pass to the joint creation method.

JointRuleSolver ¤

JointRuleSolver(rules, use_default_topo=False, max_distance=absolute)

A class that holds a set of rules for joining elements.

It can be used to apply the rules to a model and create joints based on the rules.

Parameters:

  • rules (list(:class:`~compas_timber.connections.JointRule`)) –

    A list of rules to apply to the model.

  • use_default_topo (bool, default: False ) –

    Whether to use the default topology rules. Defaults to False.

  • max_distance (float, default: absolute ) –

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

Methods:¤

apply_rules_to_model ¤
apply_rules_to_model(model, handled_pairs=None)

Adds joints to model based on the given rules and elements.

Parameters:

  • model (:class:`~compas_timber.model.TimberModel`) –

    The timber model to which the rules will be applied.

  • handled_pairs (list(set(:class:`~compas_timber.elements.TimberElement`, :class:`~compas_timber.elements.TimberElement`)), default: None ) –

    A list of already handled element pairs.

Returns:

  • tuple(list(:class:`~compas_timber.connections.BeamJoiningError`), list(:class:`~compas_timber.connections.Cluster`), )

    A tuple containing a list of joining errors and a list of unjoined Clusters.

TopologyRule ¤

TopologyRule(topology_type, joint_type, max_distance=None, **kwargs)

for a given connection topology type (L,T,X,I,K...), this rule assigns a joint type.

Parameters:

  • topology_type (constant(JointTopology)) –

    The topology type to which the rule is applied.

  • joint_type (cls(:class:`compas_timber.connections.Joint`)) –

    The joint type to be applied to this topology.

  • max_distance (float, default: None ) –

    The maximum distance to consider two elements as intersecting. This will override a global max_distance if set.

  • kwargs (dict, default: {} ) –

    The keyword arguments to be passed to the joint.

Methods:¤

try_create_joint ¤
try_create_joint(model, cluster, max_distance=None)

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:

  • model (:class:`~compas_timber.models.TimberModel`) –

    The timber model containing the elements.

  • cluster (:class:`~compas_timber.connections.Cluster`) –

    The cluster of elements to create the joint from.

  • max_distance (float, default: None ) –

    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:

  • class:`~compas_timber.connections.Joint` or None

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

  • class:`~compas_timber.errors.BeamJoiningError` or None

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

Functions:¤

get_clusters_from_model ¤

get_clusters_from_model(model, max_distance=None, max_cluster_size=16)

Analyzes the model to find clusters of beams and plates. This will create JointCandidates and PlateJointCandidates in the model.

Parameters:

  • model (:class:`~compas_timber.model.TimberModel`) –

    The TimberModel to analyze.

  • max_distance (float | None, default: None ) –

    The maximum distance to consider for clustering. If None, a default distance is used.

Returns:

  • list[:class:`~compas_timber.connections.Cluster`]

    A list of clusters found in the model.