BlockElement
- class compas_model.elements.BlockElement(shape, features=None, is_support=False, frame=None, transformation=None, name=None)
Bases:
Element
Class representing block elements.
- Parameters:
- shape
compas.datastructures.Mesh
The base shape of the block.
- featureslist[
BlockFeature
], optional Additional block features.
- is_supportbool, optional
Flag indicating that the block is a support.
- frame
compas.geometry.Frame
, optional The coordinate frame of the block.
- namestr, optional
The name of the element.
- shape
- Attributes:
- shape
compas.datastructure.Mesh
The base shape of the block.
- featureslist[
BlockFeature
] A list of additional block features.
- is_supportbool
Flag indicating that the block is a support.
- shape
Methods
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 geometry of the element in local coordinates.
Compute the geometry of the element in model coordinates and taking into account the effect of interactions with connected elements.
Computes the Oriented Bounding Box (OBB) of the geometry of the element.
Inherited Methods
Converts the instance to a string.
Add a feature to the list of features of the lement.
Apply the features to the (base) geometry.
Computes the contact interaction of the geometry of the elements that is used in the model's add_contact method.
Compute the transformation to model coordinates of this element based on its position in the spatial hierarchy of the model.
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.
Transforms the element.
Creates a transformed copy of the element.
Validate the data against the object's data schema.