Skip to content

compas_timber.structural ¤

Classes¤

BeamSegmentGenerator ¤

Base class for beam segment generators.

Subclasses should implement generate_segments to produce structural segments for a beam, given its joints.

Functions¤

generate_segments abstractmethod ¤
generate_segments(beam: Beam, joints: Sequence[Joint]) -> list[StructuralSegment]

Generate structural segments for a beam.

Parameters:

  • beam (:class:`compas_timber.elements.Beam`) –

    The beam for which to generate segments.

  • joints (list of :class:`compas_timber.connections.Joint`) –

    The joints associated with the beam.

Returns:

  • list of :class:`StructuralSegment`

BeamStructuralElementSolver ¤

BeamStructuralElementSolver(
    beam_segment_generator: BeamSegmentGenerator | None = None,
    joint_connector_generator: JointConnectorGenerator | None = None,
    interaction_type: InteractionType | None = None,
)

Produces structural segments for beams and joints in a timber model.

Parameters:

  • beam_segment_generator (:class:`BeamSegmentGenerator`, default: None ) –

    Generator used to produce structural segments for beams. Defaults to :class:SimpleBeamSegmentGenerator.

  • joint_connector_generator (:class:`JointConnectorGenerator`, default: None ) –

    Generator used to produce connector segments for joints. Defaults to :class:SimpleJointConnectorGenerator.

  • interaction_type (:class:`InteractionSource`, default: None ) –

    Which interaction types to consider when creating structural segments. Defaults to InteractionSource.AUTO.

Functions¤

add_joint_structural_segments ¤
add_joint_structural_segments(
    model: TimberModel, joints: Iterable[Joint]
) -> Iterable[StructuralSegment]

Creates and adds structural segments for a given joint to the timber model.

For joints connecting non-intersecting beams (e.g. crossing beams), this creates a 'virtual' element connecting the centerlines of the beams.

Parameters:

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

    The timber model containing the beams and joints.

  • joints (iterable of :class:`compas_timber.connections.Joint`) –

    The joints for which to create structural segments.

Returns:

  • list of :class:`StructuralSegment`

    The structural segments that were created and added to the model.

add_structural_segments ¤
add_structural_segments(
    model: TimberModel,
) -> tuple[list[StructuralSegment], Iterable[Joint]]

Creates and adds structural segments for a given beam to the timber model.

These are essentially segments of the beam's centerline split at the locations of the joints.

Parameters:

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

    The timber model containing the beams and joints.

Returns:

  • list of :class:`StructuralSegment`

    The structural segments that were created and added to the model.

  • set of :class:`compas_timber.connections.Joint`

    The joints that were traversed when creating the structural segments. This is the definitive set of joints traversed when creating the beam segments, and should be used when creating joint connector segments to avoid duplicates.

InteractionType ¤

Defines which interaction types to consider when creating structural segments.

Attributes:

  • AUTO (int) –

    Per connection: use joints if available, fall back to candidates.

  • JOINTS (int) –

    Only use joints, ignore candidates.

  • CANDIDATES (int) –

    Only use candidates, ignore joints.

JointConnectorGenerator ¤

Base class for joint connector segment generators.

Subclasses should implement generate_connectors to produce structural connector segments for a joint.

Functions¤

generate_connectors abstractmethod ¤
generate_connectors(joint: Joint) -> list[tuple[Beam, Beam, list[StructuralSegment]]]

Generate connector segments for a joint.

Parameters:

  • joint (:class:`compas_timber.connections.Joint`) –

    The joint for which to generate connector segments.

Returns:

  • list of tuple(Beam, Beam, list of :class:`StructuralSegment`)

    Each tuple contains the two beams being connected and the connector segments between them.

SimpleBeamSegmentGenerator ¤

Generates structural segments by splitting the beam centerline at joint locations.

SimpleJointConnectorGenerator ¤

Generates connector segments as virtual lines between non-intersecting beam centerlines.