Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions docs/documentation/display_attribute.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# display_attribute

::: cadwork.display_attribute
rendering:
show_root_heading: false
show_source: true
1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ nav:
- Hit Result: documentation/hit_result.md
- Coordinate System Data: documentation/coordinate_system_data.md
- Active Point Result: documentation/active_point_result.md
- Display Attribute: documentation/display_attribute.md
- Connector Axis Controller: documentation/connector_axis_controller.md
- Dimension Controller: documentation/dimension_controller.md
- Element Controller: documentation/element_controller.md
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cwapi3d"
version = "32.443.1"
version = "32.443.2"
authors = [{ name = "Cadwork", email = "it@cadwork.ca" }]
requires-python = ">= 3.12"
description = 'Python bindings for CwAPI3D'
Expand Down
2 changes: 2 additions & 0 deletions src/cadwork/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ from .hit_result import hit_result
from .dimension_base_format import dimension_base_format
from .dxf_layer_format_type import dxf_layer_format_type
from .dxf_export_version import dxf_export_version
from .display_attribute import display_attribute
from typing import List

# These assignments make each type accessible through both import styles:
Expand Down Expand Up @@ -114,6 +115,7 @@ dimension_base_format = dimension_base_format
dxf_layer_format_type = dxf_layer_format_type
dxf_export_version = dxf_export_version
rgb_color = rgb_color
display_attribute = display_attribute


def get_auto_attribute_elements() -> List[int]:
Expand Down
130 changes: 130 additions & 0 deletions src/cadwork/display_attribute.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
class display_attribute:
"""
A wrapper class for managing element display states.
These methods update the internal state of the attribute
object without requiring external parameters.
"""

def __init__(self) -> None:
"""Initializes a new display_attribute instance."""

def set_none(self) -> None:
"""Resets or clears the current display attribute state.

Returns:
None
"""

def set_name(self) -> None:
"""Triggers the assignment of the name attribute.

Returns:
None
"""

def set_group(self) -> None:
"""Triggers the assignment of the group attribute.

Returns:
None
"""

def set_subgroup(self) -> None:
"""Triggers the assignment of the subgroup attribute.

Returns:
None
"""

def set_comment(self) -> None:
"""Triggers the assignment of the comment attribute.

Returns:
None
"""

def set_edv_code(self) -> None:
"""Triggers the assignment of the EDV/ERP code.

Returns:
None
"""

def set_material(self) -> None:
"""Triggers the assignment of the material attribute.

Returns:
None
"""

def set_material_group(self) -> None:
"""Triggers the assignment of the material group attribute.

Returns:
None
"""

def set_user1(self) -> None:
"""Triggers the assignment of custom user field 1."""

def set_user2(self) -> None:
"""Triggers the assignment of custom user field 2."""

def set_user3(self) -> None:
"""Triggers the assignment of custom user field 3."""

def set_user4(self) -> None:
"""Triggers the assignment of custom user field 4."""

def set_user5(self) -> None:
"""Triggers the assignment of custom user field 5."""

def set_user6(self) -> None:
"""Triggers the assignment of custom user field 6."""

def set_user7(self) -> None:
"""Triggers the assignment of custom user field 7."""

def set_user8(self) -> None:
"""Triggers the assignment of custom user field 8."""

def set_user9(self) -> None:
"""Triggers the assignment of custom user field 9."""

def set_user10(self) -> None:
"""Triggers the assignment of custom user field 10."""

def set_production_number(self) -> None:
"""Triggers the assignment of the production/fabrication number.

Returns:
None
"""

def set_timber_number(self) -> None:
"""Triggers the assignment of the timber-specific member number.

Returns:
None
"""

def set_assembly_number(self) -> None:
"""Triggers the assignment of the assembly/unit number.

Returns:
None
"""

def set_ifc_building(self) -> None:
"""Triggers the assignment of the IFC building attribute.

Returns:
None
"""

def set_ifc_storey(self) -> None:
"""Triggers the assignment of the IFC storey/level attribute.

Returns:
None
"""
10 changes: 10 additions & 0 deletions src/file_controller/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ from cadwork.point_3d import point_3d
from cadwork.bim_team_upload_result import bim_team_upload_result
from cadwork.dxf_layer_format_type import dxf_layer_format_type
from cadwork.dxf_export_version import dxf_export_version
from cadwork.display_attribute import display_attribute
from cadwork.api_types import *

def export_stl_file(element_id_list: List[ElementId], file_path: str) -> None:
Expand Down Expand Up @@ -584,3 +585,12 @@ def export_dstv_file(file_path: str) -> bool:
Returns:
True on successful export, false otherwise.
"""


def set_webgl_hierarchy(stage: int, attribute: display_attribute) -> None:
"""Sets the WebGL hierarchy based on the given stage and attribute.

Parameters:
stage: The hierarchy stage to set.
attribute: The display attribute to use for the hierarchy.
"""
Loading