diff --git a/pyproject.toml b/pyproject.toml index c2d2fb1..5dc45e2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "cwapi3d" -version = "32.443.5" +version = "32.443.6" authors = [{ name = "Cadwork", email = "it@cadwork.ca" }] requires-python = ">= 3.12" description = 'Python bindings for CwAPI3D' @@ -49,5 +49,8 @@ packages = [ ] package-dir = { "" = "src" } +[tool.setuptools.package-data] +"*" = ["*.pyi", "py.typed"] + [tool.setuptools.exclude-package-data] -"*" = [".py"] +"*" = ["*.py"] diff --git a/src/attribute_controller/__init__.pyi b/src/attribute_controller/__init__.pyi index d072d71..0a08af6 100644 --- a/src/attribute_controller/__init__.pyi +++ b/src/attribute_controller/__init__.pyi @@ -1,5 +1,3 @@ -from typing import List - from cadwork.api_types import * from cadwork.attribute_display_settings import attribute_display_settings from cadwork.element_grouping_type import element_grouping_type @@ -10,7 +8,7 @@ from cadwork.node_symbol import node_symbol from cadwork.process_type import process_type -def set_name(element_id_list: List[ElementId], name: str) -> None: +def set_name(element_id_list: list[ElementId], name: str) -> None: """Sets the element name. Parameters: @@ -19,7 +17,7 @@ def set_name(element_id_list: List[ElementId], name: str) -> None: """ -def set_group(element_id_list: List[ElementId], group: str) -> None: +def set_group(element_id_list: list[ElementId], group: str) -> None: """Sets the element group. Parameters: @@ -28,7 +26,7 @@ def set_group(element_id_list: List[ElementId], group: str) -> None: """ -def set_subgroup(element_id_list: List[ElementId], subgroup: str) -> None: +def set_subgroup(element_id_list: list[ElementId], subgroup: str) -> None: """Sets the element subgroup. Parameters: @@ -37,7 +35,7 @@ def set_subgroup(element_id_list: List[ElementId], subgroup: str) -> None: """ -def set_comment(element_id_list: List[ElementId], comment: str) -> None: +def set_comment(element_id_list: list[ElementId], comment: str) -> None: """Sets the element comment. Parameters: @@ -46,7 +44,7 @@ def set_comment(element_id_list: List[ElementId], comment: str) -> None: """ -def set_user_attribute(element_id_list: List[ElementId], number: UserAttributeId, user_attribute: str) -> None: +def set_user_attribute(element_id_list: list[ElementId], number: UserAttributeId, user_attribute: str) -> None: """Sets the element user attribute. Parameters: @@ -56,7 +54,7 @@ def set_user_attribute(element_id_list: List[ElementId], number: UserAttributeId """ -def set_sku(element_id_list: List[ElementId], sku: str) -> None: +def set_sku(element_id_list: list[ElementId], sku: str) -> None: """Sets the element SKU. Parameters: @@ -65,7 +63,7 @@ def set_sku(element_id_list: List[ElementId], sku: str) -> None: """ -def set_production_number(element_id_list: List[ElementId], production_number: UnsignedInt) -> None: +def set_production_number(element_id_list: list[ElementId], production_number: UnsignedInt) -> None: """Sets the element production number. Parameters: @@ -74,7 +72,7 @@ def set_production_number(element_id_list: List[ElementId], production_number: U """ -def set_part_number(element_id_list: List[ElementId], part_number: UnsignedInt) -> None: +def set_part_number(element_id_list: list[ElementId], part_number: UnsignedInt) -> None: """Sets the element part number. Parameters: @@ -83,7 +81,7 @@ def set_part_number(element_id_list: List[ElementId], part_number: UnsignedInt) """ -def set_additional_data(element_id_list: List[ElementId], data_id: str, data_text: str) -> None: +def set_additional_data(element_id_list: list[ElementId], data_id: str, data_text: str) -> None: """Sets the element additional data. Parameters: @@ -93,7 +91,7 @@ def set_additional_data(element_id_list: List[ElementId], data_id: str, data_tex """ -def delete_additional_data(element_id_list: List[ElementId], data_id: str) -> None: +def delete_additional_data(element_id_list: list[ElementId], data_id: str) -> None: """Deletes the element additional data. Parameters: @@ -111,7 +109,7 @@ def set_user_attribute_name(number: UserAttributeId, user_attribute_name: str) - """ -def set_process_type_and_extended_settings_from_name(element_id_list: List[ElementId]) -> None: +def set_process_type_and_extended_settings_from_name(element_id_list: list[ElementId]) -> None: """Sets the element process type and extended settings from the element name. Parameters: @@ -137,7 +135,7 @@ def set_name_extended_settings(name: str, extended_settings: extended_settings) """ -def set_output_type(element_id_list: List[ElementId], process_type: process_type) -> None: +def set_output_type(element_id_list: list[ElementId], process_type: process_type) -> None: """Sets the element output type. Parameters: @@ -146,7 +144,7 @@ def set_output_type(element_id_list: List[ElementId], process_type: process_type """ -def set_extended_settings(element_id_list: List[ElementId], extended_settings: extended_settings) -> None: +def set_extended_settings(element_id_list: list[ElementId], extended_settings: extended_settings) -> None: """Sets the element extended settings. Parameters: @@ -155,7 +153,7 @@ def set_extended_settings(element_id_list: List[ElementId], extended_settings: e """ -def set_wall(element_id_list: List[ElementId]) -> None: +def set_wall(element_id_list: list[ElementId]) -> None: """Sets the element to wall. Deprecated : @@ -166,7 +164,7 @@ def set_wall(element_id_list: List[ElementId]) -> None: """ -def set_floor(element_id_list: List[ElementId]) -> None: +def set_floor(element_id_list: list[ElementId]) -> None: """Set floor. Deprecated : @@ -177,7 +175,7 @@ def set_floor(element_id_list: List[ElementId]) -> None: """ -def set_opening(element_id_list: List[ElementId]) -> None: +def set_opening(element_id_list: list[ElementId]) -> None: """Sets the element to opening. Parameters: @@ -185,7 +183,7 @@ def set_opening(element_id_list: List[ElementId]) -> None: """ -def set_fastening_attribute(element_id_list: List[ElementId], value: str) -> None: +def set_fastening_attribute(element_id_list: list[ElementId], value: str) -> None: """Sets the element fastening attribute. Parameters: @@ -194,7 +192,7 @@ def set_fastening_attribute(element_id_list: List[ElementId], value: str) -> Non """ -def set_element_material(element_id_list: List[ElementId], material: MaterialId) -> None: +def set_element_material(element_id_list: list[ElementId], material: MaterialId) -> None: """Sets the element material. Parameters: @@ -203,7 +201,7 @@ def set_element_material(element_id_list: List[ElementId], material: MaterialId) """ -def set_assembly_number(element_id_list: List[ElementId], assembly_number: str) -> None: +def set_assembly_number(element_id_list: list[ElementId], assembly_number: str) -> None: """set assembly number. Parameters: @@ -212,7 +210,7 @@ def set_assembly_number(element_id_list: List[ElementId], assembly_number: str) """ -def set_list_quantity(element_id_list: List[ElementId], list_quantity: UnsignedInt) -> None: +def set_list_quantity(element_id_list: list[ElementId], list_quantity: UnsignedInt) -> None: """Set list quantity. Parameters: @@ -221,7 +219,7 @@ def set_list_quantity(element_id_list: List[ElementId], list_quantity: UnsignedI """ -def set_layer_settings(element_id_list: List[ElementId], layer_settings: layer_settings) -> None: +def set_layer_settings(element_id_list: list[ElementId], layer_settings: layer_settings) -> None: """Set layer settings. Parameters: @@ -230,7 +228,7 @@ def set_layer_settings(element_id_list: List[ElementId], layer_settings: layer_s """ -def set_ignore_in_vba_calculation(element_id_list: List[ElementId], ignore: bool) -> None: +def set_ignore_in_vba_calculation(element_id_list: list[ElementId], ignore: bool) -> None: """Sets if the element should be ignored in VBA Calculation. Parameters: @@ -244,7 +242,7 @@ def clear_errors() -> None: """ -def set_reference_wall_2dc(element_id_list: List[ElementId], _2dc_file_path: str) -> None: +def set_reference_wall_2dc(element_id_list: list[ElementId], _2dc_file_path: str) -> None: """Applies a new 2dc reference wall to an element. Parameters: @@ -261,7 +259,7 @@ def get_user_attribute_count() -> UnsignedInt: """ -def set_standard_part(element_id_list: List[ElementId]) -> None: +def set_standard_part(element_id_list: list[ElementId]) -> None: """Sets covers (wall,opening or floor) to standard part. Parameters: @@ -269,7 +267,7 @@ def set_standard_part(element_id_list: List[ElementId]) -> None: """ -def set_solid_wall(element_id_list: List[ElementId]) -> None: +def set_solid_wall(element_id_list: list[ElementId]) -> None: """Sets elements to solid wall. Parameters: @@ -277,7 +275,7 @@ def set_solid_wall(element_id_list: List[ElementId]) -> None: """ -def set_log_wall(element_id_list: List[ElementId]) -> None: +def set_log_wall(element_id_list: list[ElementId]) -> None: """Sets elements to log wall. Parameters: @@ -285,7 +283,7 @@ def set_log_wall(element_id_list: List[ElementId]) -> None: """ -def set_solid_floor(element_id_list: List[ElementId]) -> None: +def set_solid_floor(element_id_list: list[ElementId]) -> None: """Sets elements to solid floor. Parameters: @@ -293,7 +291,7 @@ def set_solid_floor(element_id_list: List[ElementId]) -> None: """ -def set_roof(element_id_list: List[ElementId]) -> None: +def set_roof(element_id_list: list[ElementId]) -> None: """Set roof. Deprecated : @@ -304,7 +302,7 @@ def set_roof(element_id_list: List[ElementId]) -> None: """ -def set_solid_roof(element_id_list: List[ElementId]) -> None: +def set_solid_roof(element_id_list: list[ElementId]) -> None: """Sets elements to solid roof cover. Parameters: @@ -323,7 +321,7 @@ def get_node_symbol(element_id: ElementId) -> node_symbol: """ -def set_node_symbol(element_id_list: List[ElementId], symbol: node_symbol) -> None: +def set_node_symbol(element_id_list: list[ElementId], symbol: node_symbol) -> None: """Set node symbol. Parameters: @@ -355,7 +353,7 @@ def update_auto_attribute() -> None: """ -def set_additional_guid(element_id_list: List[ElementId], data_id: str, guid: str) -> None: +def set_additional_guid(element_id_list: list[ElementId], data_id: str, guid: str) -> None: """Set additional guid. Parameters: @@ -406,7 +404,7 @@ def add_item_to_user_attribute_list(attribute_number: UserAttributeId, item: str """ -def set_container_number(element_id_list: List[ElementId], number: UnsignedInt) -> None: +def set_container_number(element_id_list: list[ElementId], number: UnsignedInt) -> None: """Set container number. Parameters: @@ -415,7 +413,7 @@ def set_container_number(element_id_list: List[ElementId], number: UnsignedInt) """ -def get_name_list_items() -> List[str]: +def get_name_list_items() -> list[str]: """Retrieve a list of name for all items Returns: @@ -671,7 +669,7 @@ def set_attribute_display_settings_for_solid_wall_panel(settings: attribute_disp """ -def set_framed_floor(element_id_list: List[ElementId]) -> None: +def set_framed_floor(element_id_list: list[ElementId]) -> None: """Sets the elements to framed floor. Parameters: @@ -679,7 +677,7 @@ def set_framed_floor(element_id_list: List[ElementId]) -> None: """ -def set_framed_roof(element_id_list: List[ElementId]) -> None: +def set_framed_roof(element_id_list: list[ElementId]) -> None: """Sets the elements to framed roof. Parameters: @@ -687,7 +685,7 @@ def set_framed_roof(element_id_list: List[ElementId]) -> None: """ -def set_framed_wall(element_id_list: List[ElementId]) -> None: +def set_framed_wall(element_id_list: list[ElementId]) -> None: """Sets the element to framed wall. Parameters: @@ -695,7 +693,7 @@ def set_framed_wall(element_id_list: List[ElementId]) -> None: """ -def get_name_list_items_by_element_type(element_type: element_type) -> List[str]: +def get_name_list_items_by_element_type(element_type: element_type) -> list[str]: """Get name list items by element type. Parameters: @@ -1326,7 +1324,7 @@ def get_additional_guid(element_id: ElementId, data_id: str) -> str: """ -def get_prefab_layer_all_assigned(element_id: ElementId) -> List[int]: +def get_prefab_layer_all_assigned(element_id: ElementId) -> list[int]: """Get all assigned prefab layers. Parameters: @@ -1337,7 +1335,7 @@ def get_prefab_layer_all_assigned(element_id: ElementId) -> List[int]: """ -def get_prefab_layer_with_dimensions(element_id: ElementId) -> List[int]: +def get_prefab_layer_with_dimensions(element_id: ElementId) -> list[int]: """Get prefab layer with dimensions. Parameters: @@ -1348,7 +1346,7 @@ def get_prefab_layer_with_dimensions(element_id: ElementId) -> List[int]: """ -def get_prefab_layer_without_dimensions(element_id: ElementId) -> List[int]: +def get_prefab_layer_without_dimensions(element_id: ElementId) -> list[int]: """Get prefab layer without dimensions. Parameters: @@ -1403,7 +1401,7 @@ def get_container_number_with_prefix(element_id: ElementId) -> str: """ -def get_group_list_items() -> List[str]: +def get_group_list_items() -> list[str]: """Get group list items. Returns: @@ -1411,7 +1409,7 @@ def get_group_list_items() -> List[str]: """ -def get_subgroup_list_items() -> List[str]: +def get_subgroup_list_items() -> list[str]: """Get subgroup list items. Returns: @@ -1419,7 +1417,7 @@ def get_subgroup_list_items() -> List[str]: """ -def get_comment_list_items() -> List[str]: +def get_comment_list_items() -> list[str]: """Get comment list items. Returns: @@ -1427,7 +1425,7 @@ def get_comment_list_items() -> List[str]: """ -def get_sku_list_items() -> List[str]: +def get_sku_list_items() -> list[str]: """Get sku list items. Returns: @@ -1435,7 +1433,7 @@ def get_sku_list_items() -> List[str]: """ -def get_user_attribute_list_items(element_id: ElementId) -> List[str]: +def get_user_attribute_list_items(element_id: ElementId) -> list[str]: """Get user attribute list items. Parameters: @@ -1760,7 +1758,7 @@ def set_attribute_visibility_in_modify_window(number: UnsignedInt, visibility: b """ -def set_cutting_set(element_id_list: List[ElementId], cutting_set_name: str) -> bool: +def set_cutting_set(element_id_list: list[ElementId], cutting_set_name: str) -> bool: """Set cutting set. Parameters: @@ -1783,7 +1781,7 @@ def get_standard_element_material_id(element_id: ElementId) -> int: """ -def set_machine_calculation_set(element_ids: List[ElementId], name: str) -> bool: +def set_machine_calculation_set(element_ids: list[ElementId], name: str) -> bool: """Set machine calculation set for a list of elements. Note: diff --git a/src/attribute_controller/py.typed b/src/attribute_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/bim_controller/__init__.pyi b/src/bim_controller/__init__.pyi index 3a2f864..723a8f8 100644 --- a/src/bim_controller/__init__.pyi +++ b/src/bim_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.ifc_2x3_element_type import ifc_2x3_element_type from cadwork.ifc_options import ifc_options from cadwork.ifc_predefined_type import ifc_predefined_type @@ -43,7 +42,7 @@ def get_ifc2x3_element_type(element_id: ElementId) -> ifc_2x3_element_type: """ -def set_ifc2x3_element_type(element_id_list: List[ElementId], ifc_type: ifc_2x3_element_type) -> None: +def set_ifc2x3_element_type(element_id_list: list[ElementId], ifc_type: ifc_2x3_element_type) -> None: """Set ifc2x3 element type. Parameters: @@ -115,7 +114,7 @@ def export_bcf(file_path: str) -> bool: True if the export was successful, false otherwise. """ -def export_ifc(element_id_list: List[ElementId], file_path: str) -> bool: +def export_ifc(element_id_list: list[ElementId], file_path: str) -> bool: """Export IFC file. Parameters: @@ -136,7 +135,7 @@ def export_ifc(element_id_list: List[ElementId], file_path: str) -> bool: True if the export was successful, false otherwise. """ -def import_ifc_return_exchange_objects(file_path: str) -> List[ElementId]: +def import_ifc_return_exchange_objects(file_path: str) -> list[ElementId]: """Imports an IFC File and returns the ids of the Exchange Objects. Parameters: @@ -163,7 +162,7 @@ def set_storey_height(building: str, storey: str, height: float) -> None: >>> bc.set_storey_height(building_name, storey_name, height_millimeters) """ -def convert_exchange_objects(exchange_objects: List[ElementId]) -> List[ElementId]: +def convert_exchange_objects(exchange_objects: list[ElementId]) -> list[ElementId]: """Converts a list of Exchange Objects to Cadwork Elements. Parameters: @@ -173,7 +172,7 @@ def convert_exchange_objects(exchange_objects: List[ElementId]) -> List[ElementI The list of Cadwork Element ids. """ -def export_ifc2x3_silently(element_id_list: List[ElementId], file_path: str) -> bool: +def export_ifc2x3_silently(element_id_list: list[ElementId], file_path: str) -> bool: """Export IFC2x3 silently. Parameters: @@ -184,7 +183,7 @@ def export_ifc2x3_silently(element_id_list: List[ElementId], file_path: str) -> True if the export was successful, false otherwise. """ -def export_ifc4_silently(element_id_list: List[ElementId], file_path: str) -> bool: +def export_ifc4_silently(element_id_list: list[ElementId], file_path: str) -> bool: """Exports IFC4 silently. Parameters: @@ -195,7 +194,7 @@ def export_ifc4_silently(element_id_list: List[ElementId], file_path: str) -> bo True if the export was successful, false otherwise. """ -def export_ifc2x3_silently_with_options(element_id_list: List[ElementId], file_path: str, options: ifc_options) -> bool: +def export_ifc2x3_silently_with_options(element_id_list: list[ElementId], file_path: str, options: ifc_options) -> bool: """Exports IFC2x3 silently with options. Parameters: @@ -207,7 +206,7 @@ def export_ifc2x3_silently_with_options(element_id_list: List[ElementId], file_p True if the export was successful, false otherwise. """ -def export_ifc4_silently_with_options(element_id_list: List[ElementId], file_path: str, options: ifc_options) -> bool: +def export_ifc4_silently_with_options(element_id_list: list[ElementId], file_path: str, options: ifc_options) -> bool: """Exports IFC4 silently with options. Parameters: @@ -219,14 +218,14 @@ def export_ifc4_silently_with_options(element_id_list: List[ElementId], file_pat True if the export was successful, false otherwise. """ -def update_bmt_structure_created_elements(element_id_list: List[ElementId]) -> None: +def update_bmt_structure_created_elements(element_id_list: list[ElementId]) -> None: """This function takes the specified elements and inserts them into the BMT structure and adds them to the active building and storey. Parameters: element_id_list: The list of element ids to be updated in the BMT structure. """ -def update_bmt_structure_building_storey(element_id_list: List[ElementId]) -> None: +def update_bmt_structure_building_storey(element_id_list: list[ElementId]) -> None: """This function takes the specified elements and inserts them into the BMT structure and adds them to the assigned Building and Storey. Parameters: @@ -240,7 +239,7 @@ def get_ifc_options() -> ifc_options: The IfcOptions object containing the current settings. """ -def set_building_and_storey(element_id_list: List[ElementId], building: str, storey: str) -> None: +def set_building_and_storey(element_id_list: list[ElementId], building: str, storey: str) -> None: """Set building and storey. Parameters: @@ -311,14 +310,14 @@ def get_ifc2x3_element_type_display_string(entity_type: ifc_2x3_element_type) -> The display string representation of the IFC2x3 element type. """ -def get_all_buildings() -> List[str]: +def get_all_buildings() -> list[str]: """Get all buildings. Returns: A list of all building. """ -def get_all_storeys(building: str) -> List[str]: +def get_all_storeys(building: str) -> list[str]: """Get all storeys. Parameters: @@ -360,7 +359,7 @@ def get_ifc_predefined_type(element_id: ElementId) -> 'ifc_predefined_type': """ -def set_ifc_predefined_type(element_id_list: List[ElementId], predefined_type: ifc_predefined_type) -> None: +def set_ifc_predefined_type(element_id_list: list[ElementId], predefined_type: ifc_predefined_type) -> None: """Set a predefined type to elements. Attention, if you change the PredefinedType of the elements, you are responsible for ensuring that valid types are set. Parameters: diff --git a/src/bim_controller/py.typed b/src/bim_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/cadwork/__init__.pyi b/src/cadwork/__init__.pyi index aef0f2d..c8c40a3 100644 --- a/src/cadwork/__init__.pyi +++ b/src/cadwork/__init__.pyi @@ -1,136 +1,186 @@ -from cadwork.rgb_color import rgb_color -from .attribute_display_settings import attribute_display_settings -from .bim_team_upload_result import bim_team_upload_result -from .bim_team_upload_result_code import bim_team_upload_result_code -from .btl_version import btl_version -from .camera_data import camera_data -from .coordinate_system_data import coordinate_system_data -from .division_zone_direction import division_zone_direction -from .double_shoulder_options import double_shoulder_options -from .edge_list import edge_list -from .element_grouping_type import element_grouping_type -from .element_module_detail import element_module_detail -from .element_module_properties import element_module_properties -from .element_type import element_type -from .extended_settings import extended_settings -from .facet_list import facet_list -from .heel_shoulder_beam_geometry import heel_shoulder_beam_geometry -from .heel_shoulder_options import heel_shoulder_options -from .hundegger_machine_type import hundegger_machine_type -from .ifc_2x3_element_type import ifc_2x3_element_type -from .ifc_element_combine_behaviour import ifc_element_combine_behaviour -from .ifc_material_definition import ifc_material_definition -from .ifc_options import ifc_options -from .ifc_options_aggregation import ifc_options_aggregation -from .ifc_options_level_of_detail import ifc_options_level_of_detail -from .ifc_options_project_data import ifc_options_project_data -from .ifc_options_properties import ifc_options_properties -from .ifc_predefined_type import ifc_predefined_type -from .import_3dc_options import import_3dc_options -from .layer_settings import layer_settings -from .multi_layer_type import multi_layer_type -from .node_symbol import node_symbol -from .point_3d import point_3d -from .polygon_list import polygon_list -from .process_type import process_type -from .projection_type import projection_type -from .rhino_options import rhino_options -from .shortcut_key import shortcut_key -from .shortcut_key_modifier import shortcut_key_modifier -from .shoulder_beam_geometry import shoulder_beam_geometry -from .shoulder_drilling_orientation import shoulder_drilling_orientation -from .shoulder_options import shoulder_options -from .standard_element_type import standard_element_type -from .text_element_type import text_element_type -from .text_object_options import text_object_options -from .vertex_list import vertex_list -from .weinmann_mfb_version import weinmann_mfb_version -from .window_geometry import window_geometry -from .element_map_query import element_map_query -from .element_filter import element_filter -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 +"""cadwork Python API type definitions. -# These assignments make each type accessible through both import styles: -# 1. Direct import: from cadwork import point_3d -# 2. Module access: import cadwork; cadwork.point_3d(...) -# Without these assignments, the classes would be imported but not exposed as callable attributes -# of the cadwork module, resulting in "not callable" errors/warnings when using the module access style. +This module re-exports all cadwork data types, enumerations, and utility classes. -attribute_display_settings = attribute_display_settings -bim_team_upload_result = bim_team_upload_result -bim_team_upload_result_code = bim_team_upload_result_code -btl_version = btl_version -camera_data = camera_data -coordinate_system_data = coordinate_system_data -division_zone_direction = division_zone_direction -double_shoulder_options = double_shoulder_options -edge_list = edge_list -element_grouping_type = element_grouping_type -element_module_detail = element_module_detail -element_module_properties = element_module_properties -element_type = element_type -extended_settings = extended_settings -facet_list = facet_list -heel_shoulder_beam_geometry = heel_shoulder_beam_geometry -heel_shoulder_options = heel_shoulder_options -hundegger_machine_type = hundegger_machine_type -ifc_2x3_element_type = ifc_2x3_element_type -ifc_element_combine_behaviour = ifc_element_combine_behaviour -ifc_material_definition = ifc_material_definition -ifc_options = ifc_options -ifc_options_aggregation = ifc_options_aggregation -ifc_options_level_of_detail = ifc_options_level_of_detail -ifc_options_project_data = ifc_options_project_data -ifc_options_properties = ifc_options_properties -ifc_predefined_type = ifc_predefined_type -import_3dc_options = import_3dc_options -layer_settings = layer_settings -multi_layer_type = multi_layer_type -node_symbol = node_symbol -point_3d = point_3d -polygon_list = polygon_list -process_type = process_type -projection_type = projection_type -rhino_options = rhino_options -shortcut_key = shortcut_key -shortcut_key_modifier = shortcut_key_modifier -shoulder_beam_geometry = shoulder_beam_geometry -shoulder_drilling_orientation = shoulder_drilling_orientation -shoulder_options = shoulder_options -standard_element_type = standard_element_type -text_element_type = text_element_type -text_object_options = text_object_options -vertex_list = vertex_list -weinmann_mfb_version = weinmann_mfb_version -window_geometry = window_geometry -element_map_query = element_map_query -element_filter = element_filter -hit_result = hit_result -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 +Usage:: + from cadwork import point_3d, element_type -def get_auto_attribute_elements() -> List[int]: - """Get ontly the elements of the selected types in the attribute manager dialog. All other elements will - get an empty attribute value. - - Returns: - List[int]: element IDs + # or + import cadwork + p = cadwork.point_3d(0.0, 0.0, 0.0) """ +# --- Type aliases --- +from .api_types import AxisId as AxisId +from .api_types import ColorId as ColorId +from .api_types import ElementId as ElementId +from .api_types import EndtypeId as EndtypeId +from .api_types import MaterialId as MaterialId +from .api_types import MenuIndex as MenuIndex +from .api_types import MultiLayerSetId as MultiLayerSetId +from .api_types import ReferenceSide as ReferenceSide +from .api_types import UnsignedInt as UnsignedInt +from .api_types import UserAttributeId as UserAttributeId + +# --- Data classes --- +from .active_point_result import active_point_result as active_point_result +from .attribute_display_settings import attribute_display_settings as attribute_display_settings +from .bim_team_upload_result import bim_team_upload_result as bim_team_upload_result +from .camera_data import camera_data as camera_data +from .coordinate_system_data import coordinate_system_data as coordinate_system_data +from .double_shoulder_options import double_shoulder_options as double_shoulder_options +from .edge_list import edge_list as edge_list +from .element_filter import element_filter as element_filter +from .element_map_query import element_map_query as element_map_query +from .element_module_detail import element_module_detail as element_module_detail +from .element_module_properties import element_module_properties as element_module_properties +from .extended_settings import extended_settings as extended_settings +from .facet_list import facet_list as facet_list +from .heel_shoulder_beam_geometry import heel_shoulder_beam_geometry as heel_shoulder_beam_geometry +from .heel_shoulder_options import heel_shoulder_options as heel_shoulder_options +from .hit_result import hit_result as hit_result +from .ifc_material_definition import ifc_material_definition as ifc_material_definition +from .ifc_options import ifc_options as ifc_options +from .ifc_options_aggregation import ifc_options_aggregation as ifc_options_aggregation +from .ifc_options_level_of_detail import ifc_options_level_of_detail as ifc_options_level_of_detail +from .ifc_options_project_data import ifc_options_project_data as ifc_options_project_data +from .ifc_options_properties import ifc_options_properties as ifc_options_properties +from .import_3dc_options import import_3dc_options as import_3dc_options +from .layer_settings import layer_settings as layer_settings +from .point import point as point +from .point_3d import point_3d as point_3d +from .polygon_list import polygon_list as polygon_list +from .rhino_options import rhino_options as rhino_options +from .rgb_color import rgb_color as rgb_color +from .shoulder_beam_geometry import shoulder_beam_geometry as shoulder_beam_geometry +from .shoulder_options import shoulder_options as shoulder_options +from .text_object_options import text_object_options as text_object_options +from .vertex_list import vertex_list as vertex_list +from .window_geometry import window_geometry as window_geometry + +# --- Enumerations --- +from .bim_team_upload_result_code import bim_team_upload_result_code as bim_team_upload_result_code +from .btl_version import btl_version as btl_version +from .dimension_base_format import dimension_base_format as dimension_base_format +from .display_attribute import display_attribute as display_attribute +from .division_zone_direction import division_zone_direction as division_zone_direction +from .dxf_export_version import dxf_export_version as dxf_export_version +from .dxf_layer_format_type import dxf_layer_format_type as dxf_layer_format_type +from .element_grouping_type import element_grouping_type as element_grouping_type +from .element_type import element_type as element_type +from .hundegger_machine_type import hundegger_machine_type as hundegger_machine_type +from .ifc_2x3_element_type import ifc_2x3_element_type as ifc_2x3_element_type +from .ifc_element_combine_behaviour import ifc_element_combine_behaviour as ifc_element_combine_behaviour +from .ifc_predefined_type import ifc_predefined_type as ifc_predefined_type +from .multi_layer_cover_type import multi_layer_cover_type as multi_layer_cover_type +from .multi_layer_subtype import multi_layer_subtype as multi_layer_subtype +from .multi_layer_type import multi_layer_type as multi_layer_type +from .node_symbol import node_symbol as node_symbol +from .process_type import process_type as process_type +from .projection_type import projection_type as projection_type +from .shortcut_key import shortcut_key as shortcut_key +from .shortcut_key_modifier import shortcut_key_modifier as shortcut_key_modifier +from .shoulder_drilling_orientation import shoulder_drilling_orientation as shoulder_drilling_orientation +from .standard_element_type import standard_element_type as standard_element_type +from .text_element_type import text_element_type as text_element_type +from .vba_catalog_item_type import vba_catalog_item_type as vba_catalog_item_type +from .weinmann_mfb_version import weinmann_mfb_version as weinmann_mfb_version + +__all__ = [ + # Type aliases + "AxisId", + "ColorId", + "ElementId", + "EndtypeId", + "MaterialId", + "MenuIndex", + "MultiLayerSetId", + "ReferenceSide", + "UnsignedInt", + "UserAttributeId", + # Data classes + "active_point_result", + "attribute_display_settings", + "bim_team_upload_result", + "camera_data", + "coordinate_system_data", + "double_shoulder_options", + "edge_list", + "element_filter", + "element_map_query", + "element_module_detail", + "element_module_properties", + "extended_settings", + "facet_list", + "heel_shoulder_beam_geometry", + "heel_shoulder_options", + "hit_result", + "ifc_material_definition", + "ifc_options", + "ifc_options_aggregation", + "ifc_options_level_of_detail", + "ifc_options_project_data", + "ifc_options_properties", + "import_3dc_options", + "layer_settings", + "point", + "point_3d", + "polygon_list", + "rhino_options", + "rgb_color", + "shoulder_beam_geometry", + "shoulder_options", + "text_object_options", + "vertex_list", + "window_geometry", + # Enumerations + "bim_team_upload_result_code", + "btl_version", + "dimension_base_format", + "display_attribute", + "division_zone_direction", + "dxf_export_version", + "dxf_layer_format_type", + "element_grouping_type", + "element_type", + "hundegger_machine_type", + "ifc_2x3_element_type", + "ifc_element_combine_behaviour", + "ifc_predefined_type", + "multi_layer_cover_type", + "multi_layer_subtype", + "multi_layer_type", + "node_symbol", + "process_type", + "projection_type", + "shortcut_key", + "shortcut_key_modifier", + "shoulder_drilling_orientation", + "standard_element_type", + "text_element_type", + "vba_catalog_item_type", + "weinmann_mfb_version", + # Module-level functions + "get_auto_attribute_elements", + "set_auto_attribute", +] + + +def get_auto_attribute_elements() -> list[int]: + """Get only the elements of the selected types in the attribute manager dialog. + + All other elements will get an empty attribute value. + + Returns: + list[int]: element IDs + """ + -def set_auto_attribute(elements: List[int], value: str) -> None: - """Set the auto attribute to the selected element types. +def set_auto_attribute(elements: list[int], value: str) -> None: + """Set the auto attribute to the selected element types. - Args: - elements (List[int]): element IDs - value (str): attribute + Parameters: + elements: element IDs + value: attribute value """ diff --git a/src/cadwork/active_point_result.pyi b/src/cadwork/active_point_result.pyi new file mode 100644 index 0000000..a97b157 --- /dev/null +++ b/src/cadwork/active_point_result.pyi @@ -0,0 +1,17 @@ +from dataclasses import dataclass +from cadwork.point_3d import point_3d + +@dataclass(frozen=True) +class active_point_result: + """Result of an active point query. + + Attributes: + has_point: Whether a valid point was found. + point: The point coordinates, or None if no point was found. + """ + + has_point: bool + point: point_3d | None = None + + def __bool__(self) -> bool: + """Returns True if a valid point was found.""" diff --git a/src/cadwork/api_types.pyi b/src/cadwork/api_types.pyi index 7e1d19d..19531d6 100644 --- a/src/cadwork/api_types.pyi +++ b/src/cadwork/api_types.pyi @@ -1,22 +1,25 @@ -from typing import Annotated +from typing import TypeAlias -UnsignedInt = Annotated[int, "Must be >= 0"] -"""""" -MaterialId = Annotated[int, "Must be >= 0"] -"""""" -ColorId = Annotated[int, "Must be >= 0"] -"""""" -EndtypeId = Annotated[int, "Must be >= 0"] -"""""" -AxisId = Annotated[int, "Must be >= 0"] -"""""" -MenuIndex = Annotated[int, "Normal int"] -"""""" -ReferenceSide = Annotated[int, "Must be >= 0"] -"""""" -MultiLayerSetId = Annotated[int, "Must be >= 0"] -"""""" -UserAttributeId = Annotated[int, "Must be >= 0"] -"""""" -ElementId = Annotated[int, "Must be >= 0"] -"""""" \ No newline at end of file +UnsignedInt: TypeAlias = int +MaterialId: TypeAlias = int +ColorId: TypeAlias = int +EndtypeId: TypeAlias = int +AxisId: TypeAlias = int +MenuIndex: TypeAlias = int +ReferenceSide: TypeAlias = int +MultiLayerSetId: TypeAlias = int +UserAttributeId: TypeAlias = int +ElementId: TypeAlias = int + +__all__ = [ + "UnsignedInt", + "MaterialId", + "ColorId", + "EndtypeId", + "AxisId", + "MenuIndex", + "ReferenceSide", + "MultiLayerSetId", + "UserAttributeId", + "ElementId", +] diff --git a/src/cadwork/hit_result.pyi b/src/cadwork/hit_result.pyi index ab4918d..1272559 100644 --- a/src/cadwork/hit_result.pyi +++ b/src/cadwork/hit_result.pyi @@ -1,22 +1,21 @@ -from typing import List -from cadwork import point_3d +from cadwork.point_3d import point_3d class hit_result: - def get_hit_element_ids(self) -> List[int]: - """get hit element ids + def get_hit_element_ids(self) -> list[int]: + """Get hit element IDs. Returns: - List[int] + list[int]: element IDs that were hit. """ - def get_hit_vertices_by_element(self, element_id: int) -> List[point_3d]: - """get hit vertices by element + def get_hit_vertices_by_element(self, element_id: int) -> list[point_3d]: + """Get hit vertices for a specific element. Parameters: - element_id: element_id + element_id: The element ID. Returns: - List[point_3d] + list[point_3d]: vertices hit on the element. """ diff --git a/src/cadwork/ifc_options.pyi b/src/cadwork/ifc_options.pyi index 471d5d2..18ec643 100644 --- a/src/cadwork/ifc_options.pyi +++ b/src/cadwork/ifc_options.pyi @@ -1,35 +1,35 @@ -from cadwork import ifc_options_aggregation -from cadwork import ifc_options_level_of_detail -from cadwork import ifc_options_project_data -from cadwork import ifc_options_properties +from cadwork.ifc_options_aggregation import ifc_options_aggregation +from cadwork.ifc_options_level_of_detail import ifc_options_level_of_detail +from cadwork.ifc_options_project_data import ifc_options_project_data +from cadwork.ifc_options_properties import ifc_options_properties + class ifc_options: - - def get_ifc_options_properties(self) -> 'ifc_options_properties': - """get ifc options properties + + def get_ifc_options_properties(self) -> ifc_options_properties: + """Get IFC options properties. Returns: - 'ifc_options_properties' + ifc_options_properties: The IFC properties options. """ - def get_ifc_options_project_data(self) -> 'ifc_options_project_data': - """get ifc options project data + def get_ifc_options_project_data(self) -> ifc_options_project_data: + """Get IFC options project data. Returns: - 'ifc_options_project_data' + ifc_options_project_data: The IFC project data options. """ - def get_ifc_options_aggregation(self) -> 'ifc_options_aggregation': - """get ifc options aggregation + def get_ifc_options_aggregation(self) -> ifc_options_aggregation: + """Get IFC options aggregation. Returns: - 'ifc_options_aggregation' + ifc_options_aggregation: The IFC aggregation options. """ - def get_ifc_options_level_of_detail(self) -> 'ifc_options_level_of_detail': - """get ifc options level of detail + def get_ifc_options_level_of_detail(self) -> ifc_options_level_of_detail: + """Get IFC options level of detail. Returns: - 'ifc_options_level_of_detail' + ifc_options_level_of_detail: The IFC level of detail options. """ - diff --git a/src/cadwork/py.typed b/src/cadwork/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/cadwork/rgb_color.pyi b/src/cadwork/rgb_color.pyi new file mode 100644 index 0000000..cadba6e --- /dev/null +++ b/src/cadwork/rgb_color.pyi @@ -0,0 +1,21 @@ +class rgb_color: + """RGB color representation. + + Attributes: + r: Red component (0-255). + g: Green component (0-255). + b: Blue component (0-255). + """ + + r: int + g: int + b: int + + def __init__(self, r: int, g: int, b: int) -> None: + """Initialize an RGB color. + + Parameters: + r: Red component (0-255). + g: Green component (0-255). + b: Blue component (0-255). + """ diff --git a/src/connector_axis_controller/__init__.pyi b/src/connector_axis_controller/__init__.pyi index 9208955..5146280 100644 --- a/src/connector_axis_controller/__init__.pyi +++ b/src/connector_axis_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.point_3d import point_3d from cadwork.api_types import * from cadwork.vba_catalog_item_type import vba_catalog_item_type @@ -69,7 +68,7 @@ def clear_errors() -> None: """ -def update_axis_cutting_ability(axis_id_list: List[ElementId]) -> None: +def update_axis_cutting_ability(axis_id_list: list[ElementId]) -> None: """Updates the Connection Config (CuttingAbility) of Axis/VBAs. Parameters: @@ -189,7 +188,7 @@ def get_section_diameter(axis_id: ElementId, section_index: UnsignedInt) -> floa """ -def get_axis_items_guids(axis_id: ElementId) -> List[str]: +def get_axis_items_guids(axis_id: ElementId) -> list[str]: """Returns a list of GUIDs of all axis items. Parameters: @@ -323,7 +322,7 @@ def get_bolt_diameter(axis_id: ElementId) -> float: The bolt diameter. """ -def get_standard_connector_list() -> List[str]: +def get_standard_connector_list() -> list[str]: """Returns a list of all standard connectors. Returns: @@ -441,7 +440,7 @@ def get_intersection_count(intersection_index: UnsignedInt) -> int: The intersection count. """ -def get_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt) -> List[str]: +def get_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt) -> list[str]: """Get item GUIDs at intersection. Parameters: @@ -453,7 +452,7 @@ def get_item_guids_at_intersection(axis_id: ElementId, intersection_index: Unsig """ -def set_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt, item_guids: List[str]) -> None: +def set_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt, item_guids: list[str]) -> None: """Sets item GUIDs at intersection. Parameters: diff --git a/src/connector_axis_controller/py.typed b/src/connector_axis_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/dimension_controller/__init__.pyi b/src/dimension_controller/__init__.pyi index f802513..c276360 100644 --- a/src/dimension_controller/__init__.pyi +++ b/src/dimension_controller/__init__.pyi @@ -1,9 +1,8 @@ -from typing import List from cadwork.point_3d import point_3d from cadwork.dimension_base_format import dimension_base_format from cadwork.api_types import * -def create_dimension(xl: point_3d, plane_normal: point_3d, distance: point_3d, dimension_points: List[point_3d]) -> ElementId: +def create_dimension(xl: point_3d, plane_normal: point_3d, distance: point_3d, dimension_points: list[point_3d]) -> ElementId: """Creates a dimension element to measure distances on 3D parts. The dimension is drawn on a plane defined by its normal and offset distance. Points added to the dimension are projected @@ -40,7 +39,7 @@ def create_dimension(xl: point_3d, plane_normal: point_3d, distance: point_3d, d The element id of the created dimension element. """ -def set_orientation(element_id_list: List[ElementId], view_dir: point_3d, view_dir_up: point_3d) -> None: +def set_orientation(element_id_list: list[ElementId], view_dir: point_3d, view_dir_up: point_3d) -> None: """Sets the orientation of dimension elements. Parameters: @@ -59,7 +58,7 @@ def add_segment(element_id: ElementId, segment: point_3d) -> None: segment: The point to add to the dimension (despite the parameter name, this is a point, not a segment). """ -def set_precision(element_id_list: List[ElementId], precision: UnsignedInt) -> None: +def set_precision(element_id_list: list[ElementId], precision: UnsignedInt) -> None: """Sets the precision/decimal places of a dimension element. Parameters: @@ -67,7 +66,7 @@ def set_precision(element_id_list: List[ElementId], precision: UnsignedInt) -> N precision: The precision/decimal places to set. """ -def set_text_size(element_id_list: List[ElementId], text_size: float) -> None: +def set_text_size(element_id_list: list[ElementId], text_size: float) -> None: """Sets the text size of a dimension element. Parameters: @@ -75,7 +74,7 @@ def set_text_size(element_id_list: List[ElementId], text_size: float) -> None: text_size: The text size to set. """ -def set_line_thickness(element_id_list: List[ElementId], thickness: float) -> None: +def set_line_thickness(element_id_list: list[ElementId], thickness: float) -> None: """Sets the line thickness of a dimension element. Parameters: @@ -83,7 +82,7 @@ def set_line_thickness(element_id_list: List[ElementId], thickness: float) -> No thickness: The line thickness to set. """ -def set_total_dimension(element_id_list: List[ElementId], total: bool) -> None: +def set_total_dimension(element_id_list: list[ElementId], total: bool) -> None: """Set whether the visualisation of the overall dimension is set for a dimension element. Parameters: @@ -91,7 +90,7 @@ def set_total_dimension(element_id_list: List[ElementId], total: bool) -> None: total: True if the visualisation is set, false otherwise. """ -def set_text_color(element_id_list: List[ElementId], color_id: ColorId) -> None: +def set_text_color(element_id_list: list[ElementId], color_id: ColorId) -> None: """Sets the text color of a dimension element. Parameters: @@ -99,7 +98,7 @@ def set_text_color(element_id_list: List[ElementId], color_id: ColorId) -> None: color_id: The color id to set. """ -def set_line_color(element_id_list: List[ElementId], color_id: ColorId) -> None: +def set_line_color(element_id_list: list[ElementId], color_id: ColorId) -> None: """Sets the line color of a dimension element. Parameters: @@ -107,7 +106,7 @@ def set_line_color(element_id_list: List[ElementId], color_id: ColorId) -> None: color_id: The color id to set. """ -def set_default_anchor_length(element_id_list: List[ElementId], length: float) -> None: +def set_default_anchor_length(element_id_list: list[ElementId], length: float) -> None: """Sets the default anchor length of a dimension element. Parameters: @@ -115,7 +114,7 @@ def set_default_anchor_length(element_id_list: List[ElementId], length: float) - length: The default anchor length to set. """ -def set_distance(element_id_list: List[ElementId], distance: point_3d) -> None: +def set_distance(element_id_list: list[ElementId], distance: point_3d) -> None: """Sets the distance vector between the points and the line. Parameters: @@ -123,7 +122,7 @@ def set_distance(element_id_list: List[ElementId], distance: point_3d) -> None: distance: The distance vector to set. """ -def shift_distance_and_texts(element_id_list: List[ElementId], shifted: bool) -> None: +def shift_distance_and_texts(element_id_list: list[ElementId], shifted: bool) -> None: """Sets if distance and texts are shifted. Parameters: @@ -131,7 +130,7 @@ def shift_distance_and_texts(element_id_list: List[ElementId], shifted: bool) -> shifted: True if distance and texts are shifted, false otherwise. """ -def get_dimension_points(element_id: ElementId) -> List[point_3d]: +def get_dimension_points(element_id: ElementId) -> list[point_3d]: """Gets all dimension points ordered by dimension direction. Parameters: diff --git a/src/dimension_controller/py.typed b/src/dimension_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/element_controller/__init__.pyi b/src/element_controller/__init__.pyi index ba88b37..83d0038 100644 --- a/src/element_controller/__init__.pyi +++ b/src/element_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List, Dict from cadwork.edge_list import edge_list from cadwork.element_module_properties import element_module_properties from cadwork.facet_list import facet_list @@ -16,21 +15,21 @@ from cadwork.heel_shoulder_options import heel_shoulder_options from cadwork.double_shoulder_options import double_shoulder_options from cadwork.api_types import * -def delete_elements(element_id_list: List[ElementId]) -> None: +def delete_elements(element_id_list: list[ElementId]) -> None: """Deletes the specified elements. Parameters: element_id_list: The element id list. """ -def join_elements(element_id_list: List[ElementId]) -> None: +def join_elements(element_id_list: list[ElementId]) -> None: """Joins the specified elements together. Parameters: element_id_list: The element id list. """ -def join_top_level_elements(element_id_list: List[ElementId]) -> None: +def join_top_level_elements(element_id_list: list[ElementId]) -> None: """Joins the specified top-level elements together. Parameters: @@ -310,7 +309,7 @@ def create_node(node_position: point_3d) -> ElementId: The ID of the created node. """ -def solder_elements(element_id_list: List[ElementId]) -> List[ElementId]: +def solder_elements(element_id_list: list[ElementId]) -> list[ElementId]: """Solders elements together. Parameters: @@ -320,35 +319,35 @@ def solder_elements(element_id_list: List[ElementId]) -> List[ElementId]: The list of soldered element IDs. """ -def convert_beam_to_panel(element_id_list: List[ElementId]) -> None: +def convert_beam_to_panel(element_id_list: list[ElementId]) -> None: """Converts beams to panels. Parameters: element_id_list: The element id list. """ -def convert_panel_to_beam(element_id_list: List[ElementId]) -> None: +def convert_panel_to_beam(element_id_list: list[ElementId]) -> None: """Converts panels to beams. Parameters: element_id_list: The element id list. """ -def delete_all_element_end_types(element_id_list: List[ElementId]) -> None: +def delete_all_element_end_types(element_id_list: list[ElementId]) -> None: """Deletes all end types of the elements. Parameters: element_id_list: The element id list. """ -def delete_all_element_processes(element_id_list: List[ElementId]) -> None: +def delete_all_element_processes(element_id_list: list[ElementId]) -> None: """Deletes all processes of the elements. Parameters: element_id_list: The element id list. """ -def move_element(element_id_list: List[ElementId], move_vector: point_3d) -> None: +def move_element(element_id_list: list[ElementId], move_vector: point_3d) -> None: """Moves the provided element by a specified vector. Parameters: @@ -403,7 +402,7 @@ def create_text_object(text: str, position: point_3d, x_local_direction: point_3 The ID of the created text object. """ -def copy_elements(element_id_list: List[ElementId], copy_vector: point_3d) -> List[int]: +def copy_elements(element_id_list: list[ElementId], copy_vector: point_3d) -> list[int]: """Copy a list of elements. Parameters: @@ -414,7 +413,7 @@ def copy_elements(element_id_list: List[ElementId], copy_vector: point_3d) -> Li The IDs of the copied elements. """ -def rotate_elements(element_id_list: List[ElementId], origin: point_3d, rotation_axis: point_3d, rotation_angle: float) -> None: +def rotate_elements(element_id_list: list[ElementId], origin: point_3d, rotation_axis: point_3d, rotation_angle: float) -> None: """Rotate the provided elements around a specified axis. Parameters: @@ -424,7 +423,7 @@ def rotate_elements(element_id_list: List[ElementId], origin: point_3d, rotation rotation_angle: The angle by which to rotate the elements un degree. """ -def subtract_elements(hard_elements: List[ElementId], soft_elements: List[ElementId]) -> List[ElementId]: +def subtract_elements(hard_elements: list[ElementId], soft_elements: list[ElementId]) -> list[ElementId]: """Subtracts a list of "soft" elements from a list of "hard" elements. Parameters: @@ -445,7 +444,7 @@ def check_element_id(element_id: ElementId) -> bool: True if the element ID exists, false otherwise. """ -def start_element_module_calculation(covers: List[ElementId]) -> None: +def start_element_module_calculation(covers: list[ElementId]) -> None: """Starts the calculation of the element module for a list of covers. Parameters: @@ -469,7 +468,7 @@ def get_element_from_cadwork_guid(cadwork_guid: str) -> ElementId: The element ID. """ -def add_elements_to_undo(element_id_list: List[ElementId], cmd: int) -> None: +def add_elements_to_undo(element_id_list: list[ElementId], cmd: int) -> None: """Add elements to the undo stack. Parameters: @@ -485,28 +484,28 @@ def make_redo() -> None: """Performs a redo operation, reapplying the last undone change. """ -def split_elements(element_id_list: List[ElementId]) -> None: +def split_elements(element_id_list: list[ElementId]) -> None: """Splits elements. Parameters: element_id_list: The elements to split. """ -def set_line_to_marking_line(element_id_list: List[ElementId]) -> None: +def set_line_to_marking_line(element_id_list: list[ElementId]) -> None: """Sets the line to the marking line. Parameters: element_id_list: The elements to modify. """ -def set_line_to_normal_line(element_id_list: List[ElementId]) -> None: +def set_line_to_normal_line(element_id_list: list[ElementId]) -> None: """Sets the line to the normal line. Parameters: element_id_list: The elements to modify. """ -def create_auto_export_solid_from_standard(element_id_list: List[ElementId], output_name: str, standard_element_name: str) -> ElementId: +def create_auto_export_solid_from_standard(element_id_list: list[ElementId], output_name: str, standard_element_name: str) -> ElementId: """Creates an auto export solid from a standard element. Parameters: @@ -518,7 +517,7 @@ def create_auto_export_solid_from_standard(element_id_list: List[ElementId], out The element ID of the created solid. """ -def set_element_module_properties_for_elements(element_id_list: List[ElementId], properties: element_module_properties) -> None: +def set_element_module_properties_for_elements(element_id_list: list[ElementId], properties: element_module_properties) -> None: """Sets the element module properties for elements. Parameters: @@ -550,7 +549,7 @@ def create_text_object_with_font(text: str, position: point_3d, x_local_directio The element ID of the created text object. """ -def apply_transformation_coordinate(element_id_list: List[ElementId], old_point: point_3d, old_x_local_direction: point_3d, old_y_local_direction: point_3d, new_point: point_3d, new_x_local_direction: point_3d, new_y_local_direction: point_3d) -> None: +def apply_transformation_coordinate(element_id_list: list[ElementId], old_point: point_3d, old_x_local_direction: point_3d, old_y_local_direction: point_3d, new_point: point_3d, new_x_local_direction: point_3d, new_y_local_direction: point_3d) -> None: """Apply transformation coordinate to elements. Parameters: @@ -563,49 +562,49 @@ def apply_transformation_coordinate(element_id_list: List[ElementId], old_point: new_y_local_direction: The new Y local direction. """ -def delete_elements_with_undo(element_id_list: List[ElementId]) -> None: +def delete_elements_with_undo(element_id_list: list[ElementId]) -> None: """Deletes the provided elements with undo functionality. Parameters: element_id_list: The elements to delete. """ -def add_created_elements_to_undo(element_id_list: List[ElementId]) -> None: +def add_created_elements_to_undo(element_id_list: list[ElementId]) -> None: """Adds created elements to the undo stack. Parameters: element_id_list: The elements to add. """ -def add_modified_elements_to_undo(element_id_list: List[ElementId]) -> None: +def add_modified_elements_to_undo(element_id_list: list[ElementId]) -> None: """Adds modified elements to the undo stack. Parameters: element_id_list: The elements to add. """ -def recreate_elements(element_id_list: List[ElementId]) -> None: +def recreate_elements(element_id_list: list[ElementId]) -> None: """Recreate elements based on the provided list. Parameters: element_id_list: The elements to recreate. """ -def create_multi_wall(element_id_list: List[ElementId]) -> None: +def create_multi_wall(element_id_list: list[ElementId]) -> None: """Creates a multi-wall structure. Parameters: element_id_list: The elements to use in the multi-wall structure. """ -def get_user_element_ids() -> List[ElementId]: +def get_user_element_ids() -> list[ElementId]: """Gets a list of user element IDs. Returns: The user element IDs. """ -def get_user_element_ids_with_existing(element_id_list: List[ElementId]) -> List[ElementId]: +def get_user_element_ids_with_existing(element_id_list: list[ElementId]) -> list[ElementId]: """Retrieve a list of user element IDs that exist in the provided list. Parameters: @@ -619,7 +618,7 @@ def clear_errors() -> None: """Clears all errors. """ -def glide_elements(element_id_list: List[ElementId], glide_origin_point: point_3d) -> None: +def glide_elements(element_id_list: list[ElementId], glide_origin_point: point_3d) -> None: """Glides elements to a specified point. Parameters: @@ -667,7 +666,7 @@ def cut_element_with_plane(element_id: ElementId, cut_plane_normal_vector: point True if the cut operation was successful, false otherwise. """ -def create_circular_mep(diameter: float, points: List[point_3d]) -> ElementId: +def create_circular_mep(diameter: float, points: list[point_3d]) -> ElementId: """Create a circular MEP (Mechanical, Electrical, and Plumbing) element. Parameters: @@ -678,7 +677,7 @@ def create_circular_mep(diameter: float, points: List[point_3d]) -> ElementId: The ID of the created circular MEP element. """ -def create_rectangular_mep(width: float, depth: float, points: List[point_3d]) -> ElementId: +def create_rectangular_mep(width: float, depth: float, points: list[point_3d]) -> ElementId: """Create a rectangular MEP (Mechanical, Electrical, and Plumbing) element. Parameters: @@ -727,7 +726,7 @@ def slice_element_with_plane(element_id: ElementId, cut_plane_normal_vector: poi True if the slicing operation was successful, false otherwise. """ -def create_auto_container_from_standard(element_id_list: List[ElementId], output_name: str, standard_element_name: str) -> ElementId: +def create_auto_container_from_standard(element_id_list: list[ElementId], output_name: str, standard_element_name: str) -> ElementId: """Create an auto container from a standard element. Parameters: @@ -739,7 +738,7 @@ def create_auto_container_from_standard(element_id_list: List[ElementId], output The id of the created auto container element. """ -def create_auto_export_solid_from_standard_with_reference(element_id_list: List[ElementId], output_name: str, standard_element_name: str, reference_id: ElementId) -> ElementId: +def create_auto_export_solid_from_standard_with_reference(element_id_list: list[ElementId], output_name: str, standard_element_name: str, reference_id: ElementId) -> ElementId: """Creates an auto export solid from a standard element with a reference. Parameters: @@ -752,7 +751,7 @@ def create_auto_export_solid_from_standard_with_reference(element_id_list: List[ The id of the created auto export solid element. """ -def create_auto_container_from_standard_with_reference(element_id_list: List[ElementId], output_name: str, standard_element_name: str, reference_id: ElementId) -> ElementId: +def create_auto_container_from_standard_with_reference(element_id_list: list[ElementId], output_name: str, standard_element_name: str, reference_id: ElementId) -> ElementId: """Creates an auto container from a standard element with a reference. Parameters: @@ -785,7 +784,7 @@ def create_surface(surface_vertices: vertex_list) -> ElementId: The ID of the created surface element. """ -def stretch_start_facet(element_id_list: List[ElementId], stretch_vector: point_3d) -> None: +def stretch_start_facet(element_id_list: list[ElementId], stretch_vector: point_3d) -> None: """Stretch the start facet of the given elements. Parameters: @@ -793,7 +792,7 @@ def stretch_start_facet(element_id_list: List[ElementId], stretch_vector: point_ stretch_vector: A vector that defines the stretch direction and distance. """ -def stretch_end_facet(element_id_list: List[ElementId], stretch_vector: point_3d) -> None: +def stretch_end_facet(element_id_list: list[ElementId], stretch_vector: point_3d) -> None: """Stretch the end facet of the given elements. Parameters: @@ -801,7 +800,7 @@ def stretch_end_facet(element_id_list: List[ElementId], stretch_vector: point_3d stretch_vector: A vector that defines the stretch direction and distance. """ -def set_export_solid_contents(export_solid_id: ElementId, element_id_list: List[ElementId]) -> None: +def set_export_solid_contents(export_solid_id: ElementId, element_id_list: list[ElementId]) -> None: """Sets the contents of an export solid. Parameters: @@ -809,7 +808,7 @@ def set_export_solid_contents(export_solid_id: ElementId, element_id_list: List[ element_id_list: The list of element IDs to set as the contents of the export solid. """ -def set_container_contents(container_id: ElementId, element_id_list: List[ElementId]) -> None: +def set_container_contents(container_id: ElementId, element_id_list: list[ElementId]) -> None: """Sets the contents of a container. Parameters: @@ -817,7 +816,7 @@ def set_container_contents(container_id: ElementId, element_id_list: List[Elemen element_id_list: The list of element IDs to set as the contents of the container. """ -def set_parent_opening_variants_opening_angle(element_id_list: List[ElementId], angle: float) -> None: +def set_parent_opening_variants_opening_angle(element_id_list: list[ElementId], angle: float) -> None: """Sets the opening angle of the parent opening variants. Parameters: @@ -825,7 +824,7 @@ def set_parent_opening_variants_opening_angle(element_id_list: List[ElementId], angle: The opening angle to set. """ -def mirror_move_elements(element_id_list: List[ElementId], plane: point_3d, plane_distance: float) -> None: +def mirror_move_elements(element_id_list: list[ElementId], plane: point_3d, plane_distance: float) -> None: """Mirrors and moves elements across a plane. Parameters: @@ -834,7 +833,7 @@ def mirror_move_elements(element_id_list: List[ElementId], plane: point_3d, plan plane_distance: The distance from the plane. """ -def mirror_copy_elements(element_id_list: List[ElementId], plane: point_3d, plane_distance: float) -> List[ElementId]: +def mirror_copy_elements(element_id_list: list[ElementId], plane: point_3d, plane_distance: float) -> list[ElementId]: """Copies elements by mirroring them across a plane. Parameters: @@ -989,7 +988,7 @@ def create_standard_steel_vectors(standard_element_name: str, length: float, sta The id of the created standard steel element. """ -def move_element_with_undo(element_id_list: List[ElementId], vector: point_3d) -> None: +def move_element_with_undo(element_id_list: list[ElementId], vector: point_3d) -> None: """Moves an element with undo functionality. Parameters: @@ -1031,7 +1030,7 @@ def create_normal_axis_vectors(length: float, starting_point: point_3d, axis_dir The id of the created normal axis. """ -def convert_bolt_to_standardconnector(element_id_list: List[ElementId], standard_element_name: str) -> None: +def convert_bolt_to_standardconnector(element_id_list: list[ElementId], standard_element_name: str) -> None: """Converts bolts to standard connectors. Parameters: @@ -1072,14 +1071,14 @@ def extrude_surface_to_beam_vector(surface: ElementId, vector: point_3d) -> Elem The id of the created beam element. """ -def convert_container_to_container_block(element_id_list: List[ElementId]) -> None: +def convert_container_to_container_block(element_id_list: list[ElementId]) -> None: """Converts a container to a container block. Parameters: element_id_list: The list of elements to convert. """ -def create_bounding_box_local(reference_element: ElementId, element_id_list: List[ElementId]) -> ElementId: +def create_bounding_box_local(reference_element: ElementId, element_id_list: list[ElementId]) -> ElementId: """Creates a local bounding box for a list of elements relative to a reference element. Parameters: @@ -1090,7 +1089,7 @@ def create_bounding_box_local(reference_element: ElementId, element_id_list: Lis The ID of the created bounding box element. """ -def create_bounding_box_global(element_id_list: List[ElementId]) -> ElementId: +def create_bounding_box_global(element_id_list: list[ElementId]) -> ElementId: """Creates a global bounding box for a list of elements. Parameters: @@ -1100,28 +1099,28 @@ def create_bounding_box_global(element_id_list: List[ElementId]) -> ElementId: The ID of the created bounding box element. """ -def convert_auxiliary_to_panel(element_id_list: List[ElementId]) -> None: +def convert_auxiliary_to_panel(element_id_list: list[ElementId]) -> None: """Converts auxiliary elements to panel. Parameters: element_id_list: The list of elements to convert. """ -def convert_auxiliary_to_beam(element_id_list: List[ElementId]) -> None: +def convert_auxiliary_to_beam(element_id_list: list[ElementId]) -> None: """Converts auxiliary elements to beams. Parameters: element_id_list: The list of elements to convert. """ -def auto_set_rough_volume_situation(element_id_list: List[ElementId]) -> None: +def auto_set_rough_volume_situation(element_id_list: list[ElementId]) -> None: """Automatically sets the rough volume situation for a list of elements. Parameters: element_id_list: The list of elements to process. """ -def rough_volume_situation_manual(cover: ElementId, add_partner: List[ElementId], remove_partner: List[ElementId]) -> None: +def rough_volume_situation_manual(cover: ElementId, add_partner: list[ElementId], remove_partner: list[ElementId]) -> None: """Manually sets the rough volume situation for a cover element. Parameters: @@ -1130,14 +1129,14 @@ def rough_volume_situation_manual(cover: ElementId, add_partner: List[ElementId] remove_partner: The list of partner element IDs to remove. """ -def auto_set_parts_situation(element_id_list: List[ElementId]) -> None: +def auto_set_parts_situation(element_id_list: list[ElementId]) -> None: """Automatically sets the parts situation for a list of elements. Parameters: element_id_list: The list of elements to process. """ -def parts_situation_manual(cover: ElementId, add_childs: List[ElementId], remove_childs: List[ElementId]) -> None: +def parts_situation_manual(cover: ElementId, add_childs: list[ElementId], remove_childs: list[ElementId]) -> None: """Manually sets the parts situation for a cover element. Parameters: @@ -1146,21 +1145,21 @@ def parts_situation_manual(cover: ElementId, add_childs: List[ElementId], remove remove_childs: The list of child element IDs to remove. """ -def activate_rv_without_situation() -> List[ElementId]: +def activate_rv_without_situation() -> list[ElementId]: """Activates the rough volume situation for elements without a situation. Returns: The list of IDs of the elements for which the rough volume situation was activated. """ -def activate_parts_without_situation() -> List[ElementId]: +def activate_parts_without_situation() -> list[ElementId]: """Activates the parts situation for elements without a situation. Returns: The list of IDs of the elements for which the parts situation was activated. """ -def add_elements_to_detail(element_id_list: List[ElementId], detail: int) -> None: +def add_elements_to_detail(element_id_list: list[ElementId], detail: int) -> None: """Adds elements to a detail. Parameters: @@ -1168,7 +1167,7 @@ def add_elements_to_detail(element_id_list: List[ElementId], detail: int) -> Non detail: The ID of the detail. """ -def subtract_elements_with_undo(hard_element_id_list: List[ElementId], soft_element_id_list: List[ElementId], with_undo: bool) -> List[ElementId]: +def subtract_elements_with_undo(hard_element_id_list: list[ElementId], soft_element_id_list: list[ElementId], with_undo: bool) -> list[ElementId]: """Subtracts a list of "soft" elements from a list of "hard" elements with undo functionality. Parameters: @@ -1180,7 +1179,7 @@ def subtract_elements_with_undo(hard_element_id_list: List[ElementId], soft_elem The list of elements resulting from the subtraction. """ -def create_linear_optimization(element_id_list: List[ElementId], optimization_number: int, total_length: float, start_cut: float, end_cut: float, saw_kerf: float, is_production_list: bool) -> ElementId: +def create_linear_optimization(element_id_list: list[ElementId], optimization_number: int, total_length: float, start_cut: float, end_cut: float, saw_kerf: float, is_production_list: bool) -> ElementId: """create linear optimization Parameters: @@ -1196,14 +1195,14 @@ def create_linear_optimization(element_id_list: List[ElementId], optimization_nu The ID of the created linear optimization element. """ -def start_element_module_calculation_silently(covers: List[ElementId]) -> None: +def start_element_module_calculation_silently(covers: list[ElementId]) -> None: """Starts the calculation of the element module for a list of covers silently (without user interaction). Parameters: covers: The list of covers for which to start the element module calculation. """ -def replace_physical_drillings_with_drilling_axes(element_id_list: List[ElementId], mininum_diameter: float, maximum_diameter: float) -> List[ElementId]: +def replace_physical_drillings_with_drilling_axes(element_id_list: list[ElementId], mininum_diameter: float, maximum_diameter: float) -> list[ElementId]: """Replaces physical drillings with drilling axes based on diameter range. Parameters: @@ -1223,7 +1222,7 @@ def cut_element_with_processing_group(soft_element: ElementId, processing: Eleme processing: The ID of the processing group. """ -def add_element_to_detail(element_id_list: List[ElementId], detail: int) -> None: +def add_element_to_detail(element_id_list: list[ElementId], detail: int) -> None: """Adds elements to a detail. Parameters: @@ -1231,7 +1230,7 @@ def add_element_to_detail(element_id_list: List[ElementId], detail: int) -> None detail: The ID of the detail. """ -def convert_elements_to_auxiliary_elements(element_id_list: List[ElementId]) -> None: +def convert_elements_to_auxiliary_elements(element_id_list: list[ElementId]) -> None: """Converts elements to auxiliary elements. Parameters: @@ -1305,7 +1304,7 @@ def create_polygon_panel(polygon_vertices: vertex_list, thickness: float, x_loca The ID of the created polygon panel element. """ -def cut_elements_with_overmeasure(hard_element_id_list: List[ElementId], soft_element_id_list: List[ElementId]) -> None: +def cut_elements_with_overmeasure(hard_element_id_list: list[ElementId], soft_element_id_list: list[ElementId]) -> None: """Cuts elements with overmeasure. Parameters: @@ -1313,7 +1312,7 @@ def cut_elements_with_overmeasure(hard_element_id_list: List[ElementId], soft_el soft_element_id_list: The list of soft elements. """ -def cut_log_corner_joint(settings_name: str, element_id_list: List[ElementId]) -> None: +def cut_log_corner_joint(settings_name: str, element_id_list: list[ElementId]) -> None: """Cuts log corner joint. Parameters: @@ -1321,7 +1320,7 @@ def cut_log_corner_joint(settings_name: str, element_id_list: List[ElementId]) - element_id_list: The list of elements to be cut. """ -def get_edge_selection(element_id_list: List[ElementId]) -> edge_list: +def get_edge_selection(element_id_list: list[ElementId]) -> edge_list: """Retrieves the edge selection of the provided elements. Parameters: @@ -1331,7 +1330,7 @@ def get_edge_selection(element_id_list: List[ElementId]) -> edge_list: The list of edges selected. """ -def get_facets_with_lasso(element_id_list: List[ElementId]) -> facet_list: +def get_facets_with_lasso(element_id_list: list[ElementId]) -> facet_list: """Retrieves the facets of elements within a lasso selection. Parameters: @@ -1388,14 +1387,14 @@ def chamfer_edge(element_id: ElementId, edge_start: point_3d, edge_end: point_3d length: The length of the chamfer. """ -def convert_drilling_to_circular_beam(element_id_list: List[ElementId]) -> None: +def convert_drilling_to_circular_beam(element_id_list: list[ElementId]) -> None: """Converts drilling to circular beam. Parameters: element_id_list: The list of element IDs to convert. """ -def convert_lines_to_surfaces(element_id_list: List[ElementId]) -> List[ElementId]: +def convert_lines_to_surfaces(element_id_list: list[ElementId]) -> list[ElementId]: """Converts lines to surfaces. Parameters: @@ -1405,7 +1404,7 @@ def convert_lines_to_surfaces(element_id_list: List[ElementId]) -> List[ElementI The list of element IDs that were converted. """ -def convert_surfaces_to_volume(element_id_list: List[ElementId]) -> ElementId: +def convert_surfaces_to_volume(element_id_list: list[ElementId]) -> ElementId: """Converts surfaces to volume. Parameters: @@ -1415,7 +1414,7 @@ def convert_surfaces_to_volume(element_id_list: List[ElementId]) -> ElementId: The ID of the created volume element. """ -def cut_corner_lap(element_id_list: List[ElementId], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_corner_lap(element_id_list: list[ElementId], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a corner-lap joint with specific parameters. Parameters: @@ -1429,7 +1428,7 @@ def cut_corner_lap(element_id_list: List[ElementId], depth: float, clearance_bas drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion. """ -def cut_t_lap(element_id_list: List[ElementId], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_t_lap(element_id_list: list[ElementId], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a T-lap joint with specific parameters. Parameters: @@ -1443,7 +1442,7 @@ def cut_t_lap(element_id_list: List[ElementId], depth: float, clearance_base: fl drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion. """ -def cut_cross_lap(element_id_list: List[ElementId], depth: float, clearance_base: float, clearance_side: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_cross_lap(element_id_list: list[ElementId], depth: float, clearance_base: float, clearance_side: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a cross-lap joint with specific parameters. Parameters: @@ -1456,7 +1455,7 @@ def cut_cross_lap(element_id_list: List[ElementId], depth: float, clearance_base drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion. """ -def delete_processes_keep_cutting_bodies(element_id_list: List[ElementId], keep_cutting_elements_only: bool) -> List[ElementId]: +def delete_processes_keep_cutting_bodies(element_id_list: list[ElementId], keep_cutting_elements_only: bool) -> list[ElementId]: """Gets the cutting bodies of all processes (and deletes processes), like Ctrl+D Action Parameters: @@ -1467,7 +1466,7 @@ def delete_processes_keep_cutting_bodies(element_id_list: List[ElementId], keep_ The id list of all removed geometry, cuttings bodies. """ -def cut_double_tenon(element_id_list: List[ElementId], depth1: float, depth2: float, clearance: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_double_tenon(element_id_list: list[ElementId], depth1: float, depth2: float, clearance: float, backcut: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cut a double tenon joint with specific parameters. Parameters: @@ -1492,7 +1491,7 @@ def get_coordinate_system_data_nesting_child(nesting_parent_id: ElementId, nesti A global element coordinate-system of the nested child element consisting of a Point1, a Point2 and a Point3. You can get the local placement by subtracting the parent coordinate - system with child coordinate - system. """ -def cut_half_lap(element_id_list: List[ElementId], length: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_half_lap(element_id_list: list[ElementId], length: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cut a half-lap joint with specific parameters. Parameters: @@ -1505,7 +1504,7 @@ def cut_half_lap(element_id_list: List[ElementId], length: float, clearance_leng drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion. """ -def cut_simple_scarf(element_id_list: List[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_simple_scarf(element_id_list: list[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cut a simple scarf joint with specific parameters. Parameters: @@ -1519,7 +1518,7 @@ def cut_simple_scarf(element_id_list: List[ElementId], length: float, depth: flo drilling_tolerance: The tolerance applied to the hole size, typically for fitting the bolt head or allowing easier assembly. """ -def cut_diagonal_cut(element_id_list: List[ElementId], length: float, clearance_length: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_diagonal_cut(element_id_list: list[ElementId], length: float, clearance_length: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cut a diagonal cut joint with specific parameters. Parameters: @@ -1531,42 +1530,42 @@ def cut_diagonal_cut(element_id_list: List[ElementId], length: float, clearance_ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion. """ -def get_all_identifiable_element_ids() -> List[ElementId]: +def get_all_identifiable_element_ids() -> list[ElementId]: """Retrieves a list of all identifiable elements. Returns: A list of all identifiable element IDs. """ -def get_visible_identifiable_element_ids() -> List[ElementId]: +def get_visible_identifiable_element_ids() -> list[ElementId]: """Get a list of all visible identifiable elements. Returns: A list of IDs of all visible identifiable elements. """ -def get_invisible_identifiable_element_ids() -> List[ElementId]: +def get_invisible_identifiable_element_ids() -> list[ElementId]: """Get a list of all invisible identifiable elements. Returns: A list of IDs of all invisible identifiable elements. """ -def get_active_identifiable_element_ids() -> List[ElementId]: +def get_active_identifiable_element_ids() -> list[ElementId]: """Get a list of all active identifiable elements. Returns: A list of IDs of all active identifiable elements. """ -def get_inactive_all_identifiable_element_ids() -> List[ElementId]: +def get_inactive_all_identifiable_element_ids() -> list[ElementId]: """Get a list of all inactive identifiable elements. Returns: A list of IDs of all inactive identifiable elements. """ -def get_inactive_visible_identifiable_element_ids() -> List[ElementId]: +def get_inactive_visible_identifiable_element_ids() -> list[ElementId]: """Get a list of all inactive visible identifiable elements. Returns: @@ -1606,7 +1605,7 @@ def get_element_contact_facets(first_id: ElementId, second_id: ElementId) -> fac The list of contact facets between the two elements. """ -def get_element_raw_interface_vertices(first_id: ElementId, second_id: ElementId) -> List[point_3d]: +def get_element_raw_interface_vertices(first_id: ElementId, second_id: ElementId) -> list[point_3d]: """Get the raw interface vertices between two elements. Parameters: @@ -1617,35 +1616,35 @@ def get_element_raw_interface_vertices(first_id: ElementId, second_id: ElementId The list of raw interface vertices between the two elements. """ -def get_standard_export_solid_list() -> List[str]: +def get_standard_export_solid_list() -> list[str]: """Retrieves a list of standard export solid names. Returns: The list of standard export solid names. """ -def get_standard_container_list() -> List[str]: +def get_standard_container_list() -> list[str]: """Retrieves a list of standard container names. Returns: The list of standard container names. """ -def get_standard_beam_list() -> List[str]: +def get_standard_beam_list() -> list[str]: """Retrieves a list of standard beam names. Returns: The list of standard beam names. """ -def get_standard_panel_list() -> List[str]: +def get_standard_panel_list() -> list[str]: """Retrieves a list of standard panel names. Returns: The list of standard panel names. """ -def get_variant_sibling_element_ids(element_id: ElementId) -> List[ElementId]: +def get_variant_sibling_element_ids(element_id: ElementId) -> list[ElementId]: """Retrieves a list of variant sibling element IDs. Parameters: @@ -1665,7 +1664,7 @@ def get_reference_element(element_id: ElementId) -> ElementId: The reference element ID. """ -def get_element_contact_vertices(first_id: ElementId, second_id: ElementId) -> List[point_3d]: +def get_element_contact_vertices(first_id: ElementId, second_id: ElementId) -> list[point_3d]: """Get the contact vertices between two elements. Parameters: @@ -1728,7 +1727,7 @@ def get_element_type_description(element_id: ElementId) -> str: The type description of the element. """ -def get_opening_variant_ids(element_id_list: List[ElementId], opening_type: int) -> List[int]: +def get_opening_variant_ids(element_id_list: list[ElementId], opening_type: int) -> list[int]: """Get the opening variant IDs for a list of elements. Parameters: @@ -1749,7 +1748,7 @@ def get_parent_container_id(element_id: ElementId) -> ElementId: The ID of the parent element. """ -def get_export_solid_content_elements(element_id: ElementId) -> List[ElementId]: +def get_export_solid_content_elements(element_id: ElementId) -> list[ElementId]: """Get the content elements of an export solid. Parameters: @@ -1759,7 +1758,7 @@ def get_export_solid_content_elements(element_id: ElementId) -> List[ElementId]: The list of content elements. """ -def get_container_content_elements(element_id: ElementId) -> List[ElementId]: +def get_container_content_elements(element_id: ElementId) -> list[ElementId]: """Get the content elements of a container. Parameters: @@ -1786,7 +1785,7 @@ def get_element_cadwork_guid(element_id: ElementId) -> str: The Cadwork GUID of the element. """ -def get_bounding_box_vertices_local(reference_element: ElementId, element_id_list: List[ElementId]) -> List[point_3d]: +def get_bounding_box_vertices_local(reference_element: ElementId, element_id_list: list[ElementId]) -> list[point_3d]: """Retrieves the local bounding box vertices for a list of elements relative to a reference element. Parameters: @@ -1797,7 +1796,7 @@ def get_bounding_box_vertices_local(reference_element: ElementId, element_id_lis The list of vertices representing the local bounding box of the elements. """ -def get_bounding_box_vertices_global(element_id_list: List[ElementId]) -> List[point_3d]: +def get_bounding_box_vertices_global(element_id_list: list[ElementId]) -> list[point_3d]: """Get the global bounding box vertices for a list of elements. Parameters: @@ -1807,14 +1806,14 @@ def get_bounding_box_vertices_global(element_id_list: List[ElementId]) -> List[p The list of vertices representing the global bounding box of the elements. """ -def get_all_nesting_raw_parts() -> List[ElementId]: +def get_all_nesting_raw_parts() -> list[ElementId]: """Get a list of all raw parts in a nesting operation. Returns: The list of IDs of all raw parts in a nesting operation. """ -def get_joined_elements(element_id: ElementId) -> List[ElementId]: +def get_joined_elements(element_id: ElementId) -> list[ElementId]: """Retrieves the IDs of elements that have been joined with the specified element. Parameters: @@ -1824,7 +1823,7 @@ def get_joined_elements(element_id: ElementId) -> List[ElementId]: The list of IDs of the joined elements. """ -def check_element_duplicates(element_id_list: List[ElementId]) -> List[ElementId]: +def check_element_duplicates(element_id_list: list[ElementId]) -> list[ElementId]: """Checks for duplicate elements in the provided list. Parameters: @@ -1834,7 +1833,7 @@ def check_element_duplicates(element_id_list: List[ElementId]) -> List[ElementId The list of duplicate elements. """ -def get_elements_in_contact(element_id: ElementId) -> List[ElementId]: +def get_elements_in_contact(element_id: ElementId) -> list[ElementId]: """Retrieves a list of elements in contact with a specific element. Parameters: @@ -1868,7 +1867,7 @@ def create_text_object_with_options(position: point_3d, x_local_direction: point The ID of the created text object. """ -def convert_surfaces_to_roof_surfaces(element_id_list: List[ElementId], roof_name: str) -> None: +def convert_surfaces_to_roof_surfaces(element_id_list: list[ElementId], roof_name: str) -> None: """Converts surfaces to roof surfaces. Parameters: @@ -1921,7 +1920,7 @@ def remove_standard_export_solid(guid: str) -> None: guid: The unique identifier of the standard export solid to be removed. """ -def get_user_element_ids_with_count(count: int) -> List[ElementId]: +def get_user_element_ids_with_count(count: int) -> list[ElementId]: """Retrieves a list of user element IDs. Parameters: @@ -1931,7 +1930,7 @@ def get_user_element_ids_with_count(count: int) -> List[ElementId]: The list of user element IDs. """ -def cut_scarf_straight(element_id_list: List[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, clearance_hook: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_scarf_straight(element_id_list: list[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, clearance_hook: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a straight scarf joint (lengthwise) with specific parameters. Parameters: @@ -1946,7 +1945,7 @@ def cut_scarf_straight(element_id_list: List[ElementId], length: float, depth: f drilling_tolerance: The tolerance added to the hole size for easier assembly or bolt head fitting. """ -def cut_scarf_diagonal(element_id_list: List[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_scarf_diagonal(element_id_list: list[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a diagonal scarf joint (lengthwise) with specific parameters. Parameters: @@ -1960,7 +1959,7 @@ def cut_scarf_diagonal(element_id_list: List[ElementId], length: float, depth: f drilling_tolerance: Tolerance added to the hole diameter for ease of insertion or head fit. """ -def cut_scarf_with_wedge(element_id_list: List[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, wedge_width: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: +def cut_scarf_with_wedge(element_id_list: list[ElementId], length: float, depth: float, clearance_length: float, clearance_depth: float, wedge_width: float, drilling_count: UnsignedInt, drilling_diameter: float, drilling_tolerance: float) -> None: """Cuts a diagonal scarf joint with an added wedge, using specific parameters. Parameters: @@ -1975,7 +1974,7 @@ def cut_scarf_with_wedge(element_id_list: List[ElementId], length: float, depth: drilling_tolerance: Tolerance applied to the hole size, often used for easier bolt fitting or head clearance. """ -def cut_beam_end_profile(element_id_list: List[ElementId], profile_name: str, on_start_face: bool, on_end_face: bool) -> None: +def cut_beam_end_profile(element_id_list: list[ElementId], profile_name: str, on_start_face: bool, on_end_face: bool) -> None: """Add end profile to beam elements. Parameters: @@ -2055,7 +2054,7 @@ def create_spline_line(spline_points: vertex_list) -> ElementId: The ID of the created spline. """ -def unjoin_elements(element_id_list: List[ElementId]) -> bool: +def unjoin_elements(element_id_list: list[ElementId]) -> bool: """Unjoins the specified elements. Parameters: @@ -2065,7 +2064,7 @@ def unjoin_elements(element_id_list: List[ElementId]) -> bool: True if the operation was successful, false if an error occured. """ -def unjoin_top_level_elements(element_id_list: List[ElementId]) -> bool: +def unjoin_top_level_elements(element_id_list: list[ElementId]) -> bool: """Unjoins the specified top-level elements. Parameters: @@ -2083,14 +2082,14 @@ def set_element_group_multi_select_mode() -> None: """Switches the current element group selection mode so that all elements of a group are selected when selecting one of it. """ -def convert_circular_beam_to_drilling(element_id_list: List[ElementId]) -> None: +def convert_circular_beam_to_drilling(element_id_list: list[ElementId]) -> None: """Converts circular beams to drillings. Parameters: element_id_list: The list of element IDs to convert. """ -def slice_elements_with_plane_and_get_new_elements(element_id: ElementId, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> List[ElementId]: +def slice_elements_with_plane_and_get_new_elements(element_id: ElementId, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> list[ElementId]: """Slices an element with a plane and returns the new elements. Parameters: @@ -2128,7 +2127,7 @@ def slice_elements_with_plane_and_get_new_elements(element_id: ElementId, cut_pl The list of IDs of the new elements created by the slicing operation. """ -def get_elements_in_collision(element_id: ElementId) -> List[ElementId]: +def get_elements_in_collision(element_id: ElementId) -> list[ElementId]: """Retrieves a list of elements in collision with a specific element. Parameters: @@ -2186,8 +2185,8 @@ def set_double_shoulder_options(options: double_shoulder_options) -> None: options: The double shoulder options to set. """ -def cut_shoulder(element_id_list: List[ElementId], connecting_element_id_list: - List[ElementId]) ->None: +def cut_shoulder(element_id_list: list[ElementId], connecting_element_id_list: + list[ElementId]) ->None: """Cuts shoulder with current 3D options. Parameters: @@ -2195,8 +2194,8 @@ def cut_shoulder(element_id_list: List[ElementId], connecting_element_id_list: connecting_element_id_list: The list of elements that intersect or connect with the cut elements, used to determine the cutting geometry. """ -def cut_heel_shoulder(element_id_list: List[ElementId], - connecting_element_id_list: List[ElementId]) ->None: +def cut_heel_shoulder(element_id_list: list[ElementId], + connecting_element_id_list: list[ElementId]) ->None: """Cuts heel with current 3D options Parameters: @@ -2204,8 +2203,8 @@ def cut_heel_shoulder(element_id_list: List[ElementId], connecting_element_id_list: The list of elements that intersect or connect with the cut elements, used to determine the cutting geometry. """ -def cut_double_shoulder(element_id_list: List[ElementId], - connecting_element_id_list: List[ElementId]) ->None: +def cut_double_shoulder(element_id_list: list[ElementId], + connecting_element_id_list: list[ElementId]) ->None: """Cuts a double shoulder joint using the current 3D cutting options. Parameters: @@ -2214,7 +2213,7 @@ def cut_double_shoulder(element_id_list: List[ElementId], """ -def filter_elements(element_id_list: List[ElementId], element_filter: element_filter) -> List[ElementId]: +def filter_elements(element_id_list: list[ElementId], element_filter: element_filter) -> list[ElementId]: """Filters a list of elements based on a provided filter. Parameters: @@ -2234,7 +2233,7 @@ def filter_elements(element_id_list: List[ElementId], element_filter: element_fi """ -def map_elements(element_id_list: List[ElementId], map_query: element_map_query) -> Dict[str, List[ElementId]]: +def map_elements(element_id_list: list[ElementId], map_query: element_map_query) -> dict[str, list[ElementId]]: """Maps a list of elements based on a provided map query. Parameters: @@ -2254,7 +2253,7 @@ def map_elements(element_id_list: List[ElementId], map_query: element_map_query) """ -def cast_ray_and_get_element_intersections(element_id_list: List[ElementId], ray_start_position: point_3d, +def cast_ray_and_get_element_intersections(element_id_list: list[ElementId], ray_start_position: point_3d, ray_end_position: point_3d, radius: float) -> hit_result: """Casts a ray through the 3D model and calculates all intersection points between the ray and specified elements. This function performs ray casting against each specified element to find intersection points.For each element hit by the ray, it returns the element ID and all points where the ray intersects with that element. The ray is defined by a start point, end point, and radius. diff --git a/src/element_controller/py.typed b/src/element_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/endtype_controller/__init__.pyi b/src/endtype_controller/__init__.pyi index 1fccb18..3013e8c 100644 --- a/src/endtype_controller/__init__.pyi +++ b/src/endtype_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.api_types import * def get_endtype_id(name: str) -> EndtypeId: @@ -299,7 +298,7 @@ def get_endtype_name_facet(element_id: ElementId, face_number: int) -> str: The endtype name of the face. """ -def get_existing_tenon_ids() -> List[EndtypeId]: +def get_existing_tenon_ids() -> list[EndtypeId]: """Get the existing tenon endtype id list. Examples: @@ -312,7 +311,7 @@ def get_existing_tenon_ids() -> List[EndtypeId]: List of existing tenon endtype id. """ -def get_existing_lengthening_ids() -> List[EndtypeId]: +def get_existing_lengthening_ids() -> list[EndtypeId]: """Get the existing lengthening endtype id list. Examples: @@ -325,7 +324,7 @@ def get_existing_lengthening_ids() -> List[EndtypeId]: List of existing lengthening endtype id. """ -def get_existing_dovetail_ids() -> List[EndtypeId]: +def get_existing_dovetail_ids() -> list[EndtypeId]: """Get the existing dovetail endtype id list. Examples: @@ -338,7 +337,7 @@ def get_existing_dovetail_ids() -> List[EndtypeId]: List of existing dovetail endtype id. """ -def get_existing_dovetail_dado_ids() -> List[EndtypeId]: +def get_existing_dovetail_dado_ids() -> list[EndtypeId]: """Get the existing dado endtype id list. Examples: @@ -351,7 +350,7 @@ def get_existing_dovetail_dado_ids() -> List[EndtypeId]: List of existing dado endtype id. """ -def get_existing_japanese_tenon_ids() -> List[EndtypeId]: +def get_existing_japanese_tenon_ids() -> list[EndtypeId]: """Get the existing japanese-tenon endtype id list. Examples: diff --git a/src/endtype_controller/py.typed b/src/endtype_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/file_controller/__init__.pyi b/src/file_controller/__init__.pyi index 5324d4a..ba7d6fe 100644 --- a/src/file_controller/__init__.pyi +++ b/src/file_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.import_3dc_options import import_3dc_options from cadwork.point_3d import point_3d from cadwork.bim_team_upload_result import bim_team_upload_result @@ -7,7 +6,7 @@ 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: +def export_stl_file(element_id_list: list[ElementId], file_path: str) -> None: """Exports an STL file. Parameters: @@ -24,7 +23,7 @@ def export_stl_file(element_id_list: List[ElementId], file_path: str) -> None: """ -def import_step_file(file_path: str, scale_factor: float) -> List[ElementId]: +def import_step_file(file_path: str, scale_factor: float) -> list[ElementId]: """Imports a STEP file. Parameters: @@ -36,7 +35,7 @@ def import_step_file(file_path: str, scale_factor: float) -> List[ElementId]: """ -def import_step_file_with_message_option(file_path: str, scale_factor: float, hide_message: bool) -> List[ElementId]: +def import_step_file_with_message_option(file_path: str, scale_factor: float, hide_message: bool) -> list[ElementId]: """Imports a STEP file with message option. Parameters: @@ -49,7 +48,7 @@ def import_step_file_with_message_option(file_path: str, scale_factor: float, hi """ -def export_webgl(element_id_list: List[ElementId], file_path: str) -> bool: +def export_webgl(element_id_list: list[ElementId], file_path: str) -> bool: """Exports a WebGL file. Parameters: @@ -71,7 +70,7 @@ def export_webgl(element_id_list: List[ElementId], file_path: str) -> bool: """ -def export_3d_file(element_id_list: List[ElementId], file_path: str) -> bool: +def export_3d_file(element_id_list: list[ElementId], file_path: str) -> bool: """Exports a 3D file. Parameters: @@ -93,7 +92,7 @@ def export_3d_file(element_id_list: List[ElementId], file_path: str) -> bool: """ -def import_sat_file(file_path: str, scale_factor: float, binary: bool) -> List[ElementId]: +def import_sat_file(file_path: str, scale_factor: float, binary: bool) -> list[ElementId]: """Imports an SAT file. Parameters: @@ -106,7 +105,7 @@ def import_sat_file(file_path: str, scale_factor: float, binary: bool) -> List[E """ -def import_3dc_file(file_path: str) -> List[ElementId]: +def import_3dc_file(file_path: str) -> list[ElementId]: """Imports a 3DC file. Parameters: @@ -117,7 +116,7 @@ def import_3dc_file(file_path: str) -> List[ElementId]: """ -def import_rhino_file(file_path: str, without_dialog: bool) -> List[ElementId]: +def import_rhino_file(file_path: str, without_dialog: bool) -> list[ElementId]: """Imports a Rhino file. Parameters: @@ -129,7 +128,7 @@ def import_rhino_file(file_path: str, without_dialog: bool) -> List[ElementId]: """ -def export_step_file(element_id_list: List[ElementId], file_path: str, scale_factor: float, version: int, +def export_step_file(element_id_list: list[ElementId], file_path: str, scale_factor: float, version: int, text_mode: bool) -> None: """Exports a STEP file. @@ -163,7 +162,7 @@ def import_3dz_file(file_path: str) -> None: """ -def export_obj_file(element_id_list: List[ElementId], file_path: str) -> None: +def export_obj_file(element_id_list: list[ElementId], file_path: str) -> None: """Exports a OBJ file. Parameters: @@ -180,7 +179,7 @@ def export_obj_file(element_id_list: List[ElementId], file_path: str) -> None: """ -def import_sat_file_silently(file_path: str, scale_factor: float, binary: bool) -> List[ElementId]: +def import_sat_file_silently(file_path: str, scale_factor: float, binary: bool) -> list[ElementId]: """Imports a SAT File without messages. Parameters: @@ -193,7 +192,7 @@ def import_sat_file_silently(file_path: str, scale_factor: float, binary: bool) """ -def export_fbx_file(element_id_list: List[ElementId], file_path: str, fbx_format: int) -> None: +def export_fbx_file(element_id_list: list[ElementId], file_path: str, fbx_format: int) -> None: """Exports a FBX file. Parameters: @@ -231,7 +230,7 @@ def clear_errors() -> None: """ -def import_3dc_file_with_glide(file_path: str) -> List[ElementId]: +def import_3dc_file_with_glide(file_path: str) -> list[ElementId]: """Imports a 3DC file with glide. Parameters: @@ -250,7 +249,7 @@ def import_btl_file(file_path: str) -> None: """ -def export_3dc_file(element_id_list: List[ElementId], file_path: str) -> None: +def export_3dc_file(element_id_list: list[ElementId], file_path: str) -> None: """Exports a 3D file. Parameters: @@ -289,7 +288,7 @@ def export_btl_file_for_nesting(file_path: str) -> None: """ -def export_rhino_file(element_id_list: List[ElementId], file_path: str, version: int, use_default_assignment: bool, +def export_rhino_file(element_id_list: list[ElementId], file_path: str, version: int, use_default_assignment: bool, write_standard_attributes: bool) -> None: """Exports a 3dm rhino file. @@ -319,7 +318,7 @@ def export_rhino_file(element_id_list: List[ElementId], file_path: str, version: """ -def import_bxf_file(file_path: str, insert_position: point_3d) -> List[ElementId]: +def import_bxf_file(file_path: str, insert_position: point_3d) -> list[ElementId]: """Imports a BXF file. Parameters: @@ -347,7 +346,7 @@ def set_blum_export_path(path: str) -> None: """ -def export_sat_file(element_id_list: List[ElementId], file_path: str, scale_factor: float, binary: bool, version: int) -> None: +def export_sat_file(element_id_list: list[ElementId], file_path: str, scale_factor: float, binary: bool, version: int) -> None: """Exports a SAT File. Parameters: @@ -375,7 +374,7 @@ def export_sat_file(element_id_list: List[ElementId], file_path: str, scale_fact """ -def export_glb_file(element_id_list: List[ElementId], file_path: str) -> None: +def export_glb_file(element_id_list: list[ElementId], file_path: str) -> None: """Exports a GLB File. Parameters: @@ -392,7 +391,7 @@ def export_glb_file(element_id_list: List[ElementId], file_path: str) -> None: """ -def import_variant_file(file_path: str, insert_position: point_3d) -> List[ElementId]: +def import_variant_file(file_path: str, insert_position: point_3d) -> list[ElementId]: """Imports a variant (.val-File). Parameters: @@ -416,7 +415,7 @@ def import_element_light(file_path: str, insert_position: point_3d) -> int: """ -def export_rhino_file_with_options(element_id_list: List[ElementId], file_path: str, version: int, +def export_rhino_file_with_options(element_id_list: list[ElementId], file_path: str, version: int, use_default_assignment: bool, write_standard_attributes: bool, rhino_options: None) -> None: """Exports elements to a rhino 3dm file based on the export options. @@ -449,7 +448,7 @@ def export_rhino_file_with_options(element_id_list: List[ElementId], file_path: """ -def import_3dc_file_with_options(file_path: str, import_3dc_options: import_3dc_options) -> List[ElementId]: +def import_3dc_file_with_options(file_path: str, import_3dc_options: import_3dc_options) -> list[ElementId]: """Imports a 3d or a 3dc file depending on the import options. Parameters: @@ -477,7 +476,7 @@ def load_webgl_preset_file(file_path: str) -> None: """ -def export_step_file_extrude_drillings(element_id_list: List[ElementId], file_path: str, scale_factor: float, version: int, +def export_step_file_extrude_drillings(element_id_list: list[ElementId], file_path: str, scale_factor: float, version: int, text_mode: bool, imperial_units: bool) -> None: """Exports a STEP file with extruded drillings. @@ -505,7 +504,7 @@ def export_step_file_extrude_drillings(element_id_list: List[ElementId], file_pa """ -def export_step_file_cut_drillings(element_id_list: List[ElementId], file_path: str, scale_factor: float, version: int, +def export_step_file_cut_drillings(element_id_list: list[ElementId], file_path: str, scale_factor: float, version: int, text_mode: bool, imperial_units: bool) -> None: """Exports a STEP file with extruded drillings. @@ -533,7 +532,7 @@ def export_step_file_cut_drillings(element_id_list: List[ElementId], file_path: """ -def export_sat_file_cut_drillings(element_id_list: List[ElementId], file_path: str, +def export_sat_file_cut_drillings(element_id_list: list[ElementId], file_path: str, scale_factor: float, binary: bool, version: int) -> None: """Exports a SAT File with extruded drillings (cut drilling holes into bodies). @@ -551,7 +550,7 @@ def export_sat_file_cut_drillings(element_id_list: List[ElementId], file_path: s """ -def upload_to_bim_team_and_create_share_link(element_id_list: List[ElementId]) -> bim_team_upload_result: +def upload_to_bim_team_and_create_share_link(element_id_list: list[ElementId]) -> bim_team_upload_result: """Exports the elements to BIMteam and creates a share link. Parameters: diff --git a/src/file_controller/py.typed b/src/file_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/geometry_controller/__init__.pyi b/src/geometry_controller/__init__.pyi index 35323b9..e81d50d 100644 --- a/src/geometry_controller/__init__.pyi +++ b/src/geometry_controller/__init__.pyi @@ -1,24 +1,23 @@ -from typing import List from cadwork.api_types import ElementId, UnsignedInt from cadwork.facet_list import facet_list from cadwork.point_3d import point_3d -def rotate_height_axis_90(element_id_list: List[ElementId]) -> None: +def rotate_height_axis_90(element_id_list: list[ElementId]) -> None: """Rotates the element height axis 90 degrees. Parameters: element_id_list: The element id list. """ -def rotate_height_axis_180(element_id_list: List[ElementId]) -> None: +def rotate_height_axis_180(element_id_list: list[ElementId]) -> None: """Rotates the element height axis 180 degrees. Parameters: element_id_list: The element id list. """ -def set_over_width(element_id_list: List[ElementId], value: float) -> None: +def set_over_width(element_id_list: list[ElementId], value: float) -> None: """Sets the element overwidth. Parameters: @@ -26,7 +25,7 @@ def set_over_width(element_id_list: List[ElementId], value: float) -> None: value: The element overwidth. """ -def set_over_height(element_id_list: List[ElementId], value: float) -> None: +def set_over_height(element_id_list: list[ElementId], value: float) -> None: """Sets the element overheight. Parameters: @@ -34,7 +33,7 @@ def set_over_height(element_id_list: List[ElementId], value: float) -> None: value: The element overheight. """ -def set_over_length(element_id_list: List[ElementId], value: float) -> None: +def set_over_length(element_id_list: list[ElementId], value: float) -> None: """Sets the element overlength. Parameters: @@ -42,7 +41,7 @@ def set_over_length(element_id_list: List[ElementId], value: float) -> None: value: The element overlength. """ -def set_rounding_width(element_id_list: List[ElementId], value: float) -> None: +def set_rounding_width(element_id_list: list[ElementId], value: float) -> None: """Sets the element rounding width. Parameters: @@ -50,7 +49,7 @@ def set_rounding_width(element_id_list: List[ElementId], value: float) -> None: value: The element rounding width. """ -def set_rounding_height(element_id_list: List[ElementId], value: float) -> None: +def set_rounding_height(element_id_list: list[ElementId], value: float) -> None: """Sets the element rounding height. Parameters: @@ -58,7 +57,7 @@ def set_rounding_height(element_id_list: List[ElementId], value: float) -> None: value: The element rounding height. """ -def set_rounding_length(element_id_list: List[ElementId], value: float) -> None: +def set_rounding_length(element_id_list: list[ElementId], value: float) -> None: """Sets the element rounding length. Parameters: @@ -66,7 +65,7 @@ def set_rounding_length(element_id_list: List[ElementId], value: float) -> None: value: The element rounding length. """ -def set_cross_correction_negative_width(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_negative_width(element_id_list: list[ElementId], value: float) -> None: """Sets the element negative width cross correction. Parameters: @@ -74,7 +73,7 @@ def set_cross_correction_negative_width(element_id_list: List[ElementId], value: value: The element negative width cross correction. """ -def set_cross_correction_positive_width(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_positive_width(element_id_list: list[ElementId], value: float) -> None: """Sets the element positive width cross correction. Parameters: @@ -82,7 +81,7 @@ def set_cross_correction_positive_width(element_id_list: List[ElementId], value: value: The element positive width cross correction. """ -def set_cross_correction_negative_height(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_negative_height(element_id_list: list[ElementId], value: float) -> None: """Sets the element negative height cross correction. Parameters: @@ -90,7 +89,7 @@ def set_cross_correction_negative_height(element_id_list: List[ElementId], value value: The element negative height cross correction. """ -def set_cross_correction_positive_height(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_positive_height(element_id_list: list[ElementId], value: float) -> None: """Sets the element positive height cross correction. Parameters: @@ -98,7 +97,7 @@ def set_cross_correction_positive_height(element_id_list: List[ElementId], value value: The element positive height cross correction. """ -def set_cross_correction_negative_length(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_negative_length(element_id_list: list[ElementId], value: float) -> None: """Sets the element negative length cross correction. Parameters: @@ -106,7 +105,7 @@ def set_cross_correction_negative_length(element_id_list: List[ElementId], value value: The element negative length cross correction. """ -def set_cross_correction_positive_length(element_id_list: List[ElementId], value: float) -> None: +def set_cross_correction_positive_length(element_id_list: list[ElementId], value: float) -> None: """Sets the element positive length cross correction. Parameters: @@ -114,7 +113,7 @@ def set_cross_correction_positive_length(element_id_list: List[ElementId], value value: The element positive length cross correction. """ -def apply_global_scale(element_id_list: List[ElementId], scale: float, origin: point_3d) -> None: +def apply_global_scale(element_id_list: list[ElementId], scale: float, origin: point_3d) -> None: """Applies a global scale to element. Parameters: @@ -123,35 +122,35 @@ def apply_global_scale(element_id_list: List[ElementId], scale: float, origin: p origin: The scaling origin. """ -def auto_regenerate_axes(element_id_list: List[ElementId]) -> None: +def auto_regenerate_axes(element_id_list: list[ElementId]) -> None: """Automatically regenerates axes on element. Parameters: element_id_list: The element id list. """ -def rotate_length_axis_90(element_id_list: List[ElementId]) -> None: +def rotate_length_axis_90(element_id_list: list[ElementId]) -> None: """Rotates element length axis 90 degrees. Parameters: element_id_list: The element id list. """ -def rotate_length_axis_180(element_id_list: List[ElementId]) -> None: +def rotate_length_axis_180(element_id_list: list[ElementId]) -> None: """Rotates element length axis 180 degrees. Parameters: element_id_list: The element id list. """ -def invert_model(element_id_list: List[ElementId]) -> None: +def invert_model(element_id_list: list[ElementId]) -> None: """Inverts element model. Parameters: element_id_list: The element id list. """ -def set_width_real(element_id_list: List[ElementId], width: float) -> None: +def set_width_real(element_id_list: list[ElementId], width: float) -> None: """Sets the element real width. Parameters: @@ -159,7 +158,7 @@ def set_width_real(element_id_list: List[ElementId], width: float) -> None: width: The element real width. """ -def set_height_real(element_id_list: List[ElementId], height: float) -> None: +def set_height_real(element_id_list: list[ElementId], height: float) -> None: """Sets the element real height. Parameters: @@ -167,7 +166,7 @@ def set_height_real(element_id_list: List[ElementId], height: float) -> None: height: The element real height. """ -def set_length_real(element_id_list: List[ElementId], length: float) -> None: +def set_length_real(element_id_list: list[ElementId], length: float) -> None: """Sets the element real length. Parameters: @@ -175,7 +174,7 @@ def set_length_real(element_id_list: List[ElementId], length: float) -> None: length: The element real length. """ -def rotate_height_axis_2_points(element_id_list: List[ElementId], point1: point_3d, point2: point_3d) -> None: +def rotate_height_axis_2_points(element_id_list: list[ElementId], point1: point_3d, point2: point_3d) -> None: """Rotates the element height axis via 2 points. Parameters: @@ -188,7 +187,7 @@ def clear_errors() -> None: """Clears all errors. """ -def set_drilling_tolerance(element_id_list: List[ElementId], tolerance: float) -> None: +def set_drilling_tolerance(element_id_list: list[ElementId], tolerance: float) -> None: """Sets the drilling tolerance of the axis. Parameters: @@ -196,14 +195,14 @@ def set_drilling_tolerance(element_id_list: List[ElementId], tolerance: float) - tolerance: The new drilling tolerance. """ -def auto_regenerate_axes_silently(element_id_list: List[ElementId]) -> None: +def auto_regenerate_axes_silently(element_id_list: list[ElementId]) -> None: """Automatically regenerates axes on elements without any user interaction. Parameters: element_id_list: The list of element IDs for which the axes will be regenerated. """ -def rotate_length_axis_2_points(element_id_list: List[ElementId], point1: point_3d, point2: point_3d) -> None: +def rotate_length_axis_2_points(element_id_list: list[ElementId], point1: point_3d, point2: point_3d) -> None: """Rotates the element length axis via 2 points. Parameters: @@ -522,7 +521,7 @@ def get_reference_side(element_id: ElementId) -> int: The element reference side. """ -def get_element_vertices(element_id: ElementId) -> List[point_3d]: +def get_element_vertices(element_id: ElementId) -> list[point_3d]: """Gets the element vertices. Parameters: @@ -603,7 +602,7 @@ def get_area_of_front_face(element_id: ElementId) -> float: The element front face area. """ -def get_door_surface(element_id_list: List[ElementId]) -> float: +def get_door_surface(element_id_list: list[ElementId]) -> float: """Gets the element door surface. Parameters: @@ -613,7 +612,7 @@ def get_door_surface(element_id_list: List[ElementId]) -> float: The element door surface. """ -def get_window_surface(element_id_list: List[ElementId]) -> float: +def get_window_surface(element_id_list: list[ElementId]) -> float: """Gets the element window surface. Parameters: @@ -654,7 +653,7 @@ def get_drilling_tolerance(element_id: ElementId) -> float: The drilling tolerance. """ -def get_element_reference_face_vertices(element_id: ElementId) -> List[point_3d]: +def get_element_reference_face_vertices(element_id: ElementId) -> list[point_3d]: """Gets the vertices of the reference side. Parameters: @@ -674,7 +673,7 @@ def get_element_reference_face_area(element_id: ElementId) -> float: The area(size) of reference face. """ -def get_center_of_gravity_for_list(element_id_list: List[ElementId]) -> point_3d: +def get_center_of_gravity_for_list(element_id_list: list[ElementId]) -> point_3d: """Gets the center of gravity for a list of elements. Parameters: @@ -684,7 +683,7 @@ def get_center_of_gravity_for_list(element_id_list: List[ElementId]) -> point_3d The center of gravity as a vector3D. """ -def get_center_of_gravity_for_list_considering_materials(element_id_list: List[ElementId]) -> point_3d: +def get_center_of_gravity_for_list_considering_materials(element_id_list: list[ElementId]) -> point_3d: """Gets the center of gravity for a list of elements, considering their materials. Parameters: @@ -734,7 +733,7 @@ def get_actual_physical_volume(element_id: ElementId) -> float: The actual physical volume. """ -def are_facets_coplanar(first_facet: List[point_3d], second_facet: List[point_3d]) -> bool: +def are_facets_coplanar(first_facet: list[point_3d], second_facet: list[point_3d]) -> bool: """Tests if facets are coplanar. Parameters: @@ -755,7 +754,7 @@ def get_round_machine_rough_part_negative_width(element_id: ElementId) -> bool: The option RoundMachineRoughPartNegativeWidth value. """ -def set_round_machine_rough_part_negative_width(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_negative_width(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartNegativeWidth. Parameters: @@ -773,7 +772,7 @@ def get_round_machine_rough_part_positive_width(element_id: ElementId) -> bool: The option RoundMachineRoughPartPositiveWidth value. """ -def set_round_machine_rough_part_positive_width(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_positive_width(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartPositiveWidth. Parameters: @@ -791,7 +790,7 @@ def get_round_machine_rough_part_negative_height(element_id: ElementId) -> bool: The option RoundMachineRoughPartNegativeHeight value. """ -def set_round_machine_rough_part_negative_height(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_negative_height(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartNegativeHeight. Parameters: @@ -809,7 +808,7 @@ def get_round_machine_rough_part_positive_height(element_id: ElementId) -> bool: The option RoundMachineRoughPartPositiveHeight value. """ -def set_round_machine_rough_part_positive_height(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_positive_height(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartPositiveHeight. Parameters: @@ -827,7 +826,7 @@ def get_round_machine_rough_part_negative_length(element_id: ElementId) -> bool: The option RoundMachineRoughPartNegativeLength value. """ -def set_round_machine_rough_part_negative_length(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_negative_length(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartNegativeLength. Parameters: @@ -845,7 +844,7 @@ def get_round_machine_rough_part_positive_length(element_id: ElementId) -> bool: The option RoundMachineRoughPartPositiveLength value. """ -def set_round_machine_rough_part_positive_length(element_id_list: List[ElementId], value: bool) -> None: +def set_round_machine_rough_part_positive_length(element_id_list: list[ElementId], value: bool) -> None: """Sets the value of option RoundMachineRoughPartPositiveLength. Parameters: diff --git a/src/geometry_controller/py.typed b/src/geometry_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/list_controller/__init__.pyi b/src/list_controller/__init__.pyi index 5f92be7..3f33c97 100644 --- a/src/list_controller/__init__.pyi +++ b/src/list_controller/__init__.pyi @@ -1,8 +1,6 @@ -from typing import List - from cadwork.api_types import ElementId, UnsignedInt -def export_production_list(element_id_list: List[ElementId], file_path: str) -> None: +def export_production_list(element_id_list: list[ElementId], file_path: str) -> None: """Exports a production list to the given file path. Parameters: @@ -10,7 +8,7 @@ def export_production_list(element_id_list: List[ElementId], file_path: str) -> file_path: The path of the target file for the export. """ -def export_part_list(element_id_list: List[ElementId], file_path: str) -> None: +def export_part_list(element_id_list: list[ElementId], file_path: str) -> None: """Exports a part list to the specified file path. Parameters: @@ -18,14 +16,14 @@ def export_part_list(element_id_list: List[ElementId], file_path: str) -> None: file_path: The path of the target file for the export. """ -def check_position_numbers_production_list() -> List[ElementId]: +def check_position_numbers_production_list() -> list[ElementId]: """Checks the production list numbers and returns the element IDs that have discrepancies. Returns: The element IDs with discrepancies. """ -def check_position_numbers_part_list() -> List[ElementId]: +def check_position_numbers_part_list() -> list[ElementId]: """Checks the part list numbers and returns the element IDs that have discrepancies. Returns: @@ -36,7 +34,7 @@ def clear_errors() -> None: """Clears all errors. """ -def export_production_list_with_settings(element_id_list: List[ElementId], file_path: str, settings_file_path: str) -> None: +def export_production_list_with_settings(element_id_list: list[ElementId], file_path: str, settings_file_path: str) -> None: """Exports a production list using an additional settings file. Parameters: @@ -45,7 +43,7 @@ def export_production_list_with_settings(element_id_list: List[ElementId], file_ settings_file_path: The path to the settings file to be used for export. """ -def export_part_list_with_settings(element_id_list: List[ElementId], file_path: str, settings_file_path: str) -> None: +def export_part_list_with_settings(element_id_list: list[ElementId], file_path: str, settings_file_path: str) -> None: """Exports a part list using an additional settings file. Parameters: @@ -54,14 +52,14 @@ def export_part_list_with_settings(element_id_list: List[ElementId], file_path: settings_file_path: The path to the settings file to be used for export. """ -def generate_new_production_list_numbers(element_id_list: List[ElementId]) -> None: +def generate_new_production_list_numbers(element_id_list: list[ElementId]) -> None: """Generates new production list numbers for the specified elements. Parameters: element_id_list: The list of elements to generate numbers for. """ -def generate_new_part_list_numbers(element_id_list: List[ElementId]) -> None: +def generate_new_part_list_numbers(element_id_list: list[ElementId]) -> None: """Generates new part list numbers for the specified elements. Parameters: @@ -82,7 +80,7 @@ def load_part_list_calculation_settings(settings_file_path: str) -> None: settings_file_path: The path to the settings file to be loaded. """ -def generate_new_production_list_silently(element_id_list: List[ElementId], starting_number: UnsignedInt, keep_existing_numbers: bool, +def generate_new_production_list_silently(element_id_list: list[ElementId], starting_number: UnsignedInt, keep_existing_numbers: bool, with_containers: bool) -> None: """Generates new production list numbers silently starting from a given number, optionally keeping existing numbers and considering container elements. @@ -93,7 +91,7 @@ def generate_new_production_list_silently(element_id_list: List[ElementId], star with_containers: Whether to include container elements in the number generation. """ -def generate_new_part_list_silently(element_id_list: List[ElementId], starting_number: UnsignedInt, keep_existing_numbers: bool, +def generate_new_part_list_silently(element_id_list: list[ElementId], starting_number: UnsignedInt, keep_existing_numbers: bool, with_containers: bool) -> None: """Generates new part list numbers silently starting from a given number, optionally keeping existing numbers and considering container elements. @@ -104,7 +102,7 @@ def generate_new_part_list_silently(element_id_list: List[ElementId], starting_n with_containers: Whether to include container elements in the number generation. """ -def export_cover_list(element_id_list: List[ElementId], file_path: str) -> None: +def export_cover_list(element_id_list: list[ElementId], file_path: str) -> None: """Exports a Wall, Roof, or Floor list to the specified file path. Parameters: @@ -112,7 +110,7 @@ def export_cover_list(element_id_list: List[ElementId], file_path: str) -> None: file_path: The path of the target file for the export. """ -def export_cover_list_with_settings(element_id_list: List[ElementId], file_path: str, settings_file_path: str) -> None: +def export_cover_list_with_settings(element_id_list: list[ElementId], file_path: str, settings_file_path: str) -> None: """Exports a Wall, Roof, or Floor list to the specified file path using an additional settings file. Parameters: diff --git a/src/list_controller/py.typed b/src/list_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/machine_controller/__init__.pyi b/src/machine_controller/__init__.pyi index 585ba29..8ff0020 100644 --- a/src/machine_controller/__init__.pyi +++ b/src/machine_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork import vertex_list from cadwork.api_types import ElementId from cadwork.btl_version import btl_version @@ -101,7 +100,7 @@ def export_btl_with_presetting(btl_version: btl_version, file_path: str, presett >>> mc.export_btl_with_presetting(btl_version, output_path, presetting_file) """ -def calculate_btl_machine_data(element_id_list: List[ElementId], btl_version: btl_version) -> None: +def calculate_btl_machine_data(element_id_list: list[ElementId], btl_version: btl_version) -> None: """Calculates the Machine Data for BTL. Parameters: @@ -118,7 +117,7 @@ def calculate_btl_machine_data(element_id_list: List[ElementId], btl_version: bt >>> mc.calculate_btl_machine_data(beam_elements, btl_version) """ -def calculate_hundegger_machine_data(element_id_list: List[ElementId], hundeggertype: hundegger_machine_type) -> None: +def calculate_hundegger_machine_data(element_id_list: list[ElementId], hundeggertype: hundegger_machine_type) -> None: """Calculates the Machine Data for Hundegger. Parameters: @@ -178,7 +177,7 @@ def export_hundegger_with_file_path_and_presetting_silent(hundeggertype: hundegg """ -def get_element_hundegger_processings(element_id: ElementId, hundeggertype: hundegger_machine_type) -> List[ElementId]: +def get_element_hundegger_processings(element_id: ElementId, hundeggertype: hundegger_machine_type) -> list[ElementId]: """Gets the list of Hundegger processings for a specific element. Parameters: @@ -200,7 +199,7 @@ def get_element_hundegger_processings(element_id: ElementId, hundeggertype: hund """ -def get_element_btl_processings(element_id: ElementId, btl_version: btl_version) -> List[ElementId]: +def get_element_btl_processings(element_id: ElementId, btl_version: btl_version) -> list[ElementId]: """Gets the list of BTL processings for a specific element. Parameters: @@ -288,7 +287,7 @@ def get_processing_points(reference_element_id: ElementId, processing_id: Elemen """ -def get_processing_btl_parameter_set(reference_element_id: ElementId, processing_id: ElementId) -> List[str]: +def get_processing_btl_parameter_set(reference_element_id: ElementId, processing_id: ElementId) -> list[str]: """Gets the BTL parameter set of a specific processing. Parameters: diff --git a/src/machine_controller/py.typed b/src/machine_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/material_controller/__init__.pyi b/src/material_controller/__init__.pyi index 7a905a4..5c39c8b 100644 --- a/src/material_controller/__init__.pyi +++ b/src/material_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.api_types import MaterialId, UnsignedInt def create_material(name: str) -> MaterialId: @@ -412,7 +411,7 @@ def get_weight_type(material_id: MaterialId) -> str: The material weight type. """ -def get_all_materials() -> List[MaterialId]: +def get_all_materials() -> list[MaterialId]: """Retrieves a list of all materials. Returns: @@ -463,7 +462,7 @@ def get_short_name(material_id: MaterialId) -> str: The short name of the material. """ -def get_all_material_groups() -> List[MaterialId]: +def get_all_material_groups() -> list[MaterialId]: """Retrieves a list of all material groups. Returns: diff --git a/src/material_controller/py.typed b/src/material_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/menu_controller/__init__.pyi b/src/menu_controller/__init__.pyi index 5bb45ef..39ca11f 100644 --- a/src/menu_controller/__init__.pyi +++ b/src/menu_controller/__init__.pyi @@ -1,7 +1,4 @@ -from typing import List - - -def display_simple_menu(menu_items: List[str]) -> str: +def display_simple_menu(menu_items: list[str]) -> str: """Displays a simple menu. Parameters: diff --git a/src/menu_controller/py.typed b/src/menu_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/multi_layer_cover_controller/__init__.pyi b/src/multi_layer_cover_controller/__init__.pyi index 5f84e71..5e0a32e 100644 --- a/src/multi_layer_cover_controller/__init__.pyi +++ b/src/multi_layer_cover_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork import multi_layer_cover_type from cadwork.api_types import * from cadwork.multi_layer_type import multi_layer_type @@ -169,7 +168,7 @@ def set_cover_color(set_id: MultiLayerSetId, cover_color: ColorId) -> None: >>> mlc.set_cover_color(multi_layer_set_id, blue_color_id) """ -def get_multi_layer_walls() -> List[MultiLayerSetId]: +def get_multi_layer_walls() -> list[MultiLayerSetId]: """Gets all multi layer wall ids. Examples: @@ -370,7 +369,7 @@ def get_cover_color(set_id: MultiLayerSetId) -> ColorId: The cover color. """ -def get_multi_layer_framed_floors() -> List[MultiLayerSetId]: +def get_multi_layer_framed_floors() -> list[MultiLayerSetId]: """Gets all framed multi layer floor ids. Examples: @@ -398,7 +397,7 @@ def create_multi_layer_framed_floor(set_name: str) -> MultiLayerSetId: The multi layer set id. """ -def get_multi_layer_framed_roofs() -> List[MultiLayerSetId]: +def get_multi_layer_framed_roofs() -> list[MultiLayerSetId]: """Gets all multi layer roof ids. Examples: @@ -412,7 +411,7 @@ def get_multi_layer_framed_roofs() -> List[MultiLayerSetId]: The multi layer roof ids. """ -def get_multi_layer_solid_floors() -> List[MultiLayerSetId]: +def get_multi_layer_solid_floors() -> list[MultiLayerSetId]: """Gets all solid multi layer floor ids. Examples: @@ -468,7 +467,7 @@ def create_multi_layer_framed_wall(set_name: str) -> MultiLayerSetId: The multi layer set id. """ -def get_multi_layer_sets() -> List[MultiLayerSetId]: +def get_multi_layer_sets() -> list[MultiLayerSetId]: """Gets all multi layer set ids of all types. Examples: @@ -497,7 +496,7 @@ def create_multi_layer_by_cover_type(set_name: str, cover_type: multi_layer_cove The multi layer set id. """ -def get_multi_layer_sets_for_cover_type(cover_type: multi_layer_cover_type) -> List[MultiLayerSetId]: +def get_multi_layer_sets_for_cover_type(cover_type: multi_layer_cover_type) -> list[MultiLayerSetId]: """Gets all multi layer set ids of specified cover type. Parameters: @@ -511,7 +510,7 @@ def get_multi_layer_sets_for_cover_type(cover_type: multi_layer_cover_type) -> L """ -def get_multi_layer_log_walls() -> List[MultiLayerSetId]: +def get_multi_layer_log_walls() -> list[MultiLayerSetId]: """Gets all multi layer log wall ids. Examples: @@ -539,7 +538,7 @@ def create_multi_layer_log_wall(set_name: str) -> MultiLayerSetId: The multi layer set id. """ -def get_multi_layer_solid_roofs() -> List[MultiLayerSetId]: +def get_multi_layer_solid_roofs() -> list[MultiLayerSetId]: """Gets all multi layer solid roof ids. Examples: @@ -567,7 +566,7 @@ def create_multi_layer_solid_roof(set_name: str) -> MultiLayerSetId: The multi layer set id. """ -def get_multi_layer_solid_walls() -> List[MultiLayerSetId]: +def get_multi_layer_solid_walls() -> list[MultiLayerSetId]: """Gets all multi layer solid wall ids. Examples: diff --git a/src/multi_layer_cover_controller/py.typed b/src/multi_layer_cover_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/roof_controller/__init__.pyi b/src/roof_controller/__init__.pyi index 73e22c0..60cee98 100644 --- a/src/roof_controller/__init__.pyi +++ b/src/roof_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.api_types import ElementId def get_profile_length(element_id: ElementId) -> float: @@ -58,7 +57,7 @@ def get_edge_length(element_id: ElementId, edge_type: str) -> float: The edge length. """ -def get_all_caddy_element_ids() -> List[ElementId]: +def get_all_caddy_element_ids() -> list[ElementId]: """Gets all caddy elements Returns: diff --git a/src/roof_controller/py.typed b/src/roof_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/scene_controller/__init__.pyi b/src/scene_controller/__init__.pyi index 9c48503..76970e0 100644 --- a/src/scene_controller/__init__.pyi +++ b/src/scene_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.api_types import * def add_scene(name: str) -> bool: @@ -32,7 +31,7 @@ def delete_scene(name: str) -> bool: True if the operation succeeded, false otherwise. """ -def add_elements_to_scene(name: str, element_id_list: List[ElementId]) -> bool: +def add_elements_to_scene(name: str, element_id_list: list[ElementId]) -> bool: """Adds elements to a scene. Parameters: @@ -43,7 +42,7 @@ def add_elements_to_scene(name: str, element_id_list: List[ElementId]) -> bool: True if the operation succeeded, false otherwise. """ -def remove_elements_from_scene(name: str, element_id_list: List[ElementId]) -> bool: +def remove_elements_from_scene(name: str, element_id_list: list[ElementId]) -> bool: """Removes elements from a scene. Parameters: @@ -54,7 +53,7 @@ def remove_elements_from_scene(name: str, element_id_list: List[ElementId]) -> b True if the operation succeeded, false otherwise. """ -def get_elements_from_scene(name: str) -> List[ElementId]: +def get_elements_from_scene(name: str) -> list[ElementId]: """Gets the elements from a scene. Parameters: @@ -78,14 +77,14 @@ def clear_errors() -> None: """Clears all errors. """ -def get_scene_list() -> List[str]: +def get_scene_list() -> list[str]: """Gets the list of scenes. Returns: The list of scene names. """ -def group_scences(scene_names: List[str]) -> UnsignedInt: +def group_scences(scene_names: list[str]) -> UnsignedInt: """Groups the scenes to a scene group. Parameters: @@ -148,7 +147,7 @@ def rename_scene_group_by_index(group_index: UnsignedInt, new_name: str) -> None new_name: The new scene group name. """ -def group_scences_with_name(scene_names: List[str], group_name: str) -> UnsignedInt: +def group_scences_with_name(scene_names: list[str], group_name: str) -> UnsignedInt: """Groups the scenes to a scene group and sets the name of the new group. Parameters: diff --git a/src/scene_controller/py.typed b/src/scene_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/shop_drawing_controller/__init__.pyi b/src/shop_drawing_controller/__init__.pyi index 9b14315..d7e3ba9 100644 --- a/src/shop_drawing_controller/__init__.pyi +++ b/src/shop_drawing_controller/__init__.pyi @@ -1,4 +1,3 @@ -from typing import List from cadwork.point_3d import point_3d from cadwork.api_types import * @@ -35,7 +34,7 @@ def export_2d_hidden_lines_with_2dc(file_path: str, with_layout: bool) -> None: with_layout: Use layout, false by default. """ -def export_wall_with_clipboard(clipboard_number: UnsignedInt, element_id_list: List[ElementId]) -> None: +def export_wall_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None: """Exports a wall to the clipboard. Parameters: @@ -43,7 +42,7 @@ def export_wall_with_clipboard(clipboard_number: UnsignedInt, element_id_list: L element_id_list: The elements to export. """ -def export_export_solid_with_clipboard(clipboard_number: UnsignedInt, element_id_list: List[ElementId]) -> None: +def export_export_solid_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None: """Exports an export solid to the clipboard. Parameters: @@ -51,7 +50,7 @@ def export_export_solid_with_clipboard(clipboard_number: UnsignedInt, element_id element_id_list: The elements to export. """ -def export_piece_by_piece_with_clipboard(clipboard_number: UnsignedInt, element_id_list: List[ElementId]) -> None: +def export_piece_by_piece_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None: """Exports a piece-by-piece to the clipboard. Parameters: @@ -59,7 +58,7 @@ def export_piece_by_piece_with_clipboard(clipboard_number: UnsignedInt, element_ element_id_list: The elements to export. """ -def assign_export_solid(ceo_element_id_list: List[ElementId], element_id_list: List[ElementId]) -> None: +def assign_export_solid(ceo_element_id_list: list[ElementId], element_id_list: list[ElementId]) -> None: """Assigns elements to an export solid. Parameters: @@ -67,7 +66,7 @@ def assign_export_solid(ceo_element_id_list: List[ElementId], element_id_list: L element_id_list: The elements to assign. """ -def export_container_with_clipboard(clipboard_number: UnsignedInt, element_id_list: List[ElementId]) -> None: +def export_container_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None: """Export a container to the clipboard. Parameters: @@ -91,7 +90,7 @@ def add_wall_section_vertical(element_id: ElementId, position: point_3d) -> None position: The section position. """ -def export_wall_with_clipboard_and_presetting(clipboard_number: UnsignedInt, element_id_list: List[ElementId], presetting_file: str) -> None: +def export_wall_with_clipboard_and_presetting(clipboard_number: UnsignedInt, element_id_list: list[ElementId], presetting_file: str) -> None: """Exports a wall to the clipboard. Parameters: diff --git a/src/shop_drawing_controller/py.typed b/src/shop_drawing_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/utility_controller/__init__.pyi b/src/utility_controller/__init__.pyi index e779f49..6863d3e 100644 --- a/src/utility_controller/__init__.pyi +++ b/src/utility_controller/__init__.pyi @@ -1,5 +1,3 @@ -from typing import List -from typing import Tuple from cadwork.api_types import ElementId from cadwork.point_3d import point_3d from cadwork.window_geometry import window_geometry @@ -286,7 +284,7 @@ def enable_auto_display_refresh() -> None: >>> import element_controller as ec >>> uc.disable_auto_display_refresh() >>> # Perform operations that require disabled display refresh - >>> your_list_of_elements: List[int] = [] + >>> your_list_of_elements: list[int] = [] >>> uc.enable_auto_display_refresh() >>> ec.recreate_elements(your_list_of_elements) @@ -572,7 +570,7 @@ def init_LxSDK() -> None: """ -def load_element_attribute_display_settings(file_path: str, elements: List[ElementId]) -> None: +def load_element_attribute_display_settings(file_path: str, elements: list[ElementId]) -> None: """Loads element attribute display settings from a file. Parameters: @@ -697,7 +695,7 @@ def disable_update_variant() -> None: """ -def get_user_points() -> List[point_3d]: +def get_user_points() -> list[point_3d]: """Gets user points. Returns: @@ -705,7 +703,7 @@ def get_user_points() -> List[point_3d]: """ -def get_user_points_with_count(count: int) -> List[point_3d]: +def get_user_points_with_count(count: int) -> list[point_3d]: """Gets user points with a specified count. Parameters: @@ -1028,7 +1026,7 @@ def create_snapshot() -> str: """ -def get_3d_gui_upper_left_screen_coordinates() -> Tuple[int, int]: +def get_3d_gui_upper_left_screen_coordinates() -> tuple[int, int]: """Get the coordinates of the upper left corner of the 3D GUI. Returns: @@ -1044,7 +1042,7 @@ def get_3d_main_window_geometry() -> 'window_geometry': """ -def get_project_data_keys() -> List[str]: +def get_project_data_keys() -> list[str]: """Gets all keys for project data. Returns: diff --git a/src/utility_controller/py.typed b/src/utility_controller/py.typed new file mode 100644 index 0000000..e69de29 diff --git a/src/visualization_controller/__init__.pyi b/src/visualization_controller/__init__.pyi index 6f61614..69a36dd 100644 --- a/src/visualization_controller/__init__.pyi +++ b/src/visualization_controller/__init__.pyi @@ -1,10 +1,9 @@ -from typing import List from cadwork.camera_data import camera_data from cadwork.point_3d import point_3d from cadwork.api_types import * from cadwork.rgb_color import rgb_color -def set_color(element_id_list: List[ElementId], color_id: ColorId) -> None: +def set_color(element_id_list: list[ElementId], color_id: ColorId) -> None: """Sets the element color. Parameters: @@ -12,7 +11,7 @@ def set_color(element_id_list: List[ElementId], color_id: ColorId) -> None: color_id: The color ID to set. """ -def set_opengl_color(element_id_list: List[ElementId], color: rgb_color) -> None: +def set_opengl_color(element_id_list: list[ElementId], color: rgb_color) -> None: """Sets the element OpenGL color. Parameters: @@ -30,14 +29,14 @@ def is_active(element_id: ElementId) -> bool: True if the element is active, false otherwise. """ -def set_active(element_id_list: List[ElementId]) -> None: +def set_active(element_id_list: list[ElementId]) -> None: """Sets element active. Parameters: element_id_list: The list of element id. """ -def set_inactive(element_id_list: List[ElementId]) -> None: +def set_inactive(element_id_list: list[ElementId]) -> None: """Sets the element inactive. Parameters: @@ -54,14 +53,14 @@ def is_visible(element_id: ElementId) -> bool: True if the element is visible, false otherwise. """ -def set_visible(element_id_list: List[ElementId]) -> None: +def set_visible(element_id_list: list[ElementId]) -> None: """Sets the element visible. Parameters: element_id_list: The list of element id. """ -def set_invisible(element_id_list: List[ElementId]) -> None: +def set_invisible(element_id_list: list[ElementId]) -> None: """Sets the element invisible. Parameters: @@ -78,14 +77,14 @@ def is_immutable(element_id: ElementId) -> bool: True if the element is immutable, false otherwise. """ -def set_immutable(element_id_list: List[ElementId]) -> None: +def set_immutable(element_id_list: list[ElementId]) -> None: """Sets the element immutable. Parameters: element_id_list: The list of element id. """ -def set_mutable(element_id_list: List[ElementId]) -> None: +def set_mutable(element_id_list: list[ElementId]) -> None: """Sets the element mutable. Parameters: @@ -112,7 +111,7 @@ def refresh() -> None: """Refresh the drawing area. """ -def set_material(element_id_list: List[ElementId], element_id: ElementId) -> None: +def set_material(element_id_list: list[ElementId], element_id: ElementId) -> None: """Sets the element material. Parameters: @@ -206,14 +205,14 @@ def is_selectable(element_id: ElementId) -> bool: True if the element is selectable, false otherwise. """ -def set_unselectable(element_id_list: List[ElementId]) -> None: +def set_unselectable(element_id_list: list[ElementId]) -> None: """Sets a list of elements unselectable. Parameters: element_id_list: The list of element id. """ -def set_selectable(element_id_list: List[ElementId]) -> None: +def set_selectable(element_id_list: list[ElementId]) -> None: """Sets a list of elements selectable. Parameters: @@ -251,7 +250,7 @@ def show_perspective_central() -> None: """ -def set_color_without_material(element_id_list: List[ElementId], color_id: ColorId) -> None: +def set_color_without_material(element_id_list: list[ElementId], color_id: ColorId) -> None: """Sets the color of a list of elements without changing their material. Parameters: @@ -260,7 +259,7 @@ def set_color_without_material(element_id_list: List[ElementId], color_id: Color """ -def set_texture_rotated(element_id_list: List[ElementId], flag: bool) -> None: +def set_texture_rotated(element_id_list: list[ElementId], flag: bool) -> None: """Sets the rotation of the texture for a list of elements. Parameters: @@ -393,7 +392,7 @@ def get_element_transparency(element_id: ElementId) ->int: Transparency value as percentage. """ -def set_element_transparency(element_id_list: List[ElementId], value: int) -> None: +def set_element_transparency(element_id_list: list[ElementId], value: int) -> None: """Sets the element transparency. Parameters: @@ -411,7 +410,7 @@ def get_use_material_texture(element_id: ElementId) -> bool: True if the element is using material texture, false otherwise. """ -def set_use_material_texture(element_id_list: List[ElementId], value: bool) -> None: +def set_use_material_texture(element_id_list: list[ElementId], value: bool) -> None: """Sets element to use material texture. Parameters: diff --git a/src/visualization_controller/py.typed b/src/visualization_controller/py.typed new file mode 100644 index 0000000..e69de29