Element

class compas_cadwork.datamodel.Element[source]

Bases: object

Represents a cadwork Element

Parameters:
idint

The ID of the Element

Attributes:
namestr

The name of the Element

frameFrame

The local coordinate system of the Element

widthfloat

The width of the Element

heightfloat

The height of the Element

lengthfloat

The length of the Element

groupstr

The group the Element belongs to. Either group or subgroup depending on the current grouping type.

ifc_base64_guidstr

The base64 IFC GUID of the Element

cadwork_guidstr

The cadwork GUID of the Element

centerlineLine

The centerline of the Element.

midpointPoint

The midpoint of the Element’s centerline.

ifc_guidstr

The IFC GUID of the Element. See also: ifc_base64_guid.

is_beambool

Whether the Element is a beam

is_wallbool

Whether the Element is a framed wall i.e. container for all other elements in the building group.

is_drillingbool

Whether the Element is a drilling hole

is_roofbool

Whether the Element is a framed roof i.e. container for all other elements in the building group.

is_floorbool

Whether the Element is a framed floor i.e. container for all other elements in the building group.

Methods

from_selection

Returns a generator containing Element objects for all currently activated Elements

get_elements_in_contact

Returns a list of elements in contact with the current element

get_instruction_id

Returns the instruction ID of the Element

is_beam

remove

Removes the Element from the cadwork file

remove_attribute

Removes an attribute from the Element

set_attribute

Sets an attribute on the Element

set_is_instruction

Sets the is_instruction attribute on the Element

translate

Translates the Element by the given vector.