compas_timber.base
¤
Classes¤
TimberElement
¤
Base class for all timber elements.
This is an abstract class and should not be instantiated directly.
Parameters:
-
frame(:class:`compas.geometry.Frame`) –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. -
length(float) –Length of the timber element.
-
width(float) –Width of the timber element.
-
height(float) –Height of the timber element.
-
features(list[:class:`~compas_timber.fabrication.Feature`], default:None) –List of features to apply to this element.
-
**kwargs(dict, default:{}) –Additional keyword arguments.
Attributes:
-
frame(:class:`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_beam(bool) –True if the element is a beam.
-
is_plate(bool) –True if the element is a plate.
-
is_group_element(bool) –True if the element can be used as container for other elements.
-
features(list[:class:`~compas_timber.parts.Feature`]) –A list of features applied to the element.
-
geometry(:class:`compas.geometry.Geometry`) –The geometry of the element in the model's global coordinates.
Attributes¤
ref_frame
property
¤
Reference frame for machining processings according to BTLx standard. The origin is at the bottom far corner of the element. The ref_frame is always in model coordinates.
Functions¤
add_feature
¤
Adds one or more features to the beam.
Parameters:
-
feature(:class:`~compas_timber.fabrication.BTLxProcessing`)) –The feature to be added.
add_features
¤
Adds one or more features to the beam.
Parameters:
-
features(:class:`~compas_timber.fabrication.BTLxProcessing` | list(:class:`~compas_timber.fabrication.BTLxProcessing`)) –The feature or features to be added described as a BTLxProcessing or a list of BTLxProcessings.
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. This method does not consider the start and end sides of the beam (RS5 & RS6).
Parameters:
-
ref_side_index(int) –The index of the reference side to which the back side should be calculated.
Returns:
-
frame(:class:`~compas.geometry.Frame`) –The frame of the back side of the beam relative to the reference side.
compute_modeltransformation
¤
Same as parent but handles standalone elements.
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. This method does not consider the start and end sides of the beam (RS5 & RS6).
Parameters:
-
ref_side_index(int) –The index of the reference side to which the front side should be calculated.
Returns:
-
frame(:class:`~compas.geometry.Frame`) –The frame of the front side of the beam relative to the reference side.
get_dimensions_relative_to_side
¤
Returns the dimensions of a timber element with respect to the Y- axis and Normal of the given reference side.
Parameters:
-
ref_side_index(int) –The index of the reference side to which the dimensions should be calculated.
Returns:
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. This method does not consider the start and end sides of the beam (RS5 & RS6).
Parameters:
-
ref_side_index(int) –The index of the reference side to which the opposite side should be calculated.
Returns:
-
frame(:class:`~compas.geometry.Frame`) –The frame of the opposite side of the beam relative to the reference side.
remove_blank_extension
¤
Remove blank extension from the element.
This method is intended to be overridden by subclasses.
remove_features
¤
Removes a feature from the beam.
Parameters:
-
features(:class:`~compas_timber.fabrication.BTLxProcessing` | list(:class:`~compas_timber.fabrication.BTLxProcessing`) | None, default:None) –The feature or features to be removed described as a BTLxProcessing or a list of BTLxProcessings. If None, all features will be removed.
reset
¤
Resets the element to its initial state by removing all features, extensions, and debug_info.
side_as_surface
¤
Returns the requested side of the beam as a parametric planar surface.
Parameters:
-
side_index(int) –The index of the reference side to be returned. 0 to 5.
transformation_to_local
¤
Compute the transformation to local coordinates of this element based on its position in the spatial hierarchy of the model.
Returns:
-
class:`compas.geometry.Transformation`–