compas_cadwork.datamodel
¤
Classes¤
AnchorPoint
dataclass
¤
Anchor point of a cadwork measurement. There may me 2 or more anchor points in a measurement.
Attributes:
-
location(Point) –The location of the anchor point in 3d space.
-
distance(float) –The distance of the anchor point from the measurement line.
-
direction(Vector) –The direction of the anchor point from the measurement line.
Element
dataclass
¤
Element(id: int)
Represents a cadwork Element
Parameters:
-
id(int) –The ID of the Element
Attributes:
-
name(str) –The name of the Element
-
frame(Frame) –The local coordinate system of the Element
-
width(float) –The width of the Element
-
height(float) –The height of the Element
-
length(float) –The length of the Element
-
group(str) –The group the Element belongs to. Either group or subgroup depending on the current grouping type.
-
ifc_base64_guid(str) –The base64 IFC GUID of the Element
-
cadwork_guid(str) –The cadwork GUID of the Element
-
centerline(Line) –The centerline of the Element.
-
midpoint(Point) –The midpoint of the Element's centerline.
-
ifc_guid(str) –The IFC GUID of the Element. See also: ifc_base64_guid.
-
is_beam(bool) –Whether the Element is a beam
-
is_wall(bool) –Whether the Element is a framed wall i.e. container for all other elements in the building group.
-
is_drilling(bool) –Whether the Element is a drilling hole
-
is_roof(bool) –Whether the Element is a framed roof i.e. container for all other elements in the building group.
-
is_floor(bool) –Whether the Element is a framed floor i.e. container for all other elements in the building group.
- API Reference
Methods:¤
from_selection
classmethod
¤
get_elements_in_contact
¤
Returns a list of elements in contact with the current element
get_instruction_id
¤
get_instruction_id() -> str | None
Returns the instruction ID of the Element
Returns:
-
(str, optional)–The instruction ID of the Element
remove_attribute
¤
set_attribute
¤
set_is_instruction
¤
Sets the is_instruction attribute on the Element
Parameters:
ElementGroup
dataclass
¤
Represents a cadwork Element Group
Parameters:
-
name(str) –The name of the Element Group
-
elements(list, default:None) –A list of Elements belonging to the Element Group
Attributes:
-
name(str) –The name of the Element Group
-
elements(list) –A list of Elements belonging to the Element Group
-
wall_frame_element((Element, optional)) –The containing Element (often a wall element) which contains all other elements in the group. If any.
-
ifc_guid(str) –The IFC GUID of the container element, often used to represent the whole group. See also: ifc_base64_guid
ElementGroupingType
¤
CADWork Element Grouping Type
Attributes:
-
GROUP–Elements are grouped using group as the main grouping type.
-
SUBGROUP–Elements are grouped using subgroup as the main grouping type.
-
NONE–Not setting is available.
-
API Reference
utilities ClassesIFCExportSettings