Beam

class compas_timber.elements.Beam[source]

Bases: TimberElement

A class to represent timber beams (studs, slats, etc.) with rectangular cross-sections.

Parameters:
framecompas.geometry.Frame

The frame representing the beam’s local coordinate system in its hierarchical context: Origin is located at the starting point of the centerline. x-axis corresponds to the centerline (major axis), usually also the fibre direction in solid wood beams. y-axis corresponds to the width of the cross-section, usually the smaller dimension. z-axis corresponds to the height of the cross-section, usually the larger dimension.

lengthfloat

Length of the beam

widthfloat

Width of the cross-section

heightfloat

Height of the cross-section

Attributes:
transformationTransformation

The transformation matrix representing the beam’s local coordinate system in its hierarchical context. This is the internal interface for the constructor frame parameter.

frameFrame

The coordinate system (frame) of this beam in model space. This property may be different from the constructor parameter if the beam belongs to a model hierarchy.

lengthfloat

Length of the beam.

widthfloat

Width of the cross-section

heightfloat

Height of the cross-section

shapeBox

The shape of the beam in model space.

blankBox

The blank of the beam in model space.

blank_lengthfloat

The length of the blank including any extensions added to the beam.

centerlineLine

The centerline of the beam in model space.

ref_frameFrame

Reference frame for machining processings according to BTLx standard.

ref_sidestuple(Frame)

A tuple containing the 6 frames representing the sides of the beam according to BTLx standard.

ref_edgestuple(Line)

A tuple containing the 4 lines representing the long edges of the beam according to BTLx standard.

aabbBox

An axis aligned bounding box of this beam.

obbBox

An oriented bounding box of this beam.

Methods

add_blank_extension

Adds a blank extension to the beam.

compute_aabb

Computes the Axis Aligned Bounding Box (AABB) of the element in global coordinates.

compute_collision_mesh

Computes the collision geometry of the element in global coordinates.

compute_elementgeometry

Compute the geometry of the element in local coordinates.

compute_obb

Computes the Oriented Bounding Box (OBB) of the element in global coordinates.

endpoint_closest_to_point

Returns which endpoint of the centerline of the beam is closer to the given point.

extension_to_plane

Returns the amount by which to extend the beam in each direction using metric units.

from_centerline

Define the beam from its centerline.

from_endpoints

Creates a Beam from the given endpoints.

remove_blank_extension

Removes a blank extension from the beam.

Inherited Methods

ToString

Converts the instance to a string.

add_feature

Adds one or more features to the beam.

add_features

Adds one or more features to the beam.

apply_features

Apply the features to the (base) geometry.

back_side

Returns the previous side before the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.

compute_contacts

Compute the contacts between this element and another element.

compute_modelgeometry

Same as parent but handles standalone elements.

compute_modeltransformation

Same as parent but handles standalone elements.

compute_point

Computes a reference point for the element geometry (e.g.

compute_surface_mesh

Computes the triangulated surface mesh of the element's model geometry.

compute_volumetric_mesh

Computes the tetrahedral volumetric mesh of the element's model geometry.

copy

Make an independent copy of the data object.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

front_side

Returns the next side after the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.

get_dimensions_relative_to_side

Returns the perpendicular and parallel dimensions of the beam to the given reference side.

opp_side

Returns the the side that is directly across from the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.

remove_features

Removes a feature from the beam.

reset

Resets the element to its initial state by removing all features, extensions, and debug_info.

reset_computed_properties

Reset all computed/cached properties.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

side_as_surface

Returns the requested side of the beam as a parametric planar surface.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transform

Transforms the element.

transformation_to_local

Compute the transformation to local coordinates of this element based on its position in the spatial hierarchy of the model.

transformed

Creates a transformed copy of the element.

validate_data

Validate the data against the object's data schema.