Beam
- class compas_timber.parts.Beam[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.
- lengthfloat
Length of the beam
- widthfloat
Width of the cross-section
- heightfloat
Height of the cross-section
- frame
- Attributes:
- frame
Frame
The coordinate system (frame) of this beam.
- lengthfloat
Length of the beam.
- widthfloat
Width of the cross-section
- heightfloat
Height of the cross-section
- shape
Box
A feature-less box representing the parametric geometry of this beam.
- blank
Box
A feature-less box representing the material stock geometry to produce this beam.
- faceslist(
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.
- aabbtuple(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_edgeslist(
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.
- frame
Methods
Adds a blank extension to the beam.
Adds one or more features to the beam.
Align the z_axis of the beam's definition with the given vector.
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.
Removes a feature from the beam.
Inherited Methods
Converts the instance to a string.
Add a Feature to this Part.
Compute the axis-aligned bounding box of the datastructure.
Compute the oriented bounding box of the datastructure.
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 a transformed copy of the part's geometry.
Rotate the datastructure.
Returns a rotated copy of this geometry.
Scale the datastructure.
Returns a scaled copy of this geometry.
Compute a hash of the data for comparison during version control using the sha256 algorithm.
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 data structure.
Transforms the data structure.
Returns a transformed copy of this data structure.
Returns a transformed copy of this data structure.
Translate the datastructure.
Returns a translated copy of this geometry.
Validate the data against the object's data schema.