TimberElement
- class compas_timber.elements.TimberElement[source]
Bases:
Element,ABCBase class for all timber elements.
This is an abstract class and should not be instantiated directly.
- Parameters:
- frame
compas.geometry.Frame, optional The frame representing the beam’s local coordinate system in its hierarchical context. Defaults to
None, in which case the world coordinate system is used.- lengthfloat
Length of the timber element.
- widthfloat
Width of the timber element.
- heightfloat
Height of the timber element.
- featureslist[
Feature], optional List of features to apply to this element.
- **kwargsdict, optional
Additional keyword arguments.
- frame
- Attributes:
- frame
compas.geometry.Frame The coordinate system of this element in model space. This property may be different from the constructor parameter if the element belongs to a model hierarchy.
- is_beambool
True if the element is a beam.
- is_platebool
True if the element is a plate.
- is_wallbool
True if the element is a wall.
- is_group_elementbool
True if the element can be used as container for other elements.
- featureslist[
Feature] A list of features applied to the element.
geometrycompas.geometry.GeometryThe geometry of the element in the model’s global coordinates.
- frame
Methods
Adds one or more features to the beam.
Adds one or more features to the beam.
Returns the previous side before the reference side, following the right-hand rule with the thumb along the beam's frame x-axis.
Same as parent but handles standalone elements.
Same as parent but handles standalone elements.
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.
Remove blank extension from the element.
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.
Returns the requested side of the beam as a parametric planar surface.
Transforms the element.
Compute the transformation to local coordinates of this element based on its position in the spatial hierarchy of the model.
Inherited Methods
Converts the instance to a string.
Apply the features to the (base) geometry.
Computes the Axis Aligned Bounding Box (AABB) of the geometry of the element.
Computes the collision geometry of the geometry of the element.
Compute the contacts between this element and another element.
Compute the geometry of the element in local coordinates.
Computes the Oriented Bounding Box (OBB) of the geometry of the element.
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.
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.
Creates a transformed copy of the element.
Validate the data against the object's data schema.