Slab

class compas_timber.elements.Slab[source]

Bases: PlateGeometry, Element

Represents a timber slab element (wall, floor, roof, etc.).

Serves as container for beams, plates, and other related elements and groups them together to form a slab. A slab is often a single unit of prefabricated timber element. It is often referred to as an enveloping body.

Parameters:
frameFrame

The coordinate system (frame) of this slab.

lengthfloat

Length of the slab.

widthfloat

Width of the slab.

thicknessfloat

Thickness of the slab.

local_outline_a: :class:`~compas.geometry.Polyline`, optional

A polyline representing the principal outline of this slab.

local_outline_b: :class:`~compas.geometry.Polyline`, optional

A polyline representing the associated outline of this slab.

openingslist[Polyline], optional

A list of Polyline objects representing openings in this slab.

namestr, optional

Name of the slab. Defaults to “Slab”.

**kwargsdict, optional

Additional keyword arguments.

Attributes:
frameFrame

The coordinate system (frame) of this slab.

lengthfloat

Length of the slab.

widthfloat

Width of the slab.

heightfloat

Height (thickness) of the slab.

thicknessfloat

Thickness of the slab.

namestr

Name of the slab.

interfaceslist

List of interfaces associated with this slab.

attributesdict

Dictionary of additional attributes.

is_group_elementbool

Always True for slabs as they can contain other elements.

Methods

compute_elementgeometry

Compute the geometry of the element at local coordinates.

compute_modelgeometry

Same as parent but handles standalone elements.

compute_modeltransformation

Same as parent but handles standalone elements.

from_outlines

Constructs a Slab from two polyline outlines.

Inherited Methods

ToString

Converts the instance to a string.

add_feature

Add a feature to the list of features of the element.

apply_edge_extensions

adjusts segments of the outlines to lay on the edge planes created by plate joints.

apply_features

Apply the features to the (base) geometry.

compute_aabb

Computes the Axis Aligned Bounding Box (AABB) of the element.

compute_collision_mesh

Computes the collision geometry of the element.

compute_contacts

Compute the contacts between this element and another element.

compute_obb

Computes the Oriented Bounding Box (OBB) of the element.

compute_point

Computes a reference point for the element geometry (e.g.

compute_shape

The shape of the plate before other features area applied.

compute_surface_mesh

Computes the triangulated surface mesh of the element's model geometry.

compute_volumetric_mesh

Computes the tetrahedral volumetric mesh of the element's model geometry.

copy

Make an independent copy of the data object.

from_brep

Creates a plate from a brep.

from_json

Construct an object of this type from a JSON file.

from_jsonstring

Construct an object of this type from a JSON string.

from_outline_thickness

Constructs a PlateGeometry from a polyline outline and a thickness.

get_args_from_outlines

Get constructor arguments for the PlateGeometry and subclasses from outlines.

remove_blank_extension

Removes any extension plane for the given edge index.

reset

Resets the element outlines to their initial state.

set_extension_plane

Sets an extension plane for a specific edge of the plate.

sha256

Compute a hash of the data for comparison during version control using the sha256 algorithm.

to_json

Convert an object to its native data representation and save it to a JSON file.

to_jsonstring

Convert an object to its native data representation and save it to a JSON string.

transform

Transforms the element.

transformed

Creates a transformed copy of the element.

validate_data

Validate the data against the object's data schema.