Beam
- class compas_timber.parts.Beam(frame, length, width, height, geometry_type='brep', **kwargs)[source]
Bases:
Part
A class to represent timber beams (studs, slats, etc.) with rectangular cross-sections.
- Parameters:
frame (
compas.geometry.Frame
) – A local coordinate system of the beam: 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.length (float) – Length of the beam
width (float) – Width of the cross-section
height (float) – Height of the cross-section
geometry_type (str) – The type of geometry created for this beam. Either ‘mesh’ or ‘brep.
- Attributes:
frame (
Frame
) – The coordinate system (frame) of this beam.length (float) – Length of the beam.
width (float) – Width of the cross-section
height (float) – Height of the cross-section
geometry (
compas.geometry.Brep
|compas.datastructures.Mesh
) – The resolved geometry of this beam, including any applied features.geometry_type (str) – The type of geometry created by this beam. Either ‘mesh’ or ‘brep’.
tolerance (float)
shape (
Box
) – A feature-less box representing the parametric geometry of this beam. The default tolerance used in operations performed on this beam.faces (list(
Frame
)) – A list of frames representing the 6 faces of this beam. 0: +y (side’s frame normal is equal to the beam’s Y positive direction) 1: +z 2: -y 3: -z 4: -x (side at the starting end) 5: +x (side at the end of the beam)centerline (
Line
) – A line representing the centerline of this beam.centerline_start (
Point
) – The point at the start of the centerline of this beam.centerline_end (
Point
) – The point at the end of the centerline of this beam.aabb (tuple(float, float, float, float, float, float)) – An axis-aligned bounding box of this beam as a 6 valued tuple of (xmin, ymin, zmin, xmax, ymax, zmax).
long_edges (list(
Line
)) – A list containing the 4 lines along the long axis of this beam.midpoint (
Point
) – The point at the middle of the centerline of this beam.
Methods
Adds a feature to this beam.
Align the z_axis of the beam's definition with the given vector.
Applies all the features previously added using add_feature to the geometry of this Beam.
Clears applied features and restores their effect.
Returns which endpoint of the centerline of the beam is closer to the given point.
Extends the beam's parametric definition at both ends by the given values.
Returns the amount by which to extend the beam in each direction using metric units.
Define the beam from its centerline.
Construct an object of this type from the provided data.
Creates a Beam from the given endpoints.
Returns True if the other beam's values are identicale, within TOLERANCE, to the ones of this beam.
Deprecated?
Resets the geometry representation of the beam accroding to the current parametric values.
Inherited Methods
Converts the instance to a string.
Make an independent copy of the data object.
Returns a transformed copy of the part's geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
Convert an object to its native data representation.
Validate the data against the object's data schema.