Beam
- class compas_timber.elements.Beam[source]
Bases:
TimberElementA class to represent timber beams (studs, slats, etc.) with rectangular cross-sections.
- Parameters:
- frame
compas.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
- frame
- Attributes:
- transformation
Transformation The transformation matrix representing the beam’s local coordinate system in its hierarchical context. This is the internal interface for the constructor frame parameter.
- frame
Frame 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
shapeBoxThe shape of the beam in model space.
blankBoxThe blank of the beam in model space.
- blank_lengthfloat
The length of the blank including any extensions added to the beam.
centerlineLineThe centerline of the beam in model space.
ref_frameFrameReference 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.
- aabb
Box An axis aligned bounding box of this beam.
- obb
Box An oriented bounding box of this beam.
- transformation
Methods
Adds a blank extension to the beam.
Computes the Axis Aligned Bounding Box (AABB) of the element in global coordinates.
Computes the collision geometry of the element in global coordinates.
Compute the geometry of the element in local coordinates.
Computes the Oriented Bounding Box (OBB) of the element in global coordinates.
Returns which endpoint of the centerline of the beam is closer to the given point.
Returns the amount by which to extend the beam in each direction using metric units.
Define the beam from its centerline.
Creates a Beam from the given endpoints.
Removes a blank extension from the beam.
Inherited Methods
Converts the instance to a string.
Adds one or more features to the beam.
Adds one or more features to the beam.
Apply the features to the (base) geometry.
Returns the previous side before the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.
Compute the contacts between this element and another element.
Same as parent but handles standalone elements.
Same as parent but handles standalone elements.
Computes a reference point for the element geometry (e.g.
Computes the triangulated surface mesh of the element's model geometry.
Computes the tetrahedral volumetric mesh of the element's model geometry.
Make an independent copy of the data object.
Construct an object of this type from a JSON file.
Construct an object of this type from a JSON string.
Returns the next side after the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.
Returns the perpendicular and parallel dimensions of the beam to the given reference 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.
Removes a feature from the beam.
Resets the element to its initial state by removing all features, extensions, and debug_info.
Reset all computed/cached properties.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Returns the requested side of the beam as a parametric planar surface.
Convert an object to its native data representation and save it to a JSON file.
Convert an object to its native data representation and save it to a JSON string.
Transforms the element.
Compute the transformation to local coordinates of this element based on its position in the spatial hierarchy of the model.
Creates a transformed copy of the element.
Validate the data against the object's data schema.