diff --git a/docs/documentation/display_attribute.md b/docs/documentation/display_attribute.md new file mode 100644 index 0000000..f884963 --- /dev/null +++ b/docs/documentation/display_attribute.md @@ -0,0 +1,6 @@ +# display_attribute + +::: cadwork.display_attribute +rendering: +show_root_heading: false +show_source: true diff --git a/mkdocs.yml b/mkdocs.yml index 79ca2f3..ca6d2e8 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 1912917..31e5417 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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' diff --git a/src/cadwork/__init__.pyi b/src/cadwork/__init__.pyi index 42ae349..aef0f2d 100644 --- a/src/cadwork/__init__.pyi +++ b/src/cadwork/__init__.pyi @@ -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: @@ -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]: diff --git a/src/cadwork/display_attribute.pyi b/src/cadwork/display_attribute.pyi new file mode 100644 index 0000000..d0a870a --- /dev/null +++ b/src/cadwork/display_attribute.pyi @@ -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 + """ diff --git a/src/file_controller/__init__.pyi b/src/file_controller/__init__.pyi index 2cb38d0..5324d4a 100644 --- a/src/file_controller/__init__.pyi +++ b/src/file_controller/__init__.pyi @@ -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: @@ -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. + """