diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..d41a940
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1 @@
+*.gif filter=lfs diff=lfs merge=lfs -text
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 8906cb8..61d26e9 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
- python-version: '3.10'
+ python-version: '3.12'
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
\ No newline at end of file
diff --git a/.github/workflows/test_publish.yml b/.github/workflows/test_publish.yml
index e92c40f..fb83b2d 100644
--- a/.github/workflows/test_publish.yml
+++ b/.github/workflows/test_publish.yml
@@ -18,10 +18,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
- python-version: '3.10'
+ python-version: '3.12'
- run: pip install build
- run: python -m build
- uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
- skip-existing: true
\ No newline at end of file
+ skip-existing: true
diff --git a/dockerfile b/Dockerfile
similarity index 93%
rename from dockerfile
rename to Dockerfile
index fd991d7..8c973a7 100644
--- a/dockerfile
+++ b/Dockerfile
@@ -1,4 +1,4 @@
-FROM python:3.10
+FROM python:3.12
WORKDIR /app
diff --git a/docs/debug.md b/docs/debug.md
index 6bafe8d..9c55bde 100644
--- a/docs/debug.md
+++ b/docs/debug.md
@@ -6,7 +6,7 @@ hide:
**Debugging python script in cadwork**
This section refers to calling the plugins from the Plugin Bar.
If you want to debug a script in cadwork, then you can enable the console in User Test in the user settings. When cadwork is restarted, the console opens.
-In the console you will see the screen output, or errors.
+In the console you will see the screen output or errors.
User Test -> Userprofile -> Test Options... -> Console
diff --git a/docs/documentation/active_point_result.md b/docs/documentation/active_point_result.md
new file mode 100644
index 0000000..ae56849
--- /dev/null
+++ b/docs/documentation/active_point_result.md
@@ -0,0 +1,6 @@
+# active_point_result
+
+::: cadwork.active_point_result
+rendering:
+show_root_heading: false
+show_source: true
diff --git a/docs/documentation/api_types.md b/docs/documentation/api_types.md
new file mode 100644
index 0000000..081a321
--- /dev/null
+++ b/docs/documentation/api_types.md
@@ -0,0 +1,6 @@
+# Api Types
+
+::: cadwork.api_types
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/attribute_controller.md b/docs/documentation/attribute_controller.md
index 850334b..7d372e0 100644
--- a/docs/documentation/attribute_controller.md
+++ b/docs/documentation/attribute_controller.md
@@ -1,6 +1,6 @@
# Attribute Controller
-::: src.attribute_controller
+::: attribute_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/attribute_display_settings.md b/docs/documentation/attribute_display_settings.md
new file mode 100644
index 0000000..55188ce
--- /dev/null
+++ b/docs/documentation/attribute_display_settings.md
@@ -0,0 +1,6 @@
+# attribute_display_settings
+
+::: cadwork.attribute_display_settings
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/bim_controller.md b/docs/documentation/bim_controller.md
index 5fb70c9..2ba4033 100644
--- a/docs/documentation/bim_controller.md
+++ b/docs/documentation/bim_controller.md
@@ -1,6 +1,6 @@
# BIM Controller
-::: src.bim_controller
+::: bim_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/bim_team_upload_result.md b/docs/documentation/bim_team_upload_result.md
new file mode 100644
index 0000000..dec1542
--- /dev/null
+++ b/docs/documentation/bim_team_upload_result.md
@@ -0,0 +1,12 @@
+# BIMteam upload
+
+::: cadwork.bim_team_upload_result
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+
+::: cadwork.bim_team_upload_result_code
+ rendering:
+ show_root_heading: false
+ show_source: true
\ No newline at end of file
diff --git a/docs/documentation/brep_data.md b/docs/documentation/brep_data.md
index 56f91a2..6d27061 100644
--- a/docs/documentation/brep_data.md
+++ b/docs/documentation/brep_data.md
@@ -1,21 +1,21 @@
# BREP
-::: src.cadwork.facet_list
+::: cadwork.facet_list
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.edge_list
+::: cadwork.edge_list
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.polygon_list
+::: cadwork.polygon_list
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.vertex_list
+::: cadwork.vertex_list
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/camera_data.md b/docs/documentation/camera_data.md
index 48c5643..08e7de2 100644
--- a/docs/documentation/camera_data.md
+++ b/docs/documentation/camera_data.md
@@ -1,11 +1,11 @@
# Camera Data
-::: src.cadwork.camera_data
+::: cadwork.camera_data
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.projection_type
+::: cadwork.projection_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/connector_axis_controller.md b/docs/documentation/connector_axis_controller.md
index 46c236a..139d862 100644
--- a/docs/documentation/connector_axis_controller.md
+++ b/docs/documentation/connector_axis_controller.md
@@ -1,6 +1,6 @@
# Connector Axis Controller
-::: src.connector_axis_controller
+::: connector_axis_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/coordinate_system_data.md b/docs/documentation/coordinate_system_data.md
new file mode 100644
index 0000000..f499bb6
--- /dev/null
+++ b/docs/documentation/coordinate_system_data.md
@@ -0,0 +1,6 @@
+# coordinate_system_data
+
+::: cadwork.coordinate_system_data
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/dimension_controller.md b/docs/documentation/dimension_controller.md
index a1a2d23..906f076 100644
--- a/docs/documentation/dimension_controller.md
+++ b/docs/documentation/dimension_controller.md
@@ -1,6 +1,6 @@
# Dimension Controller
-::: src.dimension_controller
+::: dimension_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/display_attribute.md b/docs/documentation/display_attribute.md
new file mode 100644
index 0000000..f884963
--- /dev/null
+++ b/docs/documentation/display_attribute.md
@@ -0,0 +1,6 @@
+# display_attribute
+
+::: cadwork.display_attribute
+rendering:
+show_root_heading: false
+show_source: true
diff --git a/docs/documentation/element_controller.md b/docs/documentation/element_controller.md
index 7abf8a3..12a4049 100644
--- a/docs/documentation/element_controller.md
+++ b/docs/documentation/element_controller.md
@@ -1,6 +1,6 @@
# Element Controller
-::: src.element_controller
+::: element_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/element_filter.md b/docs/documentation/element_filter.md
new file mode 100644
index 0000000..b6b54ae
--- /dev/null
+++ b/docs/documentation/element_filter.md
@@ -0,0 +1,6 @@
+# element_filter
+
+::: cadwork.element_filter
+rendering:
+show_root_heading: false
+show_source: true
diff --git a/docs/documentation/element_map_query.md b/docs/documentation/element_map_query.md
new file mode 100644
index 0000000..c378158
--- /dev/null
+++ b/docs/documentation/element_map_query.md
@@ -0,0 +1,6 @@
+# element_map_query
+
+::: cadwork.element_map_query
+rendering:
+show_root_heading: false
+show_source: true
diff --git a/docs/documentation/element_module_properties.md b/docs/documentation/element_module_properties.md
index d5f6ef4..0d98804 100644
--- a/docs/documentation/element_module_properties.md
+++ b/docs/documentation/element_module_properties.md
@@ -1,6 +1,6 @@
# element_module_properties
-::: src.cadwork.element_module_properties
+::: cadwork.element_module_properties
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/element_type.md b/docs/documentation/element_type.md
index c6a897c..86c07b2 100644
--- a/docs/documentation/element_type.md
+++ b/docs/documentation/element_type.md
@@ -1,6 +1,6 @@
# element_type
-::: src.cadwork.element_type
+::: cadwork.element_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/endtype_controller.md b/docs/documentation/endtype_controller.md
index 6552168..efc2c01 100644
--- a/docs/documentation/endtype_controller.md
+++ b/docs/documentation/endtype_controller.md
@@ -1,6 +1,6 @@
# End-Type Controller
-::: src.endtype_controller
+::: endtype_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/enums.md b/docs/documentation/enums.md
index 837761d..8b127f0 100644
--- a/docs/documentation/enums.md
+++ b/docs/documentation/enums.md
@@ -1,59 +1,117 @@
+# Enum types
+
## Node symbols
-::: src.cadwork.node_symbol
+::: cadwork.node_symbol
rendering:
show_root_heading: false
show_source: true
## Element module
-::: src.cadwork.element_module_detail
+::: cadwork.element_module_detail
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.division_zone_direction
+::: cadwork.division_zone_direction
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.element_grouping_type
+::: cadwork.element_grouping_type
rendering:
show_root_heading: false
show_source: true
## F-Keys
-::: src.cadwork.shortcut_key
+::: cadwork.shortcut_key
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.shortcut_key_modifier
+::: cadwork.shortcut_key_modifier
rendering:
show_root_heading: false
show_source: true
## Machines
-::: src.cadwork.btl_version
+::: cadwork.btl_version
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.hundegger_machine_type
+::: cadwork.hundegger_machine_type
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.weinmann_mfb_version
+::: cadwork.weinmann_mfb_version
rendering:
show_root_heading: false
show_source: true
## IFC Aggregation Behaviour
-::: src.cadwork.ifc_element_combine_behaviour
+::: cadwork.ifc_element_combine_behaviour
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+## Multi Layer Type
+
+::: cadwork.multi_layer_type
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+## Multi Layer Cover Subtype
+
+::: cadwork.multi_layer_subtype
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+## Multi Layer Cover Type
+
+::: cadwork.multi_layer_cover_type
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+## BIMteam upload
+
+::: cadwork.bim_team_upload_result_code
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+### Dimenson base format
+
+::: cadwork.dimension_base_format
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+### DXF export version
+
+::: cadwork.dxf_export_version
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+### DXF layer format type
+
+::: cadwork.dxf_layer_format_type
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+## Vba catalog
+
+::: cadwork.vba_catalog_item_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/extended_settings.md b/docs/documentation/extended_settings.md
index aac68de..ee3acda 100644
--- a/docs/documentation/extended_settings.md
+++ b/docs/documentation/extended_settings.md
@@ -1,6 +1,6 @@
# extended_settings
-::: src.cadwork.extended_settings
+::: cadwork.extended_settings
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/file_controller.md b/docs/documentation/file_controller.md
index 2e77d4c..148a6da 100644
--- a/docs/documentation/file_controller.md
+++ b/docs/documentation/file_controller.md
@@ -1,6 +1,6 @@
# File Controller
-::: src.file_controller
+::: file_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/geometry_controller.md b/docs/documentation/geometry_controller.md
index 1572b8e..5ead026 100644
--- a/docs/documentation/geometry_controller.md
+++ b/docs/documentation/geometry_controller.md
@@ -1,6 +1,6 @@
# Geometry Controller
-::: src.geometry_controller
+::: geometry_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/hit_result.md b/docs/documentation/hit_result.md
new file mode 100644
index 0000000..18e66b2
--- /dev/null
+++ b/docs/documentation/hit_result.md
@@ -0,0 +1,6 @@
+# hit_result
+
+::: cadwork.hit_result
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/ifc_2x3_element_type.md b/docs/documentation/ifc_2x3_element_type.md
index 52c866d..05191f6 100644
--- a/docs/documentation/ifc_2x3_element_type.md
+++ b/docs/documentation/ifc_2x3_element_type.md
@@ -1,6 +1,6 @@
# ifc_2x3_element_type
-::: src.cadwork.ifc_2x3_element_type
+::: cadwork.ifc_2x3_element_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/ifc_options.md b/docs/documentation/ifc_options.md
index 4bb3a3d..49fb18d 100644
--- a/docs/documentation/ifc_options.md
+++ b/docs/documentation/ifc_options.md
@@ -1,26 +1,26 @@
# IFC Options
-::: src.cadwork.ifc_options
+::: cadwork.ifc_options
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.ifc_options_aggregation
+::: cadwork.ifc_options_aggregation
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.ifc_options_level_of_detail
+::: cadwork.ifc_options_level_of_detail
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.ifc_options_project_data
+::: cadwork.ifc_options_project_data
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.ifc_options_properties
+::: cadwork.ifc_options_properties
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/ifc_predefined_type.md b/docs/documentation/ifc_predefined_type.md
new file mode 100644
index 0000000..e0c0775
--- /dev/null
+++ b/docs/documentation/ifc_predefined_type.md
@@ -0,0 +1,6 @@
+# ifc_predefined_type
+
+::: cadwork.ifc_predefined_type
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/import_3dc_options.md b/docs/documentation/import_3dc_options.md
new file mode 100644
index 0000000..9fa2731
--- /dev/null
+++ b/docs/documentation/import_3dc_options.md
@@ -0,0 +1,6 @@
+# import_3dc_options
+
+::: cadwork.import_3dc_options
+ rendering:
+ show_root_heading: false
+ show_source: true
\ No newline at end of file
diff --git a/docs/documentation/layer_settings.md b/docs/documentation/layer_settings.md
index d56c0e7..06b8d59 100644
--- a/docs/documentation/layer_settings.md
+++ b/docs/documentation/layer_settings.md
@@ -1,6 +1,6 @@
# Layer Settings
-::: src.cadwork.layer_settings
+::: cadwork.layer_settings
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/list_controller.md b/docs/documentation/list_controller.md
index 1d8fa3e..7564e75 100644
--- a/docs/documentation/list_controller.md
+++ b/docs/documentation/list_controller.md
@@ -1,6 +1,6 @@
# List Controller
-::: src.list_controller
+::: list_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/machine_controller.md b/docs/documentation/machine_controller.md
index f5b5415..9a40c80 100644
--- a/docs/documentation/machine_controller.md
+++ b/docs/documentation/machine_controller.md
@@ -1,6 +1,6 @@
# Machine Controller
-::: src.machine_controller
+::: machine_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/material_controller.md b/docs/documentation/material_controller.md
index f76ecde..218d0b4 100644
--- a/docs/documentation/material_controller.md
+++ b/docs/documentation/material_controller.md
@@ -1,6 +1,6 @@
# Material Controller
-::: src.material_controller
+::: material_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/menu_controller.md b/docs/documentation/menu_controller.md
index 8d5e890..38b129e 100644
--- a/docs/documentation/menu_controller.md
+++ b/docs/documentation/menu_controller.md
@@ -1,6 +1,6 @@
# Menu Controller
-::: src.menu_controller
+::: menu_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/multi_layer_cover_controller.md b/docs/documentation/multi_layer_cover_controller.md
new file mode 100644
index 0000000..6f73ee9
--- /dev/null
+++ b/docs/documentation/multi_layer_cover_controller.md
@@ -0,0 +1,6 @@
+# Multi Layer Cover Controller
+
+::: multi_layer_cover_controller
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/point_3d.md b/docs/documentation/point_3d.md
index 0e7dd15..95af39f 100644
--- a/docs/documentation/point_3d.md
+++ b/docs/documentation/point_3d.md
@@ -1,6 +1,6 @@
# point_3d
-::: src.cadwork.point_3d
+::: cadwork.point_3d
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/process_type.md b/docs/documentation/process_type.md
index ea04168..095a950 100644
--- a/docs/documentation/process_type.md
+++ b/docs/documentation/process_type.md
@@ -1,6 +1,6 @@
# process_type
-::: src.cadwork.process_type
+::: cadwork.process_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/rhino_export_options.md b/docs/documentation/rhino_export_options.md
index a68a8e9..62d4b81 100644
--- a/docs/documentation/rhino_export_options.md
+++ b/docs/documentation/rhino_export_options.md
@@ -1,6 +1,6 @@
# rhino_options
-::: src.cadwork.rhino_options
+::: cadwork.rhino_options
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/roof_controller.md b/docs/documentation/roof_controller.md
index 094f6cf..66efda1 100644
--- a/docs/documentation/roof_controller.md
+++ b/docs/documentation/roof_controller.md
@@ -1,6 +1,6 @@
# Roof Controller
-::: src.roof_controller
+::: roof_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/scene_controller.md b/docs/documentation/scene_controller.md
index 60fb920..1719974 100644
--- a/docs/documentation/scene_controller.md
+++ b/docs/documentation/scene_controller.md
@@ -1,6 +1,6 @@
# Scene Controller
-::: src.scene_controller
+::: scene_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/shop_drawing_controller.md b/docs/documentation/shop_drawing_controller.md
index 6eaddc8..45be541 100644
--- a/docs/documentation/shop_drawing_controller.md
+++ b/docs/documentation/shop_drawing_controller.md
@@ -1,6 +1,6 @@
# Shop Drawing Controller
-::: src.shop_drawing_controller
+::: shop_drawing_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/shoulder_options.md b/docs/documentation/shoulder_options.md
new file mode 100644
index 0000000..fe04389
--- /dev/null
+++ b/docs/documentation/shoulder_options.md
@@ -0,0 +1,21 @@
+# Shoulder options
+
+::: cadwork.double_shoulder_options
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+::: cadwork.shoulder_options
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+::: cadwork.heel_shoulder_beam_geometry
+ rendering:
+ show_root_heading: false
+ show_source: true
+
+::: cadwork.heel_shoulder_options
+ rendering:
+ show_root_heading: false
+ show_source: true
\ No newline at end of file
diff --git a/docs/documentation/standard_element_type.md b/docs/documentation/standard_element_type.md
new file mode 100644
index 0000000..fe6efdc
--- /dev/null
+++ b/docs/documentation/standard_element_type.md
@@ -0,0 +1,6 @@
+# standard_element_type
+
+::: cadwork.standard_element_type
+ rendering:
+ show_root_heading: false
+ show_source: true
diff --git a/docs/documentation/text_object_options.md b/docs/documentation/text_object_options.md
index 196567f..5e77c6b 100644
--- a/docs/documentation/text_object_options.md
+++ b/docs/documentation/text_object_options.md
@@ -1,11 +1,11 @@
# Text Object Options
-::: src.cadwork.text_object_options
+::: cadwork.text_object_options
rendering:
show_root_heading: false
show_source: true
-::: src.cadwork.text_element_type
+::: cadwork.text_element_type
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/utility_controller.md b/docs/documentation/utility_controller.md
index c3f8c00..6c712a0 100644
--- a/docs/documentation/utility_controller.md
+++ b/docs/documentation/utility_controller.md
@@ -1,6 +1,6 @@
# Utility Controller
-::: src.utility_controller
+::: utility_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/visualization_controller.md b/docs/documentation/visualization_controller.md
index 29d8c5e..77690ce 100644
--- a/docs/documentation/visualization_controller.md
+++ b/docs/documentation/visualization_controller.md
@@ -1,6 +1,6 @@
# Visualization Controller
-::: src.visualization_controller
+::: visualization_controller
rendering:
show_root_heading: false
show_source: true
diff --git a/docs/documentation/window_geometry.md b/docs/documentation/window_geometry.md
new file mode 100644
index 0000000..567ba69
--- /dev/null
+++ b/docs/documentation/window_geometry.md
@@ -0,0 +1,6 @@
+# window_geometry
+
+::: cadwork.window_geometry
+ rendering:
+ show_root_heading: true
+ show_source: true
\ No newline at end of file
diff --git a/docs/examples/utility_example.md b/docs/examples/utility_example.md
index ea40c95..93d09d8 100644
--- a/docs/examples/utility_example.md
+++ b/docs/examples/utility_example.md
@@ -28,7 +28,7 @@ for p in points_range:
vc.set_color(drillings, 5)
uc.enable_auto_display_refresh()
-# ec.ec.recreate_elements(element_ids)
+ec.recreate_elements(drillings)
end = timer()
print(timedelta(seconds=end-start))
diff --git a/docs/img/console.gif b/docs/img/console.gif
index 716c43e..2ff83df 100644
Binary files a/docs/img/console.gif and b/docs/img/console.gif differ
diff --git a/docs/img/mcp/gemini-mcp.gif b/docs/img/mcp/gemini-mcp.gif
new file mode 100644
index 0000000..5b859e2
--- /dev/null
+++ b/docs/img/mcp/gemini-mcp.gif
@@ -0,0 +1,3 @@
+version https://git-lfs.github.com/spec/v1
+oid sha256:0d186d314f5b792a95c767cca400f252066297098653b4e1109a0e63813662d8
+size 20279546
diff --git a/docs/img/mcp/mcp.svg b/docs/img/mcp/mcp.svg
new file mode 100644
index 0000000..dea2577
--- /dev/null
+++ b/docs/img/mcp/mcp.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/docs/img/mcp/mcp_cgpt_app.png b/docs/img/mcp/mcp_cgpt_app.png
new file mode 100644
index 0000000..3499729
Binary files /dev/null and b/docs/img/mcp/mcp_cgpt_app.png differ
diff --git a/docs/img/mcp/mcp_python_api_v1.drawio.png b/docs/img/mcp/mcp_python_api_v1.drawio.png
new file mode 100644
index 0000000..d5e1e38
Binary files /dev/null and b/docs/img/mcp/mcp_python_api_v1.drawio.png differ
diff --git a/docs/js/tablesort.js b/docs/js/tablesort.js
index 98717ae..4d659ea 100644
--- a/docs/js/tablesort.js
+++ b/docs/js/tablesort.js
@@ -1,6 +1,11 @@
document$.subscribe(function () {
var tables = document.querySelectorAll("article table:not([class])")
+
+
tables.forEach(function (table) {
- new Tablesort(table)
+ table.querySelectorAll('tr').forEach(row => {
+ if(row.children[3]) row.children[3].style.display = 'none'; // Hide the 4th column
+ })
+ new Tablesort(table) // Initialize Tablesort on the table
})
-})
+})
\ No newline at end of file
diff --git a/docs/mcp.md b/docs/mcp.md
new file mode 100644
index 0000000..ab175ba
--- /dev/null
+++ b/docs/mcp.md
@@ -0,0 +1,118 @@
+---
+hide:
+ - navigation
+ - toc
+---
+
+# {: style="height: 32px; vertical-align: middle;" } MCP Cadwork Python API Server
+
+**MCP URL:** `https://pyapi.mcp.cadwork.dev/mcp`
+
+## What is MCP?
+
+The **Model Context Protocol (MCP)** is an open standard that enables AI assistants to securely connect to external
+context. Think of it as a bridge that allows AI models to access real-time, specialized information beyond their
+training data.
+
+When you connect an AI assistant to an MCP server, it gains the ability to query that server for relevant context,
+making responses more accurate and up-to-date.
+
+{width="1200" style="display: block; margin: 0 auto;"}
+
+## Demo
+
+See how easy it is to use the Cadwork Python API with an MCP-enabled AI assistant:
+
+
+
+You can use the Cadwork Python MCP for:
+
+- **Contextual Answers**: Ask questions in natural language and get responses that reference the actual API
+ documentation, including function signatures, parameters, and code examples.
+- **Code Generation**: Request script snippets for specific tasks. The AI can generate code using the correct Cadwork
+ API functions because it has direct access to the documentation.
+- **Discovery**: Explore available modules and functions by simply asking "What functions are available for geometry
+ operations?" or "How do I work with elements?"
+- **Troubleshooting**: Describe an error or unexpected behavior, and get help that's grounded in the actual API
+ specifications.
+
+## Setup instructions
+
+To use the Cadwork Python API documentation as an MCP server, you need to configure your AI assistant to connect to it.
+Here are the most common ai code assistants and how to configure them:
+
+
+
+??? note "Claude Desktop"
+
+ Add the following to your Claude Desktop configuration file via the UI:
+
+ `Settings` > `Connectors` > `Add custom connectors`
+
+ [Claude MCP Documentation](https://modelcontextprotocol.io/docs/develop/connect-remote-servers){target=_blank}
+
+??? note "Claude Code (CLI)"
+
+ Claude Code supports MCP servers natively. Add the server using:
+
+ ```bash
+ claude mcp add --transport http cadwork-pyapi https://pyapi.mcp.cadwork.dev/mcp
+ ```
+
+ [Claude Code MCP Guide](https://docs.anthropic.com/en/docs/claude-code/mcp){target=_blank}
+
+??? note "ChatGPT"
+
+ ChatGPT does support MCP servers connector (they are called App) but only on *developer mode*. You need to activate it
+ first and then:
+
+ `Settings` > `Apps` > `Create app` (Developer mode: on) > `Create app`
+
+
+ {width=300}
+
+
+ [OpenAI Plugins Documentation](https://help.openai.com/en/articles/11487775-apps-in-chatgpt#building-your-own-app){target=_blank}
+
+??? note "VS Code (GitHub Copilot)"
+
+ Add the following to your VS Code settings file (`.vscode/mcp.json` in your workspace or user settings):
+
+ ```json
+ {
+ "servers": {
+ "cadwork-pyapi": {
+ "type": "http",
+ "url": "https://pyapi.mcp.cadwork.dev/mcp"
+ }
+ }
+ }
+ ```
+
+ [VS Code MCP Documentation](https://code.visualstudio.com/docs/copilot/chat/mcp-servers){target=_blank}
+
+??? note "Gemini CLI"
+
+ Gemini CLI supports MCP servers natively through its command-line interface.
+
+ **Prerequisites**: Install the Gemini CLI first:
+
+ ```bash
+ npm install -g @google/gemini-cli@latest
+ ```
+
+ **Add the server**:
+
+ ```bash
+ gemini mcp add --transport http cadwork-pyapi https://pyapi.mcp.cadwork.dev/mcp
+ ```
+
+ **Verify the connection**:
+
+ ```bash
+ gemini mcp list
+ ```
+
+ Once added, the Cadwork Python API documentation will be automatically available when you interact with Gemini CLI.
+
+ [Gemini MCP Guide](https://geminicli.com/docs/tools/mcp-server){target=_blank}
\ No newline at end of file
diff --git a/docs/release_notes.md b/docs/release_notes.md
index 955c041..47b60b9 100644
--- a/docs/release_notes.md
+++ b/docs/release_notes.md
@@ -1,3639 +1,137 @@
----
-hide:
- - navigation
----
+# Newly added functions in cadwork 3D API Build >= 2025.0.274
-# Differences from the last to the current version
+* Added examples to the docstrings for better understanding.
+* Corrected several argument types in function signatures.
-- What all counts as a change:
- - New functions
- - Changed function descriptions (docstrings)
- - New classes
- - Changed classes descriptions (docstrings)
- - New enums
- - Changed enums descriptions (docstrings)
+### Functions machine_controller
-
-## New Items
-### Functions attribute_controller
-#### is_attribute_visible_in_modify_window
-
-```python
-def is_attribute_visible_in_modify_window(number: int) ->bool:
- """is attribute visible in modify window
-
- Parameters:
- number: number
-
- Returns:
- bool
- """
-
-```
-
-#### set_attribute_visibility_in_modify_window
-
-```python
-def set_attribute_visibility_in_modify_window(number: int, visibility: bool
- ) ->None:
- """set attribute visibility in modify window
-
- Parameters:
- number: number
- visibility: visibility
-
- Returns:
- None
- """
-
-```
-
-#### set_cutting_set
-
-```python
-def set_cutting_set(element_id_list: List[int], cutting_set_name: str) ->bool:
- """set cutting set
-
- Parameters:
- element_id_list: element_id_list
- cutting_set_name: cutting_set_name
-
- Returns:
- bool
- """
-
-```
-
-## New Items
-### Functions bim_controller
-#### get_ifc_predefined_type
-
-```python
-def get_ifc_predefined_type(element_id: int) ->ifc_predefined_type:
- """Get the IfcPredefinedType of an element.
-
- Parameters:
- element_id: element_id
-
- Returns:
- IfcPredefinedType Wrapper
- """
-
-```
-
-#### set_ifc_predefined_type
-
-```python
-def set_ifc_predefined_type(element_i_ds: List[int], predefined_type: None
- ) ->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:
- element_i_ds: element_i_ds
- predefined_type: predefined_type
-
- Returns:
- None
- """
-
-```
-
-## New Items
-### Functions dimension_controller
-#### get_distance
-
-```python
-def get_distance(element: int) ->point_3d:
- """Get the distance to the dimension reference point. The point is in the plane of the dimensioning.
-
- Parameters:
- element: element
-
- Returns:
- point_3d
- """
-
-```
-
-#### get_plane_normal
-
-```python
-def get_plane_normal(element: int) ->point_3d:
- """Get the plane normal
-
- Parameters:
- element: element
-
- Returns:
- normal
- """
-
-```
-
-#### get_plane_xl
-
-```python
-def get_plane_xl(element: int) ->point_3d:
- """Get the plane x direction
-
- Parameters:
- element: element
-
- Returns:
- x direction
- """
-
-```
-
-#### get_segment_count
-
-```python
-def get_segment_count(element: int) ->int:
- """Get count of segments
-
- Parameters:
- element: element
-
- Returns:
- segment count
- """
-
-```
-
-#### get_segment_distance
-
-```python
-def get_segment_distance(element: int, segment_index: int) ->float:
- """Get the distance from the anchor point to the dimension segment
-
- Parameters:
- element: element
- segment_index: segment_index
-
- Returns:
- distance
- """
-
-```
-
-## New Items
-### Functions element_controller
-#### convert_surfaces_to_roof_surfaces
-
-```python
-def convert_surfaces_to_roof_surfaces(elements: List[int], roof_name: str
- ) ->None:
- """converts surfaces to roof surfaces
-
- Parameters:
- elements: elements
- roof_name: roof_name
-
- Returns:
- None
- """
-
-```
-
-#### start_standard_element_dialog
-
-```python
-def start_standard_element_dialog(standard_element_type: None) ->str:
- """Starts the standard element dialogue based on the chosen element type
-
- Parameters:
- standard_element_type: standard_element_type
-
- Returns:
- Returns guid of selected standard element if item is valid, else null
- """
-
-```
-
-#### remove_standard_connector_axis
-
-```python
-def remove_standard_connector_axis(a0: str) ->None:
- """remove standard connector axis
-
- Parameters:
- a0: a0
-
- Returns:
- None
- """
-
-```
-
-#### remove_standard_beam
-
-```python
-def remove_standard_beam(guid: str) ->None:
- """remove standard beam
-
- Parameters:
- guid: guid
-
- Returns:
- None
- """
-
-```
-
-#### remove_standard_panel
-
-```python
-def remove_standard_panel(guid: str) ->None:
- """remove standard panel
-
- Parameters:
- guid: guid
-
- Returns:
- None
- """
-
-```
-
-#### remove_standard_container
-
-```python
-def remove_standard_container(guid: str) ->None:
- """remove standard container
-
- Parameters:
- guid: guid
-
- Returns:
- None
- """
-
-```
-
-#### remove_standard_export_solid
-
-```python
-def remove_standard_export_solid(guid: str) ->None:
- """remove standard export solid
-
- Parameters:
- guid: guid
-
- Returns:
- None
- """
-
-```
-
-#### get_user_element_ids_with_count
-
-```python
-def get_user_element_ids_with_count(count: int) ->List[int]:
- """get user element ids with count
-
- Parameters:
- count: count
-
- Returns:
- List[int]
- """
-
-```
-
-#### cut_scarf_straight
-
-```python
-def cut_scarf_straight(elements: List[int], length: float, depth: float,
- clearance_length: float, clearance_depth: float, clearance_hook: float,
- drilling_count: int, drilling_diameter: float, drilling_tolerance: float
- ) ->None:
- """cut scarf straight
-
- Parameters:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- clearance_hook: clearance_hook
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
-
- Returns:
- None
- """
-
-```
-
-#### cut_scarf_diagonal
-
-```python
-def cut_scarf_diagonal(elements: List[int], length: float, depth: float,
- clearance_length: float, clearance_depth: float, drilling_count: int,
- drilling_diameter: float, drilling_tolerance: float) ->None:
- """cut scarf diagonal
-
- Parameters:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
-
- Returns:
- None
- """
-
-```
-
-#### cut_scarf_with_wedge
-
-```python
-def cut_scarf_with_wedge(elements: List[int], length: float, depth: float,
- clearance_length: float, clearance_depth: float, wedge_width: float,
- drilling_count: int, drilling_diameter: float, drilling_tolerance: float
- ) ->None:
- """cut scarf with wedge
-
- Parameters:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- wedge_width: wedge_width
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
-
- Returns:
- None
- """
-
-```
-
-#### cut_beam_end_profile
+#### get_element_hundegger_processings
```python
-def cut_beam_end_profile(elements: List[int], profile_name: str,
- on_start_face: bool, on_end_face: bool) ->None:
- """cut beam end profile
+def get_element_hundegger_processings(element_id: int, hundeggertype: int) -> List[int]:
+ """Get Hundegger processing IDs for an element.
Parameters:
- elements: elements
- profile_name: profile_name
- on_start_face: on_start_face
- on_end_face: on_end_face
+ element_id: The element ID.
+ hundeggertype: The Hundegger type.
Returns:
- None
+ List of processing IDs.
"""
-
```
-## New Items
-### Functions geometry_controller
-#### get_round_machine_rough_part_negative_width
+#### get_element_btl_processings
```python
-def get_round_machine_rough_part_negative_width(element_id: int) ->bool:
- """get round machine rough part negative width
+def get_element_btl_processings(element_id: int, btl_version: int) -> List[int]:
+ """Get BTL processing IDs for an element.
Parameters:
- element_id: element_id
+ element_id: The element ID.
+ btl_version: The BTL version.
Returns:
- bool
+ List of processing IDs.
"""
-
```
-#### set_round_machine_rough_part_negative_width
+#### get_processing_name
```python
-def set_round_machine_rough_part_negative_width(elements: List[int], value:
- bool) ->None:
- """set round machine rough part negative width
+def get_processing_name(reference_element_id: int, processing_id: int) -> str:
+ """Get the name of a processing.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
+ reference_element_id: The reference element ID.
+ processing_id: The processing ID.
-```
-
-#### get_round_machine_rough_part_positive_width
-
-```python
-def get_round_machine_rough_part_positive_width(element_id: int) ->bool:
- """get round machine rough part positive width
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
- Parameters:
- element_id: element_id
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> name = mc.get_processing_name(element, processing)
Returns:
- bool
+ The processing name.
"""
-
```
-#### set_round_machine_rough_part_positive_width
+#### get_processing_code
```python
-def set_round_machine_rough_part_positive_width(elements: List[int], value:
- bool) ->None:
- """set round machine rough part positive width
+def get_processing_code(reference_element_id: int, processing_id: int) -> str:
+ """Get the code of a processing.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
-
-```
+ reference_element_id: The reference element ID.
+ processing_id: The processing ID.
-#### get_round_machine_rough_part_negative_height
-
-```python
-def get_round_machine_rough_part_negative_height(element_id: int) ->bool:
- """get round machine rough part negative height
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
- Parameters:
- element_id: element_id
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> code = mc.get_processing_code(element, processing)
Returns:
- bool
+ The processing code.
"""
-
```
-#### set_round_machine_rough_part_negative_height
+#### get_processing_points
```python
-def set_round_machine_rough_part_negative_height(elements: List[int], value:
- bool) ->None:
- """set round machine rough part negative height
+def get_processing_points(reference_element_id: int, processing_id: int) -> vertex_list:
+ """Get the points of a processing.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
+ reference_element_id: The reference element ID.
+ processing_id: The processing ID.
-```
-
-#### get_round_machine_rough_part_positive_height
-
-```python
-def get_round_machine_rough_part_positive_height(element_id: int) ->bool:
- """get round machine rough part positive height
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
- Parameters:
- element_id: element_id
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> points = mc.get_processing_points(element, processing)
Returns:
- bool
+ A vertex_list of points.
"""
-
```
-#### set_round_machine_rough_part_positive_height
+#### get_processing_btl_parameter_set
```python
-def set_round_machine_rough_part_positive_height(elements: List[int], value:
- bool) ->None:
- """set round machine rough part positive height
+def get_processing_btl_parameter_set(reference_element_id: int, processing_id: int) -> List[str]:
+ """Get the BTL parameter set for a processing.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
-
-```
+ reference_element_id: The reference element ID.
+ processing_id: The processing ID.
-#### get_round_machine_rough_part_negative_length
-
-```python
-def get_round_machine_rough_part_negative_length(element_id: int) ->bool:
- """get round machine rough part negative length
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
- Parameters:
- element_id: element_id
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> parameters = mc.get_processing_btl_parameter_set(element, processing)
Returns:
- bool
+ List of BTL parameter strings.
"""
-
```
-#### set_round_machine_rough_part_negative_length
-
-```python
-def set_round_machine_rough_part_negative_length(elements: List[int], value:
- bool) ->None:
- """set round machine rough part negative length
-
- Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
-
-```
-
-#### get_round_machine_rough_part_positive_length
-
-```python
-def get_round_machine_rough_part_positive_length(element_id: int) ->bool:
- """get round machine rough part positive length
-
- Parameters:
- element_id: element_id
-
- Returns:
- bool
- """
-
-```
-
-#### set_round_machine_rough_part_positive_length
-
-```python
-def set_round_machine_rough_part_positive_length(elements: List[int], value:
- bool) ->None:
- """set round machine rough part positive length
-
- Parameters:
- elements: elements
- value: value
-
- Returns:
- None
- """
-
-```
-
-#### get_standard_element_width_from_guid
-
-```python
-def get_standard_element_width_from_guid(standard_element_guid: str) ->float:
- """get standard element width from guid
-
- Parameters:
- standard_element_guid: standard_element_guid
-
- Returns:
- float
- """
-
-```
-
-#### get_standard_element_height_from_guid
-
-```python
-def get_standard_element_height_from_guid(standard_element_guid: str) ->float:
- """get standard element height from guid
-
- Parameters:
- standard_element_guid: standard_element_guid
-
- Returns:
- float
- """
-
-```
-
-#### get_standard_element_length_from_guid
-
-```python
-def get_standard_element_length_from_guid(standard_element_guid: str) ->float:
- """get standard element length from guid
-
- Parameters:
- standard_element_guid: standard_element_guid
-
- Returns:
- float
- """
-
-```
-
-#### get_standard_element_width_from_name
-
-```python
-def get_standard_element_width_from_name(standard_element_name: str) ->float:
- """get standard element width from name
-
- Parameters:
- standard_element_name: standard_element_name
-
- Returns:
- float
- """
-
-```
-
-#### get_standard_element_height_from_name
-
-```python
-def get_standard_element_height_from_name(standard_element_name: str) ->float:
- """get standard element height from name
-
- Parameters:
- standard_element_name: standard_element_name
-
- Returns:
- float
- """
-
-```
-
-#### get_standard_element_length_from_name
-
-```python
-def get_standard_element_length_from_name(standard_element_name: str) ->float:
- """get standard element length from name
-
- Parameters:
- standard_element_name: standard_element_name
-
- Returns:
- float
- """
-
-```
-
-## New Items
-### Functions list_controller
-#### export_cover_list
-
-```python
-def export_cover_list(element_id_list: List[int], file_path: str) ->None:
- """Exports a Wall/Roof/Floor list
-
- Parameters:
- element_id_list: element_id_list
- file_path: file_path
-
- Returns:
- None
- """
-
-```
-
-#### export_cover_list_with_settings
-
-```python
-def export_cover_list_with_settings(element_id_list: List[int], file_path:
- str, settings_file_path: str) ->None:
- """Exports a Wall/Roof/Floor list with settings file
-
- Parameters:
- element_id_list: element_id_list
- file_path: file_path
- settings_file_path: settings_file_path
-
- Returns:
- None
- """
-
-```
-
-## New Items
-### Functions material_controller
-#### get_material_color_assignment_for_nodes
-
-```python
-def get_material_color_assignment_for_nodes(a0: int) ->int:
- """get material color assignment for nodes
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_nodes
-
-```python
-def set_material_color_assignment_for_nodes(a0: int, a1: int) ->None:
- """set material color assignment for nodes
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_standard_axes
-
-```python
-def get_material_color_assignment_for_standard_axes(a0: int) ->int:
- """get material color assignment for standard axes
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_standard_axes
-
-```python
-def set_material_color_assignment_for_standard_axes(a0: int, a1: int) ->None:
- """set material color assignment for standard axes
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_drillings
-
-```python
-def get_material_color_assignment_for_drillings(a0: int) ->int:
- """get material color assignment for drillings
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_drillings
-
-```python
-def set_material_color_assignment_for_drillings(a0: int, a1: int) ->None:
- """set material color assignment for drillings
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_mep_axes
-
-```python
-def get_material_color_assignment_for_mep_axes(a0: int) ->int:
- """get material color assignment for mep axes
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_mep_axes
-
-```python
-def set_material_color_assignment_for_mep_axes(a0: int, a1: int) ->None:
- """set material color assignment for mep axes
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_beams
-
-```python
-def get_material_color_assignment_for_beams(a0: int) ->int:
- """get material color assignment for beams
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_beams
-
-```python
-def set_material_color_assignment_for_beams(a0: int, a1: int) ->None:
- """set material color assignment for beams
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_panels
-
-```python
-def get_material_color_assignment_for_panels(a0: int) ->int:
- """get material color assignment for panels
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_panels
-
-```python
-def set_material_color_assignment_for_panels(a0: int, a1: int) ->None:
- """set material color assignment for panels
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_auxiliary_elements
-
-```python
-def get_material_color_assignment_for_auxiliary_elements(a0: int) ->int:
- """get material color assignment for auxiliary elements
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_auxiliary_elements
-
-```python
-def set_material_color_assignment_for_auxiliary_elements(a0: int, a1: int
- ) ->None:
- """set material color assignment for auxiliary elements
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_material_color_assignment_for_surfaces
-
-```python
-def get_material_color_assignment_for_surfaces(a0: int) ->int:
- """get material color assignment for surfaces
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_material_color_assignment_for_surfaces
-
-```python
-def set_material_color_assignment_for_surfaces(a0: int, a1: int) ->None:
- """set material color assignment for surfaces
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_color
-
-```python
-def get_texture_color(a0: int) ->int:
- """get texture color
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_texture_color
-
-```python
-def set_texture_color(a0: int, a1: int) ->None:
- """set texture color
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_transparency
-
-```python
-def get_texture_transparency(a0: int) ->int:
- """get texture transparency
-
- Parameters:
- a0: a0
-
- Returns:
- int
- """
-
-```
-
-#### set_texture_transparency
-
-```python
-def set_texture_transparency(a0: int, a1: int) ->None:
- """set texture transparency
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_rotation_angle
-
-```python
-def get_texture_rotation_angle(a0: int) ->float:
- """get texture rotation angle
-
- Parameters:
- a0: a0
-
- Returns:
- float
- """
-
-```
-
-#### set_texture_rotation_angle
-
-```python
-def set_texture_rotation_angle(a0: int, a1: float) ->None:
- """set texture rotation angle
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_length_alignment
-
-```python
-def get_texture_length_alignment(a0: int) ->bool:
- """get texture length alignment
-
- Parameters:
- a0: a0
-
- Returns:
- bool
- """
-
-```
-
-#### set_texture_length_alignment
-
-```python
-def set_texture_length_alignment(a0: int, a1: bool) ->None:
- """set texture length alignment
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_zoom_x
-
-```python
-def get_texture_zoom_x(a0: int) ->float:
- """get texture zoom x
-
- Parameters:
- a0: a0
-
- Returns:
- float
- """
-
-```
-
-#### set_texture_zoom_x
-
-```python
-def set_texture_zoom_x(a0: int, a1: float) ->None:
- """set texture zoom x
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-#### get_texture_zoom_y
-
-```python
-def get_texture_zoom_y(a0: int) ->float:
- """get texture zoom y
-
- Parameters:
- a0: a0
-
- Returns:
- float
- """
-
-```
-
-#### set_texture_zoom_y
-
-```python
-def set_texture_zoom_y(a0: int, a1: float) ->None:
- """set texture zoom y
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
-
-```
-
-## New Items
-### Functions scene_controller
-#### is_scene_present
-
-```python
-def is_scene_present(name: str) ->bool:
- """Queries of scene with name is present
-
- Parameters:
- name: name
-
- Returns:
- presence of scene
- """
-
-```
-
-#### set_group_tab_color
-
-```python
-def set_group_tab_color(scene_group_name: str, red: int, green: int, blue: int
- ) ->None:
- """set group tab color
-
- Parameters:
- scene_group_name: scene_group_name
- red: red
- green: green
- blue: blue
-
- Returns:
- None
- """
-
-```
-
-#### rename_scene_group
-
-```python
-def rename_scene_group(old_name: str, new_name: str) ->None:
- """rename scene group
-
- Parameters:
- old_name: old_name
- new_name: new_name
-
- Returns:
- None
- """
-
-```
-
-#### get_group_index_by_name
-
-```python
-def get_group_index_by_name(scene_group_name: str) ->int:
- """get group index by name
-
- Parameters:
- scene_group_name: scene_group_name
-
- Returns:
- int
- """
-
-```
-
-#### rename_scene_group_by_index
-
-```python
-def rename_scene_group_by_index(group_index: int, new_name: str) ->None:
- """rename scene group by index
-
- Parameters:
- group_index: group_index
- new_name: new_name
-
- Returns:
- None
- """
-
-```
-
-#### group_scences_with_name
-
-```python
-def group_scences_with_name(a0: List[str], a1: str) ->int:
- """group scences with name
-
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- int
- """
-
-```
-
-## New Items
-### Functions utility_controller
-#### get_3d_main_window_geometry
-
-```python
-def get_3d_main_window_geometry() ->'window_geometry':
- """get 3d main window geometry
-
- Returns:
- window geometry
- """
-
-```
-
-#### get_project_data_keys
-
-```python
-def get_project_data_keys() ->List[str]:
- """get project data keys
-
- Returns:
- List[str]
- """
-
-```
-
-## New Items
-### Classes cadwork
-#### coordinate_system_data
-
-```python
-class coordinate_system_data:
-
- def get_p1(self) ->point_3d:
- """get p1
-
- Returns:
- point_3d
- """
-
- def get_p2(self) ->point_3d:
- """get p2
-
- Returns:
- point_3d
- """
-
- def get_p3(self) ->point_3d:
- """get p3
-
- Returns:
- point_3d
- """
-
-```
-
-## New Items
-### Classes cadwork
-#### ifc_predefined_type
-
-```python
-class ifc_predefined_type:
-
- def is_none(self) ->bool:
- """is none
-
- Returns:
- bool
- """
-
- def is_ceiling(self) ->bool:
- """is ceiling
-
- Returns:
- bool
- """
-
- def is_cladding(self) ->bool:
- """is cladding
-
- Returns:
- bool
- """
-
- def is_flooring(self) ->bool:
- """is flooring
-
- Returns:
- bool
- """
-
- def is_insulation(self) ->bool:
- """is insulation
-
- Returns:
- bool
- """
-
- def is_membrane(self) ->bool:
- """is membrane
-
- Returns:
- bool
- """
-
- def is_roofing(self) ->bool:
- """is roofing
-
- Returns:
- bool
- """
-
- def is_sleeving(self) ->bool:
- """is sleeving
-
- Returns:
- bool
- """
-
- def is_wrapping(self) ->bool:
- """is wrapping
-
- Returns:
- bool
- """
-
- def is_footing_beam(self) ->bool:
- """is footing beam
-
- Returns:
- bool
- """
-
- def is_pad_footing(self) ->bool:
- """is pad footing
-
- Returns:
- bool
- """
-
- def is_pile_cap(self) ->bool:
- """is pile cap
-
- Returns:
- bool
- """
-
- def is_strip_footing(self) ->bool:
- """is strip footing
-
- Returns:
- bool
- """
-
- def is_cohesion(self) ->bool:
- """is cohesion
-
- Returns:
- bool
- """
-
- def is_friction(self) ->bool:
- """is friction
-
- Returns:
- bool
- """
-
- def is_support(self) ->bool:
- """is support
-
- Returns:
- bool
- """
-
- def is_balustrade(self) ->bool:
- """is balustrade
-
- Returns:
- bool
- """
-
- def is_guardrail(self) ->bool:
- """is guardrail
-
- Returns:
- bool
- """
-
- def is_handrail(self) ->bool:
- """is handrail
-
- Returns:
- bool
- """
-
- def is_baseslab(self) ->bool:
- """is baseslab
-
- Returns:
- bool
- """
-
- def is_floor(self) ->bool:
- """is floor
-
- Returns:
- bool
- """
-
- def is_landing(self) ->bool:
- """is landing
-
- Returns:
- bool
- """
-
- def is_roof(self) ->bool:
- """is roof
-
- Returns:
- bool
- """
-
- def is_beam(self) ->bool:
- """is beam
-
- Returns:
- bool
- """
-
- def is_spandrel(self) ->bool:
- """is spandrel
-
- Returns:
- bool
- """
-
- def is_tbeam(self) ->bool:
- """is tbeam
-
- Returns:
- bool
- """
-
- def is_complex(self) ->bool:
- """is complex
-
- Returns:
- bool
- """
-
- def is_element(self) ->bool:
- """is element
-
- Returns:
- bool
- """
-
- def is_partial(self) ->bool:
- """is partial
-
- Returns:
- bool
- """
-
- def is_provision_for_space(self) ->bool:
- """is provision for space
-
- Returns:
- bool
- """
-
- def is_provision_for_void(self) ->bool:
- """is provision for void
-
- Returns:
- bool
- """
-
- def is_column(self) ->bool:
- """is column
-
- Returns:
- bool
- """
-
- def is_pilaster(self) ->bool:
- """is pilaster
-
- Returns:
- bool
- """
-
- def is_molding(self) ->bool:
- """is molding
-
- Returns:
- bool
- """
-
- def is_skirtingboard(self) ->bool:
- """is skirtingboard
-
- Returns:
- bool
- """
-
- def is_door(self) ->bool:
- """is door
-
- Returns:
- bool
- """
-
- def is_gate(self) ->bool:
- """is gate
-
- Returns:
- bool
- """
-
- def is_trap_door(self) ->bool:
- """is trap door
-
- Returns:
- bool
- """
-
- def is_caisson_foundation(self) ->bool:
- """is caisson foundation
-
- Returns:
- bool
- """
-
- def is_brace(self) ->bool:
- """is brace
-
- Returns:
- bool
- """
-
- def is_chord(self) ->bool:
- """is chord
-
- Returns:
- bool
- """
-
- def is_collar(self) ->bool:
- """is collar
-
- Returns:
- bool
- """
-
- def is_member(self) ->bool:
- """is member
-
- Returns:
- bool
- """
-
- def is_mullion(self) ->bool:
- """is mullion
-
- Returns:
- bool
- """
-
- def is_plate(self) ->bool:
- """is plate
-
- Returns:
- bool
- """
-
- def is_post(self) ->bool:
- """is post
-
- Returns:
- bool
- """
-
- def is_purlin(self) ->bool:
- """is purlin
-
- Returns:
- bool
- """
-
- def is_rafter(self) ->bool:
- """is rafter
-
- Returns:
- bool
- """
-
- def is_stringer(self) ->bool:
- """is stringer
-
- Returns:
- bool
- """
-
- def is_strut(self) ->bool:
- """is strut
-
- Returns:
- bool
- """
-
- def is_stud(self) ->bool:
- """is stud
-
- Returns:
- bool
- """
-
- def is_bored(self) ->bool:
- """is bored
-
- Returns:
- bool
- """
-
- def is_driven(self) ->bool:
- """is driven
-
- Returns:
- bool
- """
-
- def is_jetgrouting(self) ->bool:
- """is jetgrouting
-
- Returns:
- bool
- """
-
- def is_curtain_panel(self) ->bool:
- """is curtain panel
-
- Returns:
- bool
- """
-
- def is_sheet(self) ->bool:
- """is sheet
-
- Returns:
- bool
- """
-
- def is_half_turn_ramp(self) ->bool:
- """is half turn ramp
-
- Returns:
- bool
- """
-
- def is_quarter_turn_ramp(self) ->bool:
- """is quarter turn ramp
-
- Returns:
- bool
- """
-
- def is_spiral_ramp(self) ->bool:
- """is spiral ramp
-
- Returns:
- bool
- """
-
- def is_straight_run_ramp(self) ->bool:
- """is straight run ramp
-
- Returns:
- bool
- """
-
- def is_two_quarter_turn_ramp(self) ->bool:
- """is two quarter turn ramp
-
- Returns:
- bool
- """
-
- def is_two_straight_run_ramp(self) ->bool:
- """is two straight run ramp
-
- Returns:
- bool
- """
-
- def is_barrel_roof(self) ->bool:
- """is barrel roof
-
- Returns:
- bool
- """
-
- def is_butterfly_roof(self) ->bool:
- """is butterfly roof
-
- Returns:
- bool
- """
-
- def is_dome_roof(self) ->bool:
- """is dome roof
-
- Returns:
- bool
- """
-
- def is_flat_roof(self) ->bool:
- """is flat roof
-
- Returns:
- bool
- """
-
- def is_freeform(self) ->bool:
- """is freeform
-
- Returns:
- bool
- """
-
- def is_gable_roof(self) ->bool:
- """is gable roof
-
- Returns:
- bool
- """
-
- def is_gambrel_roof(self) ->bool:
- """is gambrel roof
-
- Returns:
- bool
- """
-
- def is_hipped_gable_roof(self) ->bool:
- """is hipped gable roof
-
- Returns:
- bool
- """
-
- def is_hip_roof(self) ->bool:
- """is hip roof
-
- Returns:
- bool
- """
-
- def is_mansard_roof(self) ->bool:
- """is mansard roof
-
- Returns:
- bool
- """
-
- def is_pavilion_roof(self) ->bool:
- """is pavilion roof
-
- Returns:
- bool
- """
-
- def is_rainbow_roof(self) ->bool:
- """is rainbow roof
-
- Returns:
- bool
- """
-
- def is_shed_roof(self) ->bool:
- """is shed roof
-
- Returns:
- bool
- """
-
- def is_curved_run_stair(self) ->bool:
- """is curved run stair
-
- Returns:
- bool
- """
-
- def is_double_return_stair(self) ->bool:
- """is double return stair
-
- Returns:
- bool
- """
-
- def is_half_turn_stair(self) ->bool:
- """is half turn stair
-
- Returns:
- bool
- """
-
- def is_half_winding_stair(self) ->bool:
- """is half winding stair
-
- Returns:
- bool
- """
-
- def is_quarter_turn_stair(self) ->bool:
- """is quarter turn stair
-
- Returns:
- bool
- """
-
- def is_quarter_winding_stair(self) ->bool:
- """is quarter winding stair
-
- Returns:
- bool
- """
-
- def is_spiral_stair(self) ->bool:
- """is spiral stair
-
- Returns:
- bool
- """
-
- def is_straight_run_stair(self) ->bool:
- """is straight run stair
-
- Returns:
- bool
- """
-
- def is_three_quarter_turn_stair(self) ->bool:
- """is three quarter turn stair
-
- Returns:
- bool
- """
-
- def is_three_quarter_winding_stair(self) ->bool:
- """is three quarter winding stair
-
- Returns:
- bool
- """
-
- def is_two_curved_run_stair(self) ->bool:
- """is two curved run stair
-
- Returns:
- bool
- """
-
- def is_two_quarter_turn_stair(self) ->bool:
- """is two quarter turn stair
-
- Returns:
- bool
- """
-
- def is_two_quarter_winding_stair(self) ->bool:
- """is two quarter winding stair
-
- Returns:
- bool
- """
-
- def is_two_straight_run_stair(self) ->bool:
- """is two straight run stair
-
- Returns:
- bool
- """
-
- def is_curved(self) ->bool:
- """is curved
-
- Returns:
- bool
- """
-
- def is_spiral(self) ->bool:
- """is spiral
-
- Returns:
- bool
- """
-
- def is_straight(self) ->bool:
- """is straight
-
- Returns:
- bool
- """
-
- def is_winder(self) ->bool:
- """is winder
-
- Returns:
- bool
- """
-
- def is_elemented_wall(self) ->bool:
- """is elemented wall
-
- Returns:
- bool
- """
-
- def is_movable(self) ->bool:
- """is movable
-
- Returns:
- bool
- """
-
- def is_parapet(self) ->bool:
- """is parapet
-
- Returns:
- bool
- """
-
- def is_partitioning(self) ->bool:
- """is partitioning
-
- Returns:
- bool
- """
-
- def is_plumbing_wall(self) ->bool:
- """is plumbing wall
-
- Returns:
- bool
- """
-
- def is_polygonal(self) ->bool:
- """is polygonal
-
- Returns:
- bool
- """
-
- def is_shear(self) ->bool:
- """is shear
-
- Returns:
- bool
- """
-
- def is_solid_wall(self) ->bool:
- """is solid wall
-
- Returns:
- bool
- """
-
- def is_standard(self) ->bool:
- """is standard
-
- Returns:
- bool
- """
-
- def is_lightdome(self) ->bool:
- """is lightdome
-
- Returns:
- bool
- """
-
- def is_skylight(self) ->bool:
- """is skylight
-
- Returns:
- bool
- """
-
- def is_window(self) ->bool:
- """is window
-
- Returns:
- bool
- """
-
- def is_opening(self) ->bool:
- """is opening
-
- Returns:
- bool
- """
-
- def is_recess(self) ->bool:
- """is recess
-
- Returns:
- bool
- """
-
- def is_anchorbolt(self) ->bool:
- """is anchorbolt
-
- Returns:
- bool
- """
-
- def is_bolt(self) ->bool:
- """is bolt
-
- Returns:
- bool
- """
-
- def is_dowel(self) ->bool:
- """is dowel
-
- Returns:
- bool
- """
-
- def is_nail(self) ->bool:
- """is nail
-
- Returns:
- bool
- """
-
- def is_nail_plate(self) ->bool:
- """is nail plate
-
- Returns:
- bool
- """
-
- def is_rivet(self) ->bool:
- """is rivet
-
- Returns:
- bool
- """
-
- def is_screw(self) ->bool:
- """is screw
-
- Returns:
- bool
- """
-
- def is_shear_connector(self) ->bool:
- """is shear connector
-
- Returns:
- bool
- """
-
- def is_staple(self) ->bool:
- """is staple
-
- Returns:
- bool
- """
-
- def is_stud_shear_connector(self) ->bool:
- """is stud shear connector
-
- Returns:
- bool
- """
-
- def is_glue(self) ->bool:
- """is glue
-
- Returns:
- bool
- """
-
- def is_mortar(self) ->bool:
- """is mortar
-
- Returns:
- bool
- """
-
- def is_weld(self) ->bool:
- """is weld
-
- Returns:
- bool
- """
-
- def is_external(self) ->bool:
- """is external
-
- Returns:
- bool
- """
-
- def is_gfa(self) ->bool:
- """is gfa
-
- Returns:
- bool
- """
-
- def is_internal(self) ->bool:
- """is internal
-
- Returns:
- bool
- """
-
- def is_parking(self) ->bool:
- """is parking
-
- Returns:
- bool
- """
-
- def is_space(self) ->bool:
- """is space
-
- Returns:
- bool
- """
-
- def is_accessory_assembly(self) ->bool:
- """is accessory assembly
-
- Returns:
- bool
- """
-
- def is_arch(self) ->bool:
- """is arch
-
- Returns:
- bool
- """
-
- def is_beam_grid(self) ->bool:
- """is beam grid
-
- Returns:
- bool
- """
-
- def is_braced_frame(self) ->bool:
- """is braced frame
-
- Returns:
- bool
- """
-
- def is_girder(self) ->bool:
- """is girder
-
- Returns:
- bool
- """
-
- def is_reinforcement_unit(self) ->bool:
- """is reinforcement unit
-
- Returns:
- bool
- """
-
- def is_rigid_frame(self) ->bool:
- """is rigid frame
-
- Returns:
- bool
- """
-
- def is_slab_field(self) ->bool:
- """is slab field
-
- Returns:
- bool
- """
-
- def is_truss(self) ->bool:
- """is truss
-
- Returns:
- bool
- """
-
- def is_cable_ladder_segment(self) ->bool:
- """is cable ladder segment
-
- Returns:
- bool
- """
-
- def is_cable_tray_segment(self) ->bool:
- """is cable tray segment
-
- Returns:
- bool
- """
-
- def is_cable_trunking_segment(self) ->bool:
- """is cable trunking segment
-
- Returns:
- bool
- """
-
- def is_conduit_segment(self) ->bool:
- """is conduit segment
-
- Returns:
- bool
- """
-
- def is_busbar_segment(self) ->bool:
- """is busbar segment
-
- Returns:
- bool
- """
-
- def is_cable_segment(self) ->bool:
- """is cable segment
-
- Returns:
- bool
- """
-
- def is_conductor_segment(self) ->bool:
- """is conductor segment
-
- Returns:
- bool
- """
-
- def is_core_segment(self) ->bool:
- """is core segment
-
- Returns:
- bool
- """
-
- def is_flexible_segment(self) ->bool:
- """is flexible segment
-
- Returns:
- bool
- """
-
- def is_rigid_segment(self) ->bool:
- """is rigid segment
-
- Returns:
- bool
- """
-
- def is_culvert(self) ->bool:
- """is culvert
-
- Returns:
- bool
- """
-
- def is_gutter(self) ->bool:
- """is gutter
-
- Returns:
- bool
- """
-
- def is_spool(self) ->bool:
- """is spool
-
- Returns:
- bool
- """
-
- def is_audio_visual_outlet(self) ->bool:
- """is audio visual outlet
-
- Returns:
- bool
- """
-
- def is_communications_outlet(self) ->bool:
- """is communications outlet
-
- Returns:
- bool
- """
-
- def is_power_outlet(self) ->bool:
- """is power outlet
-
- Returns:
- bool
- """
-
- def is_data_outlet(self) ->bool:
- """is data outlet
-
- Returns:
- bool
- """
-
- def is_telephone_outlet(self) ->bool:
- """is telephone outlet
-
- Returns:
- bool
- """
-
- def is_anchoring(self) ->bool:
- """is anchoring
-
- Returns:
- bool
- """
-
- def is_edge(self) ->bool:
- """is edge
-
- Returns:
- bool
- """
-
- def is_ligature(self) ->bool:
- """is ligature
-
- Returns:
- bool
- """
-
- def is_main(self) ->bool:
- """is main
-
- Returns:
- bool
- """
-
- def is_punching(self) ->bool:
- """is punching
-
- Returns:
- bool
- """
-
- def is_ring(self) ->bool:
- """is ring
-
- Returns:
- bool
- """
-
- def set_none(self) ->None:
- """set none
-
- Returns:
- None
- """
-
- def set_ceiling(self) ->None:
- """set ceiling
-
- Returns:
- None
- """
-
- def set_cladding(self) ->None:
- """set cladding
-
- Returns:
- None
- """
-
- def set_flooring(self) ->None:
- """set flooring
-
- Returns:
- None
- """
-
- def set_insulation(self) ->None:
- """set insulation
-
- Returns:
- None
- """
-
- def set_membrane(self) ->None:
- """set membrane
-
- Returns:
- None
- """
-
- def set_roofing(self) ->None:
- """set roofing
-
- Returns:
- None
- """
-
- def set_sleeving(self) ->None:
- """set sleeving
-
- Returns:
- None
- """
-
- def set_wrapping(self) ->None:
- """set wrapping
-
- Returns:
- None
- """
-
- def set_footing_beam(self) ->None:
- """set footing beam
-
- Returns:
- None
- """
-
- def set_pad_footing(self) ->None:
- """set pad footing
-
- Returns:
- None
- """
-
- def set_pile_cap(self) ->None:
- """set pile cap
-
- Returns:
- None
- """
-
- def set_strip_footing(self) ->None:
- """set strip footing
-
- Returns:
- None
- """
-
- def set_cohesion(self) ->None:
- """set cohesion
-
- Returns:
- None
- """
-
- def set_friction(self) ->None:
- """set friction
-
- Returns:
- None
- """
-
- def set_support(self) ->None:
- """set support
-
- Returns:
- None
- """
-
- def set_balustrade(self) ->None:
- """set balustrade
-
- Returns:
- None
- """
-
- def set_guardrail(self) ->None:
- """set guardrail
-
- Returns:
- None
- """
-
- def set_handrail(self) ->None:
- """set handrail
-
- Returns:
- None
- """
-
- def set_baseslab(self) ->None:
- """set baseslab
-
- Returns:
- None
- """
-
- def set_floor(self) ->None:
- """set floor
-
- Returns:
- None
- """
-
- def set_landing(self) ->None:
- """set landing
-
- Returns:
- None
- """
-
- def set_roof(self) ->None:
- """set roof
-
- Returns:
- None
- """
-
- def set_beam(self) ->None:
- """set beam
-
- Returns:
- None
- """
-
- def set_hollowcore(self) ->None:
- """set hollowcore
-
- Returns:
- None
- """
-
- def set_joist(self) ->None:
- """set joist
-
- Returns:
- None
- """
-
- def set_lintel(self) ->None:
- """set lintel
-
- Returns:
- None
- """
-
- def set_spandrel(self) ->None:
- """set spandrel
-
- Returns:
- None
- """
-
- def set_tbeam(self) ->None:
- """set tbeam
-
- Returns:
- None
- """
-
- def set_complex(self) ->None:
- """set complex
-
- Returns:
- None
- """
-
- def set_element(self) ->None:
- """set element
-
- Returns:
- None
- """
-
- def set_partial(self) ->None:
- """set partial
-
- Returns:
- None
- """
-
- def set_provision_for_space(self) ->None:
- """set provision for space
-
- Returns:
- None
- """
-
- def set_provision_for_void(self) ->None:
- """set provision for void
-
- Returns:
- None
- """
-
- def set_column(self) ->None:
- """set column
-
- Returns:
- None
- """
-
- def set_pilaster(self) ->None:
- """set pilaster
-
- Returns:
- None
- """
-
- def set_molding(self) ->None:
- """set molding
-
- Returns:
- None
- """
-
- def set_skirtingboard(self) ->None:
- """set skirtingboard
-
- Returns:
- None
- """
-
- def set_door(self) ->None:
- """set door
-
- Returns:
- None
- """
-
- def set_gate(self) ->None:
- """set gate
-
- Returns:
- None
- """
-
- def set_trap_door(self) ->None:
- """set trap door
-
- Returns:
- None
- """
-
- def set_caisson_foundation(self) ->None:
- """set caisson foundation
-
- Returns:
- None
- """
-
- def set_brace(self) ->None:
- """set brace
-
- Returns:
- None
- """
-
- def set_chord(self) ->None:
- """set chord
-
- Returns:
- None
- """
-
- def set_collar(self) ->None:
- """set collar
-
- Returns:
- None
- """
-
- def set_member(self) ->None:
- """set member
-
- Returns:
- None
- """
-
- def set_mullion(self) ->None:
- """set mullion
-
- Returns:
- None
- """
-
- def set_plate(self) ->None:
- """set plate
-
- Returns:
- None
- """
-
- def set_post(self) ->None:
- """set post
-
- Returns:
- None
- """
-
- def set_purlin(self) ->None:
- """set purlin
-
- Returns:
- None
- """
-
- def set_rafter(self) ->None:
- """set rafter
-
- Returns:
- None
- """
-
- def set_stringer(self) ->None:
- """set stringer
-
- Returns:
- None
- """
-
- def set_strut(self) ->None:
- """set strut
-
- Returns:
- None
- """
-
- def set_stud(self) ->None:
- """set stud
-
- Returns:
- None
- """
-
- def set_bored(self) ->None:
- """set bored
-
- Returns:
- None
- """
-
- def set_driven(self) ->None:
- """set driven
-
- Returns:
- None
- """
-
- def set_jetgrouting(self) ->None:
- """set jetgrouting
-
- Returns:
- None
- """
-
- def set_curtain_panel(self) ->None:
- """set curtain panel
-
- Returns:
- None
- """
-
- def set_sheet(self) ->None:
- """set sheet
-
- Returns:
- None
- """
-
- def set_half_turn_ramp(self) ->None:
- """set half turn ramp
-
- Returns:
- None
- """
-
- def set_quarter_turn_ramp(self) ->None:
- """set quarter turn ramp
-
- Returns:
- None
- """
-
- def set_spiral_ramp(self) ->None:
- """set spiral ramp
-
- Returns:
- None
- """
-
- def set_straight_run_ramp(self) ->None:
- """set straight run ramp
-
- Returns:
- None
- """
-
- def set_two_quarter_turn_ramp(self) ->None:
- """set two quarter turn ramp
-
- Returns:
- None
- """
-
- def set_two_straight_run_ramp(self) ->None:
- """set two straight run ramp
-
- Returns:
- None
- """
-
- def set_barrel_roof(self) ->None:
- """set barrel roof
-
- Returns:
- None
- """
-
- def set_butterfly_roof(self) ->None:
- """set butterfly roof
-
- Returns:
- None
- """
-
- def set_dome_roof(self) ->None:
- """set dome roof
-
- Returns:
- None
- """
-
- def set_flat_roof(self) ->None:
- """set flat roof
-
- Returns:
- None
- """
-
- def set_freeform(self) ->None:
- """set freeform
-
- Returns:
- None
- """
-
- def set_gable_roof(self) ->None:
- """set gable roof
-
- Returns:
- None
- """
-
- def set_gambrel_roof(self) ->None:
- """set gambrel roof
-
- Returns:
- None
- """
-
- def set_hipped_gable_roof(self) ->None:
- """set hipped gable roof
-
- Returns:
- None
- """
-
- def set_hip_roof(self) ->None:
- """set hip roof
-
- Returns:
- None
- """
-
- def set_mansard_roof(self) ->None:
- """set mansard roof
-
- Returns:
- None
- """
-
- def set_pavilion_roof(self) ->None:
- """set pavilion roof
-
- Returns:
- None
- """
-
- def set_rainbow_roof(self) ->None:
- """set rainbow roof
-
- Returns:
- None
- """
-
- def set_shed_roof(self) ->None:
- """set shed roof
-
- Returns:
- None
- """
-
- def set_curved_run_stair(self) ->None:
- """set curved run stair
-
- Returns:
- None
- """
-
- def set_double_return_stair(self) ->None:
- """set double return stair
-
- Returns:
- None
- """
-
- def set_half_turn_stair(self) ->None:
- """set half turn stair
-
- Returns:
- None
- """
-
- def set_half_winding_stair(self) ->None:
- """set half winding stair
-
- Returns:
- None
- """
-
- def set_quarter_turn_stair(self) ->None:
- """set quarter turn stair
-
- Returns:
- None
- """
-
- def set_quarter_winding_stair(self) ->None:
- """set quarter winding stair
-
- Returns:
- None
- """
-
- def set_spiral_stair(self) ->None:
- """set spiral stair
-
- Returns:
- None
- """
-
- def set_straight_run_stair(self) ->None:
- """set straight run stair
-
- Returns:
- None
- """
-
- def set_three_quarter_turn_stair(self) ->None:
- """set three quarter turn stair
-
- Returns:
- None
- """
-
- def set_three_quarter_winding_stair(self) ->None:
- """set three quarter winding stair
-
- Returns:
- None
- """
-
- def set_two_curved_run_stair(self) ->None:
- """set two curved run stair
-
- Returns:
- None
- """
-
- def set_two_quarter_turn_stair(self) ->None:
- """set two quarter turn stair
-
- Returns:
- None
- """
-
- def set_two_quarter_winding_stair(self) ->None:
- """set two quarter winding stair
-
- Returns:
- None
- """
-
- def set_two_straight_run_stair(self) ->None:
- """set two straight run stair
-
- Returns:
- None
- """
-
- def set_curved(self) ->None:
- """set curved
-
- Returns:
- None
- """
-
- def set_spiral(self) ->None:
- """set spiral
-
- Returns:
- None
- """
-
- def set_straight(self) ->None:
- """set straight
-
- Returns:
- None
- """
-
- def set_winder(self) ->None:
- """set winder
-
- Returns:
- None
- """
-
- def set_elemented_wall(self) ->None:
- """set elemented wall
-
- Returns:
- None
- """
-
- def set_movable(self) ->None:
- """set movable
-
- Returns:
- None
- """
-
- def set_parapet(self) ->None:
- """set parapet
-
- Returns:
- None
- """
-
- def set_partitioning(self) ->None:
- """set partitioning
-
- Returns:
- None
- """
-
- def set_plumbing_wall(self) ->None:
- """set plumbing wall
-
- Returns:
- None
- """
-
- def set_polygonal(self) ->None:
- """set polygonal
-
- Returns:
- None
- """
-
- def set_shear(self) ->None:
- """set shear
-
- Returns:
- None
- """
-
- def set_solid_wall(self) ->None:
- """set solid wall
-
- Returns:
- None
- """
-
- def set_standard(self) ->None:
- """set standard
-
- Returns:
- None
- """
-
- def set_lightdome(self) ->None:
- """set lightdome
-
- Returns:
- None
- """
-
- def set_skylight(self) ->None:
- """set skylight
-
- Returns:
- None
- """
-
- def set_window(self) ->None:
- """set window
-
- Returns:
- None
- """
-
- def set_opening(self) ->None:
- """set opening
-
- Returns:
- None
- """
-
- def set_recess(self) ->None:
- """set recess
-
- Returns:
- None
- """
-
- def set_anchorbolt(self) ->None:
- """set anchorbolt
-
- Returns:
- None
- """
-
- def set_bolt(self) ->None:
- """set bolt
-
- Returns:
- None
- """
-
- def set_dowel(self) ->None:
- """set dowel
-
- Returns:
- None
- """
-
- def set_nail(self) ->None:
- """set nail
-
- Returns:
- None
- """
-
- def set_nailplate(self) ->None:
- """set nailplate
-
- Returns:
- None
- """
-
- def set_rivet(self) ->None:
- """set rivet
-
- Returns:
- None
- """
-
- def set_screw(self) ->None:
- """set screw
-
- Returns:
- None
- """
-
- def set_shearconnector(self) ->None:
- """set shearconnector
-
- Returns:
- None
- """
-
- def set_staple(self) ->None:
- """set staple
-
- Returns:
- None
- """
-
- def set_studshearconnector(self) ->None:
- """set studshearconnector
-
- Returns:
- None
- """
-
- def set_glue(self) ->None:
- """set glue
-
- Returns:
- None
- """
-
- def set_mortar(self) ->None:
- """set mortar
-
- Returns:
- None
- """
-
- def set_weld(self) ->None:
- """set weld
-
- Returns:
- None
- """
-
- def set_external(self) ->None:
- """set external
-
- Returns:
- None
- """
-
- def set_gfa(self) ->None:
- """set gfa
-
- Returns:
- None
- """
-
- def set_internal(self) ->None:
- """set internal
-
- Returns:
- None
- """
-
- def set_parking(self) ->None:
- """set parking
-
- Returns:
- None
- """
-
- def set_space(self) ->None:
- """set space
-
- Returns:
- None
- """
-
- def set_accessory_assembly(self) ->None:
- """set accessory assembly
-
- Returns:
- None
- """
-
- def set_arch(self) ->None:
- """set arch
-
- Returns:
- None
- """
-
- def set_beam_grid(self) ->None:
- """set beam grid
-
- Returns:
- None
- """
-
- def set_braced_frame(self) ->None:
- """set braced frame
-
- Returns:
- None
- """
-
- def set_girder(self) ->None:
- """set girder
-
- Returns:
- None
- """
-
- def set_reinforcement_unit(self) ->None:
- """set reinforcement unit
-
- Returns:
- None
- """
-
- def set_rigid_frame(self) ->None:
- """set rigid frame
-
- Returns:
- None
- """
-
- def set_slab_field(self) ->None:
- """set slab field
-
- Returns:
- None
- """
-
- def set_truss(self) ->None:
- """set truss
-
- Returns:
- None
- """
-
- def set_cable_ladder_segment(self) ->None:
- """set cable ladder segment
-
- Returns:
- None
- """
-
- def set_cable_tray_segment(self) ->None:
- """set cable tray segment
-
- Returns:
- None
- """
-
- def set_cable_trunking_segment(self) ->None:
- """set cable trunking segment
-
- Returns:
- None
- """
-
- def set_conduit_segment(self) ->None:
- """set conduit segment
-
- Returns:
- None
- """
-
- def set_busbar_segment(self) ->None:
- """set busbar segment
-
- Returns:
- None
- """
-
- def set_cable_segment(self) ->None:
- """set cable segment
-
- Returns:
- None
- """
-
- def set_conductor_segment(self) ->None:
- """set conductor segment
-
- Returns:
- None
- """
-
- def set_core_segment(self) ->None:
- """set core segment
-
- Returns:
- None
- """
-
- def set_flexible_segment(self) ->None:
- """set flexible segment
-
- Returns:
- None
- """
-
- def set_rigid_segment(self) ->None:
- """set rigid segment
-
- Returns:
- None
- """
-
- def set_culvert(self) ->None:
- """set culvert
-
- Returns:
- None
- """
-
- def set_gutter(self) ->None:
- """set gutter
-
- Returns:
- None
- """
-
- def set_spool(self) ->None:
- """set spool
-
- Returns:
- None
- """
-
- def set_audio_visual_outlet(self) ->None:
- """set audio visual outlet
-
- Returns:
- None
- """
-
- def set_communications_outlet(self) ->None:
- """set communications outlet
-
- Returns:
- None
- """
-
- def set_power_outlet(self) ->None:
- """set power outlet
-
- Returns:
- None
- """
-
- def set_data_outlet(self) ->None:
- """set data outlet
-
- Returns:
- None
- """
-
- def set_telephone_outlet(self) ->None:
- """set telephone outlet
-
- Returns:
- None
- """
-
- def set_anchoring(self) ->None:
- """set anchoring
-
- Returns:
- None
- """
-
- def set_edge(self) ->None:
- """set edge
-
- Returns:
- None
- """
-
- def set_ligature(self) ->None:
- """set ligature
-
- Returns:
- None
- """
-
- def set_main(self) ->None:
- """set main
-
- Returns:
- None
- """
-
- def set_punching(self) ->None:
- """set punching
-
- Returns:
- None
- """
-
- def set_ring(self) ->None:
- """set ring
-
- Returns:
- None
- """
-
-```
-
-## New Items
-### Classes cadwork
-#### multi_layer_type
-
-```python
-@unique
-class multi_layer_type(IntEnum):
- """multi layer type
-
- Examples:
- >>> cadwork.multi_layer_type.undefined
- undefined
- """
- undefined = 0
- """"""
- structure = 1
- """"""
- panel = 2
- """"""
- lathing = 3
- """"""
- air = 4
- """"""
- covering = 5
- """"""
-
- def __int__(self) ->int:
- return self.value
-
-```
-
-## New Items
-## New Items
-### Classes cadwork
-#### standard_element_type
-
-```python
-@unique
-class standard_element_type(IntEnum):
- """standard element type
-
- Examples:
- >>> cadwork.standard_element_type.beam
- beam
- """
- beam = 0
- """"""
- panel = 2
- """"""
- vba = 3
- """"""
- exportSolid = 4
- """"""
- container = 5
- """"""
- metal = 6
- """"""
-
- def __int__(self) ->int:
- return self.value
-
-```
-
-## New Items
-### Classes cadwork
-#### window_geometry
-
-```python
-class window_geometry:
-
-
- class point:
-
- def __init__(self, x, y):
- self.x = x
- self.y = y
-
- def __init__(self):
- self.bottom_left = self.point(0, 0)
- self.bottom_right = self.point(0, 0)
- self.top_left = self.point(0, 0)
- self.top_right = self.point(0, 0)
-
-```
-
-
-
-
diff --git a/docs/release_notes_major.md b/docs/release_notes_major.md
new file mode 100644
index 0000000..8d80e25
--- /dev/null
+++ b/docs/release_notes_major.md
@@ -0,0 +1,136 @@
+# New methods added between the latest version of v30 and v32
+
+## New methods in class:
+
+### Class: connector_axis_controller
+
+* get_counterbore_depth_for_end_side
+* get_counterbore_depth_for_start_side
+* get_counterbore_diameter_for_end_side
+* get_counterbore_diameter_for_start_side
+* get_counterbore_is_conical_for_end_side
+* get_counterbore_is_conical_for_start_side
+* get_intersection_count
+* get_item_guids_at_intersection
+* get_section_length
+* get_section_oblong_drilling_angle
+* get_section_oblong_drilling_is_enabled
+* get_section_oblong_drilling_negative_value
+* get_section_oblong_drilling_positive_value
+* set_counterbore_for_end_side
+* set_counterbore_for_start_side
+* set_item_guids_at_intersection
+* set_section_oblong_drilling_is_disabled
+* set_section_oblong_drilling_is_enabled
+
+### Class: dimension_controller
+
+* get_dimension_base_format
+
+### Class: element_controller
+
+* cast_ray_and_get_element_intersections
+* filter_elements
+* map_elements
+
+### Class: file_controller
+
+* export_dstv_file
+* export_dxf_file
+
+### Class: machine_controller
+
+* get_element_btl_processings
+* get_element_hundegger_processings
+* get_processing_btl_parameter_set
+* get_processing_code
+* get_processing_name
+* get_processing_points
+
+### Class: utility_controller
+
+* get_3d_version_name
+* redirect_python_output_to_logger
+
+## New classes
+
+### Class: dimension_base_format
+
+* __int__
+
+### Class: dxf_export_version
+
+* __int__
+
+### Class: dxf_layer_format_type
+
+* __int__
+
+### Class: element_filter
+
+* set_comment
+* set_group
+* set_name
+* set_part_number
+* set_production_number
+* set_sku
+* set_subgroup
+* set_user_attribute
+
+### Class: element_map_query
+
+* set_by_building
+* set_by_comment
+* set_by_group
+* set_by_name
+* set_by_part_number
+* set_by_production_number
+* set_by_sku
+* set_by_storey
+* set_by_subgroup
+* set_by_user_attribute
+
+### Class: hit_result
+
+* get_hit_element_ids
+* get_hit_vertices_by_element
+
+### Class: ifc_options_properties
+
+* get_export_quantity_sets
+* set_export_quantity_sets
+
+### Class: point
+
+* __init__
+
+### Class: point_3d
+
+* __add__
+* __eq__
+* __getitem__
+* __iadd__
+* __imul__
+* __isub__
+* __itruediv__
+* __mul__
+* __ne__
+* __neg__
+* __repr__
+* __rmul__
+* __setitem__
+* __sub__
+* __truediv__
+
+### Class: text_object_options
+
+* get_draw_on_top
+* set_draw_on_top
+
+### Class: vba_catalog_item_type
+
+* __int__
+
+### Class: window_geometry
+
+* __init__
diff --git a/mkdocs.yml b/mkdocs.yml
index 04e4840..ca6d2e8 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -11,7 +11,7 @@ theme:
name: material
logo: cw_logo.svg
favicon: cw_logo.svg
- version: V30
+ version: V2025
palette:
- scheme: default
toggle:
@@ -29,75 +29,95 @@ theme:
nav:
- Home:
- - index.md
- - Getting Started: get_started.md
- - Packages and Modules: modules.md
- - Debugging: debug.md
- - Community: community.md
+ - index.md
+ - Getting Started: get_started.md
+ - Packages and Modules: modules.md
+ - Debugging: debug.md
+ - Community: community.md
- Reference:
- - Attribute Controller: documentation/attribute_controller.md
- - BIM Controller: documentation/bim_controller.md
- - Cadwork:
- - Element Module Properties: documentation/element_module_properties.md
- - Element Type: documentation/element_type.md
- - Process Type: documentation/process_type.md
- - Point 3D: documentation/point_3d.md
- - Enumerations: documentation/enums.md
- - Extended Settings: documentation/extended_settings.md
- - Rhino Export Options: documentation/rhino_export_options.md
- - BREP data: documentation/brep_data.md
- - IFC:
- - IFC2x3 Element Type: documentation/ifc_2x3_element_type.md
- - IFC Options: documentation/ifc_options.md
- - Camera: documentation/camera_data.md
- - Layer Settings: documentation/layer_settings.md
- - Text Object Options: documentation/text_object_options.md
- - Connector Axis Controller: documentation/connector_axis_controller.md
- - Dimension Controller: documentation/dimension_controller.md
- - Element Controller: documentation/element_controller.md
- - End-Type Controller: documentation/endtype_controller.md
- - File Controller: documentation/file_controller.md
- - Geometry Controller: documentation/geometry_controller.md
- - List Controller: documentation/list_controller.md
- - Machine Controller: documentation/machine_controller.md
- - Material Controller: documentation/material_controller.md
- - Menu Controller: documentation/menu_controller.md
- - Roof Controller: documentation/roof_controller.md
- - Scene Controller: documentation/scene_controller.md
- - Shop Drawing Controller: documentation/shop_drawing_controller.md
- - Utility Controller: documentation/utility_controller.md
- - Visualization Controller: documentation/visualization_controller.md
+ - Attribute Controller: documentation/attribute_controller.md
+ - BIM Controller: documentation/bim_controller.md
+ - Cadwork:
+ - Api Types: documentation/api_types.md
+ - Attribute Display Settings: documentation/attribute_display_settings.md
+ - Element Module Properties: documentation/element_module_properties.md
+ - Element Type: documentation/element_type.md
+ - Standard Element Type: documentation/standard_element_type.md
+ - Process Type: documentation/process_type.md
+ - Point 3D: documentation/point_3d.md
+ - Enumerations: documentation/enums.md
+ - Extended Settings: documentation/extended_settings.md
+ - Rhino Export Options: documentation/rhino_export_options.md
+ - BREP data: documentation/brep_data.md
+ - IFC:
+ - IFC2x3 Element Type: documentation/ifc_2x3_element_type.md
+ - IFC Predefined Type: documentation/ifc_predefined_type.md
+ - IFC Options: documentation/ifc_options.md
+ - Camera: documentation/camera_data.md
+ - Layer Settings: documentation/layer_settings.md
+ - Text Object Options: documentation/text_object_options.md
+ - Import 3DC Options: documentation/import_3dc_options.md
+ - Window Geometry: documentation/window_geometry.md
+ - BIMteam Upload Result: documentation/bim_team_upload_result.md
+ - Shoulder cut options: documentation/shoulder_options.md
+ - Element Filter: documentation/element_filter.md
+ - Element Map Query: documentation/element_map_query.md
+ - Hit Result: documentation/hit_result.md
+ - Coordinate System Data: documentation/coordinate_system_data.md
+ - Active Point Result: documentation/active_point_result.md
+ - Display Attribute: documentation/display_attribute.md
+ - Connector Axis Controller: documentation/connector_axis_controller.md
+ - Dimension Controller: documentation/dimension_controller.md
+ - Element Controller: documentation/element_controller.md
+ - End-Type Controller: documentation/endtype_controller.md
+ - File Controller: documentation/file_controller.md
+ - Geometry Controller: documentation/geometry_controller.md
+ - List Controller: documentation/list_controller.md
+ - Machine Controller: documentation/machine_controller.md
+ - Material Controller: documentation/material_controller.md
+ - Menu Controller: documentation/menu_controller.md
+ - Multi Layer Cover Controller: documentation/multi_layer_cover_controller.md
+ - Roof Controller: documentation/roof_controller.md
+ - Scene Controller: documentation/scene_controller.md
+ - Shop Drawing Controller: documentation/shop_drawing_controller.md
+ - Utility Controller: documentation/utility_controller.md
+ - Visualization Controller: documentation/visualization_controller.md
- Examples:
- - Geometry: examples/geometry.md
- - Attribute Controller: examples/attribute_example.md
- - BIM Controller: examples/bim_example.md
- - Cadwork: examples/cadwork.md
- - Connector Axis Controller: examples/connector_example.md
- - Element Controller: examples/element_example.md
- - End-Type Controller: examples/endtype_example.md
- - File Controller: examples/file_example.md
- - Geometry Controller: examples/geometry_example.md
- - List Controller: examples/list_example.md
- - Machine Controller: examples/machine_example.md
- - Material Controller: examples/material_example.md
- - Menu Controller: examples/menu_example.md
- - Roof Controller: examples/roof_example.md
- - Scene Controller: examples/scene_example.md
- - Shop Drawing Controller: examples/shop_drawing_example.md
- - Utility Controller: examples/utility_example.md
- - Visualization Controller: examples/visualization_example.md
- - GUI: examples/tk_gui.md
- - Compare: examples/compare.md
+ - Geometry: examples/geometry.md
+ - Attribute Controller: examples/attribute_example.md
+ - BIM Controller: examples/bim_example.md
+ - Cadwork: examples/cadwork.md
+ - Connector Axis Controller: examples/connector_example.md
+ - Element Controller: examples/element_example.md
+ - End-Type Controller: examples/endtype_example.md
+ - File Controller: examples/file_example.md
+ - Geometry Controller: examples/geometry_example.md
+ - List Controller: examples/list_example.md
+ - Machine Controller: examples/machine_example.md
+ - Material Controller: examples/material_example.md
+ - Menu Controller: examples/menu_example.md
+ - Roof Controller: examples/roof_example.md
+ - Scene Controller: examples/scene_example.md
+ - Shop Drawing Controller: examples/shop_drawing_example.md
+ - Utility Controller: examples/utility_example.md
+ - Visualization Controller: examples/visualization_example.md
+ - GUI: examples/tk_gui.md
+ - Compare: examples/compare.md
- Videos:
- videos.md
- Auto Attributes:
- auto_attributes.md
+ - MCP:
+ - mcp.md
- About:
- About Guide: about.md
- - Release Notes: release_notes.md
+ - Release Notes:
+ - Minor Release Notes: release_notes.md
+ - Major Release Notes: release_notes_major.md
markdown_extensions:
- admonition
+ - pymdownx.details
- attr_list
- footnotes
- md_in_html
@@ -126,8 +146,18 @@ extra_css:
- https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.16.7/katex.min.css
plugins:
- - mkdocstrings
- search
+ - autorefs # Automatically generate references for known types and functions
+ - mkdocstrings:
+ handlers:
+ python:
+ paths: [src] # Directory containing Python modules
+ options:
+ show_signature_annotations: true
+ show_type_annotations: true
+ docstring_style: google # Set the docstring style
+ cross_reference: true # Enable cross-referencing to make links to classes, methods, and functions
+ show_source: false # Disable source code display
extra:
social:
diff --git a/pyproject.toml b/pyproject.toml
index 742f889..5dc45e2 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,8 +1,8 @@
[project]
name = "cwapi3d"
-version = "30.444.0"
+version = "32.443.6"
authors = [{ name = "Cadwork", email = "it@cadwork.ca" }]
-requires-python = ">= 3.10"
+requires-python = ">= 3.12"
description = 'Python bindings for CwAPI3D'
readme = "README.md"
license = { file = "LICENSE" }
@@ -14,7 +14,7 @@ classifiers = [
"License :: OSI Approved :: MIT License",
"Operating System :: Microsoft :: Windows",
"Programming Language :: Python :: 3",
- "Programming Language :: Python :: 3.10",
+ "Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
@@ -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 cf9bc85..b078e5f 100644
--- a/src/attribute_controller/__init__.pyi
+++ b/src/attribute_controller/__init__.pyi
@@ -1,1783 +1,1804 @@
-from typing import List
-from cadwork import attribute_display_settings
-from cadwork import element_grouping_type
-from cadwork import element_type
-from cadwork import extended_settings
-from cadwork import process_type
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+from cadwork.api_types import *
+from cadwork.attribute_display_settings import attribute_display_settings
+from cadwork.element_grouping_type import element_grouping_type
+from cadwork.element_type import element_type
+from cadwork.extended_settings import extended_settings
+from cadwork.layer_settings import layer_settings
+from cadwork.node_symbol import node_symbol
+from cadwork.process_type import process_type
- Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
-def set_name(element_id_list: List[int], name: str) -> None:
- """Sets the element name
+def set_name(element_id_list: list[ElementId], name: str) -> None:
+ """Sets the element name.
Parameters:
- element_id_list: element_id_list
- name: name
-
- Returns:
- None
+ element_id_list: The element id list.
+ name: The element name.
"""
-def set_group(element_id_list: List[int], group: str) -> None:
- """Sets the element group
- Parameters:
- element_id_list: element_id_list
- group: group
+def set_group(element_id_list: list[ElementId], group: str) -> None:
+ """Sets the element group.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ group: The element group.
"""
-def set_subgroup(element_id_list: List[int], subgroup: str) -> None:
- """Sets the element subgroup
- Parameters:
- element_id_list: element_id_list
- subgroup: subgroup
+def set_subgroup(element_id_list: list[ElementId], subgroup: str) -> None:
+ """Sets the element subgroup.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ subgroup: The element subgroup.
"""
-def set_comment(element_id_list: List[int], comment: str) -> None:
- """Sets the element comment
- Parameters:
- element_id_list: element_id_list
- comment: comment
+def set_comment(element_id_list: list[ElementId], comment: str) -> None:
+ """Sets the element comment.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ comment: The element comment.
"""
-def set_user_attribute(element_id_list: List[int], number: int, user_attribute: str) -> None:
- """Sets the element user attribute
- Parameters:
- element_id_list: element_id_list
- number: number
- user_attribute: user_attribute
+def set_user_attribute(element_id_list: list[ElementId], number: UserAttributeId, user_attribute: str) -> None:
+ """Sets the element user attribute.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ number: The user attribute id.
+ user_attribute: The user attribute.
"""
-def set_sku(element_id_list: List[int], sku: str) -> None:
- """Sets the element SKU
- Parameters:
- element_id_list: element_id_list
- sku: sku
+def set_sku(element_id_list: list[ElementId], sku: str) -> None:
+ """Sets the element SKU.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ sku: The element SKU.
"""
-def set_production_number(element_id_list: List[int], production_number: int) -> None:
- """Sets the element production number
- Parameters:
- element_id_list: element_id_list
- production_number: production_number
+def set_production_number(element_id_list: list[ElementId], production_number: UnsignedInt) -> None:
+ """Sets the element production number.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ production_number: The element production number.
"""
-def set_part_number(element_id_list: List[int], part_number: int) -> None:
- """Sets the element part number
- Parameters:
- element_id_list: element_id_list
- part_number: part_number
+def set_part_number(element_id_list: list[ElementId], part_number: UnsignedInt) -> None:
+ """Sets the element part number.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ part_number: The element part number.
"""
-def set_additional_data(element_id_list: List[int], data_id: str, data_text: str) -> None:
- """Sets the element additional data
- Parameters:
- element_id_list: element_id_list
- data_id: data_id
- data_text: data_text
+def set_additional_data(element_id_list: list[ElementId], data_id: str, data_text: str) -> None:
+ """Sets the element additional data.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ data_id: The data id.
+ data_text: The element additional data.
"""
-def delete_additional_data(element_id_list: List[int], data_id: str) -> None:
- """Deletes the element additional data
- Parameters:
- element_id_list: element_id_list
- data_id: data_id
+def delete_additional_data(element_id_list: list[ElementId], data_id: str) -> None:
+ """Deletes the element additional data.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ data_id: The data id.
"""
-def set_user_attribute_name(number: int, user_attribute_name: str) -> None:
- """Sets the user attribute name
- Parameters:
- number: number
- user_attribute_name: user_attribute_name
+def set_user_attribute_name(number: UserAttributeId, user_attribute_name: str) -> None:
+ """Sets the user attribute name.
- Returns:
- None
+ Parameters:
+ number: The user attribute id.
+ user_attribute_name: The user attribute name.
"""
-def set_process_type_and_extended_settings_from_name(element_id_list: List[int]) -> None:
- """Sets the element process type and extended settings from the element name
- Parameters:
- element_id_list: element_id_list
+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.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_name_process_type(name: str, process_type: None) -> None:
- """Sets the process type for an element name
- Parameters:
- name: name
- process_type: process_type
+def set_name_process_type(name: str, process_type: process_type) -> None:
+ """Sets the process type for an element name.
- Returns:
- None
+ Parameters:
+ name: The element name.
+ process_type: The process type.
"""
-def set_name_extended_settings(name: str, extended_settings: None) -> None:
- """Sets the extended settings for an element name
- Parameters:
- name: name
- extended_settings: extended_settings
+def set_name_extended_settings(name: str, extended_settings: extended_settings) -> None:
+ """Sets the extended settings for an element name.
- Returns:
- None
+ Parameters:
+ name: The element name.
+ extended_settings: The extended settings.
"""
-def set_output_type(element_id_list: List[int], process_type: None) -> None:
- """Sets the element output type
- Parameters:
- element_id_list: element_id_list
- process_type: process_type
+def set_output_type(element_id_list: list[ElementId], process_type: process_type) -> None:
+ """Sets the element output type.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ process_type: The process type.
"""
-def set_extended_settings(element_id_list: List[int], extended_settings: None) -> None:
- """Sets the element extended settings
- Parameters:
- element_id_list: element_id_list
- extended_settings: extended_settings
+def set_extended_settings(element_id_list: list[ElementId], extended_settings: extended_settings) -> None:
+ """Sets the element extended settings.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ extended_settings: The extended settings.
"""
-def set_wall(a0: List[int]) -> None:
- """set wall
- Parameters:
- a0: a0
+def set_wall(element_id_list: list[ElementId]) -> None:
+ """Sets the element to wall.
- Returns:
- None
+ Deprecated :
+ Use [set_framed_wall][attribute_controller.set_framed_wall] instead.
+
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_floor(a0: List[int]) -> None:
- """set floor
- Parameters:
- a0: a0
+def set_floor(element_id_list: list[ElementId]) -> None:
+ """Set floor.
- Returns:
- None
+ Deprecated :
+ Use [set_framed_floor][attribute_controller.set_framed_floor] instead.
+
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_opening(element_id_list: List[int]) -> None:
- """Sets the element to opening
- Parameters:
- element_id_list: element_id_list
+def set_opening(element_id_list: list[ElementId]) -> None:
+ """Sets the element to opening.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_fastening_attribute(element_id_list: List[int], value: str) -> None:
- """Sets the element fastening attribute
- Parameters:
- element_id_list: element_id_list
- value: value
+def set_fastening_attribute(element_id_list: list[ElementId], value: str) -> None:
+ """Sets the element fastening attribute.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ value: The fastening attribute value.
"""
-def set_element_material(element_id_list: List[int], material: int) -> None:
- """Sets the element material
- Parameters:
- element_id_list: element_id_list
- material: material
+def set_element_material(element_id_list: list[ElementId], material: MaterialId) -> None:
+ """Sets the element material.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ material: The element material id.
"""
-def set_assembly_number(element_id_list: List[int], assembly_number: str) -> None:
- """set assembly number
- Parameters:
- element_id_list: element_id_list
- assembly_number: assembly_number
+def set_assembly_number(element_id_list: list[ElementId], assembly_number: str) -> None:
+ """set assembly number.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ assembly_number: The assembly number.
"""
-def set_list_quantity(element_id_list: List[int], list_quantity: int) -> None:
- """set list quantity
- Parameters:
- element_id_list: element_id_list
- list_quantity: list_quantity
+def set_list_quantity(element_id_list: list[ElementId], list_quantity: UnsignedInt) -> None:
+ """Set list quantity.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ list_quantity: The list quantity.
"""
-def set_layer_settings(element_id_list: List[int], layer_settings: None) -> None:
- """set layer settings
- Parameters:
- element_id_list: element_id_list
- layer_settings: layer_settings
+def set_layer_settings(element_id_list: list[ElementId], layer_settings: layer_settings) -> None:
+ """Set layer settings.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ layer_settings: The layer settings.
"""
-def set_ignore_in_vba_calculation(elements: List[int], ignore: bool) -> None:
- """Sets if the element should be ignored in VBA Calculation
- Parameters:
- elements: elements
- ignore: ignore
+def set_ignore_in_vba_calculation(element_id_list: list[ElementId], ignore: bool) -> None:
+ """Sets if the element should be ignored in VBA Calculation.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ ignore: True if the element should be ignored in VBA calculation, false otherwise.
"""
-def clear_errors() -> None:
- """clear errors
- Returns:
- None
+def clear_errors() -> None:
+ """clear all errors.
"""
-def set_reference_wall_2dc(elements: List[int], _2dc_file_path: str) -> None:
- """Applies a new 2dc reference wall to an element
- Parameters:
- elements: elements
- _2dc_file_path: _2dc_file_path
+def set_reference_wall_2dc(element_id_list: list[ElementId], _2dc_file_path: str) -> None:
+ """Applies a new 2dc reference wall to an element.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ _2dc_file_path: The 2dc file path.
"""
-def get_user_attribute_count() -> int:
- """get user attribute count
+def get_user_attribute_count() -> UnsignedInt:
+ """Get user attribute count.
+
Returns:
- int
+ The count of user attributes.
"""
-def set_standard_part(elements: List[int]) -> None:
+
+def set_standard_part(element_id_list: list[ElementId]) -> None:
"""Sets covers (wall,opening or floor) to standard part.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_solid_wall(elements: List[int]) -> None:
+
+def set_solid_wall(element_id_list: list[ElementId]) -> None:
"""Sets elements to solid wall.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_log_wall(elements: List[int]) -> None:
+
+def set_log_wall(element_id_list: list[ElementId]) -> None:
"""Sets elements to log wall.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_solid_floor(elements: List[int]) -> None:
+
+def set_solid_floor(element_id_list: list[ElementId]) -> None:
"""Sets elements to solid floor.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_roof(a0: List[int]) -> None:
- """set roof
- Parameters:
- a0: a0
+def set_roof(element_id_list: list[ElementId]) -> None:
+ """Set roof.
- Returns:
- None
+ Deprecated :
+ Use [set_framed_roof][attribute_controller.set_framed_roof] instead.
+
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_solid_roof(elements: List[int]) -> None:
+
+def set_solid_roof(element_id_list: list[ElementId]) -> None:
"""Sets elements to solid roof cover.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def get_node_symbol(element: int) -> int:
- """get node symbol
+
+def get_node_symbol(element_id: ElementId) -> node_symbol:
+ """Get node symbol.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- int
+ The node symbol of the element.
"""
-def set_node_symbol(elements: List[int], symbol: int) -> None:
- """set node symbol
- Parameters:
- elements: elements
- symbol: symbol
+def set_node_symbol(element_id_list: list[ElementId], symbol: node_symbol) -> None:
+ """Set node symbol.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ symbol: The node symbol.
"""
-def enable_attribute_display() -> None:
- """enable attribute display
- Returns:
- None
+def enable_attribute_display() -> None:
+ """Enable attribute display.
"""
-def disable_attribute_display() -> None:
- """disable attribute display
- Returns:
- None
+def disable_attribute_display() -> None:
+ """Disable attribute display.
"""
+
def is_attribute_display_enabled() -> bool:
- """is attribute display enabled
+ """Is attribute display enabled.
Returns:
- bool
+ True if attribute display is enabled, false otherwise.
"""
-def update_auto_attribute() -> None:
- """update auto attribute
- Returns:
- None
+def update_auto_attribute() -> None:
+ """Update the auto attribute.
"""
-def set_additional_guid(a0: List[int], a1: str, a2: str) -> None:
- """set additional guid
- Parameters:
- a0: a0
- a1: a1
- a2: a2
+def set_additional_guid(element_id_list: list[ElementId], data_id: str, guid: str) -> None:
+ """Set additional guid.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ data_id: The data id.
+ guid: The guid to set.
"""
-def add_item_to_group_list(a0: str) -> None:
- """add item to group list
- Parameters:
- a0: a0
+def add_item_to_group_list(item: str) -> None:
+ """Add item to group list.
- Returns:
- None
+ Parameters:
+ item: The item to add in the group list.
"""
-def add_item_to_subgroup_list(a0: str) -> None:
- """add item to subgroup list
- Parameters:
- a0: a0
+def add_item_to_subgroup_list(item: str) -> None:
+ """Add item to subgroup list.
- Returns:
- None
+ Parameters:
+ item: The item to add in the subgroup list.
"""
-def add_item_to_comment_list(a0: str) -> None:
- """add item to comment list
- Parameters:
- a0: a0
+def add_item_to_comment_list(item: str) -> None:
+ """Add item to comment list.
- Returns:
- None
+ Args:
+ item: The item to add in the comment list.
"""
-def add_item_to_sku_list(a0: str) -> None:
- """add item to sku list
- Parameters:
- a0: a0
+def add_item_to_sku_list(item: str) -> None:
+ """Add item to sku list.
- Returns:
- None
+ Parameters:
+ item: The item to add in the sku list.
"""
-def add_item_to_user_attribute_list(a0: int, a1: str) -> None:
- """add item to user attribute list
- Parameters:
- a0: a0
- a1: a1
+def add_item_to_user_attribute_list(attribute_number: UserAttributeId, item: str) -> None:
+ """Add item to user attribute list.
- Returns:
- None
+ Parameters:
+ attribute_number: The attribute number.
+ item: The item to add in the user attribute list.
"""
-def set_container_number(a0: List[int], a1: int) -> None:
- """set container number
- Parameters:
- a0: a0
- a1: a1
+def set_container_number(element_id_list: list[ElementId], number: UnsignedInt) -> None:
+ """Set container number.
- Returns:
- None
+ Parameters:
+ element_id_list: The element id list.
+ number: The container number.
"""
-def get_name_list_items() -> List[str]:
- """get name list items
+
+def get_name_list_items() -> list[str]:
+ """Retrieve a list of name for all items
Returns:
- List[str]
+ A list of names for all items.
"""
-def add_item_to_name_list(a0: str) -> None:
- """add item to name list
- Parameters:
- a0: a0
+def add_item_to_name_list(item: str) -> None:
+ """Add item to name list.
- Returns:
- None
+ Parameters:
+ item: The item to add in the name list.
"""
-def delete_item_from_comment_list(a0: str) -> bool:
- """delete item from comment list
+
+def delete_item_from_comment_list(item: str) -> bool:
+ """Delete item from comment list.
Parameters:
- a0: a0
+ item: The item to delete from the comment list.
Returns:
- bool
+ True if the item was successfully deleted, false otherwise.
"""
-def delete_item_from_group_list(a0: str) -> bool:
- """delete item from group list
+
+def delete_item_from_group_list(item: str) -> bool:
+ """Delete item from group list.
Parameters:
- a0: a0
+ item: The item to delete from the group list.
Returns:
- bool
+ True if the item was successfully deleted, false otherwise.
"""
-def delete_item_from_sku_list(a0: str) -> bool:
- """delete item from sku list
+
+def delete_item_from_sku_list(item: str) -> bool:
+ """Delete item from sku list.
Parameters:
- a0: a0
+ item: The item to delete from the sku list.
Returns:
- bool
+ True if the item was successfully deleted, false otherwise.
"""
-def delete_item_from_subgroup_list(a0: str) -> bool:
- """delete item from subgroup list
+
+def delete_item_from_subgroup_list(item: str) -> bool:
+ """Delete item from subgroup list.
Parameters:
- a0: a0
+ item: The item to delete from the subgroup list.
Returns:
- bool
+ True if the item was successfully deleted, false otherwise.
"""
-def delete_item_from_user_attribute_list(a0: int, a1: str) -> bool:
- """delete item from user attribute list
+
+def delete_item_from_user_attribute_list(attribute_number: UserAttributeId, item: str) -> bool:
+ """Delete item from user attribute list.
Parameters:
- a0: a0
- a1: a1
+ attribute_number: The attribute number.
+ item: The item to delete from the user attribute list.
Returns:
- bool
+ True if the item was successfully deleted, false otherwise.
"""
-def set_attribute_display_settings_for_2d(a0: attribute_display_settings) -> None:
- """set attribute display settings for 2d
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_2d(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for 2d.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_2d_with_layout(a0: attribute_display_settings) -> None:
- """set attribute display settings for 2d with layout
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_2d_with_layout(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for 2d with layout.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_2d_without_layout(a0: attribute_display_settings) -> None:
- """set attribute display settings for 2d without layout
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_2d_without_layout(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for 2d without layout.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_3d(a0: attribute_display_settings) -> None:
- """set attribute display settings for 3d
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_3d(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for 3d.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_container(a0: attribute_display_settings) -> None:
- """set attribute display settings for container
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_3d(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for 3d.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_export_solid(a0: attribute_display_settings) -> None:
- """set attribute display settings for export solid
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_container(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for container.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_framed_wall_axis(a0: attribute_display_settings) -> None:
- """set attribute display settings for framed wall axis
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_export_solid(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for export solid.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_framed_wall_beam(a0: attribute_display_settings) -> None:
- """set attribute display settings for framed wall beam
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_framed_wall_axis(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for framed wall axis.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_framed_wall_opening(a0: attribute_display_settings) -> None:
- """set attribute display settings for framed wall opening
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_framed_wall_beam(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for framed wall beam.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_framed_wall_panel(a0: attribute_display_settings) -> None:
- """set attribute display settings for framed wall panel
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_framed_wall_beam(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for framed wall beam.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_log_wall_axis(a0: attribute_display_settings) -> None:
- """set attribute display settings for log wall axis
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_framed_wall_opening(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for framed wall opening.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_log_wall_beam(a0: attribute_display_settings) -> None:
- """set attribute display settings for log wall beam
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_framed_wall_panel(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for framed wall panel.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_log_wall_opening(a0: attribute_display_settings) -> None:
- """set attribute display settings for log wall opening
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_log_wall_axis(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for log wall axis.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_log_wall_panel(a0: attribute_display_settings) -> None:
- """set attribute display settings for log wall panel
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_log_wall_beam(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for log wall beam.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_machine(a0: attribute_display_settings) -> None:
- """set attribute display settings for machine
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_log_wall_opening(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for log wall opening.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_nesting_element(a0: attribute_display_settings) -> None:
- """set attribute display settings for nesting element
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_log_wall_panel(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for log wall panel.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_nesting_volume(a0: attribute_display_settings) -> None:
- """set attribute display settings for nesting volume
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_machine(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for machine.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_solid_wall_axis(a0: attribute_display_settings) -> None:
- """set attribute display settings for solid wall axis
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_nesting_element(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for nesting element.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_solid_wall_beam(a0: attribute_display_settings) -> None:
- """set attribute display settings for solid wall beam
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_nesting_volume(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for nesting volume.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_solid_wall_opening(a0: attribute_display_settings) -> None:
- """set attribute display settings for solid wall opening
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_solid_wall_axis(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for solid wall axis.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_attribute_display_settings_for_solid_wall_panel(a0: attribute_display_settings) -> None:
- """set attribute display settings for solid wall panel
- Parameters:
- a0: a0
+def set_attribute_display_settings_for_solid_wall_beam(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for solid wall beam.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_framed_floor(element_id_list: List[int]) -> None:
- """Sets the elements to framed floor
- Parameters:
- element_id_list: element_id_list
+def set_attribute_display_settings_for_solid_wall_opening(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for solid wall opening.
- Returns:
- None
+ Parameters:
+ settings: The display settings to apply.
"""
-def set_framed_roof(element_id_list: List[int]) -> None:
- """Sets the elements to framed roof
+
+def set_attribute_display_settings_for_solid_wall_panel(settings: attribute_display_settings) -> None:
+ """Set attribute display settings for solid wall panel.
Parameters:
- element_id_list: element_id_list
+ settings: The display settings to apply.
+ """
- Returns:
- None
+
+def set_framed_floor(element_id_list: list[ElementId]) -> None:
+ """Sets the elements to framed floor.
+
+ Parameters:
+ element_id_list: The element id list.
"""
-def set_framed_wall(element_id_list: List[int]) -> None:
- """Sets the element to framed wall
+
+def set_framed_roof(element_id_list: list[ElementId]) -> None:
+ """Sets the elements to framed roof.
Parameters:
- element_id_list: element_id_list
+ element_id_list: The element id list.
+ """
- Returns:
- None
+
+def set_framed_wall(element_id_list: list[ElementId]) -> None:
+ """Sets the element to framed wall.
+
+ Parameters:
+ element_id_list: The element id list.
"""
-def get_name_list_items_by_element_type(a0: element_type) -> List[str]:
- """get name list items by element type
+
+def get_name_list_items_by_element_type(element_type: element_type) -> list[str]:
+ """Get name list items by element type.
Parameters:
- a0: a0
+ element_type: The element type to filter by.
Returns:
- List[str]
+ The list of names for the specified element type.
"""
-def get_name(element_id: int) -> str:
- """Gets the element name
+
+def get_name(element_id: ElementId) -> str:
+ """Gets the element name.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element name
+ The element name.
"""
-def get_group(element_id: int) -> str:
- """Gets the element group
+
+def get_group(element_id: ElementId) -> str:
+ """Gets the element group.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element group
+ The element group.
"""
-def get_subgroup(element_id: int) -> str:
- """Gets the element subgroup
+
+def get_subgroup(element_id: ElementId) -> str:
+ """Gets the element subgroup.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element subgroup
+ The element subgroup.
"""
-def get_comment(element_id: int) -> str:
- """Gets the element comment
+
+def get_comment(element_id: ElementId) -> str:
+ """Gets the element comment.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element comment
+ The element comment.
"""
-def get_user_attribute(element_id: int, number: int) -> str:
- """Gets the element user attribute
+
+def get_user_attribute(element_id: ElementId, number: UserAttributeId) -> str:
+ """Gets the element user attribute.
Parameters:
- element_id: element_id
- number: number
+ element_id: The element id.
+ number: The user attribute number.
Returns:
- element user attribute
+ The element user attribute.
"""
-def get_sku(element_id: int) -> str:
- """Gets the element SKU
+
+def get_sku(element_id: ElementId) -> str:
+ """Gets the element SKU.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element SKU
+ The element SKU.
"""
-def get_production_number(element_id: int) -> int:
- """Gets the element production number
+
+def get_production_number(element_id: ElementId) -> UnsignedInt:
+ """Gets the element production number.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element production number
+ The element production number.
"""
-def get_part_number(element_id: int) -> int:
- """Gets the element part number
+
+def get_part_number(element_id: ElementId) -> UnsignedInt:
+ """Gets the element part number.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element part number
+ The element part number.
"""
-def get_additional_data(element_id: int, data_id: str) -> str:
- """Gets the element additional data
+
+def get_additional_data(element_id: ElementId, data_id: str) -> str:
+ """Gets the element additional data.
Parameters:
- element_id: element_id
- data_id: data_id
+ element_id: The element id.
+ data_id: The data id.
Returns:
- element additional data
+ The element additional data.
"""
-def get_user_attribute_name(number: int) -> str:
- """Gets the user attribute name
+
+def get_user_attribute_name(number: UserAttributeId) -> str:
+ """Gets the user attribute name.
Parameters:
- number: number
+ number: The user attribute number.
Returns:
- user attribute name
+ The user attribute name.
"""
-def get_wall_situation(element_id: int) -> str:
- """Gets the element wall situation
+
+def get_wall_situation(element_id: ElementId) -> str:
+ """Gets the element wall situation.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element wall situation
+ The element wall situation.
"""
-def get_element_material_name(element_id: int) -> str:
- """Gets the element material name
+
+def get_element_material_name(element_id: ElementId) -> str:
+ """Gets the element material name.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element material name
+ The element material name.
"""
-def get_prefab_layer(element_id: int) -> str:
- """Gets the element prefab layer
+
+def get_prefab_layer(element_id: ElementId) -> str:
+ """Gets the element prefab layer.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element prefab layer
+ The element prefab layer.
"""
-def get_machine_calculation_set(element_id: int) -> str:
- """Gets the element machine calculation set
+
+def get_machine_calculation_set(element_id: ElementId) -> str:
+ """Gets the element machine calculation set.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element machine calculation set
+ The element machine calculation set.
"""
-def get_cutting_set(element_id: int) -> str:
- """Gets the element cutting set
+
+def get_cutting_set(element_id: ElementId) -> str:
+ """Gets the element cutting set.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element cutting set
+ The element cutting set.
"""
+
def get_name_process_type(name: str) -> process_type:
- """Gets the process type for an element name
+ """Gets the process type for an element name.
Parameters:
- name: name
+ name: The element name.
Returns:
- process type
+ The process type.
"""
+
def get_name_extended_settings(name: str) -> extended_settings:
- """Gets the extended settings for an element name
+ """Gets the extended settings for an element name.
Parameters:
- name: name
+ name: The element name.
Returns:
- extended settings
+ The extended settings.
"""
-def get_output_type(element_id: int) -> process_type:
- """Gets the element output type
+
+def get_output_type(element_id: ElementId) -> process_type:
+ """Gets the element output type.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element output type
+ The element output type.
"""
-def get_extended_settings(element_id: int) -> extended_settings:
- """Gets the element extended settings
+
+def get_extended_settings(element_id: ElementId) -> extended_settings:
+ """Gets the element extended settings.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element extended settings
+ The element extended settings.
"""
-def get_element_type(element_id: int) -> element_type:
- """Gets the element type
+
+def get_element_type(element_id: ElementId) -> element_type:
+ """Gets the element type.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element type
+ The element type.
"""
-def get_fastening_attribute(element_id: int) -> str:
- """Get the element fastening attribute
+
+def get_fastening_attribute(element_id: ElementId) -> str:
+ """Get the element fastening attribute.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- element fastening attribute
+ The element fastening attribute.
"""
-def get_assembly_number(element_id: int) -> str:
- """get assembly number
+
+def get_assembly_number(element_id: ElementId) -> str:
+ """Get assembly number.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The assembly number.
"""
-def get_list_quantity(element_id: int) -> int:
- """get list quantity
+
+def get_list_quantity(element_id: ElementId) -> UnsignedInt:
+ """Get list quantity.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- int
+ The list quantity.
"""
-def get_ignore_in_vba_calculation(element: int) -> bool:
- """get ignore in vba calculation
+
+def get_ignore_in_vba_calculation(element_id: ElementId) -> bool:
+ """Get ignore in vba calculation.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- bool
+ True if the element is ignored in VBA calculation, false otherwise.
"""
-def get_standard_element_name(element_id: int) -> str:
- """get standard element name
+
+def get_standard_element_name(element_id: ElementId) -> str:
+ """Get standard element name.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The standard element name.
"""
-def get_steel_shape_name(element_id: int) -> str:
- """get steel shape name
+
+def get_steel_shape_name(element_id: ElementId) -> str:
+ """Get steel shape name.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The steel shape name.
"""
-def is_beam(element_id: int) -> bool:
- """Tests if element is beam
+
+def is_beam(element_id: ElementId) -> bool:
+ """Tests if element is beam.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element beam
+ True if the element is a beam, false otherwise.
"""
-def is_panel(element_id: int) -> bool:
- """Tests if element is panel
+
+def is_panel(element_id: ElementId) -> bool:
+ """Tests if element is panel.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element panel
+ True if the element is a panel, false otherwise.
"""
-def is_opening(element_id: int) -> bool:
- """Tests if element is opening
+
+def is_opening(element_id: ElementId) -> bool:
+ """Tests if element is opening.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element opening
+ True if the element is an opening, false otherwise.
"""
-def is_wall(element_id: int) -> bool:
- """Tests if element is wall
+
+def is_wall(element_id: ElementId) -> bool:
+ """Tests if element is wall.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element wall
+ True if the element is a wall, false otherwise.
"""
-def is_floor(element_id: int) -> bool:
- """Tests if element is floor
+
+def is_floor(element_id: ElementId) -> bool:
+ """Tests if element is floor.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element floor
+ True if the element is a floor, false otherwise.
"""
-def is_roof(element_id: int) -> bool:
- """Tests if element is roof
+
+def is_roof(element_id: ElementId) -> bool:
+ """Tests if element is roof.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element roof
+ True if the element is a roof, false otherwise.
"""
-def is_metal(element_id: int) -> bool:
- """Tests if element is metal
+
+def is_metal(element_id: ElementId) -> bool:
+ """Tests if element is metal.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element metal
+ True if the element is metal, false otherwise.
"""
-def is_export_solid(element_id: int) -> bool:
- """Tests if element is export solid
+
+def is_export_solid(element_id: ElementId) -> bool:
+ """Tests if element is export solid.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element export solid
+ True if the element is an export solid, false otherwise.
"""
-def is_container(element_id: int) -> bool:
- """Tests if element is container
+
+def is_container(element_id: ElementId) -> bool:
+ """Tests if element is container.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element container
+ True if the element is a container, false otherwise.
"""
-def is_connector_axis(element_id: int) -> bool:
- """Tests if element is connector axis
+
+def is_connector_axis(element_id: ElementId) -> bool:
+ """Tests if element is connector axis.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element connector axis
+ True if the element is a connector axis, false otherwise.
"""
-def is_drilling(element_id: int) -> bool:
- """Tests if element is drilling
+
+def is_drilling(element_id: ElementId) -> bool:
+ """Tests if element is drilling.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element drilling
+ True if the element is drilling, false otherwise.
"""
-def is_node(element_id: int) -> bool:
- """Tests if element is node
+
+def is_node(element_id: ElementId) -> bool:
+ """Tests if element is node.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element node
+ True if the element is a node, false otherwise.
"""
-def is_auxiliary(element_id: int) -> bool:
- """Tests if element is auxiliary
+
+def is_auxiliary(element_id: ElementId) -> bool:
+ """Tests if element is auxiliary.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element auxiliary
+ True if the element is auxiliary, false otherwise.
"""
-def is_roof_surface(element_id: int) -> bool:
- """Tests if the element is roof surface
+
+def is_roof_surface(element_id: ElementId) -> bool:
+ """Tests if the element is roof surface.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element roof surface
+ True if the element is a roof surface, false otherwise.
"""
-def is_caddy_object(element_id: int) -> bool:
- """Tests if the element is caddy object
+
+def is_caddy_object(element_id: ElementId) -> bool:
+ """Tests if the element is caddy object.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element caddy object
+ True if the element is a caddy object, false otherwise.
"""
-def is_envelope(element_id: int) -> bool:
- """is envelope
+
+def is_envelope(element_id: ElementId) -> bool:
+ """Tests if the element is an envelope.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is an envelope, false otherwise.
"""
-def is_architecture_wall_2dc(element: int) -> bool:
- """Tests if the element has a 2dc reference wall
+
+def is_architecture_wall_2dc(element_id: ElementId) -> bool:
+ """Tests if the element is a 2dc reference wall.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- is architecturewall 2dc
+ True if the element is a 2dc reference wall, false otherwise.
"""
-def is_architecture_wall_xml(element: int) -> bool:
- """Tests if the element has a xml reference wall
+
+def is_architecture_wall_xml(element_id: ElementId) -> bool:
+ """Tests if the element is a xml reference wall.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- is architecturewall xml
+ True if the element is a xml reference wall, false otherwise.
"""
-def is_surface(element_id: int) -> bool:
- """Tests if the element is a Surface
+
+def is_surface(element_id: ElementId) -> bool:
+ """Tests if the element is a Surface.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is Surface
+ True if the element is a Surface, false otherwise.
"""
-def is_line(element_id: int) -> bool:
- """Tests if the element is a Line
+
+def is_line(element_id: ElementId) -> bool:
+ """Tests if the element is a Line.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is Line
+ True if the element is a Line, false otherwise.
"""
-def get_auto_attribute(element_id: int, number: int) -> str:
- """get auto attribute
+
+def get_auto_attribute(element_id: ElementId, number: UnsignedInt) -> str:
+ """Get auto attribute.
Parameters:
- element_id: element_id
- number: number
+ element_id: The element id.
+ number: The auto attribute number.
Returns:
- str
+ The auto attribute value.
"""
-def get_auto_attribute_name(number: int) -> str:
- """get auto attribute name
+
+def get_auto_attribute_name(number: UnsignedInt) -> str:
+ """Get auto attribute name.
Parameters:
- number: number
+ number: The auto attribute number.
Returns:
- str
+ The auto attribute name.
"""
-def is_framed_wall(element_id: int) -> bool:
- """is framed wall
+
+def is_framed_wall(element_id: ElementId) -> bool:
+ """Tests if the element is a framed wall.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a framed wall, false otherwise.
"""
-def is_solid_wall(element_id: int) -> bool:
- """is solid wall
+
+def is_solid_wall(element_id: ElementId) -> bool:
+ """Tests if the element is a solid wall.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a solid wall, false otherwise.
"""
-def is_log_wall(element_id: int) -> bool:
- """is log wall
+
+def is_log_wall(element_id: ElementId) -> bool:
+ """Tests if the element is a log wall.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a log wall, false otherwise.
"""
-def is_framed_floor(element_id: int) -> bool:
- """is framed floor
+
+def is_framed_floor(element_id: ElementId) -> bool:
+ """Tests if the element is a framed floor.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a framed floor, false otherwise.
"""
-def is_solid_floor(element_id: int) -> bool:
- """is solid floor
+
+def is_solid_floor(element_id: ElementId) -> bool:
+ """Tests if the element is a solid floor.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a solid floor, false otherwise.
"""
-def is_framed_roof(element_id: int) -> bool:
- """is framed roof
+
+def is_framed_roof(element_id: ElementId) -> bool:
+ """Tests if the element is a framed roof.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a framed roof, false otherwise.
"""
-def is_solid_roof(element_id: int) -> bool:
- """is solid roof
+
+def is_solid_roof(element_id: ElementId) -> bool:
+ """Tests if the element is a solid roof.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is a solid roof, false otherwise.
"""
-def get_additional_guid(a0: int, a1: str) -> str:
- """get additional guid
+
+def get_additional_guid(element_id: ElementId, data_id: str) -> str:
+ """Get additional guid.
Parameters:
- a0: a0
- a1: a1
+ element_id: The element id.
+ data_id: The data id.
Returns:
- str
+ The additional guid associated with the element and data id.
"""
-def get_prefab_layer_all_assigned(a0: int) -> List[int]:
- """get prefab layer all assigned
+
+def get_prefab_layer_all_assigned(element_id: ElementId) -> list[int]:
+ """Get all assigned prefab layers.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- List[int]
+ The list of all assigned prefab layers for the element.
"""
-def get_prefab_layer_with_dimensions(a0: int) -> List[int]:
- """get prefab layer with dimensions
+
+def get_prefab_layer_with_dimensions(element_id: ElementId) -> list[int]:
+ """Get prefab layer with dimensions.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- List[int]
+ The list of prefab layers with dimensions for the element.
"""
-def get_prefab_layer_without_dimensions(a0: int) -> List[int]:
- """get prefab layer without dimensions
+
+def get_prefab_layer_without_dimensions(element_id: ElementId) -> list[int]:
+ """Get prefab layer without dimensions.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- List[int]
+ The list of prefab layers without dimensions for the element.
"""
-def is_nesting_parent(a0: int) -> bool:
- """is nesting parent
+
+def is_nesting_parent(element_id: ElementId) -> bool:
+ """Tests if the element is a nesting parent.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a nesting parent, false otherwise.
"""
-def is_nesting_raw_part(a0: int) -> bool:
- """is nesting raw part
+
+def is_nesting_raw_part(element_id: ElementId) -> bool:
+ """Tests if the element is a nesting raw part.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a nesting raw part, false otherwise.
"""
-def get_container_number(a0: int) -> int:
- """get container number
+
+def get_container_number(element_id: ElementId) -> UnsignedInt:
+ """Get container number.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- int
+ The container number associated with the element.
"""
-def get_container_number_with_prefix(a0: int) -> str:
- """get container number with prefix
+
+def get_container_number_with_prefix(element_id: ElementId) -> str:
+ """Get container number with prefix.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- str
+ The container number with prefix associated with the element.
"""
-def get_group_list_items() -> List[str]:
- """get group list items
+
+def get_group_list_items() -> list[str]:
+ """Get group list items.
Returns:
- List[str]
+ The list of group list items.
"""
-def get_subgroup_list_items() -> List[str]:
- """get subgroup list items
+
+def get_subgroup_list_items() -> list[str]:
+ """Get subgroup list items.
Returns:
- List[str]
+ The list of subgroup list items.
"""
-def get_comment_list_items() -> List[str]:
- """get comment list items
+
+def get_comment_list_items() -> list[str]:
+ """Get comment list items.
Returns:
- List[str]
+ The list of comment list items.
"""
-def get_sku_list_items() -> List[str]:
- """get sku list items
+
+def get_sku_list_items() -> list[str]:
+ """Get sku list items.
Returns:
- List[str]
+ The list of sku list items.
"""
-def get_user_attribute_list_items(a0: int) -> List[str]:
- """get user attribute list items
+
+def get_user_attribute_list_items(element_id: ElementId) -> list[str]:
+ """Get user attribute list items.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- List[str]
+ The list of user attribute list items.
"""
-def is_circular_mep(a0: int) -> bool:
- """is circular mep
+
+def is_circular_mep(element_id: ElementId) -> bool:
+ """Test if element is circular mep.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a circular mep, false otherwise.
"""
-def is_rectangular_mep(a0: int) -> bool:
- """is rectangular mep
+
+def is_rectangular_mep(element_id: ElementId) -> bool:
+ """Test if element is rectangular mep.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a rectangular mep, false otherwise.
"""
-def get_machine_calculation_state(a0: int) -> str:
- """get machine calculation state
+
+def get_machine_calculation_state(element_id: ElementId) -> str:
+ """Get machine calculation state.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- str
+ The machine calculation state of the element.
"""
-def get_machine_calculation_set_machine_type(a0: int) -> str:
- """get machine calculation set machine type
+
+def get_machine_calculation_set_machine_type(element_id: ElementId) -> str:
+ """Get machine calculation set machine type.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- str
+ The machine calculation set machine type of the element.
"""
-def is_btl_processing_group(a0: int) -> bool:
- """is btl processing group
+
+def is_btl_processing_group(element_id: ElementId) -> bool:
+ """Test if element is btl processing group.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a btl processing group, false otherwise.
"""
-def is_hundegger_processing_group(a0: int) -> bool:
- """is hundegger processing group
+
+def is_hundegger_processing_group(element_id: ElementId) -> bool:
+ """Test if element is hundegger processing group.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the element is a hundegger processing group, false otherwise.
"""
+
def get_element_grouping_type() -> element_grouping_type:
- """Get the element grouping type (group, subgroup)
+ """Get the element grouping type (group, subgroup).
Returns:
- element grouping type
+ The element grouping type.
"""
+
def set_element_grouping_type(element_grouping_type: element_grouping_type) -> None:
- """Set the element grouping type (group, subgroup)
+ """Set the element grouping type (group, subgroup).
Parameters:
- element_grouping_type: element_grouping_type
-
- Returns:
- None
+ element_grouping_type: The element grouping type to set.
"""
-def get_associated_nesting_name(element_id: int) -> str:
- """get associated nesting name
+
+def get_associated_nesting_name(element_id: ElementId) -> str:
+ """Get associated nesting name
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The associated nesting name.
"""
-def get_associated_nesting_number(element_id: int) -> str:
- """get associated nesting number
+
+def get_associated_nesting_number(element_id: ElementId) -> str:
+ """Get associated nesting number.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The associated nesting number.
"""
+
def get_attribute_display_settings_for_2d() -> attribute_display_settings:
- """get attribute display settings for 2d
+ """Get attribute display settings for 2d.
Returns:
- attribute_display_settings
+ The attribute display settings for 2d.
"""
+
def get_attribute_display_settings_for_2d_with_layout() -> attribute_display_settings:
- """get attribute display settings for 2d with layout
+ """Get attribute display settings for 2d with layout.
Returns:
- attribute_display_settings
+ The attribute display settings for 2d with layout.
"""
+
def get_attribute_display_settings_for_2d_without_layout() -> attribute_display_settings:
- """get attribute display settings for 2d without layout
+ """Get attribute display settings for 2d without layout.
Returns:
- attribute_display_settings
+ The attribute display settings for 2d without layout.
"""
+
def get_attribute_display_settings_for_3d() -> attribute_display_settings:
- """get attribute display settings for 3d
+ """Get attribute display settings for 3d.
Returns:
- attribute_display_settings
+ The attribute display settings for 3d.
"""
+
def get_attribute_display_settings_for_container() -> attribute_display_settings:
- """get attribute display settings for container
+ """Get attribute display settings for container.
Returns:
- attribute_display_settings
+ The attribute display settings for container.
"""
+
def get_attribute_display_settings_for_export_solid() -> attribute_display_settings:
- """get attribute display settings for export solid
+ """Get attribute display settings for export solid.
Returns:
- attribute_display_settings
+ The attribute display settings for export solid.
"""
+
def get_attribute_display_settings_for_framed_wall_axis() -> attribute_display_settings:
- """get attribute display settings for framed wall axis
+ """Get attribute display settings for framed wall axis.
Returns:
- attribute_display_settings
+ The attribute display settings for framed wall axis.
"""
+
def get_attribute_display_settings_for_framed_wall_beam() -> attribute_display_settings:
- """get attribute display settings for framed wall beam
+ """Get attribute display settings for framed wall beam.
Returns:
- attribute_display_settings
+ The attribute display settings for framed wall beam.
"""
+
def get_attribute_display_settings_for_framed_wall_opening() -> attribute_display_settings:
- """get attribute display settings for framed wall opening
+ """Get attribute display settings for framed wall opening.
Returns:
- attribute_display_settings
+ The attribute display settings for framed wall opening.
"""
+
def get_attribute_display_settings_for_framed_wall_panel() -> attribute_display_settings:
- """get attribute display settings for framed wall panel
+ """Get attribute display settings for framed wall panel.
Returns:
- attribute_display_settings
+ The attribute display settings for framed wall panel.
"""
+
def get_attribute_display_settings_for_log_wall_axis() -> attribute_display_settings:
- """get attribute display settings for log wall axis
+ """Get attribute display settings for log wall axis.
Returns:
- attribute_display_settings
+ The attribute display settings for log wall axis.
"""
+
def get_attribute_display_settings_for_log_wall_beam() -> attribute_display_settings:
- """get attribute display settings for log wall beam
+ """Get attribute display settings for log wall beam.
Returns:
- attribute_display_settings
+ The attribute display settings for log wall beam.
"""
+
def get_attribute_display_settings_for_log_wall_opening() -> attribute_display_settings:
- """get attribute display settings for log wall opening
+ """Get attribute display settings for log wall opening.
Returns:
- attribute_display_settings
+ The attribute display settings for log wall opening.
"""
+
def get_attribute_display_settings_for_log_wall_panel() -> attribute_display_settings:
- """get attribute display settings for log wall panel
+ """Get attribute display settings for log wall panel.
Returns:
- attribute_display_settings
+ The attribute display settings for log wall panel.
"""
+
def get_attribute_display_settings_for_machine() -> attribute_display_settings:
- """get attribute display settings for machine
+ """Get attribute display settings for machine.
Returns:
- attribute_display_settings
+ The attribute display settings for machine.
"""
+
def get_attribute_display_settings_for_nesting_element() -> attribute_display_settings:
- """get attribute display settings for nesting element
+ """Get attribute display settings for nesting element.
Returns:
- attribute_display_settings
+ The attribute display settings for nesting element.
"""
+
def get_attribute_display_settings_for_nesting_volume() -> attribute_display_settings:
- """get attribute display settings for nesting volume
+ """Get attribute display settings for nesting volume.
Returns:
- attribute_display_settings
+ The attribute display settings for nesting volume.
"""
+
def get_attribute_display_settings_for_solid_wall_axis() -> attribute_display_settings:
- """get attribute display settings for solid wall axis
+ """Get attribute display settings for solid wall axis.
Returns:
- attribute_display_settings
+ The attribute display settings for solid wall axis.
"""
+
def get_attribute_display_settings_for_solid_wall_beam() -> attribute_display_settings:
- """get attribute display settings for solid wall beam
+ """Get attribute display settings for solid wall beam.
Returns:
- attribute_display_settings
+ The attribute display settings for solid wall beam.
"""
+
def get_attribute_display_settings_for_solid_wall_opening() -> attribute_display_settings:
- """get attribute display settings for solid wall opening
+ """Get attribute display settings for solid wall opening.
Returns:
- attribute_display_settings
+ The attribute display settings for solid wall opening.
"""
+
def get_attribute_display_settings_for_solid_wall_panel() -> attribute_display_settings:
- """get attribute display settings for solid wall panel
+ """Get attribute display settings for solid wall panel.
Returns:
- attribute_display_settings
+ The attribute display settings for solid wall panel.
"""
-def is_processing(element_id: int) -> bool:
- """is processing
+
+def is_processing(element_id: ElementId) -> bool:
+ """Tests if element is processing.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is processing, false otherwise.
"""
-def delete_user_attribute(number: int) -> bool:
+
+def delete_user_attribute(number: UserAttributeId) -> bool:
"""Delete user attribute from attribute list. The attribute is only deleted when the attribute is not used.
Parameters:
- number: number
+ number: The attribute number.
Returns:
- bool deletion successfully
+ True if the attribute was successfully deleted, false otherwise.
"""
-def is_attribute_visible_in_modify_window(number: int) -> bool:
- """is attribute visible in modify window
+
+def is_attribute_visible_in_modify_window(number: UnsignedInt) -> bool:
+ """Test if attribute is visible in modify window.
Parameters:
- number: number
+ number: The attribute number.
Returns:
- bool
+ True if the attribute is visible in the modify window, false otherwise.
"""
-def set_attribute_visibility_in_modify_window(number: int, visibility: bool) -> None:
- """set attribute visibility in modify window
+
+def set_attribute_visibility_in_modify_window(number: UnsignedInt, visibility: bool) -> None:
+ """Set attribute visibility in modify window.
+
+ Parameters:
+ number: The attribute number.
+ visibility: The visibility state.
+ """
+
+
+def set_cutting_set(element_id_list: list[ElementId], cutting_set_name: str) -> bool:
+ """Set cutting set.
Parameters:
- number: number
- visibility: visibility
+ element_id_list: The list of element ids.
+ cutting_set_name: The name of the cutting set.
Returns:
- None
+ True if the cutting set was successfully set, false otherwise.
"""
-def set_cutting_set(element_id_list: List[int], cutting_set_name: str) -> bool:
- """set cutting set
+
+def get_standard_element_material_id(element_id: ElementId) -> int:
+ """Get standard element material id.
+
+ Parameters:
+ element_id: The element id.
+
+ Returns:
+ The standard element material id.
+ """
+
+
+def set_machine_calculation_set(element_ids: list[ElementId], name: str) -> bool:
+ """Set machine calculation set for a list of elements.
+
+ Note:
+ If multiple sets share the same name, the first matching set is used.
Parameters:
- element_id_list: element_id_list
- cutting_set_name: cutting_set_name
+ element_ids: The list of element ids.
+ name: The name of the machine calculation set to apply.
+
+ Examples:
+ >>> import attribute_controller as ac
+ >>> import element_controller as ec
+ >>> [element] = ec.get_active_identifiable_element_ids()
+ >>> current_set = ac.get_machine_calculation_set(element)
+ >>> success = ac.set_machine_calculation_set([element], "xyz_hundegger K2_BVN")
Returns:
- bool
+ True if the machine calculation set was successfully applied, false otherwise.
"""
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 23e8981..723a8f8 100644
--- a/src/bim_controller/__init__.pyi
+++ b/src/bim_controller/__init__.pyi
@@ -1,320 +1,378 @@
-from typing import List
-from cadwork import ifc_2x3_element_type
-from cadwork import ifc_options
-from cadwork import ifc_predefined_type
+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
+from cadwork.api_types import *
-def get_last_error(a0: int) -> str:
- """get last error
+def get_ifc_guid(element_id: ElementId) -> str:
+ """Get the IFC GUID of an element.
Parameters:
- a0: a0
+ element_id: The element id.
- Returns:
- str
- """
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
-def get_ifc_guid(element_id: int) -> str:
- """get ifc guid
-
- Parameters:
- element_id: element_id
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> ifc_guid = bc.get_ifc_guid(element)
+ >>> print(f"IFC GUID: {ifc_guid}")
Returns:
- str
+ A string representing the IFC GUID.
"""
-def clear_errors() -> None:
- """clear errors
+def get_ifc2x3_element_type(element_id: ElementId) -> ifc_2x3_element_type:
+ """Get ifc2x3 element type.
- Returns:
- None
- """
+ Parameters:
+ element_id: The element id.
-def get_ifc2x3_element_type(element_id: int) -> ifc_2x3_element_type:
- """get ifc2x3 element type
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
+ >>> import cadwork # needed for ifc_2x3_element_type
- Parameters:
- element_id: element_id
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> ifc_type = bc.get_ifc2x3_element_type(element)
Returns:
- ifc_2x3_element_type
+ The ifc_2x3_element_type of the element.
"""
-def set_ifc2x3_element_type(element_i_ds: List[int], element_type: None) -> None:
- """set ifc2x3 element type
- Parameters:
- element_i_ds: element_i_ds
- element_type: element_type
+def set_ifc2x3_element_type(element_id_list: list[ElementId], ifc_type: ifc_2x3_element_type) -> None:
+ """Set ifc2x3 element type.
- Returns:
- None
+ Parameters:
+ element_id_list: The list of element ids.
+ ifc_type: The ifc_2x3_element_type to set.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
+ >>> import cadwork
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> ifc_entity_type = cadwork.ifc_2x3_element_type()
+ >>> ifc_entity_type.set_ifc_member()
+ >>> bc.set_ifc2x3_element_type(selected_elements, ifc_entity_type)
"""
def import_ifc_as_graphical_object(file_path: str) -> bool:
- """import ifc as graphical object
+ """Imports ifc as graphical object.
Parameters:
- file_path: file_path
+ file_path: The path to the IFC file.
+
+ Examples:
+ >>> import bim_controller as bc
+
+ >>> ifc_file_path = r"C:/imports/building_model.ifc"
+ >>> success = bc.import_ifc_as_graphical_object(ifc_file_path)
+ >>> if success:
+ >>> print("IFC imported as graphical object successfully")
Returns:
- bool
+ True if the import was successful, false otherwise.
"""
def import_bcf(file_path: str) -> bool:
- """import bcf
+ """Imports a BCF file.
Parameters:
- file_path: file_path
+ file_path: The path to the BCF file.
+
+ Examples:
+ >>> import bim_controller as bc
+
+ >>> bcf_file_path = r"C:/imports/issues.bcf"
+ >>> success = bc.import_bcf(bcf_file_path)
+ >>> if success:
+ >>> print("BCF file imported successfully")
Returns:
- bool
+ True if the import was successful, false otherwise.
"""
def export_bcf(file_path: str) -> bool:
- """export bcf
+ """Exports a BCF file.
Parameters:
- file_path: file_path
+ file_path: The path where the BCF file will be exported.
+
+ Examples:
+ >>> import bim_controller as bc
+
+ >>> bcf_output_path = r"C:/exports/project_issues.bcf"
+ >>> success = bc.export_bcf(bcf_output_path)
+ >>> if success:
+ >>> print("BCF file exported successfully")
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def export_ifc(element_i_ds: List[int], file_path: str) -> bool:
- """export ifc
+def export_ifc(element_id_list: list[ElementId], file_path: str) -> bool:
+ """Export IFC file.
Parameters:
- element_i_ds: element_i_ds
- file_path: file_path
+ element_id_list: The list of element ids.
+ file_path: The path where the IFC file will be exported.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> ifc_output_path = r"C:/exports/building_model.ifc"
+ >>> success = bc.export_ifc(selected_elements, ifc_output_path)
+ >>> if success:
+ >>> print("IFC file exported successfully")
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def import_ifc_return_exchange_objects(file_path: str) -> List[int]:
- """imports an IFC File and returns the ids of the Exchange Objects
+def import_ifc_return_exchange_objects(file_path: str) -> list[ElementId]:
+ """Imports an IFC File and returns the ids of the Exchange Objects.
Parameters:
- file_path: file_path
+ file_path: The path to the IFC file.
Returns:
- List[int]
+ The ids of the exchange objects.
"""
def set_storey_height(building: str, storey: str, height: float) -> None:
- """set storey height
+ """Set storey height.
Parameters:
- building: building
- storey: storey
- height: height
+ building: The name of the building.
+ storey: The name of the storey.
+ height: The height of the storey.
- Returns:
- None
+ Examples:
+ >>> import bim_controller as bc
+
+ >>> building_name = "Building A"
+ >>> storey_name = "Ground Floor"
+ >>> height_millimeters = 3_500
+ >>> bc.set_storey_height(building_name, storey_name, height_millimeters)
"""
-def convert_exchange_objects(exchange_objects: List[int]) -> List[int]:
- """converts a list of Exchange Objects to Cadwork Elements
+def convert_exchange_objects(exchange_objects: list[ElementId]) -> list[ElementId]:
+ """Converts a list of Exchange Objects to Cadwork Elements.
Parameters:
- exchange_objects: exchange_objects
+ exchange_objects: A list of Exchange Object id to convert.
Returns:
- List[int]
+ The list of Cadwork Element ids.
"""
-def export_ifc2x3_silently(element_i_ds: List[int], file_path: str) -> bool:
- """export ifc2x3 silently
+def export_ifc2x3_silently(element_id_list: list[ElementId], file_path: str) -> bool:
+ """Export IFC2x3 silently.
Parameters:
- element_i_ds: element_i_ds
- file_path: file_path
+ element_id_list: The list of element ids.
+ file_path: The path where the IFC file will be exported.
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def export_ifc4_silently(element_i_ds: List[int], file_path: str) -> bool:
- """export ifc4 silently
+def export_ifc4_silently(element_id_list: list[ElementId], file_path: str) -> bool:
+ """Exports IFC4 silently.
Parameters:
- element_i_ds: element_i_ds
- file_path: file_path
+ element_id_list: The list of element ids.
+ file_path: The path where the IFC file will be exported.
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def export_ifc2x3_silently_with_options(element_i_ds: List[int], file_path: str, options: ifc_options) -> bool:
- """export ifc2x3 silently with options
+def export_ifc2x3_silently_with_options(element_id_list: list[ElementId], file_path: str, options: ifc_options) -> bool:
+ """Exports IFC2x3 silently with options.
Parameters:
- element_i_ds: element_i_ds
- file_path: file_path
- options: options
+ element_id_list: The list of element ids.
+ file_path: The path where the IFC file will be exported.
+ options: The export options.
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def export_ifc4_silently_with_options(element_i_ds: List[int], file_path: str, options: ifc_options) -> bool:
- """export ifc4 silently with options
+def export_ifc4_silently_with_options(element_id_list: list[ElementId], file_path: str, options: ifc_options) -> bool:
+ """Exports IFC4 silently with options.
Parameters:
- element_i_ds: element_i_ds
- file_path: file_path
- options: options
+ element_id_list: The list of element ids.
+ file_path: The path where the IFC file will be exported.
+ options: The export options.
Returns:
- bool
+ True if the export was successful, false otherwise.
"""
-def update_bmt_structure_created_elements(element_i_ds: List[int]) -> 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_i_ds: element_i_ds
-
- Returns:
- None
+ element_id_list: The list of element ids to be updated in the BMT structure.
"""
-def update_bmt_structure_building_storey(element_i_ds: List[int]) -> 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:
- element_i_ds: element_i_ds
-
- Returns:
- None
+ element_id_list: The list of element ids to be updated in the BMT structure.
"""
def get_ifc_options() -> ifc_options:
- """Get the IfcOptions with the settings used in the document // *
+ """Get the IfcOptions with the settings used in the document.
Returns:
- IfcOptions //
+ The IfcOptions object containing the current settings.
"""
-def set_building_and_storey(element_id_list: List[int], building: str, storey: str) -> None:
- """set building and storey
+def set_building_and_storey(element_id_list: list[ElementId], building: str, storey: str) -> None:
+ """Set building and storey.
Parameters:
- element_id_list: element_id_list
- building: building
- storey: storey
-
- Returns:
- None
+ element_id_list: The list of element ids.
+ building: The building name.
+ storey: The storey name.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> building_name = "Building A"
+ >>> storey_name = "Ground Floor"
+ >>> bc.set_building_and_storey(selected_elements, building_name, storey_name)
"""
-def get_building(element: int) -> str:
- """get building
+def get_building(element_id: ElementId) -> str:
+ """Get building name for a given element.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- str
+ The name of the building.
"""
-def get_storey(element: int) -> str:
- """get storey
+def get_storey(element_id: ElementId) -> str:
+ """Get storey name for a given element.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- str
+ The name of the storey.
"""
def get_storey_height(building: str, storey: str) -> float:
- """get storey height
+ """Get storey height for a given building and storey.
Parameters:
- building: building
- storey: storey
+ building: The building name.
+ storey: The storey name.
Returns:
- float
+ The height of the storey.
"""
-def get_ifc2x3_element_type_string(element_type: None) -> str:
- """get ifc2x3 element type string
+
+def get_ifc2x3_element_type_string(entity_type: ifc_2x3_element_type) -> str:
+ """Get IFC2x3 element type string.
Parameters:
- element_type: element_type
+ entity_type: The entity type.
Returns:
- str
+ The string representation of the IFC2x3 element type.
"""
-def get_ifc2x3_element_type_display_string(element_type: None) -> str:
- """get ifc2x3 element type display string
+
+def get_ifc2x3_element_type_display_string(entity_type: ifc_2x3_element_type) -> str:
+ """Get IFC2x3 element type display string.
Parameters:
- element_type: element_type
+ entity_type: The entity type.
Returns:
- str
+ The display string representation of the IFC2x3 element type.
"""
-def get_all_buildings() -> List[str]:
- """get all buildings
+def get_all_buildings() -> list[str]:
+ """Get all buildings.
Returns:
- List[str]
+ A list of all building.
"""
-def get_all_storeys(building: str) -> List[str]:
- """get all storeys
+def get_all_storeys(building: str) -> list[str]:
+ """Get all storeys.
Parameters:
- building: building
+ building: The building name.
Returns:
- List[str]
+ A list of all storeys in the building.
"""
-def get_element_id_from_base64_ifc_guid(a1: str) -> int:
- """get element id from base64 ifc guid
+
+def get_element_id_from_base64_ifc_guid(base_64_ifc_guid: str) -> ElementId:
+ """Get element id from base64 ifc guid.
Parameters:
- a1: a1
+ base_64_ifc_guid: The base64 IFC GUID.
Returns:
- int
+ The element id corresponding to the base64 IFC GUID.
"""
-def get_ifc_base64_guid(element_id: int) -> str:
- """Get IFC base64 Guid from element ID
+def get_ifc_base64_guid(element_id: ElementId) -> str:
+ """Get IFC base64 Guid from element id.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
The IFC GUID in base64 string format ("28kif20KPEuBjk2m1N3ep$").
"""
-def get_ifc_predefined_type(element_id: int) -> 'ifc_predefined_type':
+def get_ifc_predefined_type(element_id: ElementId) -> 'ifc_predefined_type':
"""Get the IfcPredefinedType of an element.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- IfcPredefinedType Wrapper
+ The IfcPredefinedType of the element.
"""
-def set_ifc_predefined_type(element_i_ds: List[int], predefined_type: None) -> 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:
- element_i_ds: element_i_ds
- predefined_type: predefined_type
+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.
- Returns:
- None
+ Parameters:
+ element_id_list: The list of element ids.
+ predefined_type: The predefined type to set.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import bim_controller as bc
+ >>> import cadwork
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> predefined_type = cadwork.ifc_predefined_type()
+ >>> predefined_type.set_member()
+ >>> bc.set_ifc_predefined_type(selected_elements, predefined_type)
"""
-
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 1372526..6339dc0 100644
--- a/src/cadwork/__init__.pyi
+++ b/src/cadwork/__init__.pyi
@@ -1,56 +1,186 @@
-from .attribute_display_settings import attribute_display_settings
-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 .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 .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_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 .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 .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 typing import List
-
-
-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
+"""cadwork Python API type definitions.
+
+This module re-exports all cadwork data types, enumerations, and utility classes.
+
+Usage::
+
+ from cadwork import point_3d, element_type, rgb_color
+
+ # 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.py b/src/cadwork/active_point_result.py
new file mode 100644
index 0000000..d4ec1f5
--- /dev/null
+++ b/src/cadwork/active_point_result.py
@@ -0,0 +1,12 @@
+from dataclasses import dataclass
+from typing import Optional
+from cadwork import point_3d
+
+
+@dataclass(frozen=True)
+class active_point_result:
+ has_point: bool
+ point: Optional["point_3d"] = None
+
+ def __bool__(self) -> bool:
+ return self.has_point
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
new file mode 100644
index 0000000..19531d6
--- /dev/null
+++ b/src/cadwork/api_types.pyi
@@ -0,0 +1,25 @@
+from typing import TypeAlias
+
+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/attribute_display_settings.pyi b/src/cadwork/attribute_display_settings.pyi
index 86a2fc7..0491826 100644
--- a/src/cadwork/attribute_display_settings.pyi
+++ b/src/cadwork/attribute_display_settings.pyi
@@ -1,4 +1,5 @@
class attribute_display_settings:
+ """attribute display settings"""
def get_text_position_percentage(self) -> int:
"""get text position percentage
diff --git a/src/cadwork/bim_team_upload_result.pyi b/src/cadwork/bim_team_upload_result.pyi
new file mode 100644
index 0000000..56f41ab
--- /dev/null
+++ b/src/cadwork/bim_team_upload_result.pyi
@@ -0,0 +1,17 @@
+from src.cadwork.bim_team_upload_result_code import bim_team_upload_result_code
+
+
+class bim_team_upload_result:
+ """bim team upload result
+ """
+
+ def __init__(self):
+ """
+ Instance of the bim_team_upload_result class.
+
+ Attributes:
+ upload_result_code (bim_team_upload_result_code): The result code of the upload.
+ share_link (str): The share link for the uploaded BIM team result.
+ """
+ self.upload_result_code = bim_team_upload_result_code.ok
+ self.share_link = ""
diff --git a/src/cadwork/bim_team_upload_result_code.pyi b/src/cadwork/bim_team_upload_result_code.pyi
new file mode 100644
index 0000000..344d7f2
--- /dev/null
+++ b/src/cadwork/bim_team_upload_result_code.pyi
@@ -0,0 +1,26 @@
+from enum import IntEnum, unique
+
+
+@unique
+class bim_team_upload_result_code(IntEnum):
+ """bim team upload result code
+
+ Examples:
+ >>> cadwork.bim_team_upload_result_code.ok
+ ok
+ """
+ ok = 0
+ """"""
+ error_general_error = 1
+ """"""
+ error_too_many_models = 2
+ """"""
+ error_insufficient_storage = 3
+ """"""
+ error_invalid_project_id = 4
+ """"""
+ error_authentication_failed = 5
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
diff --git a/src/cadwork/dimension_base_format.pyi b/src/cadwork/dimension_base_format.pyi
new file mode 100644
index 0000000..af5d8d1
--- /dev/null
+++ b/src/cadwork/dimension_base_format.pyi
@@ -0,0 +1,24 @@
+from enum import IntEnum, unique
+
+
+@unique
+class dimension_base_format(IntEnum):
+ """ Enumeration for dimension base format.
+
+ Examples:
+ >>> cadwork.dimension_base_format.sum_only
+
+ """
+ none = 0
+ """"""
+ distance_only = 1
+ """"""
+ sum_only = 2
+ """"""
+ distance_and_sum = 3
+ """"""
+ sum_moved = 4
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
diff --git a/src/cadwork/display_attribute.pyi b/src/cadwork/display_attribute.pyi
new file mode 100644
index 0000000..dea133f
--- /dev/null
+++ b/src/cadwork/display_attribute.pyi
@@ -0,0 +1,136 @@
+class display_attribute:
+ """
+ A wrapper class for managing element display states for WebGL hierarchy display settings (not in Cadwork 3d).
+ These methods update the internal state of the attribute object without requiring external parameters.
+
+ Used exclusively with `set_webgl_hierarchy` to define visibility and display
+ properties for elements in the WebGL.
+
+ .. deprecated::
+ This class supports legacy local WebGL workflows.
+ It will be deprecated.
+ """
+
+ def __init__(self) -> None:
+ """Initializes a new display_attribute instance."""
+
+ def set_none(self) -> None:
+ """Resets or clears the current display attribute state.
+
+ Returns:
+ None
+ """
+
+ def set_name(self) -> None:
+ """Triggers the assignment of the name attribute.
+
+ Returns:
+ None
+ """
+
+ def set_group(self) -> None:
+ """Triggers the assignment of the group attribute.
+
+ Returns:
+ None
+ """
+
+ def set_subgroup(self) -> None:
+ """Triggers the assignment of the subgroup attribute.
+
+ Returns:
+ None
+ """
+
+ def set_comment(self) -> None:
+ """Triggers the assignment of the comment attribute.
+
+ Returns:
+ None
+ """
+
+ def set_edv_code(self) -> None:
+ """Triggers the assignment of the EDV/ERP code.
+
+ Returns:
+ None
+ """
+
+ def set_material(self) -> None:
+ """Triggers the assignment of the material attribute.
+
+ Returns:
+ None
+ """
+
+ def set_material_group(self) -> None:
+ """Triggers the assignment of the material group attribute.
+
+ Returns:
+ None
+ """
+
+ def set_user1(self) -> None:
+ """Triggers the assignment of custom user field 1."""
+
+ def set_user2(self) -> None:
+ """Triggers the assignment of custom user field 2."""
+
+ def set_user3(self) -> None:
+ """Triggers the assignment of custom user field 3."""
+
+ def set_user4(self) -> None:
+ """Triggers the assignment of custom user field 4."""
+
+ def set_user5(self) -> None:
+ """Triggers the assignment of custom user field 5."""
+
+ def set_user6(self) -> None:
+ """Triggers the assignment of custom user field 6."""
+
+ def set_user7(self) -> None:
+ """Triggers the assignment of custom user field 7."""
+
+ def set_user8(self) -> None:
+ """Triggers the assignment of custom user field 8."""
+
+ def set_user9(self) -> None:
+ """Triggers the assignment of custom user field 9."""
+
+ def set_user10(self) -> None:
+ """Triggers the assignment of custom user field 10."""
+
+ def set_production_number(self) -> None:
+ """Triggers the assignment of the production/fabrication number.
+
+ Returns:
+ None
+ """
+
+ def set_timber_number(self) -> None:
+ """Triggers the assignment of the timber-specific member number.
+
+ Returns:
+ None
+ """
+
+ def set_assembly_number(self) -> None:
+ """Triggers the assignment of the assembly/unit number.
+
+ Returns:
+ None
+ """
+
+ def set_ifc_building(self) -> None:
+ """Triggers the assignment of the IFC building attribute.
+
+ Returns:
+ None
+ """
+
+ def set_ifc_storey(self) -> None:
+ """Triggers the assignment of the IFC storey/level attribute.
+
+ Returns:
+ None
+ """
diff --git a/src/cadwork/double_shoulder_options.pyi b/src/cadwork/double_shoulder_options.pyi
new file mode 100644
index 0000000..95b96c3
--- /dev/null
+++ b/src/cadwork/double_shoulder_options.pyi
@@ -0,0 +1,274 @@
+class double_shoulder_options:
+
+ def get_add_drilling_axis(self) -> bool:
+ """get add drilling axis
+
+ Returns:
+ bool
+ """
+
+ def set_add_drilling_axis(self, value: bool) -> None:
+ """set add drilling axis
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_add_drilling_axis_query_user_flag(self) -> bool:
+ """get add drilling axis query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_add_drilling_axis_query_user_flag(self, flag: bool) -> None:
+ """set add drilling axis query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_diameter(self) -> float:
+ """get drilling diameter
+
+ Returns:
+ float
+ """
+
+ def set_drilling_diameter(self, value: float) -> None:
+ """set drilling diameter
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_drilling_diameter_query_user_flag(self) -> bool:
+ """get drilling diameter query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_diameter_query_user_flag(self, flag: bool) -> None:
+ """set drilling diameter query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_tolerance(self) -> float:
+ """get drilling tolerance
+
+ Returns:
+ float
+ """
+
+ def set_drilling_tolerance(self, value: float) -> None:
+ """set drilling tolerance
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_drilling_tolerance_query_user_flag(self) -> bool:
+ """get drilling tolerance query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_tolerance_query_user_flag(self, flag: bool) -> None:
+ """set drilling tolerance query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_orientation_query_user_flag(self) -> bool:
+ """get drilling orientation query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_orientation_query_user_flag(self, flag: bool) -> None:
+ """set drilling orientation query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_beam_geometry(self) -> 'shoulder_beam_geometry':
+ """get beam geometry
+
+ Returns:
+ shoulder_beam_geometry
+ """
+
+ def set_beam_geometry(self, value: 'shoulder_beam_geometry') -> None:
+ """set beam geometry
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_beam_geometry_query_user_flag(self) -> bool:
+ """get beam geometry query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_beam_geometry_query_user_flag(self, flag: bool) -> None:
+ """set beam geometry query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_double_shoulder_depth(self) -> float:
+ """get double shoulder depth
+
+ Returns:
+ float
+ """
+
+ def set_double_shoulder_depth(self, value: float) -> None:
+ """set double shoulder depth
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_double_shoulder_depth_query_user_flag(self) -> bool:
+ """get double shoulder depth query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_double_shoulder_depth_query_user_flag(self, flag: bool) -> None:
+ """set double shoulder depth query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_heel_shoulder_depth(self) -> float:
+ """get heel shoulder depth
+
+ Returns:
+ float
+ """
+
+ def set_heel_shoulder_depth(self, value: float) -> None:
+ """set heel shoulder depth
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_heel_shoulder_depth_query_user_flag(self) -> bool:
+ """get heel shoulder depth query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_heel_shoulder_depth_query_user_flag(self, flag: bool) -> None:
+ """set heel shoulder depth query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width(self) -> bool:
+ """get cut counter part through whole width
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width(self, value: bool) -> None:
+ """set cut counter part through whole width
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width_query_user_flag(self) -> bool:
+ """get cut counter part through whole width query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width_query_user_flag(self, flag: bool) -> None:
+ """set cut counter part through whole width query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_orientation(self) -> 'shoulder_drilling_orientation':
+ """get drilling orientation
+
+ Returns:
+ shoulder_drilling_orientation
+ """
+
+ def set_drilling_orientation(self, value: 'shoulder_drilling_orientation') -> None:
+ """set drilling orientation
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
diff --git a/src/cadwork/dxf_export_version.pyi b/src/cadwork/dxf_export_version.pyi
new file mode 100644
index 0000000..8bceba1
--- /dev/null
+++ b/src/cadwork/dxf_export_version.pyi
@@ -0,0 +1,18 @@
+from enum import IntEnum, unique
+
+
+@unique
+class dxf_export_version(IntEnum):
+ """ Enumeration for DXF export version.
+
+ Examples:
+ >>> cadwork.dxf_export_version.auto_cad_r27
+
+ """
+ auto_cad_r10 = 0
+ """"""
+ auto_cad_r27 = 1
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
diff --git a/src/cadwork/dxf_layer_format_type.pyi b/src/cadwork/dxf_layer_format_type.pyi
new file mode 100644
index 0000000..74bf6eb
--- /dev/null
+++ b/src/cadwork/dxf_layer_format_type.pyi
@@ -0,0 +1,26 @@
+from enum import IntEnum, unique
+
+
+@unique
+class dxf_layer_format_type(IntEnum):
+ """ Enumeration for DXF layer format type.
+
+ Examples:
+ >>> cadwork.dxf_layer_format_type.color
+
+ """
+ all_in_no_1 = 0
+ """"""
+ color = 1
+ """"""
+ material = 2
+ """"""
+ name = 3
+ """"""
+ group = 4
+ """"""
+ subgroup = 5
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
diff --git a/src/cadwork/element_filter.pyi b/src/cadwork/element_filter.pyi
new file mode 100644
index 0000000..d8af660
--- /dev/null
+++ b/src/cadwork/element_filter.pyi
@@ -0,0 +1,82 @@
+class element_filter:
+
+ def set_name(self, name: str) -> None:
+ """set name
+
+ Parameters:
+ name: name
+
+ Returns:
+ None
+ """
+
+ def set_group(self, group: str) -> None:
+ """set group
+
+ Parameters:
+ group: group
+
+ Returns:
+ None
+ """
+
+ def set_subgroup(self, subgroup: str) -> None:
+ """set subgroup
+
+ Parameters:
+ subgroup: subgroup
+
+ Returns:
+ None
+ """
+
+ def set_comment(self, comment: str) -> None:
+ """set comment
+
+ Parameters:
+ comment: comment
+
+ Returns:
+ None
+ """
+
+ def set_user_attribute(self, number: int, user_attribute: str) -> None:
+ """set user attribute
+
+ Parameters:
+ number: number
+ user_attribute: user_attribute
+
+ Returns:
+ None
+ """
+
+ def set_sku(self, sku: str) -> None:
+ """set sku
+
+ Parameters:
+ sku: sku
+
+ Returns:
+ None
+ """
+
+ def set_production_number(self, production_number: int) -> None:
+ """set production number
+
+ Parameters:
+ production_number: production_number
+
+ Returns:
+ None
+ """
+
+ def set_part_number(self, part_number: int) -> None:
+ """set part number
+
+ Parameters:
+ part_number: part_number
+
+ Returns:
+ None
+ """
diff --git a/src/cadwork/element_map_query.pyi b/src/cadwork/element_map_query.pyi
new file mode 100644
index 0000000..c187566
--- /dev/null
+++ b/src/cadwork/element_map_query.pyi
@@ -0,0 +1,74 @@
+class element_map_query:
+
+ def set_by_name(self) -> None:
+ """set by name
+
+ Returns:
+ None
+ """
+
+ def set_by_group(self) -> None:
+ """set by group
+
+ Returns:
+ None
+ """
+
+ def set_by_subgroup(self) -> None:
+ """set by subgroup
+
+ Returns:
+ None
+ """
+
+ def set_by_comment(self) -> None:
+ """set by comment
+
+ Returns:
+ None
+ """
+
+ def set_by_user_attribute(self, number: int) -> None:
+ """set by user attribute
+
+ Parameters:
+ number: number
+
+ Returns:
+ None
+ """
+
+ def set_by_sku(self) -> None:
+ """set by sku
+
+ Returns:
+ None
+ """
+
+ def set_by_production_number(self) -> None:
+ """set by production number
+
+ Returns:
+ None
+ """
+
+ def set_by_part_number(self) -> None:
+ """set by part number
+
+ Returns:
+ None
+ """
+
+ def set_by_building(self) -> None:
+ """set by building
+
+ Returns:
+ None
+ """
+
+ def set_by_storey(self) -> None:
+ """set by storey
+
+ Returns:
+ None
+ """
diff --git a/src/cadwork/extended_settings.pyi b/src/cadwork/extended_settings.pyi
index 4658f37..80745a5 100644
--- a/src/cadwork/extended_settings.pyi
+++ b/src/cadwork/extended_settings.pyi
@@ -176,4 +176,71 @@ class extended_settings:
Returns:
None
"""
+
+ def get_ignore_processing(self) ->bool:
+ """get ignore processing
+
+ Returns:
+ bool
+ """
+
+ def set_ignore_processing(self, value: bool) ->None:
+ """set ignore processing
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_single_piece(self) -> bool:
+ """get single piece
+
+ Returns:
+ bool
+ """
+
+ def set_single_piece(self, value: bool) -> None:
+ """set single piece
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_composite(self) -> bool:
+ """get composite
+
+ Returns:
+ bool
+ """
+
+ def set_composite(self, value: bool) -> None:
+ """set composite
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_drilling_create_notches(self) -> bool:
+ """get drilling create notches
+ Returns:
+ bool
+ """
+
+ def set_drilling_create_notches(self, value: bool) -> None:
+ """set drilling create notches
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
\ No newline at end of file
diff --git a/src/cadwork/facet_list.pyi b/src/cadwork/facet_list.pyi
index 7868591..6b580ee 100644
--- a/src/cadwork/facet_list.pyi
+++ b/src/cadwork/facet_list.pyi
@@ -11,7 +11,7 @@ class facet_list:
int
"""
- def at(self, index: int) -> point_3d:
+ def at(self, index: int) -> vertex_list:
"""at
Parameters:
diff --git a/src/cadwork/heel_shoulder_beam_geometry.pyi b/src/cadwork/heel_shoulder_beam_geometry.pyi
new file mode 100644
index 0000000..d07fca2
--- /dev/null
+++ b/src/cadwork/heel_shoulder_beam_geometry.pyi
@@ -0,0 +1,21 @@
+from enum import IntEnum, unique
+
+
+@unique
+class heel_shoulder_beam_geometry(IntEnum):
+ """heel shoulder beam geometry
+
+ Examples:
+ >>> cadwork.heel_shoulder_beam_geometry.normal
+ normal
+ """
+ normal = 0
+ """NormalHeel
+ """
+ straight = 3
+ """StraightHeel
+ """
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/heel_shoulder_options.pyi b/src/cadwork/heel_shoulder_options.pyi
new file mode 100644
index 0000000..93773e3
--- /dev/null
+++ b/src/cadwork/heel_shoulder_options.pyi
@@ -0,0 +1,206 @@
+class heel_shoulder_options:
+
+ def get_beam_geometry(self) -> 'shoulder_beam_geometry':
+ """get beam geometry
+
+ Returns:
+ shoulder_beam_geometry
+ """
+
+ def set_beam_geometry(self, value: 'shoulder_beam_geometry') -> None:
+ """set beam geometry
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_beam_geometry_query_user_flag(self) -> bool:
+ """get beam geometry query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_beam_geometry_query_user_flag(self, flag: bool) -> None:
+ """set beam geometry query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_shoulder_depth(self) -> float:
+ """get shoulder depth
+
+ Returns:
+ float
+ """
+
+ def set_shoulder_depth(self, value: float) -> None:
+ """set shoulder depth
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_shoulder_depth_query_user_flag(self) -> bool:
+ """get shoulder depth query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_shoulder_depth_query_user_flag(self, flag: bool) -> None:
+ """set shoulder depth query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_gap(self) -> float:
+ """get gap
+
+ Returns:
+ float
+ """
+
+ def set_gap(self, value: float) -> None:
+ """set gap
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_gap_query_user_flag(self) -> bool:
+ """get gap query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_gap_query_user_flag(self, flag: bool) -> None:
+ """set gap query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width(self) -> bool:
+ """get cut counter part through whole width
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width(self, value: bool) -> None:
+ """set cut counter part through whole width
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width_query_user_flag(self) -> bool:
+ """get cut counter part through whole width query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width_query_user_flag(self, flag: bool) -> None:
+ """set cut counter part through whole width query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_add_end_type(self) -> bool:
+ """get add end type
+
+ Returns:
+ bool
+ """
+
+ def set_add_end_type(self, value: bool) -> None:
+ """set add end type
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_add_end_type_query_user_flag(self) -> bool:
+ """get add end type query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_add_end_type_query_user_flag(self, flag: bool) -> None:
+ """set add end type query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_end_type_name(self) -> str:
+ """get end type name
+
+ Returns:
+ str
+ """
+
+ def set_end_type_name(self, value: str) -> None:
+ """set end type name
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_end_type_name_query_user_flag(self) -> bool:
+ """get end type name query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_end_type_name_query_user_flag(self, flag: bool) -> None:
+ """set end type name query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
diff --git a/src/cadwork/hit_result.pyi b/src/cadwork/hit_result.pyi
new file mode 100644
index 0000000..1272559
--- /dev/null
+++ b/src/cadwork/hit_result.pyi
@@ -0,0 +1,21 @@
+from cadwork.point_3d import point_3d
+
+
+class hit_result:
+
+ def get_hit_element_ids(self) -> list[int]:
+ """Get hit element IDs.
+
+ Returns:
+ list[int]: element IDs that were hit.
+ """
+
+ def get_hit_vertices_by_element(self, element_id: int) -> list[point_3d]:
+ """Get hit vertices for a specific element.
+
+ Parameters:
+ element_id: The element ID.
+
+ Returns:
+ list[point_3d]: vertices hit on the element.
+ """
diff --git a/src/cadwork/ifc_2x3_element_type.pyi b/src/cadwork/ifc_2x3_element_type.pyi
index 396b883..741b053 100644
--- a/src/cadwork/ifc_2x3_element_type.pyi
+++ b/src/cadwork/ifc_2x3_element_type.pyi
@@ -1,5 +1,5 @@
class ifc_2x3_element_type:
-
+
def is_none(self) -> bool:
"""is none
@@ -407,9 +407,23 @@ class ifc_2x3_element_type:
"""
def __repr__(self) -> str:
- """ repr
+ """ repr
Returns:
str
"""
+ def is_ifc_element_assembly(self) -> bool:
+ """is ifc element assembly
+
+ Returns:
+ bool
+ """
+
+ def set_ifc_element_assembly(self) -> None:
+ """set ifc element assembly
+
+ Returns:
+ None
+ """
+
diff --git a/src/cadwork/ifc_material_definition.pyi b/src/cadwork/ifc_material_definition.pyi
new file mode 100644
index 0000000..e23941a
--- /dev/null
+++ b/src/cadwork/ifc_material_definition.pyi
@@ -0,0 +1,21 @@
+from enum import IntEnum, unique
+
+
+@unique
+class ifc_material_definition(IntEnum):
+ """ifc material definition
+
+ Examples:
+ >>> cadwork.ifc_material_definition.ignore
+ ignore
+ """
+ ignore = 1
+ """"""
+ material_layer_set = 2
+ """"""
+ material_constituent_set = 3
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
+
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/ifc_options_aggregation.pyi b/src/cadwork/ifc_options_aggregation.pyi
index d0e2811..ceb8622 100644
--- a/src/cadwork/ifc_options_aggregation.pyi
+++ b/src/cadwork/ifc_options_aggregation.pyi
@@ -1,4 +1,4 @@
-from cadwork import element_grouping_type
+from cadwork import element_grouping_type, ifc_material_definition
from cadwork import ifc_element_combine_behaviour
class ifc_options_aggregation:
@@ -71,3 +71,20 @@ class ifc_options_aggregation:
None
"""
+ def set_multi_layer_material_definition_type(self, ifc_material_definition: ifc_material_definition) -> None:
+ """set multi layer material definition type
+
+ Parameters:
+ ifc_material_definition: ifc_material_definition
+
+ Returns:
+ None
+ """
+
+ def get_multi_layer_material_definition_type(self) -> ifc_material_definition:
+ """get multi layer material definition type
+
+ Returns:
+ ifc_material_definition
+ """
+
diff --git a/src/cadwork/ifc_options_properties.pyi b/src/cadwork/ifc_options_properties.pyi
index 909ea58..c13697f 100644
--- a/src/cadwork/ifc_options_properties.pyi
+++ b/src/cadwork/ifc_options_properties.pyi
@@ -102,3 +102,19 @@ class ifc_options_properties:
bool
"""
+ def get_export_quantity_sets(self) -> bool:
+ """get export quantity sets
+
+ Returns:
+ bool
+ """
+
+ def set_export_quantity_sets(self, export_quantity_sets: bool) -> None:
+ """set export quantity sets
+
+ Parameters:
+ export_quantity_sets: export_quantity_sets
+
+ Returns:
+ None
+ """
diff --git a/src/cadwork/multi_layer_cover_type.pyi b/src/cadwork/multi_layer_cover_type.pyi
new file mode 100644
index 0000000..c632e97
--- /dev/null
+++ b/src/cadwork/multi_layer_cover_type.pyi
@@ -0,0 +1,29 @@
+from enum import IntEnum, unique
+
+
+@unique
+class multi_layer_cover_type(IntEnum):
+ """multi layer cover type
+
+ Examples:
+ >>> cadwork.multi_layer_cover_type.framedWall
+ framedWall
+ """
+ framedWall = 0
+ """"""
+ solidWall = 1
+ """"""
+ logWall = 2
+ """"""
+ framedRoof = 3
+ """"""
+ solidRoof = 4
+ """"""
+ framedFloor = 5
+ """"""
+ solidFloor = 6
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/multi_layer_subtype.pyi b/src/cadwork/multi_layer_subtype.pyi
new file mode 100644
index 0000000..05ad725
--- /dev/null
+++ b/src/cadwork/multi_layer_subtype.pyi
@@ -0,0 +1,33 @@
+from enum import IntEnum, unique
+
+
+@unique
+class multi_layer_subtype(IntEnum):
+ """multi layer subtype
+
+ Examples:
+ >>> cadwork.multi_layer_subtype.undefined
+ undefined
+ """
+ undefined = 0
+ """"""
+ loadBearingFrameStructure = 1
+ """"""
+ solidStructure = 2
+ """"""
+ straightEdge = 3
+ """"""
+ biasEdge = 4
+ """"""
+ vertical = 5
+ """"""
+ horizontal = 6
+ """"""
+ air = 7
+ """"""
+ nonLoadBearingFrameStructure = 8
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/multi_layer_type.pyi b/src/cadwork/multi_layer_type.pyi
new file mode 100644
index 0000000..a0128f1
--- /dev/null
+++ b/src/cadwork/multi_layer_type.pyi
@@ -0,0 +1,27 @@
+from enum import IntEnum, unique
+
+
+@unique
+class multi_layer_type(IntEnum):
+ """multi layer type
+
+ Examples:
+ >>> cadwork.multi_layer_type.undefined
+ undefined
+ """
+ undefined = 0
+ """"""
+ structure = 1
+ """"""
+ panel = 2
+ """"""
+ lathing = 3
+ """"""
+ air = 4
+ """"""
+ covering = 5
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/point.pyi b/src/cadwork/point.pyi
new file mode 100644
index 0000000..555350e
--- /dev/null
+++ b/src/cadwork/point.pyi
@@ -0,0 +1,11 @@
+class point:
+ def __init__(self, x: float, y: float):
+ """
+ Initialize a point with x and y coordinates.
+
+ Args:
+ x (float): The x-coordinate.
+ y (float): The y-coordinate.
+ """
+ self.x = x
+ self.y = y
diff --git a/src/cadwork/point_3d.pyi b/src/cadwork/point_3d.pyi
index d782233..4e73bfa 100644
--- a/src/cadwork/point_3d.pyi
+++ b/src/cadwork/point_3d.pyi
@@ -1,55 +1,153 @@
class point_3d:
-
- def __init__(self, x: float, y: float, z: float) -> None: ...
-
- def dot(self, p: 'point_3d') -> float:
- """dot
+ def __init__(self, x: float, y: float, z: float):
+ """
+ Initialize an instance of a point_3d.
Parameters:
- p: p
+ x (float): The x-coordinate of the point.
+ y (float): The y-coordinate of the point.
+ z (float): The z-coordinate of the point.
+ """
+ self.x = x
+ self.y = y
+ self.z = z
+
+ def __add__(self, other: 'point_3d') -> 'point_3d':
+ """
+ Add two points component-wise.
Returns:
- float
+ point_3d: The sum of two points.
"""
- def cross(self, p: 'point_3d') -> 'point_3d':
- """cross
+ def __sub__(self, other: 'point_3d') -> 'point_3d':
+ """
+ Subtract two points component-wise.
- Parameters:
- p: p
+ Returns:
+ point_3d: The difference of two points.
+ """
+
+ def __mul__(self, other: float) -> 'point_3d':
+ """
+ Multiply point by a scalar.
Returns:
- 'point_3d'
+ point_3d: The scaled point.
"""
- def magnitude(self) -> float:
- """magnitude
+ def __rmul__(self, other: float) -> 'point_3d':
+ """
+ Multiply point by a scalar (right-hand side).
Returns:
- float
+ point_3d: The scaled point.
"""
- def normalized(self) -> 'point_3d':
- """normalized
+ def __truediv__(self, other: float) -> 'point_3d':
+ """
+ Divide point by a scalar.
Returns:
- 'point_3d'
+ point_3d: The scaled point.
"""
- def distance(self, p: 'point_3d') -> float:
- """distance
+ def __iadd__(self, other: 'point_3d') -> 'point_3d':
+ """
+ In-place addition of another point.
- Parameters:
- p: p
+ Returns:
+ point_3d: The updated point.
+ """
+
+ def __isub__(self, other: 'point_3d') -> 'point_3d':
+ """
+ In-place subtraction of another point.
Returns:
- float
+ point_3d: The updated point.
"""
- def invert(self) -> 'point_3d':
- """invert
+ def __imul__(self, other: float) -> 'point_3d':
+ """
+ In-place multiplication by a scalar.
+
+ Returns:
+ point_3d: The updated point.
+ """
+
+ def __itruediv__(self, other: float) -> 'point_3d':
+ """
+ In-place division by a scalar.
+
+ Returns:
+ point_3d: The updated point.
+ """
+
+ def __neg__(self) -> 'point_3d':
+ """
+ Negate the point (component-wise).
Returns:
- 'point_3d'
+ point_3d: The negated point.
"""
+ def __eq__(self, other: object) -> bool:
+ """
+ Check if two points are equal.
+
+ Returns:
+ bool: True if equal, False otherwise.
+ """
+
+ def __ne__(self, other: object) -> bool:
+ """
+ Check if two points are not equal.
+
+ Returns:
+ bool: True if not equal, False otherwise.
+ """
+
+ def __getitem__(self, index: int) -> float:
+ """
+ Get coordinate by index (0: x, 1: y, 2: z).
+
+ Returns:
+ float: The coordinate value.
+ Raises:
+ IndexError: If index is out of range.
+ """
+
+ def __setitem__(self, index: int, value: float) -> None:
+ """
+ Set coordinate by index (0: x, 1: y, 2: z).
+
+ Raises:
+ IndexError: If index is out of range.
+ """
+
+ def __repr__(self) -> str:
+ """
+ Return the string representation of the point.
+
+ Returns:
+ str: The string representation.
+ """
+
+ def dot(self, p: 'point_3d') -> float:
+ """Dot product with another point."""
+
+ def cross(self, p: 'point_3d') -> 'point_3d':
+ """Cross product with another point."""
+
+ def magnitude(self) -> float:
+ """Return the magnitude of the point vector."""
+
+ def normalized(self) -> 'point_3d':
+ """Return the normalized (unit) vector."""
+
+ def distance(self, p: 'point_3d') -> float:
+ """Euclidean distance to another point."""
+
+ def invert(self) -> 'point_3d':
+ """Return the inverted point (negated coordinates)."""
diff --git a/src/cadwork/polygon_list.pyi b/src/cadwork/polygon_list.pyi
index 8055c95..bdf1f38 100644
--- a/src/cadwork/polygon_list.pyi
+++ b/src/cadwork/polygon_list.pyi
@@ -1,21 +1,20 @@
-from cadwork import point_3d
+from cadwork import vertex_list
+
class polygon_list:
-
+
def count(self) -> int:
- """count
+ """Returns the number of polygons in the list.
- Returns:
- int
+ Returns: int
"""
- def at(self, index: int) -> point_3d:
- """at
+ def at(self, index: int) -> vertex_list:
+ """Returns the polygon vertices at the given index.
Parameters:
- index: index
+ index: The zero-based polygon index.
Returns:
- point_3d
+ vertex_list: The ordered vertices defining the polygon.
"""
-
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.py b/src/cadwork/rgb_color.py
new file mode 100644
index 0000000..ad1fcb6
--- /dev/null
+++ b/src/cadwork/rgb_color.py
@@ -0,0 +1,5 @@
+class rgb_color:
+ def __init__(self, r, g, b):
+ self.r = r
+ self.g = g
+ self.b = b
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/cadwork/shoulder_beam_geometry.pyi b/src/cadwork/shoulder_beam_geometry.pyi
new file mode 100644
index 0000000..28deb23
--- /dev/null
+++ b/src/cadwork/shoulder_beam_geometry.pyi
@@ -0,0 +1,28 @@
+from enum import IntEnum, unique
+
+
+@unique
+class shoulder_beam_geometry(IntEnum):
+ """shoulder beam geometry
+
+ Examples:
+ >>> cadwork.shoulder_beam_geometry.bisector
+ bisector
+ """
+
+ bisector = 0
+ """Bisector
+ """
+ birdsmouth = 2
+ """PerpBirdmouth
+ """
+ perpendicular_to_strut = 3
+ """PerpShoulder
+ """
+ perpendicular_to_counter_part = 4
+ """PerpChord
+ """
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/shoulder_drilling_orientation.pyi b/src/cadwork/shoulder_drilling_orientation.pyi
new file mode 100644
index 0000000..b2d60d2
--- /dev/null
+++ b/src/cadwork/shoulder_drilling_orientation.pyi
@@ -0,0 +1,23 @@
+from enum import IntEnum, unique
+
+
+@unique
+class shoulder_drilling_orientation(IntEnum):
+ """shoulder drilling orientation
+
+ Examples:
+ >>> cadwork.shoulder_drilling_orientation.perpendicular_to_bisector
+ perpendicular_to_bisector
+ """
+ perpendicular_to_bisector = 1
+ """"""
+ perpendicular_to_counter_part = 2
+ """"""
+ perpendicular_to_strut = 3
+ """"""
+ perpendicular_to_contact_surface = 4
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
+
diff --git a/src/cadwork/shoulder_options.pyi b/src/cadwork/shoulder_options.pyi
new file mode 100644
index 0000000..f79be86
--- /dev/null
+++ b/src/cadwork/shoulder_options.pyi
@@ -0,0 +1,342 @@
+class shoulder_options:
+
+ def get_add_drilling_axis(self) -> bool:
+ """get add drilling axis
+
+ Returns:
+ bool
+ """
+
+ def set_add_drilling_axis(self, value: bool) -> None:
+ """set add drilling axis
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_add_drilling_axis_query_user_flag(self) -> bool:
+ """get add drilling axis query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_add_drilling_axis_query_user_flag(self, flag: bool) -> None:
+ """set add drilling axis query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_diameter(self) -> float:
+ """get drilling diameter
+
+ Returns:
+ float
+ """
+
+ def set_drilling_diameter(self, value: float) -> None:
+ """set drilling diameter
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_drilling_diameter_query_user_flag(self) -> bool:
+ """get drilling diameter query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_diameter_query_user_flag(self, flag: bool) -> None:
+ """set drilling diameter query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_tolerance(self) -> float:
+ """get drilling tolerance
+
+ Returns:
+ float
+ """
+
+ def set_drilling_tolerance(self, value: float) -> None:
+ """set drilling tolerance
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_drilling_tolerance_query_user_flag(self) -> bool:
+ """get drilling tolerance query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_tolerance_query_user_flag(self, flag: bool) -> None:
+ """set drilling tolerance query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_orientation_query_user_flag(self) -> bool:
+ """get drilling orientation query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_drilling_orientation_query_user_flag(self, flag: bool) -> None:
+ """set drilling orientation query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_beam_geometry(self) -> 'shoulder_beam_geometry':
+ """get beam geometry
+
+ Returns:
+ shoulder_beam_geometry
+ """
+
+ def set_beam_geometry(self, value: 'shoulder_beam_geometry') -> None:
+ """set beam geometry
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_beam_geometry_query_user_flag(self) -> bool:
+ """get beam geometry query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_beam_geometry_query_user_flag(self, flag: bool) -> None:
+ """set beam geometry query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_shoulder_depth(self) -> float:
+ """get shoulder depth
+
+ Returns:
+ float
+ """
+
+ def set_shoulder_depth(self, value: float) -> None:
+ """set shoulder depth
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_shoulder_depth_query_user_flag(self) -> bool:
+ """get shoulder depth query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_shoulder_depth_query_user_flag(self, flag: bool) -> None:
+ """set shoulder depth query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_toe_offset(self) -> float:
+ """get toe offset
+
+ Returns:
+ float
+ """
+
+ def set_toe_offset(self, value: float) -> None:
+ """set toe offset
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_toe_offset_query_user_flag(self) -> bool:
+ """get toe offset query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_toe_offset_query_user_flag(self, flag: bool) -> None:
+ """set toe offset query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width(self) -> bool:
+ """get cut counter part through whole width
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width(self, value: bool) -> None:
+ """set cut counter part through whole width
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_cut_counter_part_through_whole_width_query_user_flag(self) -> bool:
+ """get cut counter part through whole width query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_cut_counter_part_through_whole_width_query_user_flag(self, flag: bool) -> None:
+ """set cut counter part through whole width query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_add_end_type(self) -> bool:
+ """get add end type
+
+ Returns:
+ bool
+ """
+
+ def set_add_end_type(self, value: bool) -> None:
+ """set add end type
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_add_end_type_query_user_flag(self) -> bool:
+ """get add end type query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_add_end_type_query_user_flag(self, flag: bool) -> None:
+ """set add end type query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_end_type_name(self) -> str:
+ """get end type name
+
+ Returns:
+ str
+ """
+
+ def set_end_type_name(self, value: str) -> None:
+ """set end type name
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_end_type_name_query_user_flag(self) -> bool:
+ """get end type name query user flag
+
+ Returns:
+ bool
+ """
+
+ def set_end_type_name_query_user_flag(self, flag: bool) -> None:
+ """set end type name query user flag
+
+ Parameters:
+ flag: flag
+
+ Returns:
+ None
+ """
+
+ def get_drilling_orientation(self) -> 'shoulder_drilling_orientation':
+ """get drilling orientation
+
+ Returns:
+ shoulder_drilling_orientation
+ """
+
+ def set_drilling_orientation(self, value: 'shoulder_drilling_orientation') -> None:
+ """set drilling orientation
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
diff --git a/src/cadwork/text_object_options.pyi b/src/cadwork/text_object_options.pyi
index 4aaac5a..61bce78 100644
--- a/src/cadwork/text_object_options.pyi
+++ b/src/cadwork/text_object_options.pyi
@@ -155,3 +155,19 @@ class text_object_options:
bool
"""
+ def set_draw_on_top(self, value: bool) -> None:
+ """set draw on top
+
+ Parameters:
+ value: value
+
+ Returns:
+ None
+ """
+
+ def get_draw_on_top(self) -> bool:
+ """get draw on top
+
+ Returns:
+ bool
+ """
diff --git a/src/cadwork/vba_catalog_item_type.pyi b/src/cadwork/vba_catalog_item_type.pyi
new file mode 100644
index 0000000..7728235
--- /dev/null
+++ b/src/cadwork/vba_catalog_item_type.pyi
@@ -0,0 +1,50 @@
+from enum import IntEnum, unique
+
+
+@unique
+class vba_catalog_item_type(IntEnum):
+ """ Enumeration for vba item types.
+
+ Examples:
+ >>> cadwork.vba_catalog_item_type.nut
+ nut
+ """
+ null = 0
+ """"""
+ nut = 1
+ """"""
+ washer = 2
+ """"""
+ wpecial_ring = 3
+ """"""
+ square_washer = 4
+ """"""
+ wooden_plug = 5
+ """"""
+ bolt_with_head = 10001
+ """"""
+ bolt_without_head = 10002
+ """"""
+ lag_bolt = 10003
+ """"""
+ bolt_peg = 10004
+ """"""
+ normal_screw = 10005
+ """"""
+ wooden_dowl = 10006
+ """"""
+ bolt_anchor = 10007
+ """"""
+ bolt_with_mushroom_head = 10008
+ """"""
+ bolt_with_conical_head = 10009
+ """"""
+ bolt_with_head_and_washer = 10010
+ """"""
+ hanger_bolt = 10011
+ """"""
+ connection_screw = 10012
+ """"""
+
+ def __int__(self) -> int:
+ return self.value
diff --git a/src/cadwork/window_geometry.pyi b/src/cadwork/window_geometry.pyi
index 82f83c2..faec5ea 100644
--- a/src/cadwork/window_geometry.pyi
+++ b/src/cadwork/window_geometry.pyi
@@ -1,23 +1,18 @@
-class point:
- def __init__(self, x, y):
- self.x = x
- self.y = y
+from cadwork import point
-class window_geometry:
- def __init__(self):
- self.bottom_left = self.point(0, 0)
- self.bottom_right = self.point(0, 0)
- self.top_left = self.point(0, 0)
- self.top_right = self.point(0, 0)
-
- @property
- def bottom_left(self) -> point: ...
-
- @property
- def bottom_right(self) -> point: ...
- @property
- def top_left(self) -> point: ...
+class window_geometry:
+ def __init__(self, bottom_left: point, bottom_right: point, top_left: point, top_right: point):
+ """
+ Initialize window geometry with points defining the window corners.
- @property
- def top_right(self) -> point: ...
\ No newline at end of file
+ Args:
+ bottom_left (point): The bottom left corner of the window.
+ bottom_right (point): The bottom right corner of the window.
+ top_left (point): The top left corner of the window.
+ top_right (point): The top right corner of the window.
+ """
+ self.bottom_left = bottom_left
+ self.bottom_right = bottom_right
+ self.top_left = top_left
+ self.top_right = top_right
\ No newline at end of file
diff --git a/src/connector_axis_controller/__init__.pyi b/src/connector_axis_controller/__init__.pyi
index 642481a..5146280 100644
--- a/src/connector_axis_controller/__init__.pyi
+++ b/src/connector_axis_controller/__init__.pyi
@@ -1,340 +1,543 @@
-from typing import List
-from cadwork import point_3d
+from cadwork.point_3d import point_3d
+from cadwork.api_types import *
+from cadwork.vba_catalog_item_type import vba_catalog_item_type
-def get_last_error(error_code: int) -> str:
- """get last error
+def create_standard_connector(axis_name: str, point1: point_3d, point2: point_3d) -> ElementId:
+ """Creates a standard connector axis between two points.
Parameters:
- error_code: error_code
+ axis_name: Name of the standard connector axis.
+ point1: The first point defining the connector axis.
+ point2: The second point defining the connector axis.
Returns:
- str
+ The element id of the created standard connector axis.
+ """
+
+
+def set_bolt_length(axis_id: ElementId, length: float) -> None:
+ """Sets the Bolt Length.
+
+ Parameters:
+ axis_id: The id of the axis.
+ length: The bolt length.
+ """
+
+
+def set_bolt_length_automatic(axis_id: ElementId, length_automatic: bool) -> None:
+ """Sets the Bolt Length Automatic.
+
+ Parameters:
+ axis_id: The id of the axis.
+ length_automatic: True if the bolt length should be automatic, false otherwise.
+ """
+
+
+def set_diameter(axis_id: ElementId, diameter: float) -> None:
+ """Sets the Drilling Diameter for all Sections.
+
+ Parameters:
+ axis_id: The id of the axis.
+ diameter: The drilling diameter to set for all sections.
+ """
+
+
+def set_section_diameter(axis_id: ElementId, section_index: UnsignedInt, diameter: float) -> None:
+ """Sets the Drilling Diameter for a specific Sections.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ diameter: The drilling diameter to set for the specific section.
"""
-def create_standard_connector(axis_name: str, point1: point_3d, point2: point_3d) -> int:
- """Creates a standard connector axis between two points.
+
+def check_axis(axis_id: ElementId) -> bool:
+ """Returns if the axis is valid.
Parameters:
- axis_name: axis_name
- point1: point1
- point2: point2
+ axis_id: The id of the axis.
Returns:
- int
+ True if the axis is valid, false otherwise.
+ """
+
+
+def clear_errors() -> None:
+ """Clear all errors.
+ """
+
+
+def update_axis_cutting_ability(axis_id_list: list[ElementId]) -> None:
+ """Updates the Connection Config (CuttingAbility) of Axis/VBAs.
+
+ Parameters:
+ axis_id_list: The axis id list.
+ """
+
+
+def set_bolt_item(axis_id: ElementId, item_guid: str) -> None:
+ """Sets the Bolt Item.
+
+ Parameters:
+ axis_id: The id of the axis.
+ item_guid: The bolt item guid to set.
"""
-def set_bolt_length(axis_id: int, length: float) -> None:
- """Sets the Bolt Length
+
+def create_blank_connector(diameter: float, start_point: point_3d, end_point: point_3d) -> ElementId:
+ """Creates a blank connector between two points.
Parameters:
- axis_id: axis_id
- length: length
+ diameter: The diameter of the connector.
+ start_point: The start point of the connector.
+ end_point: The end point of the connector.
Returns:
- None
+ The element id of the created blank connector.
"""
-def set_bolt_length_automatic(axis_id: int, length_automatic: bool) -> None:
- """Sets the Bolt Length Automatic
+
+def import_from_file(file_path: str) -> None:
+ """Import from file.
Parameters:
- axis_id: axis_id
- length_automatic: length_automatic
+ file_path: The path to the file to import.
+ """
+
+
+def start_configuration_dialog() -> None:
+ """Starts the ConnectorAxis configuration dialog.
+ """
+
+
+def get_item_guid_by_name(name: str, item_type: vba_catalog_item_type) -> str:
+ """Get item guid by name.
+
+ Parameters:
+ name: The name of the item.
+ item_type: The type of the item.
Returns:
- None
+ The guid of the item.
"""
-def set_diameter(axis_id: int, diameter: float) -> None:
- """Sets the Drilling Diameter for all Sections
+
+def get_bolt_length(axis_id: ElementId) -> float:
+ """Gets the Bolt Length.
Parameters:
- axis_id: axis_id
- diameter: diameter
+ axis_id: The id of the axis.
Returns:
- None
+ The bolt length.
"""
-def set_section_diameter(axis_id: int, section_nr: int, diameter: float) -> None:
- """Sets the Drilling Diameter for a specific Sections
+
+def get_bolt_over_length(axis_id: ElementId) -> float:
+ """Gets the Bolt OverLength.
Parameters:
- axis_id: axis_id
- section_nr: section_nr
- diameter: diameter
+ axis_id: The id of the axis.
Returns:
- None
+ The bolt over length.
+ """
+
+
+def set_bolt_over_length(axis_id: ElementId, over_length: float) -> None:
+ """Sets the Bolt OverLength.
+
+ Parameters:
+ axis_id: The id of the axis.
+ over_length: The bolt over length.
"""
-def check_axis(axis_id: int) -> bool:
- """Returns if the axis is valid.
+
+def get_bolt_length_automatic(axis_id: ElementId) -> bool:
+ """Returns if Bolt Length Automatic is set.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
Returns:
- bool
+ True if the bolt length is automatic, false otherwise.
"""
-def clear_errors() -> None:
- """clear errors
+
+def get_bolt_item_guid(axis_id: ElementId) -> str:
+ """Gets the Guid of the Bolt Item.
+
+ Parameters:
+ axis_id: The id of the axis.
Returns:
- None
+ The guid of the bolt item.
"""
-def update_axis_cutting_ability(axis_i_ds: List[int]) -> None:
- """updates the Connection Config (CuttingAbility) of Axis/VBAs
+
+def get_section_diameter(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Gets the Drilling Diameter of a specific Sections.
Parameters:
- axis_i_ds: axis_i_ds
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- None
+ The drilling diameter of the specified section.
"""
-def set_bolt_item(axis_id: int, item_guid: str) -> None:
- """Sets the Bolt Item
+
+def get_axis_items_guids(axis_id: ElementId) -> list[str]:
+ """Returns a list of GUIDs of all axis items.
Parameters:
- axis_id: axis_id
- item_guid: item_guid
+ axis_id: The id of the axis.
Returns:
- None
+ The list of GUIDs of all axis items.
"""
-def create_blank_connector(a0: float, a1: point_3d, a2: point_3d) -> int:
- """create blank connector
+
+def get_axis_item_name(guid: str) -> str:
+ """Returns the name of an axis item.
Parameters:
- a0: a0
- a1: a1
- a2: a2
+ guid: The guid of the axis item.
Returns:
- int
+ The name of the axis item.
"""
-def import_from_file(a0: str) -> None:
- """import from file
+
+def get_axis_item_material(guid: str) -> str:
+ """Returns the material of an axis item.
Parameters:
- a0: a0
+ guid: The guid of the axis item.
Returns:
- None
+ The material of the axis item.
"""
-def start_configuration_dialog() -> None:
- """Starts the ConnectorAxis configuration dialog.
+
+def get_axis_item_norm(guid: str) -> str:
+ """Returns the norm of an axis item.
+
+ Parameters:
+ guid: The guid of the axis item.
Returns:
- None
+ The norm of the axis item.
"""
-def get_item_guid_by_name(name: str, item_type: int) -> str:
- """get item guid by name
+
+def get_axis_item_strength_category(guid: str) -> str:
+ """Returns the strength category of an axis item.
Parameters:
- name: name
- item_type: item_type
+ guid: The guid of the axis item.
Returns:
- str
+ The strength category of the axis item.
"""
-def get_bolt_length(axis_id: int) -> float:
- """Gets the Bolt Length
+
+def get_axis_item_user_field(guid: str, user_item_number: int) -> str:
+ """Returns an userfield value of an axis item.
Parameters:
- axis_id: axis_id
+ guid: The guid of the axis item.
+ user_item_number: The user item number.
Returns:
- float
+ The user field value.
"""
-def get_bolt_over_length(axis_id: int) -> float:
- """Gets the Bolt OverLength
+
+def get_axis_item_order_number(guid: str) -> str:
+ """Returns the strength category of an axis item.
Parameters:
- axis_id: axis_id
+ guid: The guid of the axis item.
Returns:
- float
+ The strength category of the axis item.
"""
-def set_bolt_over_length(axis_id: int, over_length: float) -> None:
- """Sets the Bolt OverLength
+
+def get_bolt_order_number(axis_id: ElementId) -> str:
+ """Returns the ordernumber of a bolt item.
Parameters:
- axis_id: axis_id
- over_length: over_length
+ axis_id: The id of the axis.
Returns:
- None
+ The order number of the bolt item.
"""
-def get_bolt_length_automatic(axis_id: int) -> bool:
- """Returns if Bolt Length Automatic is set
+
+def get_section_count(axis_id: ElementId) -> int:
+ """Returns the number of sections.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
Returns:
- bool
+ The number of sections of the axis.
"""
-def get_bolt_item_guid(axis_id: int) -> str:
- """Gets the Guid of the Bolt Item
+
+def get_section_material_name(axis_id: ElementId, section_index: UnsignedInt) -> str:
+ """Returns material of a section contact element.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- str
+ The material of the section contact element.
"""
-def get_section_diameter(axis_id: int, section_nr: int) -> float:
- """Gets the Drilling Diameter of a specific Sections
+
+def get_section_contact_element(axis_id: float, section_index: UnsignedInt) -> ElementId:
+ """Gets the section contact element.
Parameters:
- axis_id: axis_id
- section_nr: section_nr
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- float
+ The element id of the section contact element.
"""
-def get_axis_items_guids(axis_id: int) -> List[str]:
- """Returns a list of GUIDs of all axis items.
+
+def get_bolt_diameter(axis_id: ElementId) -> float:
+ """Gets the bolt diameter.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
Returns:
- List[str]
+ The bolt diameter.
"""
-def get_axis_item_name(guid: str) -> str:
- """Returns the name of an axis item.
+def get_standard_connector_list() -> list[str]:
+ """Returns a list of all standard connectors.
+
+ Returns:
+ The list of standard connector names.
+ """
+
+
+def get_counterbore_diameter_for_start_side(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Gets the counterbore diameter for the start side.
Parameters:
- guid: guid
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ diameter: [UNUSED PARAMETER]
+ depth: [UNUSED PARAMETER]
+ is_conical: [UNUSED PARAMETER]
Returns:
- str
+ The counterbore diameter for the start side.
"""
-def get_axis_item_material(guid: str) -> str:
- """Returns the material of an axis item.
+
+def get_counterbore_diameter_for_end_side(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Gets the counterbore diameter for the end side of a section.
Parameters:
- guid: guid
+ axis_id: The id of the axis.
+ section_index: The index of the section.
Returns:
- str
+ The counterbore diameter for the end side.
"""
-def get_axis_item_norm(guid: str) -> str:
- """Returns the norm of an axis item.
+
+def get_counterbore_depth_for_start_side(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Gets the counterbore depth for the start side.
Parameters:
- guid: guid
+ axis_id: The id of the axis.
+ section_index: The index of the section.
Returns:
- str
+ The counterbore depth for the start side.
"""
-def get_axis_item_strength_category(guid: str) -> str:
- """Returns the strength category of an axis item.
+
+def get_counterbore_depth_for_end_side(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Gets the counterbore depth for the end side.
Parameters:
- guid: guid
+ axis_id: The id of the axis.
+ section_index: The index of the section.
Returns:
- str
+ The counterbore depth for the end side.
"""
-def get_axis_item_user_field(guid: str, user_item_nr: int) -> str:
- """Returns an userfield value of an axis item.
+def get_counterbore_is_conical_for_start_side(axis_id: ElementId, section_index: UnsignedInt) -> bool:
+ """Get if counterbore is conical for start side.
Parameters:
- guid: guid
- user_item_nr: user_item_nr
+ axis_id: The id of the axis.
+ section_index: The index of the section
Returns:
- str
+ True if the counterbore is conical for the start side, false otherwise.
"""
-def get_axis_item_order_number(guid: str) -> str:
- """Returns the strength category of an axis item.
+
+def get_counterbore_is_conical_for_end_side(axis_id: ElementId, section_index: UnsignedInt) -> bool:
+ """Get if counterbore is conical for end side.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section.
+
+ Returns:
+ True if the counterbore is conical for the end side, false otherwise.
+ """
+
+
+def set_counterbore_for_start_side(axis_id: ElementId, section_index: UnsignedInt, diameter: float, depth: float,
+ is_conical: bool) -> None:
+ """Sets the counterbore for the start side.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ diameter: The diameter of the counterbore.
+ depth: The depth of the counterbore.
+ is_conical: True if the counterbore is conical, false otherwise.
+ """
+
+
+def set_counterbore_for_end_side(axis_id: ElementId, section_index: UnsignedInt, diameter: float, depth: float,
+ is_conical: bool) -> None:
+ """Sets the counterbore for the end side.
Parameters:
- guid: guid
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ diameter: The diameter of the counterbore.
+ depth: The depth of the counterbore.
+ is_conical: True if the counterbore is conical, false otherwise.
+ """
+
+
+def get_intersection_count(intersection_index: UnsignedInt) -> int:
+ """Get the intersection count.
+
+ Parameters:
+ intersection_index: The index of the intersection. (0-based index)
Returns:
- str
+ The intersection count.
"""
-def get_bolt_order_number(axis_id: int) -> str:
- """Returns the ordernumber of a bolt item.
+def get_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt) -> list[str]:
+ """Get item GUIDs at intersection.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
+ intersection_index: The index of the intersection. (0-based index)
Returns:
- str
+ The list of item GUIDs at the intersection.
"""
-def get_section_count(axis_id: int) -> int:
- """Returns the number of sections.
+
+def set_item_guids_at_intersection(axis_id: ElementId, intersection_index: UnsignedInt, item_guids: list[str]) -> None:
+ """Sets item GUIDs at intersection.
Parameters:
- axis_id: axis_id
+ axis_id: The id of the axis.
+ intersection_index: The index of the intersection. (0-based index)
+ item_guids: The item GUIDs to set.
+ """
+
+def get_section_length(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Get section length.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- int
+ The length of the section.
"""
-def get_section_material_name(axis_id: int, section_nr: int) -> str:
- """Returns material of a section contact element.
+
+def get_section_oblong_drilling_is_enabled(axis_id: ElementId, section_index: UnsignedInt) -> bool:
+ """Get if the section oblong drilling is enabled.
Parameters:
- axis_id: axis_id
- section_nr: section_nr
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- str
+ True if the section oblong drilling is enabled, false otherwise.
"""
-def get_section_contact_element(a0: float, a1: int) -> int:
- """get section contact element
+
+def get_section_oblong_drilling_positive_value(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Get section oblong drilling positive value.
Parameters:
- a0: a0
- a1: a1
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- int
+ The positive value of the section oblong drilling.
"""
-def get_bolt_diameter(a0: int) -> float:
- """get bolt diameter
+
+def get_section_oblong_drilling_negative_value(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Get the section oblong drilling negative value
Parameters:
- a0: a0
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- float
+ The negative value of the section oblong drilling.
"""
-def get_standard_connector_list() -> List[str]:
- """Returns a list of all standard connectors.
+
+def get_section_oblong_drilling_angle(axis_id: ElementId, section_index: UnsignedInt) -> float:
+ """Get section oblong drilling angle.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
Returns:
- List[str]
+ The angle of the section oblong drilling.
"""
+
+def set_section_oblong_drilling_is_disabled(axis_id: ElementId, section_index: UnsignedInt) -> None:
+ """Disable the section oblong drilling.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ """
+
+
+def set_section_oblong_drilling_is_enabled(axis_id: ElementId, section_index: UnsignedInt, positive_value: float,
+ negative_value: float, angle: float) -> None:
+ """Enable the section oblong drilling with parameters.
+
+ Parameters:
+ axis_id: The id of the axis.
+ section_index: The index of the section. (0-based index)
+ positive_value: The positive value of the section oblong drilling.
+ negative_value: The negative value of the section oblong drilling.
+ angle: The angle of the section oblong drilling.
+ """
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 3543327..c276360 100644
--- a/src/dimension_controller/__init__.pyi
+++ b/src/dimension_controller/__init__.pyi
@@ -1,211 +1,234 @@
-from typing import List
-from cadwork import point_3d
+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]) -> int:
- """creates a dimension element
+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
+ onto this plane, and dimension segments are automatically created between consecutive points.
Parameters:
- xl: xl
- plane_normal: plane_normal
- distance: distance
- dimension_points: dimension_points
+ xl: The direction vector defining the dimension line axis (the direction of the measurement arrow). Can be aligned with X, Y, Z axes or any 3D direction.
+ plane_normal: The normal vector defining the orientation of the dimension plane.
+ distance: The offset vector from the dimensioned geometry to where the dimension line is drawn. Can offset in any direction.
+ dimension_points: A list of dimension points to measure. At least 2 points are needed for a valid dimension measurement, but the points can be added later using addSegment(). Points are projected onto the dimension plane.
+
+ Examples:
+ >>> import cadwork
+ >>> import dimension_controller as dc
+
+ >>> # Create a list of dimension points
+ >>> list_points = []
+ >>> list_points.append(cadwork.point_3d(0., 0., 0.))
+ >>> list_points.append(cadwork.point_3d(1000., 0., 0.))
+ >>> list_points.append(cadwork.point_3d(2000., 500., 0.))
+ >>> list_points.append(cadwork.point_3d(3000., 200., 0.))
+ >>> list_points.append(cadwork.point_3d(4000., 360., 0.))
+ >>> list_points.append(cadwork.point_3d(6000., 451., 0.))
+
+ >>> # Create the dimension element
+ >>> id_dimension = dc.create_dimension(
+ >>> cadwork.point_3d(1., 0., 0.), # xl - dimension arrow direction
+ >>> cadwork.point_3d(0., 1., 0.), # plane_normal
+ >>> cadwork.point_3d(0., 0., 500.), # distance - offset from geometry
+ >>> list_points # dimension_points
+ >>> )
Returns:
- elementID of created dimension element
+ The element id of the created dimension element.
"""
-def set_orientation(elements: List[int], view_dir: point_3d, view_dir_up: point_3d) -> None:
- """sets the orientation of a dimension element
+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:
- elements: elements
- view_dir: view_dir
- view_dir_up: view_dir_up
-
- Returns:
- None
+ element_id_list: The element id list.
+ view_dir: The view direction vector.
+ view_dir_up: The view direction up vector.
"""
-def add_segment(element: int, segment: point_3d) -> None:
- """adds a segment to a dimension element
+def add_segment(element_id: ElementId, segment: point_3d) -> None:
+ """Adds a new point to a dimension's point list. A dimension segment is automatically
+ created between this point and the previous point. This method can be called multiple times
+ to progressively add more measurement points to the dimension.
Parameters:
- element: element
- segment: segment
-
- Returns:
- None
+ element_id: The element id.
+ segment: The point to add to the dimension (despite the parameter name, this is a point, not a segment).
"""
-def set_precision(elements: List[int], precision: int) -> None:
- """sets the precision/decimal places of a dimension element
+def set_precision(element_id_list: list[ElementId], precision: UnsignedInt) -> None:
+ """Sets the precision/decimal places of a dimension element.
Parameters:
- elements: elements
- precision: precision
-
- Returns:
- None
+ element_id_list: The element id list.
+ precision: The precision/decimal places to set.
"""
-def set_text_size(elements: List[int], text_size: float) -> None:
- """sets the text size a dimension element
+def set_text_size(element_id_list: list[ElementId], text_size: float) -> None:
+ """Sets the text size of a dimension element.
Parameters:
- elements: elements
- text_size: text_size
-
- Returns:
- None
+ element_id_list: The element id list.
+ text_size: The text size to set.
"""
-def set_line_thickness(elements: List[int], thickness: float) -> None:
- """sets the line thickness a dimension element
+def set_line_thickness(element_id_list: list[ElementId], thickness: float) -> None:
+ """Sets the line thickness of a dimension element.
Parameters:
- elements: elements
- thickness: thickness
-
- Returns:
- None
+ element_id_list: The element id list.
+ thickness: The line thickness to set.
"""
-def set_total_dimension(elements: List[int], total: bool) -> None:
- """sets if the total dimension is shown in a dimension element
+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:
- elements: elements
- total: total
+ element_id_list: The element id list.
+ total: True if the visualisation is set, false otherwise.
+ """
- Returns:
- None
+def set_text_color(element_id_list: list[ElementId], color_id: ColorId) -> None:
+ """Sets the text color of a dimension element.
+
+ Parameters:
+ element_id_list: The element id list.
+ color_id: The color id to set.
"""
-def set_text_color(elements: List[int], color_id: int) -> None:
- """sets the text color a dimension element
+def set_line_color(element_id_list: list[ElementId], color_id: ColorId) -> None:
+ """Sets the line color of a dimension element.
Parameters:
- elements: elements
- color_id: color_id
+ element_id_list: The element id list.
+ color_id: The color id to set.
+ """
- Returns:
- None
+def set_default_anchor_length(element_id_list: list[ElementId], length: float) -> None:
+ """Sets the default anchor length of a dimension element.
+
+ Parameters:
+ element_id_list: The element id list.
+ length: The default anchor length to set.
"""
-def set_line_color(elements: List[int], color_id: int) -> None:
- """sets the line color a dimension element
+def set_distance(element_id_list: list[ElementId], distance: point_3d) -> None:
+ """Sets the distance vector between the points and the line.
Parameters:
- elements: elements
- color_id: color_id
+ element_id_list: The element id list.
+ distance: The distance vector to set.
+ """
- Returns:
- None
+def shift_distance_and_texts(element_id_list: list[ElementId], shifted: bool) -> None:
+ """Sets if distance and texts are shifted.
+
+ Parameters:
+ element_id_list: The element id list.
+ shifted: True if distance and texts are shifted, false otherwise.
"""
-def set_default_anchor_length(elements: List[int], length: float) -> None:
- """sets the default anchor length a dimension element
+def get_dimension_points(element_id: ElementId) -> list[point_3d]:
+ """Gets all dimension points ordered by dimension direction.
Parameters:
- elements: elements
- length: length
+ element_id: The element id.
Returns:
- None
+ A list of dimension points.
"""
-def set_distance(elements: List[int], distance: point_3d) -> None:
- """sets the distance vector between the points and the line
+def get_default_anchor_length(element_id: ElementId) -> float:
+ """Gets the default anchor length.
Parameters:
- elements: elements
- distance: distance
+ element_id: The element id.
Returns:
- None
+ The default anchor length.
"""
-def shift_distance_and_texts(elements: List[int], shifted: bool) -> None:
- """sets if distance and texts are shifted
+def get_distance(element_id: ElementId) -> point_3d:
+ """Get the distance to the dimension reference point. The point is in the plane of the dimensioning.
Parameters:
- elements: elements
- shifted: shifted
+ element_id: The element id.
Returns:
- None
+ The distance vector.
"""
-def get_dimension_points(element: int) -> List[point_3d]:
- """gets all dimension points ordered by dimension direction
+def get_plane_normal(element_id: ElementId) -> point_3d:
+ """Get the plane normal.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- ICwAPI3DVertexList
+ The plane normal vector.
"""
-def get_default_anchor_length(element: int) -> float:
- """gets the default anchor length
+def get_plane_xl(element_id: ElementId) -> point_3d:
+ """Get the plane x direction.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- double
+ The plane x direction vector.
"""
-from cadwork import point_3d
-
-def get_distance(element: int) -> point_3d:
- """Get the distance to the dimension reference point. The point is in the plane of the dimensioning.
+def get_segment_count(element_id: ElementId) -> int:
+ """Get count of segments.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- point_3d
+ The number of segments.
"""
-def get_plane_normal(element: int) -> point_3d:
- """Get the plane normal
+def get_segment_distance(element_id: ElementId, segment_index: int) -> float:
+ """Get the distance from the anchor point to the dimension segment.
Parameters:
- element: element
+ element_id: The element id.
+ segment_index: The segment index.
Returns:
- normal
+ The distance from the anchor point to the dimension segment.
"""
-def get_plane_xl(element: int) -> point_3d:
- """Get the plane x direction
+def get_segment_direction(element_id: ElementId, segment_index: int) -> point_3d:
+ """Get the normalized direction from the anchor point to the point on the dimension.
Parameters:
- element: element
+ element_id: The element id.
+ segment_index: The segment index.
Returns:
- x direction
+ The segment direction vector.
"""
-def get_segment_count(element: int) -> int:
- """Get count of segments
+def get_total_dimension(element_id: ElementId) -> bool:
+ """Query whether the visualisation of the overall dimension is set for a dimension element.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- segment count
+ True if the visualisation is set, false otherwise. For elements that are not of type dimension, the return value is per default false.
"""
-def get_segment_distance(element: int, segment_index: int) -> float:
- """Get the distance from the anchor point to the dimension segment
+
+def get_dimension_base_format(element_id: ElementId) -> dimension_base_format:
+ """Get the dimension base format.
Parameters:
- element: element
- segment_index: segment_index
+ element_id: The element id.
Returns:
- distance
+ The format used for the dimension. Enum value `None` may indicate that something went wrong while retrieving the value due to e.g. the element not being a valid dimension.
"""
-
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 270b1a5..83d0038 100644
--- a/src/element_controller/__init__.pyi
+++ b/src/element_controller/__init__.pyi
@@ -1,1927 +1,2301 @@
-from typing import List
-from cadwork import edge_list
-from cadwork import element_module_properties
-from cadwork import facet_list
-from cadwork import point_3d
-from cadwork import text_object_options
-from cadwork import coordinate_system_data
+from cadwork.edge_list import edge_list
+from cadwork.element_module_properties import element_module_properties
+from cadwork.facet_list import facet_list
+from cadwork.point_3d import point_3d
+from cadwork.standard_element_type import standard_element_type
+from cadwork.text_object_options import text_object_options
+from cadwork.coordinate_system_data import coordinate_system_data
+from cadwork.element_map_query import element_map_query
+from cadwork.element_filter import element_filter
+from cadwork.hit_result import hit_result
+from cadwork.active_point_result import active_point_result
+from cadwork.vertex_list import vertex_list
+from cadwork.shoulder_options import shoulder_options
+from cadwork.heel_shoulder_options import heel_shoulder_options
+from cadwork.double_shoulder_options import double_shoulder_options
+from cadwork.api_types import *
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+def delete_elements(element_id_list: list[ElementId]) -> None:
+ """Deletes the specified elements.
Parameters:
- error_code: error_code
-
- Returns:
- error string
+ element_id_list: The element id list.
"""
-def delete_elements(element_id_list: List[int]) -> None:
- """delete elements
-
+def join_elements(element_id_list: list[ElementId]) -> None:
+ """Joins the specified elements together.
+
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def join_elements(element_id_list: List[int]) -> None:
- """join elements
+def join_top_level_elements(element_id_list: list[ElementId]) -> None:
+ """Joins the specified top-level elements together.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def join_top_level_elements(element_id_list: List[int]) -> None:
- """join top level elements
+def create_rectangular_beam_points(width: float, height: float, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a rectangular beam using points.
Parameters:
- element_id_list: element_id_list
+ width: The width of the beam.
+ height: The height of the beam.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
- Returns:
- None
- """
-
-def create_rectangular_beam_points(width: float, height: float, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create rectangular beam points
-
- Parameters:
- width: width
- height: height
- p1: p1
- p2: p2
- p3: p3
+ Examples:
+ >>> beam_width = 200.
+ >>> beam_height = 400.
+ >>> beam_axis_start_pt = cadwork.point_3d(300., 0., 0.)
+ >>> beam_axis_end_pt = cadwork.point_3d(300., 0., 4000.)
+ >>> length_vector = (beam_axis_end_pt - beam_axis_start_pt).normalized()
+ >>> beam_axis_y = cadwork.point_3d(1., 0., 0.)
+ >>> beam_axis_z = length_vector.cross(beam_axis_y).normalized()
+ >>> beam_height_axis_pt = beam_axis_start_pt + beam_axis_z
+ >>> beam_id = ec.create_rectangular_beam_points(beam_width, beam_height, beam_axis_start_pt, beam_axis_end_pt, beam_height_axis_pt )
Returns:
- int
+ The ID of the created rectangular beam.
"""
-def create_circular_beam_points(diameter: float, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create circular beam points
+def create_circular_beam_points(diameter: float, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a circular beam using points.
Parameters:
- diameter: diameter
- p1: p1
- p2: p2
- p3: p3
+ diameter: The diameter of the beam.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> beam_diameter = 120.
+ >>> beam_axis_start_pt = cadwork.point_3d(0., 0., 0.)
+ >>> beam_axis_end_pt = cadwork.point_3d(0., 0., 3000.)
+ >>> length_vector = (beam_axis_end_pt - beam_axis_start_pt).normalized()
+ >>> beam_axis_y = cadwork.point_3d(1., 0., 0.)
+ >>> beam_axis_z = length_vector.cross(beam_axis_y).normalized()
+ >>> beam_orientation_pt = beam_axis_start_pt + beam_axis_z
+ >>> beam_id = ec.create_circular_beam_points(beam_diameter, beam_axis_start_pt, beam_axis_end_pt, beam_orientation_pt)
Returns:
- int
+ The ID of the created circular beam.
"""
-def create_square_beam_points(width: float, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create square beam points
+def create_square_beam_points(width: float, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a square beam using points.
Parameters:
- width: width
- p1: p1
- p2: p2
- p3: p3
+ width: The width of the beam.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> beam_width = 100.
+ >>> beam_axis_start_pt = cadwork.point_3d(500., 500., 0.)
+ >>> beam_axis_end_pt = cadwork.point_3d(500., 500., 2500.)
+ >>> length_vector = (beam_axis_end_pt - beam_axis_start_pt).normalized()
+ >>> reference_vector = cadwork.point_3d(0., 1., 0.)
+ >>> beam_axis_z = length_vector.cross(reference_vector).normalized()
+ >>> orientation_pt = beam_axis_start_pt + beam_axis_z
+ >>> beam_id = ec.create_square_beam_points(beam_width, beam_axis_start_pt, beam_axis_end_pt, orientation_pt)
Returns:
- int
+ The ID of the created square beam.
"""
-def create_rectangular_beam_vectors(width: float, height: float, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create rectangular beam vectors
+def create_rectangular_beam_vectors(width: float, height: float, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a rectangular beam using vectors.
Parameters:
- width: width
- height: height
- length: length
- p1: p1
- xl: xl
- zl: zl
+ width: The width of the beam.
+ height: The height of the beam.
+ length: The length of the beam.
+ starting_point: The starting point.
+ x_local_direction: The direction of the X-axis.
+ z_local_direction: The direction of the Z-axis.
+
+ Examples:
+ >>> beam_width = 150.
+ >>> beam_height = 300.
+ >>> beam_length = 4000.
+ >>> origin_point = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Direction along length
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Direction along height
+ >>> beam_id = ec.create_rectangular_beam_vectors(beam_width, beam_height, beam_length, origin_point, x_direction, z_direction)
Returns:
- int
+ The ID of the created rectangular beam.
"""
-def create_circular_beam_vectors(diameter: float, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create circular beam vectors
+def create_circular_beam_vectors(diameter: float, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a circular beam using vectors.
Parameters:
- diameter: diameter
- length: length
- p1: p1
- xl: xl
- zl: zl
+ diameter: The diameter of the beam.
+ length: The length of the beam.
+ starting_point: The starting point of the beam.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> beam_diameter = 100.
+ >>> beam_length = 3500.
+ >>> origin_point = cadwork.point_3d(200., 200., 200.)
+ >>> x_direction = cadwork.point_3d(0., 1., 0.) # Beam aligned with Y axis
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Z orientation (arbitrary for circular beam)
+ >>> beam_id = ec.create_circular_beam_vectors(beam_diameter, beam_length, origin_point, x_direction, z_direction)
Returns:
- int
+ The ID of the created circular beam.
"""
-def create_square_beam_vectors(width: float, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create square beam vectors
+def create_square_beam_vectors(width: float, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a square beam using vectors.
Parameters:
- width: width
- length: length
- p1: p1
- xl: xl
- zl: zl
+ width: The width of the beam.
+ length: The length of the beam.
+ starting_point: The starting point of the beam.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> beam_width = 120.
+ >>> beam_length = 2800.
+ >>> origin_point = cadwork.point_3d(0., 0., 500.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Direction along length
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Direction for orientation
+ >>> beam_id = ec.create_square_beam_vectors(beam_width, beam_length, origin_point, x_direction, z_direction)
Returns:
- int
+ The ID of the created square beam.
"""
-def create_rectangular_panel_points(width: float, thickness: float, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create rectangular panel points
+def create_rectangular_panel_points(width: float, thickness: float, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Create a rectangular panel using points.
Parameters:
- width: width
- thickness: thickness
- p1: p1
- p2: p2
- p3: p3
+ width: The width of the panel.
+ thickness: The thickness of the panel.
+ first_point: The first corner point of the panel.
+ second_point: The second corner point of the panel.
+ third_point: The third corner point of the panel.
+
+ Examples:
+ >>> panel_width = 1200.
+ >>> panel_thickness = 27.
+ >>> panel_corner_pt = cadwork.point_3d(0., 0., 0.)
+ >>> panel_length_pt = cadwork.point_3d(0., 2400., 0.)
+ >>> # Calculate a point to define panel orientation
+ >>> normal_vector = cadwork.point_3d(0., 0., 1.) # Panel normal in Z direction
+ >>> orientation_pt = panel_corner_pt + normal_vector
+ >>> panel_id = ec.create_rectangular_panel_points(panel_width, panel_thickness, panel_corner_pt, panel_length_pt, orientation_pt)
Returns:
- int
+ The ID of the created rectangular panel.
"""
-def create_rectangular_panel_vectors(width: float, thickness: float, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create rectangular panel vectors
+def create_rectangular_panel_vectors(width: float, thickness: float, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Create a rectangular panel using vectors.
Parameters:
- width: width
- thickness: thickness
- length: length
- p1: p1
- xl: xl
- zl: zl
+ width: The width of the panel.
+ thickness: The thickness of the panel.
+ length: The length of the panel.
+ starting_point: The starting point of the panel.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> panel_width = 1000.
+ >>> panel_thickness = 20.
+ >>> panel_length = 2000.
+ >>> origin_point = cadwork.point_3d(0., 0., 100.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Direction along length
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Panel normal direction
+ >>> panel_id = ec.create_rectangular_panel_vectors(panel_width, panel_thickness, panel_length, origin_point, x_direction, z_direction)
Returns:
- int
+ The ID of the created rectangular panel.
"""
-def create_drilling_points(diameter: float, p1: point_3d, p2: point_3d) -> int:
- """create drilling points
+def create_drilling_points(diameter: float, first_point: point_3d, second_point: point_3d) -> ElementId:
+ """Creates drilling using points.
Parameters:
- diameter: diameter
- p1: p1
- p2: p2
+ diameter: The diameter of the drilling.
+ first_point: The starting point of the drilling.
+ second_point: The ending point of the drilling.
+
+ Examples:
+ >>> drill_diameter = 30.
+ >>> drill_start_pt = cadwork.point_3d(100., 100., 0.)
+ >>> drill_end_pt = cadwork.point_3d(100., 100., 200.)
+ >>> drilling_id = ec.create_drilling_points(drill_diameter, drill_start_pt, drill_end_pt)
Returns:
- int
+ The ID of the created drilling.
"""
-def create_drilling_vectors(diameter: float, length: float, p1: point_3d, xl: point_3d) -> int:
- """create drilling vectors
+def create_drilling_vectors(diameter: float, length: float, starting_point: point_3d, drilling_direction: point_3d) -> ElementId:
+ """Creates drilling using vectors.
Parameters:
- diameter: diameter
- length: length
- p1: p1
- xl: xl
+ diameter: The diameter of the drilling.
+ length: The length of the drilling.
+ starting_point: The starting point of the drilling.
+ drilling_direction: The direction of the drilling.
+
+ Examples:
+ >>> drill_diameter = 12.
+ >>> drill_length = 180.
+ >>> drill_start_pt = cadwork.point_3d(200., 200., 50.)
+ >>> drill_direction = cadwork.point_3d(0., 0., 1.) # Drilling in Z direction
+ >>> drilling_id = ec.create_drilling_vectors(drill_diameter, drill_length, drill_start_pt, drill_direction)
Returns:
- int
+ The ID of the created drilling.
"""
-def create_line_points(p1: point_3d, p2: point_3d) -> int:
- """create line points
+def create_line_points(first_point: point_3d, second_point: point_3d) -> ElementId:
+ """Creates a line using points.
Parameters:
- p1: p1
- p2: p2
+ first_point: The first point of the line.
+ second_point: The second point of the line.
+
+ Examples:
+ >>> line_start_pt = cadwork.point_3d(0., 0., 0.)
+ >>> line_end_pt = cadwork.point_3d(500., 500., 0.)
+ >>> line_id = ec.create_line_points(line_start_pt, line_end_pt)
Returns:
- int
+ The ID of the created line.
"""
-def create_line_vectors(length: float, p1: point_3d, xl: point_3d) -> int:
- """create line vectors
+def create_line_vectors(length: float, starting_point: point_3d, line_direction: point_3d) -> ElementId:
+ """Creates a line using vectors.
Parameters:
- length: length
- p1: p1
- xl: xl
+ length: The length of the line.
+ starting_point: The starting point of the line.
+ line_direction: The direction of the line.
+
+ Examples:
+ >>> line_length = 1000.
+ >>> line_start_pt = cadwork.point_3d(200., 0., 200.)
+ >>> line_direction = cadwork.point_3d(1., 1., 0.).normalized() # 45 degree line in XY plane
+ >>> line_id = ec.create_line_vectors(line_length, line_start_pt, line_direction)
Returns:
- int
+ The ID of the created line.
"""
-def create_node(p1: point_3d) -> int:
- """create node
+def create_node(node_position: point_3d) -> ElementId:
+ """Creates a node.
Parameters:
- p1: p1
+ node_position: The position of the node.
+
+ Examples:
+ >>> node_position = cadwork.point_3d(250., 250., 100.)
+ >>> node_id = ec.create_node(node_position)
Returns:
- int
+ The ID of the created node.
"""
-def solder_elements(element_id_list: List[int]) -> List[int]:
- """solder elements
+def solder_elements(element_id_list: list[ElementId]) -> list[ElementId]:
+ """Solders elements together.
Parameters:
- element_id_list: element_id_list
+ element_id_list: The element id list.
Returns:
- List[int]
+ The list of soldered element IDs.
"""
-def convert_beam_to_panel(element_id_list: List[int]) -> None:
- """convert beam to panel
+def convert_beam_to_panel(element_id_list: list[ElementId]) -> None:
+ """Converts beams to panels.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def convert_panel_to_beam(element_id_list: List[int]) -> None:
- """convert panel to beam
+def convert_panel_to_beam(element_id_list: list[ElementId]) -> None:
+ """Converts panels to beams.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def delete_all_element_end_types(element_id_list: List[int]) -> None:
- """delete all element end types
+def delete_all_element_end_types(element_id_list: list[ElementId]) -> None:
+ """Deletes all end types of the elements.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def delete_all_element_processes(element_id_list: List[int]) -> None:
- """delete all element processes
+def delete_all_element_processes(element_id_list: list[ElementId]) -> None:
+ """Deletes all processes of the elements.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def move_element(element_id_list: List[int], vector: point_3d) -> None:
- """move element
+def move_element(element_id_list: list[ElementId], move_vector: point_3d) -> None:
+ """Moves the provided element by a specified vector.
Parameters:
- element_id_list: element_id_list
- vector: vector
-
- Returns:
- None
+ element_id_list: The element id list.
+ move_vector: The vector by which to move the elements.
"""
-def create_polygon_beam(polygon_vertices: List[point_3d], thickness: float, xl: point_3d, zl: point_3d) -> int:
- """create polygon beam
+
+def create_polygon_beam(polygon_vertices: vertex_list, thickness: float, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a polygon beam.
Parameters:
- polygon_vertices: polygon_vertices
- thickness: thickness
- xl: xl
- zl: zl
+ polygon_vertices: The vertices of the polygon.
+ thickness: The thickness of the beam.
+ x_local_direction: The x local direction of the beam.
+ z_local_direction: The z local direction of the beam.
+
+ Examples:
+ >>> # Create a triangular beam
+ >>> vertices = cadwork.vertex_list()
+ >>> vertices.append(cadwork.point_3d(0., 0., 0.))
+ >>> vertices.append(cadwork.point_3d(200., 0., 0.))
+ >>> vertices.append(cadwork.point_3d(100., 173.2, 0.)) # Equilateral triangle
+ >>> beam_thickness = 1000. # Length of the beam
+ >>> extrusion_vector = cadwork.point_3d(0., 0., 1.) # Direction of extrusion
+ >>> z_vector = cadwork.point_3d(1., 0., 0.) # Orientation vector
+ >>> polygon_beam_id = ec.create_polygon_beam(vertices, beam_thickness, extrusion_vector, z_vector)
Returns:
- int
+ The ID of the created polygon beam.
"""
-def create_text_object(text: str, position: point_3d, xl: point_3d, zl: point_3d, size: float) -> int:
- """create text object
+def create_text_object(text: str, position: point_3d, x_local_direction: point_3d, z_local_direction: point_3d, size: float) -> ElementId:
+ """Creates a text object.
Parameters:
- text: text
- position: position
- xl: xl
- zl: zl
- size: size
+ text: The text content.
+ position: The position of the text.
+ x_local_direction: The x local direction of the text.
+ z_local_direction: The z local direction of the text.
+ size: The size of the text.
+
+ Examples:
+ >>> text_content = "Cadwork API"
+ >>> text_position = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Text direction
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Text orientation
+ >>> text_height = 200.
+ >>> text_id = ec.create_text_object(text_content, text_position, x_direction, z_direction, text_height)
Returns:
- int
+ The ID of the created text object.
"""
-def copy_elements(element_id_list: List[int], copy_vector: point_3d) -> List[int]:
- """copy elements
+def copy_elements(element_id_list: list[ElementId], copy_vector: point_3d) -> list[int]:
+ """Copy a list of elements.
Parameters:
- element_id_list: element_id_list
- copy_vector: copy_vector
+ element_id_list: The element id list.
+ copy_vector: The vector by which to copy the elements.
Returns:
- List[int]
+ The IDs of the copied elements.
"""
-def rotate_elements(element_id_list: List[int], origin: point_3d, rotation_axis: point_3d, rotation_angle: float) -> None:
- """rotate elements
+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:
- element_id_list: element_id_list
- origin: origin
- rotation_axis: rotation_axis
- rotation_angle: rotation_angle
-
- Returns:
- None
+ element_id_list: The element id list.
+ origin: The origin point of the rotation.
+ rotation_axis: The axis around which to rotate the elements.
+ rotation_angle: The angle by which to rotate the elements un degree.
"""
-def subtract_elements(hard_elements: List[int], soft_elements: List[int]) -> List[int]:
- """subtract elements
+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:
- hard_elements: hard_elements
- soft_elements: soft_elements
+ hard_elements: The list of "hard" elements.
+ soft_elements: The list of "soft" elements.
Returns:
- List[int]
+ The list of resulting elements.
"""
-def check_element_id(element_id: int) -> bool:
- """check element id
+def check_element_id(element_id: ElementId) -> bool:
+ """Check if the provided element ID exists.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element ID exists, false otherwise.
"""
-def start_element_module_calculation(covers: List[int]) -> None:
- """start element module calculation
+def start_element_module_calculation(covers: list[ElementId]) -> None:
+ """Starts the calculation of the element module for a list of covers.
Parameters:
- covers: covers
-
- Returns:
- None
+ covers: The list of cover element IDs.
"""
def set_element_detail_path(path: str) -> None:
- """set element detail path
+ """Sets the detail path for the element.
Parameters:
- path: path
-
- Returns:
- None
+ path: The detail path.
"""
-def get_element_from_cadwork_guid(cadwork_guid: str) -> int:
- """get element from cadwork guid
+def get_element_from_cadwork_guid(cadwork_guid: str) -> ElementId:
+ """Gets element from cadwork guid.
Parameters:
- cadwork_guid: cadwork_guid
+ cadwork_guid: The cadwork guid.
Returns:
- int
+ The element ID.
"""
-def add_elements_to_undo(elements: List[int], cmd: int) -> None:
- """add elements to undo
+def add_elements_to_undo(element_id_list: list[ElementId], cmd: int) -> None:
+ """Add elements to the undo stack.
Parameters:
- elements: elements
- cmd: cmd
-
- Returns:
- None
+ element_id_list: The elements to add.
+ cmd: The command associated with the undo.
"""
def make_undo() -> None:
- """make undo
-
- Returns:
- None
+ """Performs an undo operation, reverting the last change made.
"""
def make_redo() -> None:
- """make redo
-
- Returns:
- None
+ """Performs a redo operation, reapplying the last undone change.
"""
-def split_elements(elements: List[int]) -> None:
- """split elements
+def split_elements(element_id_list: list[ElementId]) -> None:
+ """Splits elements.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to split.
"""
-def set_line_to_marking_line(elements: List[int]) -> None:
- """set line to marking line
+def set_line_to_marking_line(element_id_list: list[ElementId]) -> None:
+ """Sets the line to the marking line.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to modify.
"""
-def set_line_to_normal_line(elements: List[int]) -> None:
- """set line to normal line
+def set_line_to_normal_line(element_id_list: list[ElementId]) -> None:
+ """Sets the line to the normal line.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to modify.
"""
-def create_auto_export_solid_from_standard(elements: List[int], output_name: str, standard_element_name: str) -> int:
- """create auto export solid from standard
+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:
- elements: elements
- output_name: output_name
- standard_element_name: standard_element_name
+ element_id_list: The elements to use.
+ output_name: The output name.
+ standard_element_name: The standard element name.
Returns:
- int
+ The element ID of the created solid.
"""
-def set_element_module_properties_for_elements(elements: List[int], properties: None) -> None:
- """set element module properties for elements
+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:
- elements: elements
- properties: properties
-
- Returns:
- None
+ element_id_list: The elements to modify.
+ properties: The properties to set.
"""
-def create_text_object_with_font(text: str, position: point_3d, xl: point_3d, zl: point_3d, size: float, font_name: str) -> int:
- """create text object with font
+def create_text_object_with_font(text: str, position: point_3d, x_local_direction: point_3d, z_local_direction: point_3d, size: float, font_name: str) -> ElementId:
+ """Creates a text object with a specific font.
Parameters:
- text: text
- position: position
- xl: xl
- zl: zl
- size: size
- font_name: font_name
+ text: The text to be displayed in the text object.
+ position: The position of the text object.
+ x_local_direction: The X-axis direction of the text object.
+ z_local_direction: The Z-axis direction of the text object.
+ size: The size of the text object.
+ font_name: The font name.
+
+ Examples:
+ >>> text_content = "Custom Text"
+ >>> text_position = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Text direction
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Text orientation
+ >>> text_height = 150.
+ >>> font = "Arial"
+ >>> text_id = ec.create_text_object_with_font(text_content, text_position, x_direction, z_direction, text_height, font)
Returns:
- int
+ The element ID of the created text object.
"""
-def apply_transformation_coordinate(elements: List[int], old_point: point_3d, old_xl: point_3d, old_yl: point_3d, new_point: point_3d, new_xl: point_3d, new_yl: point_3d) -> None:
- """apply transformation coordinate
+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:
- elements: elements
- old_point: old_point
- old_xl: old_xl
- old_yl: old_yl
- new_point: new_point
- new_xl: new_xl
- new_yl: new_yl
-
- Returns:
- None
+ element_id_list: The elements to modify.
+ old_point: The old point.
+ old_x_local_direction: The old X local direction.
+ old_y_local_direction: The old Y local direction.
+ new_point: The new point.
+ new_x_local_direction: The new X local direction.
+ new_y_local_direction: The new Y local direction.
"""
-def delete_elements_with_undo(elements: List[int]) -> None:
- """delete elements with undo
+def delete_elements_with_undo(element_id_list: list[ElementId]) -> None:
+ """Deletes the provided elements with undo functionality.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to delete.
"""
-def add_created_elements_to_undo(elements: List[int]) -> None:
- """add created elements to undo
+def add_created_elements_to_undo(element_id_list: list[ElementId]) -> None:
+ """Adds created elements to the undo stack.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to add.
"""
-def add_modified_elements_to_undo(elements: List[int]) -> None:
- """add modified elements to undo
+def add_modified_elements_to_undo(element_id_list: list[ElementId]) -> None:
+ """Adds modified elements to the undo stack.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to add.
"""
-def recreate_elements(elements: List[int]) -> None:
- """recreate elements
+def recreate_elements(element_id_list: list[ElementId]) -> None:
+ """Recreate elements based on the provided list.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to recreate.
"""
-def create_multi_wall(elements: List[int]) -> None:
- """create multi wall
+def create_multi_wall(element_id_list: list[ElementId]) -> None:
+ """Creates a multi-wall structure.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The elements to use in the multi-wall structure.
"""
-def get_user_element_ids() -> List[int]:
- """get user element ids
+def get_user_element_ids() -> list[ElementId]:
+ """Gets a list of user element IDs.
Returns:
- List[int]
+ The user element IDs.
"""
-def get_user_element_ids_with_existing(elements: List[int]) -> List[int]:
- """get user element ids with existing
+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:
- elements: elements
+ element_id_list: The elements to check for existence.
Returns:
- List[int]
+ The list of existing user element IDs.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
-def glide_elements(element_i_ds: List[int], glide_point: point_3d) -> None:
- """Glides elements
+def glide_elements(element_id_list: list[ElementId], glide_origin_point: point_3d) -> None:
+ """Glides elements to a specified point.
Parameters:
- element_i_ds: element_i_ds
- glide_point: glide_point
-
- Returns:
- None
+ element_id_list: The elements to glide.
+ glide_origin_point: The glide origin point.
"""
-def cut_elements_with_miter(first_id: int, second_id: int) -> bool:
- """cut elements with miter
+def cut_elements_with_miter(first_id: ElementId, second_id: ElementId) -> bool:
+ """Cut two elements with a miter joint.
Parameters:
- first_id: first_id
- second_id: second_id
+ first_id: The ID of the first element.
+ second_id: The ID of the second element.
Returns:
- bool
+ True if the cut operation was successful, false otherwise.
"""
-def cut_element_with_plane(element_id: int, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> bool:
- """cut element with plane
+def cut_element_with_plane(element_id: ElementId, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> bool:
+ """Cut an element with a plane.
Parameters:
- element_id: element_id
- cut_plane_normal_vector: cut_plane_normal_vector
- distance_from_global_origin: distance_from_global_origin
+ element_id: The element id.
+ cut_plane_normal_vector: The normal vector of the cut plane.
+ distance_from_global_origin: The distance from the global origin to the cut plane.
+
+ Examples:
+ >>> import math
+ >>> beam_height = 240.
+ >>> beam_id = ec.create_rectangular_beam_vectors(120., beam_height, 3000., cadwork.point_3d(0., 0., 0.),
+ ... cadwork.point_3d(0., 0., 1.), cadwork.point_3d(0., 1., 0.))
+ >>> # Define plane normal vector (30° from vertical in Y-Z plane)
+ >>> angle_rad = math.radians(30)
+ >>> plane_normal = cadwork.point_3d(0., -math.sin(angle_rad), math.cos(angle_rad)).normalized()
+ >>> # Calculate distance from origin to plane
+ >>> plane_point = cadwork.point_3d(0., beam_height * .5, 1500.) # Point for the cut plane
+ >>> distance = plane_point.dot(plane_normal) # Distance from origin to plane
+ >>> # To measure (check result) the distance correctly in cadwork, create a parallel plane to the cut plane
+ >>> # with the result of distance as the offset. This plane should hit through the origin (0, 0, 0).
+ >>> print(f"Plane normal: {plane_normal}, Distance: {distance}")
+ >>> result = ec.cut_element_with_plane(beam_id, plane_normal, distance)
+ >>> print(f"Cut operation successful: {result}")
Returns:
- bool
+ True if the cut operation was successful, false otherwise.
"""
-def create_circular_mep(diameter: float, points: List[point_3d]) -> int:
- """create circular mep
+def create_circular_mep(diameter: float, points: list[point_3d]) -> ElementId:
+ """Create a circular MEP (Mechanical, Electrical, and Plumbing) element.
Parameters:
- diameter: diameter
- points: points
+ diameter: The diameter of the circular MEP.
+ points: The points defining the circular MEP.
Returns:
- int
+ The ID of the created circular MEP element.
"""
-def create_rectangular_mep(width: float, depth: float, points: List[point_3d]) -> int:
- """create rectangular mep
+def create_rectangular_mep(width: float, depth: float, points: list[point_3d]) -> ElementId:
+ """Create a rectangular MEP (Mechanical, Electrical, and Plumbing) element.
Parameters:
- width: width
- depth: depth
- points: points
+ width: The width of the rectangular MEP.
+ depth: The depth of the rectangular MEP.
+ points: The points defining the rectangular MEP.
Returns:
- int
+ The ID of the created rectangular MEP element.
"""
-def slice_element_with_plane(element_id: int, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> bool:
- """slice element with plane
+def slice_element_with_plane(element_id: ElementId, cut_plane_normal_vector: point_3d, distance_from_global_origin: float) -> bool:
+ """Slice an element with a plane.
Parameters:
- element_id: element_id
- cut_plane_normal_vector: cut_plane_normal_vector
- distance_from_global_origin: distance_from_global_origin
+ element_id: The element id.
+ cut_plane_normal_vector: The normal vector of the cut plane.
+ distance_from_global_origin: The distance from the global origin to the slicing plane.
+
+ Examples:
+ >>> import math
+ >>> # Create a panel to slice
+ >>> panel_width = 1200.
+ >>> panel_thickness = 20.
+ >>> panel_length = 2400.
+ >>> panel_id = ec.create_rectangular_panel_vectors(panel_width, panel_thickness, panel_length,
+ ... cadwork.point_3d(0., 0., 0.),
+ ... cadwork.point_3d(1., 0., 0.),
+ ... cadwork.point_3d(0., 0., 1.))
+ >>> # Define plane normal vector (45° in XY plane)
+ >>> angle_rad = math.radians(45)
+ >>> plane_normal = cadwork.point_3d(math.cos(angle_rad), math.sin(angle_rad), 0.).normalized()
+ >>> # Calculate distance from origin to plane - slice through center of panel
+ >>> panel_center = cadwork.point_3d(panel_length/2., panel_width/2., 0.)
+ >>> ec.create_node(panel_center) # Create a node at the center of the panel
+ >>> distance = panel_center.dot(plane_normal) # Distance from origin to plane
+ >>> # Verify plane equation: dot(point_on_plane, normal) = distance
+ >>> # Any point on the plane should satisfy this equation
+ >>> print(f"Plane normal: {plane_normal}, Distance: {distance}")
+ >>> # Slice the panel
+ >>> result = ec.slice_element_with_plane(panel_id, plane_normal, distance)
+ >>> print(f"Slice operation successful: {result}")
+ >>> # Note: slice_element_with_plane keeps both parts as a joined element
Returns:
- bool
+ True if the slicing operation was successful, false otherwise.
"""
-def create_auto_container_from_standard(elements: List[int], output_name: str, standard_element_name: str) -> int:
- """create auto container from standard
+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:
- elements: elements
- output_name: output_name
- standard_element_name: standard_element_name
+ element_id_list: The list of elements to be used in the auto container.
+ output_name: The name of the output.
+ standard_element_name: The name of the standard element.
Returns:
- int
+ The id of the created auto container element.
"""
-def create_auto_export_solid_from_standard_with_reference(elements: List[int], output_name: str, standard_element_name: str, reference_id: int) -> int:
- """create auto export solid from standard with reference
+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:
- elements: elements
- output_name: output_name
- standard_element_name: standard_element_name
- reference_id: reference_id
+ element_id_list: The list of elements to be used in the export solid.
+ output_name: The name of the output.
+ standard_element_name: The name of the standard element.
+ reference_id: The ID of the reference element.
Returns:
- int
+ The id of the created auto export solid element.
"""
-def create_auto_container_from_standard_with_reference(elements: List[int], output_name: str, standard_element_name: str, reference_id: int) -> int:
- """create auto container from standard with reference
+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:
- elements: elements
- output_name: output_name
- standard_element_name: standard_element_name
- reference_id: reference_id
+ element_id_list: The list of elements to be used in the auto container.
+ output_name: The name of the output.
+ standard_element_name: The name of the standard element.
+ reference_id: The ID of the reference element.
Returns:
- int
+ The ID of the created auto container element.
"""
-def slice_elements_with_plane_and_get_new_elements(a0: int, a1: point_3d, a2: float) -> List[int]:
- """slice elements with plane and get new elements
+
+def create_surface(surface_vertices: vertex_list) -> ElementId:
+ """Creates a surface from a list of vertices.
Parameters:
- a0: a0
- a1: a1
- a2: a2
+ surface_vertices: The list of vertices defining the surface.
+
+ Examples:
+ >>> # Create a rectangular surface
+ >>> vertices = cadwork.vertex_list()
+ >>> vertices.append(cadwork.point_3d(0., 0., 0.))
+ >>> vertices.append(cadwork.point_3d(1000., 0., 0.))
+ >>> vertices.append(cadwork.point_3d(1000., 800., 0.))
+ >>> vertices.append(cadwork.point_3d(0., 800., 0.))
+ >>> surface_id = ec.create_surface(vertices)
Returns:
- List[int]
+ The ID of the created surface element.
"""
-def create_surface(surface_vertices: List[point_3d]) -> int:
- """create surface
+def stretch_start_facet(element_id_list: list[ElementId], stretch_vector: point_3d) -> None:
+ """Stretch the start facet of the given elements.
Parameters:
- surface_vertices: surface_vertices
-
- Returns:
- int
+ element_id_list: The list of elements to be stretched.
+ stretch_vector: A vector that defines the stretch direction and distance.
"""
-def convert_circular_beam_to_drilling(elements: List[int]) -> None:
- """converts circular/round beams into drillings
+def stretch_end_facet(element_id_list: list[ElementId], stretch_vector: point_3d) -> None:
+ """Stretch the end facet of the given elements.
Parameters:
- elements: elements
-
- Returns:
- None
+ element_id_list: The list of elements to be stretched.
+ stretch_vector: A vector that defines the stretch direction and distance.
"""
-def stretch_start_facet(a0: List[int], a1: point_3d) -> None:
- """stretch start facet
+def set_export_solid_contents(export_solid_id: ElementId, element_id_list: list[ElementId]) -> None:
+ """Sets the contents of an export solid.
Parameters:
- a0: a0
- a1: a1
+ export_solid_id: The ID of the export solid to set the contents for.
+ element_id_list: The list of element IDs to set as the contents of the export solid.
+ """
- Returns:
- None
+def set_container_contents(container_id: ElementId, element_id_list: list[ElementId]) -> None:
+ """Sets the contents of a container.
+
+ Parameters:
+ container_id: The ID of the container to set the contents for.
+ element_id_list: The list of element IDs to set as the contents of the container.
"""
-def stretch_end_facet(a0: List[int], a1: point_3d) -> None:
- """stretch end facet
+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:
- a0: a0
- a1: a1
+ element_id_list: The list of element IDs to set the opening angle for.
+ angle: The opening angle to set.
+ """
- Returns:
- 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:
+ element_id_list: The list of element IDs to mirror and move.
+ plane: The plane to mirror across.
+ plane_distance: The distance from the plane.
"""
-def set_export_solid_contents(a0: int, a1: List[int]) -> None:
- """set export solid contents
+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:
- a0: a0
- a1: a1
+ element_id_list: The ID of the element to copy.
+ plane: The plane to mirror across.
+ plane_distance: The distance from the plane.
Returns:
- None
+ The list of IDs of the copied elements.
"""
-def set_container_contents(a0: int, a1: List[int]) -> None:
- """set container contents
+def reset_element_cadwork_guid(element_id: ElementId) -> None:
+ """Sets the Cadwork Guid of an element to NULL.
Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
+ element_id: The element id.
"""
-def set_parent_opening_variants_opening_angle(a0: List[int], a1: float) -> None:
- """set parent opening variants opening angle
+def create_standard_beam_points(standard_element_name: str, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a standard beam using points.
Parameters:
- a0: a0
- a1: a1
+ standard_element_name: The name of the standard element.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> std_beam_name = "Standard-Timber-120x240" # Name as found in standard elements library
+ >>> beam_start_pt = cadwork.point_3d(0., 0., 0.)
+ >>> beam_end_pt = cadwork.point_3d(0., 0., 3000.)
+ >>> # Calculate orientation point
+ >>> length_vector = (beam_end_pt - beam_start_pt).normalized()
+ >>> ref_vector = cadwork.point_3d(1., 0., 0.)
+ >>> orientation_vector = length_vector.cross(ref_vector).normalized()
+ >>> orientation_pt = beam_start_pt + orientation_vector
+ >>> std_beam_id = ec.create_standard_beam_points(std_beam_name, beam_start_pt, beam_end_pt, orientation_pt)
Returns:
- None
+ The ID of the created standard beam.
"""
-def mirror_move_elements(elements: List[int], plane: point_3d, plane_distance: float) -> None:
- """mirror move elements
+def create_standard_beam_vectors(standard_element_name: str, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a standard beam using vectors.
Parameters:
- elements: elements
- plane: plane
- plane_distance: plane_distance
+ standard_element_name: The name of the standard element.
+ length: The length of the beam.
+ starting_point: The starting point of the beam.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> std_beam_name = "Standard-Timber-100x100" # Name as found in standard elements library
+ >>> beam_length = 2500.
+ >>> origin_point = cadwork.point_3d(100., 100., 100.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Direction along length
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Orientation vector
+ >>> std_beam_id = ec.create_standard_beam_vectors(std_beam_name, beam_length, origin_point, x_direction, z_direction)
Returns:
- None
+ The ID of the created standard beam.
"""
-def mirror_copy_elements(elements: List[int], plane: point_3d, plane_distance: float) -> List[int]:
- """mirror copy elements
+def create_standard_panel_points(standard_element_name: str, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a standard panel using points.
Parameters:
- elements: elements
- plane: plane
- plane_distance: plane_distance
+ standard_element_name: The name of the standard element.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> std_panel_name = "Standard-Panel-27mm" # Name as found in standard elements library
+ >>> panel_corner_pt = cadwork.point_3d(0., 0., 0.)
+ >>> panel_width_pt = cadwork.point_3d(1200., 0., 0.)
+ >>> # Calculate normal point for panel orientation (assuming Z is up)
+ >>> panel_normal = cadwork.point_3d(0., 0., 1.)
+ >>> orientation_pt = panel_corner_pt + panel_normal
+ >>> std_panel_id = ec.create_standard_panel_points(std_panel_name, panel_corner_pt, panel_width_pt, orientation_pt)
Returns:
- List[int]
+ The id of the created standard panel.
"""
-def reset_element_cadwork_guid(element_id: int) -> None:
- """sets the Cadwork Guid of an element to NULL
+def create_standard_panel_vectors(standard_element_name: str, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a standard panel using vectors.
Parameters:
- element_id: element_id
+ standard_element_name: The name of the standard element.
+ length: The length of the panel.
+ starting_point: The starting point of the panel.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> std_panel_name = "Standard-Panel-20mm" # Name as found in standard elements library
+ >>> panel_length = 2400.
+ >>> origin_point = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Direction along length
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Panel normal direction
+ >>> std_panel_id = ec.create_standard_panel_vectors(std_panel_name, panel_length, origin_point, x_direction, z_direction)
Returns:
- None
+ The id of the created standard panel.
"""
-def create_standard_beam_points(standard_element_name: str, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create standard beam points
+def create_standard_steel_points(standard_element_name: str, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a standard steel element using points.
Parameters:
- standard_element_name: standard_element_name
- p1: p1
- p2: p2
- p3: p3
+ standard_element_name: The name of the standard element.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> std_steel_name = "IPE 200" # Name of standard steel profile from library
+ >>> steel_start_pt = cadwork.point_3d(0., 0., 500.)
+ >>> steel_end_pt = cadwork.point_3d(3000., 0., 500.)
+ >>> # Calculate orientation point
+ >>> length_vector = (steel_end_pt - steel_start_pt).normalized()
+ >>> up_vector = cadwork.point_3d(0., 0., 1.)
+ >>> side_vector = length_vector.cross(up_vector).normalized()
+ >>> orientation_pt = steel_start_pt + up_vector
+ >>> steel_id = ec.create_standard_steel_points(std_steel_name, steel_start_pt, steel_end_pt, orientation_pt)
Returns:
- int
+ The id of the created standard steel element.
"""
-def create_standard_beam_vectors(standard_element_name: str, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create standard beam vectors
+def create_standard_steel_vectors(standard_element_name: str, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a standard steel element using vectors.
Parameters:
- standard_element_name: standard_element_name
- length: length
- p1: p1
- xl: xl
- zl: zl
+ standard_element_name: The name of the standard element.
+ length: The length of the element.
+ starting_point: The starting point of the element.
+ x_local_direction: The local X direction vector.
+ z_local_direction: The local Z direction vector.
+
+ Examples:
+ >>> std_steel_name = "HEA 220" # Name of standard steel profile from library
+ >>> steel_length = 4500.
+ >>> origin_point = cadwork.point_3d(200., 0., 200.)
+ >>> x_direction = cadwork.point_3d(0., 1., 0.) # Direction along Y axis
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Up direction
+ >>> steel_id = ec.create_standard_steel_vectors(std_steel_name, steel_length, origin_point, x_direction, z_direction)
Returns:
- int
+ The id of the created standard steel element.
"""
-def create_standard_panel_points(standard_element_name: str, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create standard panel points
+def move_element_with_undo(element_id_list: list[ElementId], vector: point_3d) -> None:
+ """Moves an element with undo functionality.
Parameters:
- standard_element_name: standard_element_name
- p1: p1
- p2: p2
- p3: p3
-
- Returns:
- int
+ element_id_list: The element id list.
+ vector: The vector to move the element.
"""
-def create_standard_panel_vectors(standard_element_name: str, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create standard panel vectors
+def create_normal_axis_points(first_point: point_3d, second_point: point_3d) -> ElementId:
+ """Creates a normal axis using points.
Parameters:
- standard_element_name: standard_element_name
- length: length
- p1: p1
- xl: xl
- zl: zl
+ first_point: The first point of the axis.
+ second_point: The second point of the axis.
+
+ Examples:
+ >>> axis_start_pt = cadwork.point_3d(0., 0., 0.)
+ >>> axis_end_pt = cadwork.point_3d(0., 0., 2000.)
+ >>> axis_id = ec.create_normal_axis_points(axis_start_pt, axis_end_pt)
Returns:
- int
+ The id of the created normal axis.
"""
-def create_standard_steel_points(standard_element_name: str, p1: point_3d, p2: point_3d, p3: point_3d) -> int:
- """create standard steel points
+def create_normal_axis_vectors(length: float, starting_point: point_3d, axis_direction: point_3d) -> ElementId:
+ """Creates a normal axis using vectors.
Parameters:
- standard_element_name: standard_element_name
- p1: p1
- p2: p2
- p3: p3
+ length: The length of the axis.
+ starting_point: The starting point of the axis.
+ axis_direction: The direction vector of the axis.
+
+ Examples:
+ >>> axis_length = 1500.
+ >>> axis_start_pt = cadwork.point_3d(200., 200., 0.)
+ >>> axis_direction = cadwork.point_3d(1., 0., 0.) # Direction along X axis
+ >>> axis_id = ec.create_normal_axis_vectors(axis_length, axis_start_pt, axis_direction)
Returns:
- int
+ The id of the created normal axis.
"""
-def create_standard_steel_vectors(standard_element_name: str, length: float, p1: point_3d, xl: point_3d, zl: point_3d) -> int:
- """create standard steel vectors
+def convert_bolt_to_standardconnector(element_id_list: list[ElementId], standard_element_name: str) -> None:
+ """Converts bolts to standard connectors.
Parameters:
- standard_element_name: standard_element_name
- length: length
- p1: p1
- xl: xl
- zl: zl
-
- Returns:
- int
+ element_id_list: The list of bolts to convert.
+ standard_element_name: The name of the standard element.
"""
-def move_element_with_undo(element_id_list: List[int], vector: point_3d) -> None:
- """move element with undo
+def extrude_surface_to_auxiliary_vector(surface: ElementId, vector: point_3d) -> ElementId:
+ """Extrudes a surface to create an auxiliary element.
Parameters:
- element_id_list: element_id_list
- vector: vector
+ surface: The surface to extrude.
+ vector: The vector to extrude along.
Returns:
- None
+ The id of the created auxiliary element.
"""
-def create_normal_axis_points(p1: point_3d, p2: point_3d) -> int:
- """create normal axis points
+def extrude_surface_to_panel_vector(surface: ElementId, vector: point_3d) -> ElementId:
+ """Extrudes a surface to create a panel element.
Parameters:
- p1: p1
- p2: p2
+ surface: The surface to extrude.
+ vector: The vector to extrude along.
Returns:
- int
+ The id of the created panel element.
"""
-def create_normal_axis_vectors(length: float, p1: point_3d, xl: point_3d) -> int:
- """create normal axis vectors
+def extrude_surface_to_beam_vector(surface: ElementId, vector: point_3d) -> ElementId:
+ """Extrudes a surface to create a beam element.
Parameters:
- length: length
- p1: p1
- xl: xl
+ surface: The surface to extrude.
+ vector: The vector to extrude along.
Returns:
- int
+ The id of the created beam element.
"""
-def convert_bolt_to_standardconnector(elements: List[int], standard_element_name: str) -> None:
- """convert bolt to standardconnector
+def convert_container_to_container_block(element_id_list: list[ElementId]) -> None:
+ """Converts a container to a container block.
Parameters:
- elements: elements
- standard_element_name: standard_element_name
-
- Returns:
- None
+ element_id_list: The list of elements to convert.
"""
-def extrude_surface_to_auxiliary_vector(surface: int, vector: point_3d) -> int:
- """extrude surface to auxiliary vector
+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:
- surface: surface
- vector: vector
+ reference_element: The ID of the reference element.
+ element_id_list: The list of elements for which to create the bounding box.
Returns:
- int
+ The ID of the created bounding box element.
"""
-def extrude_surface_to_panel_vector(surface: int, vector: point_3d) -> int:
- """extrude surface to panel vector
+def create_bounding_box_global(element_id_list: list[ElementId]) -> ElementId:
+ """Creates a global bounding box for a list of elements.
Parameters:
- surface: surface
- vector: vector
+ element_id_list: The list of elements for which to create the bounding box.
Returns:
- int
+ The ID of the created bounding box element.
"""
-def extrude_surface_to_beam_vector(surface: int, vector: point_3d) -> int:
- """extrude surface to beam vector
+def convert_auxiliary_to_panel(element_id_list: list[ElementId]) -> None:
+ """Converts auxiliary elements to panel.
Parameters:
- surface: surface
- vector: vector
-
- Returns:
- int
+ element_id_list: The list of elements to convert.
"""
-def convert_container_to_container_block(elements: List[int]) -> None:
- """convert container to container block
+def convert_auxiliary_to_beam(element_id_list: list[ElementId]) -> None:
+ """Converts auxiliary elements to beams.
Parameters:
- elements: elements
+ element_id_list: The list of elements to convert.
+ """
- Returns:
- 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 create_bounding_box_local(a0: int, a1: List[int]) -> int:
- """create bounding box local
+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:
- a0: a0
- a1: a1
+ cover: The cover element ID.
+ add_partner: The list of partner element IDs to add.
+ remove_partner: The list of partner element IDs to remove.
+ """
- Returns:
- int
+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 create_bounding_box_global(a1: List[int]) -> int:
- """create bounding box global
+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:
- a1: a1
+ cover: The cover element ID.
+ add_childs: The list of child element IDs to add.
+ remove_childs: The list of child element IDs to remove.
+ """
+
+def activate_rv_without_situation() -> list[ElementId]:
+ """Activates the rough volume situation for elements without a situation.
Returns:
- int
+ The list of IDs of the elements for which the rough volume situation was activated.
"""
-def convert_auxiliary_to_panel(a0: List[int]) -> None:
- """convert auxiliary to panel
-
- Parameters:
- a0: a0
+def activate_parts_without_situation() -> list[ElementId]:
+ """Activates the parts situation for elements without a situation.
Returns:
- None
+ The list of IDs of the elements for which the parts situation was activated.
"""
-def convert_auxiliary_to_beam(a0: List[int]) -> None:
- """convert auxiliary to beam
+def add_elements_to_detail(element_id_list: list[ElementId], detail: int) -> None:
+ """Adds elements to a detail.
Parameters:
- a0: a0
-
- Returns:
- None
+ element_id_list: The list of elements to be added to the detail.
+ detail: The ID of the detail.
"""
-def auto_set_rough_volume_situation(a0: List[int]) -> None:
- """auto set rough volume situation
+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:
- a0: a0
+ hard_element_id_list: The list of "hard" elements.
+ soft_element_id_list: The list of "soft" elements.
+ with_undo: Indicate whether the operation should be added to the undo stack.
Returns:
- None
+ The list of elements resulting from the subtraction.
"""
-def rough_volume_situation_manual(a0: int, a1: List[int], a2: List[int]) -> None:
- """rough volume situation manual
+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:
- a0: a0
- a1: a1
- a2: a2
+ element_id_list: The list of elements to be optimized.
+ optimization_number: The optimization number, nested parent element id.
+ total_length: The total length for the optimization.
+ start_cut: The start cut for the optimization.
+ end_cut: The end cut for the optimization.
+ saw_kerf: The saw kerf for the optimization.
+ is_production_list: A flag indicating if this is a production list.
Returns:
- None
+ The ID of the created linear optimization element.
"""
-def auto_set_parts_situation(a0: List[int]) -> None:
- """auto set parts situation
+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:
- a0: a0
-
- Returns:
- None
+ covers: The list of covers for which to start the element module calculation.
"""
-def parts_situation_manual(a0: int, a1: List[int], a2: List[int]) -> None:
- """parts situation manual
+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:
- a0: a0
- a1: a1
- a2: a2
+ element_id_list: The list of elements to process.
+ mininum_diameter: The minimum diameter of the drilling.
+ maximum_diameter: The maximum diameter of the drilling.
Returns:
- None
+ The list of IDs of the elements where the replacement was successful.
"""
-def activate_rv_without_situation() -> List[int]:
- """activate rv without situation
+def cut_element_with_processing_group(soft_element: ElementId, processing: ElementId) -> None:
+ """Cuts an element with a processing group.
- Returns:
- List[int]
+ Parameters:
+ soft_element: The ID of the element to be cut.
+ processing: The ID of the processing group.
"""
-def activate_parts_without_situation() -> List[int]:
- """activate parts without situation
+def add_element_to_detail(element_id_list: list[ElementId], detail: int) -> None:
+ """Adds elements to a detail.
- Returns:
- List[int]
+ Parameters:
+ element_id_list: The list of elements to be added to the detail.
+ detail: The ID of the detail.
"""
-def add_elements_to_detail(a0: List[int], a1: int) -> None:
- """add elements to detail
+def convert_elements_to_auxiliary_elements(element_id_list: list[ElementId]) -> None:
+ """Converts elements to auxiliary elements.
Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
+ element_id_list: The list of elements to be converted.
"""
-def subtract_elements_with_undo(hard_elements: List[int], soft_elements: List[int], with_undo: bool) -> List[int]:
- """subtract elements with undo
+def create_circular_axis_points(diameter: float, first_point: point_3d, second_point: point_3d) -> ElementId:
+ """Creates a circular axis using points.
Parameters:
- hard_elements: hard_elements
- soft_elements: soft_elements
- with_undo: with_undo
+ diameter: The diameter of the circular axis.
+ first_point: The first point defining the axis.
+ second_point: The second point defining the axis.
+
+ Examples:
+ >>> axis_diameter = 50.
+ >>> axis_start_pt = cadwork.point_3d(100., 100., 0.)
+ >>> axis_end_pt = cadwork.point_3d(100., 100., 300.)
+ >>> circular_axis_id = ec.create_circular_axis_points(axis_diameter, axis_start_pt, axis_end_pt)
Returns:
- List[int]
+ The ID of the created circular axis element.
"""
-def create_linear_optimization(elements: List[int], optimization_number: int, total_length: float, start_cut: float, end_cut: float, saw_kerf: float, is_production_list: bool) -> int:
- """create linear optimization
+def create_circular_axis_vector(diameter: float, length: float, starting_point: point_3d, axis_direction: point_3d) -> ElementId:
+ """Creates a circular axis using a vector.
Parameters:
- elements: elements
- optimization_number: optimization_number
- total_length: total_length
- start_cut: start_cut
- end_cut: end_cut
- saw_kerf: saw_kerf
- is_production_list: is_production_list
+ diameter: The diameter of the circular axis.
+ length: The length of the circular axis.
+ starting_point: The starting point.
+ axis_direction: The direction of the X-axis.
+
+ Examples:
+ >>> axis_diameter = 60.
+ >>> axis_length = 400.
+ >>> axis_start_pt = cadwork.point_3d(200., 200., 200.)
+ >>> axis_direction = cadwork.point_3d(0., 1., 0.) # Direction along Y axis
+ >>> circular_axis_id = ec.create_circular_axis_vector(axis_diameter, axis_length, axis_start_pt, axis_direction)
Returns:
- int
+ The ID of the created circular axis element.
"""
-def start_element_module_calculation_silently(covers: List[int]) -> None:
- """start element module calculation silently
+
+def create_polygon_panel(polygon_vertices: vertex_list, thickness: float, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a polygon panel.
Parameters:
- covers: covers
+ polygon_vertices: The vertices of the polygon.
+ thickness: The thickness of the panel.
+ x_local_direction: The X-axis direction of the panel.
+ z_local_direction: The Z-axis direction of the panel.
+
+ Examples:
+ >>> # Create a hexagonal panel
+ >>> vertices = cadwork.vertex_list()
+ >>> import math
+ >>> radius = 500.
+ >>> sides = 6
+ >>> for i in range(sides):
+ ... angle = 2 * math.pi * i / sides
+ ... vertices.append(cadwork.point_3d(radius * math.cos(angle), radius * math.sin(angle), 0.))
+ >>> vertices.append(vertices[0]) # Close the polygon
+ >>> panel_thickness = 20.
+ >>> extrusion_vector = cadwork.point_3d(0., 0., 1.) # Normal direction
+ >>> z_vector = cadwork.point_3d(1., 0., 0.) # Orientation vector
+ >>> polygon_panel_id = ec.create_polygon_panel(vertices, panel_thickness, extrusion_vector, z_vector)
Returns:
- None
+ The ID of the created polygon panel element.
"""
-def replace_physical_drillings_with_drilling_axes(a0: List[int], a1: float, a2: float) -> List[int]:
- """replace physical drillings with drilling axes
+def cut_elements_with_overmeasure(hard_element_id_list: list[ElementId], soft_element_id_list: list[ElementId]) -> None:
+ """Cuts elements with overmeasure.
Parameters:
- a0: a0
- a1: a1
- a2: a2
-
- Returns:
- List[int]
+ hard_element_id_list: The list of hard elements.
+ soft_element_id_list: The list of soft elements.
"""
-def cut_element_with_processing_group(a0: int, a1: int) -> None:
- """cut element with processing group
+def cut_log_corner_joint(settings_name: str, element_id_list: list[ElementId]) -> None:
+ """Cuts log corner joint.
Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
+ settings_name: The name of the settings to be used for the cut.
+ element_id_list: The list of elements to be cut.
"""
-def add_element_to_detail(a0: List[int], a1: int) -> None:
- """add element to detail
+def get_edge_selection(element_id_list: list[ElementId]) -> edge_list:
+ """Retrieves the edge selection of the provided elements.
Parameters:
- a0: a0
- a1: a1
+ element_id_list: The list of element IDs.
Returns:
- None
+ The list of edges selected.
"""
-def convert_elements_to_auxiliary_elements(a0: List[int]) -> None:
- """convert elements to auxiliary elements
+def get_facets_with_lasso(element_id_list: list[ElementId]) -> facet_list:
+ """Retrieves the facets of elements within a lasso selection.
Parameters:
- a0: a0
+ element_id_list: The list of elements to check for facets within the lasso selection.
Returns:
- None
+ The list of facets selected.
"""
-def create_circular_axis_points(a0: float, a1: point_3d, a2: point_3d) -> int:
- """create circular axis points
+def create_standard_element_from_guid_points(guid: str, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a standard element from GUID points.
Parameters:
- a0: a0
- a1: a1
- a2: a2
+ guid: The GUID of the standard element.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
Returns:
- int
+ The id of the created standard element.
"""
-def create_circular_axis_vector(a0: float, a1: float, a2: point_3d, a3: point_3d) -> int:
- """create circular axis vector
+def create_standard_element_from_guid_vectors(guid: str, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a standard element from GUID vectors.
Parameters:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
+ guid: The GUID of the standard element.
+ length: The length of the element.
+ starting_point: The starting point of the element.
+ x_local_direction: The X-axis direction vector.
+ z_local_direction: The Z-axis direction vector.
Returns:
- int
+ The ID of the created standard element.
"""
-def create_polygon_panel(polygon_vertices: List[point_3d], thickness: float, xl: point_3d, zl: point_3d) -> int:
- """create polygon panel
+def fillet_edge(element_id: ElementId, edge_start: point_3d, edge_end: point_3d, radius: float) -> None:
+ """Fillet an edge of an element.
Parameters:
- polygon_vertices: polygon_vertices
- thickness: thickness
- xl: xl
- zl: zl
-
- Returns:
- int
+ element_id: The element id.
+ edge_start: The start point of the edge.
+ edge_end: The end point of the edge.
+ radius: The radius of the fillet.
"""
-def cut_elements_with_overmeasure(a0: List[int], a1: List[int]) -> None:
- """cut elements with overmeasure
+def chamfer_edge(element_id: ElementId, edge_start: point_3d, edge_end: point_3d, length: float) -> None:
+ """Chamfers an edge of an element.
Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
+ element_id: The element id.
+ edge_start: The start point of the edge.
+ edge_end: The end point of the edge.
+ length: The length of the chamfer.
"""
-def cut_log_corner_joint(a0: str, a1: List[int]) -> None:
- """cut log corner joint
+def convert_drilling_to_circular_beam(element_id_list: list[ElementId]) -> None:
+ """Converts drilling to circular beam.
Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
+ element_id_list: The list of element IDs to convert.
"""
-def get_edge_selection(a0: List[int]) -> edge_list:
- """get edge selection
+def convert_lines_to_surfaces(element_id_list: list[ElementId]) -> list[ElementId]:
+ """Converts lines to surfaces.
Parameters:
- a0: a0
+ element_id_list: The list of element IDs to convert.
Returns:
- edge_list
+ The list of element IDs that were converted.
"""
-def get_facets_with_lasso(a0: List[int]) -> facet_list:
- """get facets with lasso
+def convert_surfaces_to_volume(element_id_list: list[ElementId]) -> ElementId:
+ """Converts surfaces to volume.
Parameters:
- a0: a0
+ element_id_list: The list of element IDs to convert.
Returns:
- facet_list
+ The ID of the created volume element.
"""
-def create_standard_element_from_guid_points(a0: str, a1: point_3d, a2: point_3d, a3: point_3d) -> int:
- """create standard element from guid points
+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:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
-
- Returns:
- int
+ element_id_list: The list of elements to be cut.
+ depth: The vertical depth of the lap cut applied to each element.
+ clearance_base: Additional clearance applied at the bottom (base) of the lap cut for fitting tolerance.
+ clearance_side: Additional clearance on the side faces of the cut to prevent tight joints or interference.
+ backcut: A small offset or undercut applied to the outer face of the cut to improve fit or reduce friction.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
"""
-def create_standard_element_from_guid_vectors(a0: str, a1: float, a2: point_3d, a3: point_3d, a4: point_3d) -> int:
- """create standard element from guid vectors
+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:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
- a4: a4
-
- Returns:
- int
+ element_id_list: The list of elements to be cut.
+ depth: The vertical depth of the cut where the intersecting element will be placed.
+ clearance_base: Additional clearance at the base (bottom) of the cut to ensure a proper fit.
+ clearance_side: Additional clearance on the side faces of the cut to avoid tight fitting.
+ backcut: A small offset or undercut applied inward to improve fitting during assembly.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
"""
-def fillet_edge(a0: int, a1: point_3d, a2: point_3d, a3: float) -> None:
- """fillet edge
+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:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
-
- Returns:
- None
+ element_id_list: The list of elements to be cut.
+ depth: The vertical depth of the cross-lap cut, typically half the thickness of the material.
+ clearance_base: Additional clearance at the bottom of the cut to ensure a proper fit between intersecting elements.
+ clearance_side: Additional clearance on the side walls of the cut to prevent tight fits or friction.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
"""
-def chamfer_edge(a0: int, a1: point_3d, a2: point_3d, a3: float) -> None:
- """chamfer edge
+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:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
+ element_id_list: The list of elements to be processed.
+ keep_cutting_elements_only: True if the return element id contains only cutting elements, false otherwise.
Returns:
- None
+ The id list of all removed geometry, cuttings bodies.
"""
-def convert_drilling_to_circular_beam(elements: List[int]) -> None:
- """convert drilling to circular beam
+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:
- elements: elements
-
- Returns:
- None
+ element_id_list: The list of elements to be cut.
+ depth1: The depth of the first tenon shoulder.
+ depth2: The depth of the second tenon shoulder.
+ clearance: Additional clearance applied around the tenons for fitting tolerance during assembly.
+ backcut: A small undercut or inward offset to ensure the tenons fit without surface interference.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
"""
-def convert_lines_to_surfaces(elements: List[int]) -> List[int]:
- """convert lines to surfaces
+def get_coordinate_system_data_nesting_child(nesting_parent_id: ElementId, nesting_child_id: ElementId) -> coordinate_system_data:
+ """Get the coordinate system of nesting child
Parameters:
- elements: elements
+ nesting_parent_id: The nesting parent id.
+ nesting_child_id: The nesting child id.
Returns:
- List[int]
+ 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 convert_surfaces_to_volume(elements: List[int]) -> int:
- """convert surfaces to volume
+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:
- elements: elements
-
- Returns:
- int
+ element_id_list: The list of elements to be cut.
+ length: The length of the half-lap joint along the main axis of the elements.
+ clearance_length: Additional clearance along the length of the cut to ensure proper fitting.
+ clearance_depth: Additional clearance in the depth direction to avoid tight joints or surface interference.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
"""
-def cut_corner_lap(elements: List[int], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a corner-lap with specific parameters
+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:
- elements: elements
- depth: depth
- clearance_base: clearance_base
- clearance_side: clearance_side
- backcut: backcut
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
-
- Returns:
- None
+ element_id_list: The list of elements to be cut.
+ length: The distance between the two starting points of the cut.
+ depth: The vertical depth of the initial straight cut before the diagonal cut begins.
+ clearance_length: The additional length clearance applied along the initial (depth) cut.
+ clearance_depth: The additional depth clearance applied along the diagonal cut.
+ drilling_count: The number of drill holes to be created for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size, typically for fitting the bolt head or allowing easier assembly.
"""
-def cut_t_lap(elements: List[int], depth: float, clearance_base: float, clearance_side: float, backcut: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a t-lap with specific parameters
+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:
- elements: elements
- depth: depth
- clearance_base: clearance_base
- clearance_side: clearance_side
- backcut: backcut
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ element_id_list: The list of elements to be cut.
+ length: The total length of the diagonal cut applied along the element.
+ clearance_length: Additional clearance along the cut length to ensure proper fitting between elements.
+ drilling_count: The number of drill holes to create for fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: The tolerance applied to the hole size for bolt head clearance or easier insertion.
+ """
+
+def get_all_identifiable_element_ids() -> list[ElementId]:
+ """Retrieves a list of all identifiable elements.
Returns:
- None
+ A list of all identifiable element IDs.
"""
-def cut_cross_lap(elements: List[int], depth: float, clearance_base: float, clearance_side: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a cross-lap with specific parameters
-
- Parameters:
- elements: elements
- depth: depth
- clearance_base: clearance_base
- clearance_side: clearance_side
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+def get_visible_identifiable_element_ids() -> list[ElementId]:
+ """Get a list of all visible identifiable elements.
Returns:
- None
+ A list of IDs of all visible identifiable elements.
"""
-def delete_processes_keep_cutting_bodies(elements: List[int], keep_cutting_elements_only: bool) -> List[int]:
- """Gets the cutting bodies of all processes (and deletes processes), like Ctrl+D Action
+def get_invisible_identifiable_element_ids() -> list[ElementId]:
+ """Get a list of all invisible identifiable elements.
- Parameters:
- elements: elements
- keep_cutting_elements_only: keep_cutting_elements_only
+ Returns:
+ A list of IDs of all invisible identifiable elements.
+ """
+
+def get_active_identifiable_element_ids() -> list[ElementId]:
+ """Get a list of all active identifiable elements.
Returns:
- List[int]
+ A list of IDs of all active identifiable elements.
"""
-def cut_double_tenon(elements: List[int], depth1: float, depth2: float, clearance: float, backcut: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a double tenon with specific parameters
+def get_inactive_all_identifiable_element_ids() -> list[ElementId]:
+ """Get a list of all inactive identifiable elements.
- Parameters:
- elements: elements
- depth1: depth1
- depth2: depth2
- clearance: clearance
- backcut: backcut
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ Returns:
+ A list of IDs of all inactive identifiable elements.
+ """
+
+def get_inactive_visible_identifiable_element_ids() -> list[ElementId]:
+ """Get a list of all inactive visible identifiable elements.
Returns:
- None
+ A list of IDs of all inactive visible identifiable elements.
"""
-def get_coordinate_system_data_nesting_child(nesting_parent_id: int, nesting_child_id: int) -> coordinate_system_data:
- """Get the coordinate system of nesting child
+def check_if_point_is_in_element(point: point_3d, element_id: ElementId) -> bool:
+ """Check if a point is inside an element.
Parameters:
- nesting_parent_id: nesting_parent_id
- nesting_child_id: nesting_child_id
+ point: The point to check.
+ element_id: The ID of the element to check against.
Returns:
- 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
+ True if the point is inside the element, false otherwise.
"""
-def cut_half_lap(elements: List[int], length: float, clearance_length: float, clearance_depth: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a half lap joint with specific parameters
+def check_if_point_is_on_element(point: point_3d, element_id: ElementId) -> bool:
+ """Check if a point is on the surface of an element.
Parameters:
- elements: elements
- length: length
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ point: The point to check.
+ element_id: The ID of the element to check against.
Returns:
- None
+ True if the point is on the surface of the element, false otherwise.
"""
-def cut_simple_scarf(elements: List[int], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a simple scarf joint with specific parameters
+def get_element_contact_facets(first_id: ElementId, second_id: ElementId) -> facet_list:
+ """Retrieves the contact facets between two elements.
Parameters:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ first_id: The ID of the first element.
+ second_id: The ID of the second element.
Returns:
- None
+ The list of contact facets between the two elements.
"""
-def cut_diagonal_cut(elements: List[int], length: float, clearance_length: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cuts a diagonal cut joint with specific parameters
+def get_element_raw_interface_vertices(first_id: ElementId, second_id: ElementId) -> list[point_3d]:
+ """Get the raw interface vertices between two elements.
Parameters:
- elements: elements
- length: length
- clearance_length: clearance_length
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ first_id: The ID of the first element.
+ second_id: The ID of the second element.
Returns:
- None
+ The list of raw interface vertices between the two elements.
"""
-def get_all_identifiable_element_ids() -> List[int]:
- """get all identifiable element ids
+def get_standard_export_solid_list() -> list[str]:
+ """Retrieves a list of standard export solid names.
Returns:
- List[int]
+ The list of standard export solid names.
"""
-def get_visible_identifiable_element_ids() -> List[int]:
- """get visible identifiable element ids
+def get_standard_container_list() -> list[str]:
+ """Retrieves a list of standard container names.
Returns:
- List[int]
+ The list of standard container names.
"""
-def get_invisible_identifiable_element_ids() -> List[int]:
- """get invisible identifiable element ids
+def get_standard_beam_list() -> list[str]:
+ """Retrieves a list of standard beam names.
Returns:
- List[int]
+ The list of standard beam names.
"""
-def get_active_identifiable_element_ids() -> List[int]:
- """get active identifiable element ids
+def get_standard_panel_list() -> list[str]:
+ """Retrieves a list of standard panel names.
Returns:
- List[int]
+ The list of standard panel names.
"""
-def get_inactive_all_identifiable_element_ids() -> List[int]:
- """get inactive all identifiable element ids
+def get_variant_sibling_element_ids(element_id: ElementId) -> list[ElementId]:
+ """Retrieves a list of variant sibling element IDs.
+
+ Parameters:
+ element_id: The element id.
Returns:
- List[int]
+ The list of variant sibling element IDs.
"""
-def get_inactive_visible_identifiable_element_ids() -> List[int]:
- """get inactive visible identifiable element ids
+def get_reference_element(element_id: ElementId) -> ElementId:
+ """Get the reference element for a given element.
+
+ Parameters:
+ element_id: The element id.
Returns:
- List[int]
+ The reference element ID.
"""
-def check_if_point_is_in_element(point: point_3d, element_id: int) -> bool:
- """check if point is in element
+def get_element_contact_vertices(first_id: ElementId, second_id: ElementId) -> list[point_3d]:
+ """Get the contact vertices between two elements.
Parameters:
- point: point
- element_id: element_id
+ first_id: The ID of the first element.
+ second_id: The ID of the second element.
Returns:
- bool
+ The list of contact vertices between the two elements.
"""
-def check_if_point_is_on_element(point: point_3d, element_id: int) -> bool:
- """check if point is on element
+def get_nesting_parent_id(element_id: ElementId) -> ElementId:
+ """Get the parent ID of a nested element.
Parameters:
- point: point
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The ID of the parent element.
"""
-def get_element_contact_facets(first_id: int, second_id: int) -> facet_list:
- """get element contact facets
+def check_if_elements_are_in_collision(first_element_id: ElementId, second_element_id: ElementId) -> bool:
+ """Check if two elements are in collision.
Parameters:
- first_id: first_id
- second_id: second_id
+ first_element_id: The ID of the first element.
+ second_element_id: The ID of the second element.
Returns:
- facet_list
+ True if the elements are in collision, false otherwise.
"""
-def get_element_raw_interface_vertices(first_id: int, second_id: int) -> List[point_3d]:
- """get element raw interface vertices
+def check_if_elements_are_in_contact(first_element_id: ElementId, second_element_id: ElementId) -> bool:
+ """Check if two elements are in contact.
Parameters:
- first_id: first_id
- second_id: second_id
+ first_element_id: The ID of the first element.
+ second_element_id: The ID of the second element.
Returns:
- List[point_3d]
+ True if the elements are in contact, false otherwise.
"""
-def get_standard_export_solid_list() -> List[str]:
- """get standard export solid list
+def get_element_module_properties_for_element(element_id: ElementId) -> element_module_properties:
+ """Retrieves the module properties for a specific element.
+
+ Parameters:
+ element_id: The element id.
Returns:
- List[str]
+ The module properties of the element.
"""
-def get_standard_container_list() -> List[str]:
- """get standard container list
+def get_element_type_description(element_id: ElementId) -> str:
+ """Retrieves the type description of a specific element.
+
+ Parameters:
+ element_id: The element id.
Returns:
- List[str]
+ The type description of the element.
"""
-def get_standard_beam_list() -> List[str]:
- """get standard beam list
+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:
+ element_id_list: The list of element IDs.
+ opening_type: The type of opening to check for. Unknown = 0, Window = 1, Door = 2.
Returns:
- List[str]
+ The list of opening variant IDs.
"""
-def get_standard_panel_list() -> List[str]:
- """get standard panel list
+def get_parent_container_id(element_id: ElementId) -> ElementId:
+ """Get the parent container ID of a nested element.
+
+ Parameters:
+ element_id: The element id.
Returns:
- List[str]
+ The ID of the parent element.
"""
-def get_variant_sibling_element_ids(a0: int) -> List[int]:
- """get variant sibling element ids
+def get_export_solid_content_elements(element_id: ElementId) -> list[ElementId]:
+ """Get the content elements of an export solid.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- List[int]
+ The list of content elements.
"""
-def get_reference_element(element: int) -> int:
- """get reference element
+def get_container_content_elements(element_id: ElementId) -> list[ElementId]:
+ """Get the content elements of a container.
Parameters:
- element: element
+ element_id: The element id.
Returns:
- int
+ The list of content elements.
"""
-def get_element_contact_vertices(first_id: int, second_id: int) -> List[point_3d]:
- """get element contact vertices
-
- Parameters:
- first_id: first_id
- second_id: second_id
+def get_element_detail_path() -> str:
+ """Get the detail path of the element module.
Returns:
- List[point_3d]
+ The detail path of the element module.
"""
-def get_nesting_parent_id(element_id: int) -> int:
- """get nesting parent id
+def get_element_cadwork_guid(element_id: ElementId) -> str:
+ """Get the Cadwork GUID of a specific element.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- int
+ The Cadwork GUID of the element.
"""
-def check_if_elements_are_in_collision(first_element_id: int, second_element_id: int) -> bool:
- """check if elements are in collision
+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:
- first_element_id: first_element_id
- second_element_id: second_element_id
+ reference_element: The ID of the reference element.
+ element_id_list: The list of elements for which to retrieve the bounding box vertices.
Returns:
- bool
+ The list of vertices representing the local bounding box of the elements.
"""
-def check_if_elements_are_in_contact(first_element_id: int, second_element_id: int) -> bool:
- """check if elements are in contact
+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:
- first_element_id: first_element_id
- second_element_id: second_element_id
+ element_id_list: The list of elements for which to retrieve the bounding box vertices.
Returns:
- bool
+ The list of vertices representing the global bounding box of the elements.
"""
-def get_element_module_properties_for_element(element_id: int) -> element_module_properties:
- """get element module properties for element
-
- Parameters:
- element_id: element_id
+def get_all_nesting_raw_parts() -> list[ElementId]:
+ """Get a list of all raw parts in a nesting operation.
Returns:
- element_module_properties
+ The list of IDs of all raw parts in a nesting operation.
"""
-def get_element_type_description(element_id: int) -> str:
- """get element type description
+def get_joined_elements(element_id: ElementId) -> list[ElementId]:
+ """Retrieves the IDs of elements that have been joined with the specified element.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- str
+ The list of IDs of the joined elements.
"""
-def get_opening_variant_ids(elements: List[int], opening_type: int) -> List[int]:
- """get opening variant ids
+def check_element_duplicates(element_id_list: list[ElementId]) -> list[ElementId]:
+ """Checks for duplicate elements in the provided list.
Parameters:
- elements: elements
- opening_type: opening_type
+ element_id_list: The list of element IDs to check for duplicates.
Returns:
- List[int]
+ The list of duplicate elements.
"""
-def get_parent_container_id(element_id: int) -> int:
- """get parent container id
+def get_elements_in_contact(element_id: ElementId) -> list[ElementId]:
+ """Retrieves a list of elements in contact with a specific element.
Parameters:
- element_id: element_id
+ element_id: The ID of the element to check for contact.
Returns:
- int
+ The list of IDs of the elements in contact with the specified element.
"""
-def get_export_solid_content_elements(element_id: int) -> List[int]:
- """get export solid content elements
+def create_text_object_with_options(position: point_3d, x_local_direction: point_3d, z_local_direction: point_3d, text_options: text_object_options) -> ElementId:
+ """Creates a text object with the specified options.
Parameters:
- element_id: element_id
+ position: The position of the text object.
+ x_local_direction: The X-axis direction of the text object.
+ z_local_direction: The Z-axis direction of the text object.
+ text_options: The options for the text object.
+
+ Examples:
+ >>> text_position = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(1., 0., 0.) # Text direction
+ >>> z_direction = cadwork.point_3d(0., 0., 1.) # Text orientation
+ >>> options = cadwork.text_object_options()
+ >>> options.set_text("Advanced Text")
+ >>> options.set_height(200.)
+ >>> options.set_font_name("Verdana")
+ >>> options.set_bold(True)
+ >>> text_id = ec.create_text_object_with_options(text_position, x_direction, z_direction, options)
Returns:
- List[int]
+ The ID of the created text object.
+ """
+
+def convert_surfaces_to_roof_surfaces(element_id_list: list[ElementId], roof_name: str) -> None:
+ """Converts surfaces to roof surfaces.
+
+ Parameters:
+ element_id_list: The list of elements to convert.
+ roof_name: The name of the roof surface.
"""
-def get_container_content_elements(element_id: int) -> List[int]:
- """get container content elements
+def start_standard_element_dialog(standard_element_type: standard_element_type) -> str:
+ """Starts the standard element dialogue based on the chosen element type.
Parameters:
- element_id: element_id
+ standard_element_type: The type of the standard element to create.
Returns:
- List[int]
+ The GUID of the selected standard element if the item is valid, else null.
"""
-def get_element_detail_path() -> str:
- """get element detail path
+def remove_standard_connector_axis(guid: str) -> None:
+ """Removes a standard connector axis.
- Returns:
- str
+ Parameters:
+ guid: The unique identifier of the standard connector axis to be removed.
"""
-def get_element_cadwork_guid(element_id: int) -> str:
- """get element cadwork guid
+def remove_standard_beam(guid: str) -> None:
+ """Removes a standard beam.
Parameters:
- element_id: element_id
+ guid: The unique identifier of the standard connector axis to be removed.
+ """
- Returns:
- str
+def remove_standard_panel(guid: str) -> None:
+ """Removes a standard panel.
+
+ Parameters:
+ guid: The unique identifier of the standard panel to be removed.
"""
-def get_bounding_box_vertices_local(a0: int, a1: List[int]) -> List[point_3d]:
- """get bounding box vertices local
+def remove_standard_container(guid: str) -> None:
+ """Removes a standard container.
Parameters:
- a0: a0
- a1: a1
+ guid: The unique identifier of the standard container to be removed.
+ """
- Returns:
- List[point_3d]
+def remove_standard_export_solid(guid: str) -> None:
+ """Removes a standard export solid.
+
+ Parameters:
+ guid: The unique identifier of the standard export solid to be removed.
"""
-def get_bounding_box_vertices_global(a0: List[int]) -> List[point_3d]:
- """get bounding box vertices global
+def get_user_element_ids_with_count(count: int) -> list[ElementId]:
+ """Retrieves a list of user element IDs.
Parameters:
- a0: a0
+ count: The maximal number of elements to select.
Returns:
- List[point_3d]
+ The list of user element IDs.
"""
-def get_all_nesting_raw_parts() -> List[int]:
- """get all nesting raw parts
+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.
- Returns:
- List[int]
+ Parameters:
+ element_id_list: The list of elements to apply the scarf cut to.
+ length: The total length of the scarf joint cut, measured along the element’s longitudinal axis.
+ depth: The depth of the vertical cut where both side join.
+ clearance_length: Additional clearance along the length direction to ensure proper fitting of the joint.
+ clearance_depth: Additional clearance in the depth direction to avoid tight fits or interference.
+ clearance_hook: Clearance added specifically at the hook or notch feature of the joint, if any.
+ drilling_count: The number of holes to be drilled, typically for bolts, pegs, or dowels to reinforce the joint.
+ drilling_diameter: The diameter of each drilled hole.
+ drilling_tolerance: The tolerance added to the hole size for easier assembly or bolt head fitting.
"""
-def get_joined_elements(a0: int) -> List[int]:
- """get joined elements
+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:
- a0: a0
+ element_id_list: The list of elements on which the diagonal scarf cut will be applied.
+ length: The total length of the scarf joint measured along the element’s axis.
+ depth: The vertical depth of the initial straight section before the diagonal cut begins.
+ clearance_length: Additional clearance along the length direction to facilitate proper fitting of the joint.
+ clearance_depth: Additional clearance along the depth direction to avoid tight joints or misalignment.
+ drilling_count: The number of drill holes for mechanical fasteners (e.g., bolts or dowels).
+ drilling_diameter: The diameter of each drill hole.
+ drilling_tolerance: Tolerance added to the hole diameter for ease of insertion or head fit.
+ """
- Returns:
- List[int]
+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:
+ element_id_list: The list of elements on which to apply the scarf-with-wedge cut.
+ length: The total length of the scarf joint, measured along the main axis of the element.
+ depth: The vertical depth of the straight portion of the cut before the diagonal section.
+ clearance_length: Additional clearance along the length direction for proper fit of the joint.
+ clearance_depth: Additional clearance in the depth direction to avoid interference.
+ wedge_width: The width of the wedge feature inserted or carved as part of the joint geometry.
+ drilling_count: The number of drill holes used to secure the joint (e.g., for bolts, pegs, or dowels).
+ drilling_diameter: The diameter of the drilled holes.
+ 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:
+ """Add end profile to beam elements.
+
+ Parameters:
+ element_id_list: The list of elements to modify.
+ profile_name: The name of the profile to add.
+ on_start_face: Cut on the start face?
+ on_end_face: Cut on the end face?
"""
-def check_element_duplicates(elements: List[int]) -> List[int]:
- """check element duplicates
+def create_truncated_cone_beam_points(start_diameter: float, end_diameter: float, first_point: point_3d, second_point: point_3d, third_point: point_3d) -> ElementId:
+ """Creates a truncated cone beam using points.
Parameters:
- elements: elements
+ start_diameter: The starting diameter of the beam.
+ end_diameter: The ending diameter of the beam.
+ first_point: The first point.
+ second_point: The second point.
+ third_point: The third point.
+
+ Examples:
+ >>> start_dia = 200.
+ >>> end_dia = 150.
+ >>> cone_start_pt = cadwork.point_3d(0., 0., 0.)
+ >>> cone_end_pt = cadwork.point_3d(0., 0., 3000.)
+ >>> # Calculate orientation point
+ >>> length_vector = (cone_end_pt - cone_start_pt).normalized()
+ >>> ref_vector = cadwork.point_3d(1., 0., 0.)
+ >>> orientation_vector = length_vector.cross(ref_vector).normalized()
+ >>> orientation_pt = cone_start_pt + orientation_vector
+ >>> cone_id = ec.create_truncated_cone_beam_points(start_dia, end_dia, cone_start_pt, cone_end_pt, orientation_pt)
Returns:
- List[int]
+ The ID of the created beam.
"""
-def get_elements_in_contact(a0: int) -> List[int]:
- """get elements in contact
+def create_truncated_cone_beam_vectors(start_diameter: float, end_diameter: float, length: float, starting_point: point_3d, x_local_direction: point_3d, z_local_direction: point_3d) -> ElementId:
+ """Creates a truncated cone beam using vectors.
Parameters:
- a0: a0
+ start_diameter: The starting diameter of the beam.
+ end_diameter: The ending diameter of the beam.
+ length: The length of the beam.
+ starting_point: The starting point.
+ x_local_direction: The direction of the X-axis.
+ z_local_direction: The direction of the Z-axis.
+
+ Examples:
+ >>> start_dia = 120.
+ >>> end_dia = 80.
+ >>> cone_length = 2500.
+ >>> origin_point = cadwork.point_3d(0., 0., 0.)
+ >>> x_direction = cadwork.point_3d(0., 0., 1.) # Direction along Z axis
+ >>> z_direction = cadwork.point_3d(1., 0., 0.) # Orientation vector
+ >>> cone_id = ec.create_truncated_cone_beam_vectors(start_dia, end_dia, cone_length, origin_point, x_direction, z_direction)
Returns:
- List[int]
+ The ID of the created beam.
"""
-def create_text_object_with_options(position: point_3d, xl: point_3d, zl: point_3d, text_options: text_object_options) -> int:
- """create text object with options
+
+def create_spline_line(spline_points: vertex_list) -> ElementId:
+ """Creates a spline line.
Parameters:
- position: position
- xl: xl
- zl: zl
- text_options: text_options
+ spline_points: The points defining the spline.
+
+ Examples:
+ >>> # Create a spline through multiple points
+ >>> points = cadwork.vertex_list()
+ >>> points.append(cadwork.point_3d(0., 0., 0.))
+ >>> points.append(cadwork.point_3d(500., 200., 0.))
+ >>> points.append(cadwork.point_3d(1000., 0., 200.))
+ >>> points.append(cadwork.point_3d(1500., -100., 100.))
+ >>> spline_id = ec.create_spline_line(points)
Returns:
- int
+ The ID of the created spline.
"""
-def convert_surfaces_to_roof_surfaces(elements: List[int], roof_name: str) -> None:
- """converts surfaces to roof surfaces
+def unjoin_elements(element_id_list: list[ElementId]) -> bool:
+ """Unjoins the specified elements.
Parameters:
- elements: elements
- roof_name: roof_name
+ element_id_list: The element id list.
Returns:
- None
+ True if the operation was successful, false if an error occured.
"""
-def start_standard_element_dialog(standard_element_type: None) -> str:
- """Starts the standard element dialogue based on the chosen element type
+def unjoin_top_level_elements(element_id_list: list[ElementId]) -> bool:
+ """Unjoins the specified top-level elements.
Parameters:
- standard_element_type: standard_element_type
+ element_id_list: The element id list.
Returns:
- Returns guid of selected standard element if item is valid, else null
+ True if the operation was successful, false if an error occured.
+ """
+
+def set_element_group_single_select_mode() -> None:
+ """ Switches the current element group selection mode so that single elements of a group are selectable.
"""
-def remove_standard_connector_axis(a0: str) -> None:
- """remove standard connector axis
+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:
+ """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]:
+ """Slices an element with a plane and returns the new elements.
Parameters:
- a0: a0
+ element_id: The ID of the element to be sliced.
+ cut_plane_normal_vector: The normal vector of the cutting plane.
+ distance_from_global_origin: The distance from the global origin to the cutting plane.
+
+ Examples:
+ >>> import math
+ >>> # Create a beam to slice
+ >>> beam_width = 150.
+ >>> beam_height = 300.
+ >>> beam_length = 4000.
+ >>> beam_id = ec.create_rectangular_beam_vectors(beam_width, beam_height, beam_length,
+ ... cadwork.point_3d(0., 0., 0.),
+ ... cadwork.point_3d(1., 0., 0.),
+ ... cadwork.point_3d(0., 0., 1.))
+ >>> # Define a vertical cutting plane through the middle of the beam
+ >>> plane_normal = cadwork.point_3d(1., 0., 0.) # Normal vector points along X-axis
+ >>> # A point on the plane (midpoint of the beam)
+ >>> plane_point = cadwork.point_3d(beam_length/2., 0., 0.)
+ >>> distance = plane_point.dot(plane_normal) # Distance from origin to plane
+ >>> # Verify with additional points on the plane
+ >>> test_point = cadwork.point_3d(beam_length/2., 100., 200.)
+ >>> on_plane = abs(test_point.dot(plane_normal) - distance) < 0.001
+ >>> print(f"Test point is on plane: {on_plane}")
+ >>> # Slice the beam at the midpoint and get the resulting pieces
+ >>> new_element_ids = ec.slice_elements_with_plane_and_get_new_elements(beam_id, plane_normal, distance)
+ >>> print(f"Created {len(new_element_ids)} new element_id_list: {new_element_ids}")
+ >>> # Visualization: different pen colors for the new elements
+ >>> for i, new_id in enumerate(new_element_ids):
+ ... vc.set_color([new_id], i+5)
Returns:
- None
+ The list of IDs of the new elements created by the slicing operation.
"""
-def remove_standard_beam(guid: str) -> None:
- """remove standard beam
+def get_elements_in_collision(element_id: ElementId) -> list[ElementId]:
+ """Retrieves a list of elements in collision with a specific element.
Parameters:
- guid: guid
+ element_id: The ID of the element to check for collision.
Returns:
- None
+ A list of IDs of the elements in collision with the specified element.
"""
-def remove_standard_panel(guid: str) -> None:
- """remove standard panel
+def get_text_object_options(element_id: ElementId) ->'text_object_options':
+ """Retrieves the text object options for a specific element e.g. font, text content, etc.
Parameters:
- guid: guid
+ element_id: The ID of the element to retrieve options for.
Returns:
- None
+ The text object options for the specified element.
"""
-def remove_standard_container(guid: str) -> None:
- """remove standard container
+def get_is_element_group_single_select_mode() ->bool:
+ """Gets whether the current element group selection mode is setup to select single elements.
- Parameters:
- guid: guid
+ Returns:
+ True if the current element group selection mode is set to single select, false otherwise.
+ """
+
+def get_is_element_group_multi_select_mode() ->bool:
+ """Gets whether the current element group selection mode is setup to select multiple elements.
Returns:
- None
+ True if the current element group selection mode is set to multi select, false otherwise.
"""
-def remove_standard_export_solid(guid: str) -> None:
- """remove standard export solid
+
+def set_shoulder_options(options: shoulder_options) -> None:
+ """Sets the shoulder cut options.
Parameters:
- guid: guid
+ options: The shoulder options to set.
+ """
- Returns:
- None
+
+def set_heel_shoulder_options(options: heel_shoulder_options) -> None:
+ """Sets the heel shoulder cut options.
+
+ Parameters:
+ options: The heel shoulder options to set.
"""
-def get_user_element_ids_with_count(count: int) -> List[int]:
- """get user element ids with count
+
+def set_double_shoulder_options(options: double_shoulder_options) -> None:
+ """Sets the double shoulder cut options.
Parameters:
- count: count
+ options: The double shoulder options to set.
+ """
- Returns:
- List[int]
+def cut_shoulder(element_id_list: list[ElementId], connecting_element_id_list:
+ list[ElementId]) ->None:
+ """Cuts shoulder with current 3D options.
+
+ Parameters:
+ element_id_list: The 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_scarf_straight(elements: List[int], length: float, depth: float, clearance_length: float, clearance_depth: float, clearance_hook: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cut scarf straight
+def cut_heel_shoulder(element_id_list: list[ElementId],
+ connecting_element_id_list: list[ElementId]) ->None:
+ """Cuts heel with current 3D options
Parameters:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- clearance_hook: clearance_hook
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ element_id_list: The 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.
+ """
- Returns:
- 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:
+ element_id_list: The 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_scarf_diagonal(elements: List[int], length: float, depth: float, clearance_length: float, clearance_depth: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cut scarf diagonal
+
+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:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ element_id_list: The list of elements to filter.
+ element_filter: The filter to apply to the list of elements.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> your_element_filter = cadwork.element_filter()
+ >>> your_element_filter.set_name("beam")
+ >>> filtered_elements = ec.filter_elements(ec.get_active_identifiable_element_ids(), your_element_filter)
+ >>> print(filtered_elements)
Returns:
- None
+ The filtered list of element IDs.
"""
-def cut_scarf_with_wedge(elements: List[int], length: float, depth: float, clearance_length: float, clearance_depth: float, wedge_width: float, drilling_count: int, drilling_diameter: float, drilling_tolerance: float) -> None:
- """cut scarf with wedge
+
+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:
- elements: elements
- length: length
- depth: depth
- clearance_length: clearance_length
- clearance_depth: clearance_depth
- wedge_width: wedge_width
- drilling_count: drilling_count
- drilling_diameter: drilling_diameter
- drilling_tolerance: drilling_tolerance
+ element_id_list: The list of elements to map.
+ map_query: The map query to apply to the list of elements.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> your_map_query = cadwork.element_map_query()
+ >>> your_map_query.set_by_subgroup()
+ >>> mapped_items = ec.map_elements(ec.get_active_identifiable_element_ids(), your_map_query)
+ >>> print(mapped_items)
Returns:
- None
+ The map of elements that pass the map query.
"""
-def cut_beam_end_profile(elements: List[int], profile_name: str, on_start_face: bool, on_end_face: bool) -> None:
- """cut beam end profile
+
+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.
Parameters:
- elements: elements
- profile_name: profile_name
- on_start_face: on_start_face
- on_end_face: on_end_face
+ element_id_list: List of element IDs to test against the ray.
+ ray_start_position: 3D start point of the ray.
+ ray_end_position: 3D end point of the ray.
+ radius: Radius of the ray cylinder (allows testing against a volume rather than just a line).
+
+ Examples:
+ >>> import element_controller as ec
+ >>> from cadwork import point_3d
+ >>> ray_start = point_3d(0, 0, 0)
+ >>> ray_end = point_3d(1000, 0, 0)
+ >>> hit_result = ec.cast_ray_and_get_element_intersections(ec.get_active_identifiable_element_ids(), ray_start, ray_end, 40.0)
+ >>> print(hits.get_hit_element_ids())
+ >>> for element in hits.get_hit_element_ids():
+ >>> print(f"ElementID {element}: {hits.get_hit_vertices_by_element(element)}")
+ >>> for pos in hits.get_hit_vertices_by_element(element):
+ >>> ec.create_node(pos)
Returns:
- None
+ Contains list of elements that were hit by the ray and list of vertices that are queried via ElementID.
"""
+def get_element_active_point(element_id: ElementId) -> active_point_result:
+ """Gets the active point associated with an element.
+
+ Parameters:
+ element_id: The element id.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> [element_id] = ec.get_active_identifiable_element_ids()
+ >>> result = ec.get_element_active_point(element_id)
+ >>> if result:
+ ... ec.create_node(result.point)
+ ... else:
+ ... print("No active point set for element.")
+
+ Returns:
+ True/False plus point data when available.
+ """
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 4a7d315..3013e8c 100644
--- a/src/endtype_controller/__init__.pyi
+++ b/src/endtype_controller/__init__.pyi
@@ -1,223 +1,377 @@
-from typing import List
+from cadwork.api_types import *
-def get_last_error(error_code: int) -> str:
- """get last error
+def get_endtype_id(name: str) -> EndtypeId:
+ """Gets the endtype id by endtype name.
Parameters:
- error_code: error_code
+ name: The endtype name.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> endtype_name = "Tenon_100x50"
+ >>> endtype_id = etc.get_endtype_id(endtype_name)
+ >>> print(f"Endtype ID: {endtype_id}")
Returns:
- str
+ The wanted endtype id.
"""
-def get_endtype_id(name: str) -> int:
- """Gets the endtypeID by endtypename
+def get_endtype_id_start(element_id: ElementId) -> EndtypeId:
+ """Gets the endtype id of the start face.
Parameters:
- name: name
+ element_id: The element id.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> start_endtype_id = etc.get_endtype_id_start(element)
+ >>> print(f"Start endtype ID: {start_endtype_id}")
Returns:
- int
+ The wanted endtype id.
"""
-def get_endtype_id_start(element_id: int) -> int:
- """Gets the endtypeID of the start face
+def get_endtype_id_end(element_id: ElementId) -> EndtypeId:
+ """Gets the endtype id of the end face.
Parameters:
- element_id: element_id
+ element_id: The element id.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> end_endtype_id = etc.get_endtype_id_end(element)
+ >>> print(f"End endtype ID: {end_endtype_id}")
Returns:
- int
+ The wanted endtype id.
"""
-def get_endtype_id_end(element_id: int) -> int:
- """Gets the endtypeID of the end face
+
+def get_endtype_id_facet(element_id: ElementId, face_number: int) -> EndtypeId:
+ """Gets the endtype id of a face with the face number.
Parameters:
- element_id: element_id
+ element_id: The element id.
+ face_number: The face number. 0 <= aFaceNumber < element face count.
+
+ Note:
+ Endtypes can only be set on faces that are placed at start or end points.
+ Endtypes cannot be placed on arbitrary faces.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> face_number = 1
+ >>> facet_endtype_id = etc.get_endtype_id_facet(element, face_number)
+ >>> print(f"Facet endtype ID: {facet_endtype_id}")
Returns:
- int
+ The wanted endtype id.
"""
-def get_endtype_id_facet(a0: int, a1: int) -> int:
- """get endtype id facet
+def set_endtype_name_start(element_id: ElementId, name: str) -> None:
+ """Sets the endtype to start face by endtype name.
Parameters:
- a0: a0
- a1: a1
+ element_id: The element id.
+ name: The endtype name.
- Returns:
- int
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_name = "Tenon_100x50"
+ >>> etc.set_endtype_name_start(element, endtype_name)
"""
-def set_endtype_name_start(element_id: int, name: str) -> None:
- """Sets the endtype to start face by endtypename
+def set_endtype_name_end(element_id: ElementId, name: str) -> None:
+ """Sets the endtype to end face by endtype name.
Parameters:
- element_id: element_id
- name: name
+ element_id: The element id.
+ name: The endtype name.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_name = "Mortise_100x50"
+ >>> etc.set_endtype_name_end(element, endtype_name)
"""
-def set_endtype_name_end(element_id: int, name: str) -> None:
- """Sets the endtype to end face by endtypename
- Parameters:
- element_id: element_id
- name: name
+def set_endtype_name_facet(element_id: ElementId, name: str, face_number: int) -> None:
+ """Sets the endtype to a face by endtype name.
- Returns:
- None
+ Parameters:
+ element_id: The element id.
+ name: The endtype name.
+ face_number: The face number. 0 <= aFaceNumber < element face count.
+
+ Note:
+ Endtypes can only be set on faces that are placed at start or end points.
+ Endtypes cannot be placed on arbitrary faces.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_name = "Dovetail_60x30"
+ >>> face_number = 2
+ >>> etc.set_endtype_name_facet(element, endtype_name, face_number)
"""
-def set_endtype_name_facet(a0: int, a1: str, a2: int) -> None:
- """set endtype name facet
+def set_endtype_id_start(element_id: ElementId, endtype_id: EndtypeId) -> None:
+ """Sets the endtype to start face by endtype id.
Parameters:
- a0: a0
- a1: a1
- a2: a2
+ element_id: The element id.
+ endtype_id: The endtype id.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_id = 12345
+ >>> etc.set_endtype_id_start(element, endtype_id)
"""
-def set_endtype_id_start(element_id: int, endtype_id: int) -> None:
- """Sets the endtype to start face by endtypeID
+def set_endtype_id_end(element_id: ElementId, endtype_id: EndtypeId) -> None:
+ """Sets the endtype to end face by endtype id.
Parameters:
- element_id: element_id
- endtype_id: endtype_id
+ element_id: The element id.
+ endtype_id: The endtype id.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_id = 54321
+ >>> etc.set_endtype_id_end(element, endtype_id)
"""
-def set_endtype_id_end(element_id: int, endtype_id: int) -> None:
- """Sets the endtype to end face by endtypeID
- Parameters:
- element_id: element_id
- endtype_id: endtype_id
+def set_endtype_id_facet(element_id: ElementId, endtype_id: EndtypeId, face_number: int) -> None:
+ """Sets the endtype to a face by endtype id.
- Returns:
- None
+ Parameters:
+ element_id: The element id.
+ endtype_id: The endtype id.
+ face_number: The face number. 0 <= aFaceNumber < element face count.
+
+ Note:
+ Endtypes can only be set on faces that are placed at start or end points.
+ Endtypes cannot be placed on arbitrary faces.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> endtype_id = 67890
+ >>> face_number = 3
+ >>> etc.set_endtype_id_facet(element, endtype_id, face_number)
"""
-def set_endtype_id_facet(a0: int, a1: int, a2: int) -> None:
- """set endtype id facet
+def create_new_endtype(endtype_name: str, endtype_id: EndtypeId, folder_name: str) -> EndtypeId:
+ """Creates a new Endtype.
Parameters:
- a0: a0
- a1: a1
- a2: a2
+ endtype_name: The new endtype name.
+ endtype_id: The new endtype id.
+ folder_name: The new endtype folder.
- Returns:
- None
- """
+ Examples:
+ >>> import endtype_controller as etc
-def clear_errors() -> None:
- """clear errors
+ >>> endtype_name = "Custom_Joint_80x40"
+ >>> endtype_id = 99999
+ >>> folder_name = "Custom_Joints"
+ >>> new_id = etc.create_new_endtype(endtype_name, endtype_id, folder_name)
+ >>> print(f"Created endtype with ID: {new_id}")
Returns:
- None
+ The ID of the created endtype.
"""
-def create_new_endtype(endtype_name: str, endtype_id: int, folder_name: str) -> int:
- """Creates a new Endtype
+def get_endtype_name(element_id: ElementId) -> str:
+ """Gets the endtype name by endtype id.
Parameters:
- endtype_name: endtype_name
- endtype_id: endtype_id
- folder_name: folder_name
+ element_id: The endtype id.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> endtype_id = 12345
+ >>> endtype_name = etc.get_endtype_name(endtype_id)
+ >>> print(f"Endtype name: {endtype_name}")
Returns:
- int
+ The endtype name.
"""
-def get_endtype_name(element_id: int) -> str:
- """Gets the endtypename by endtypeID
+def get_endtype_name_start(element_id: ElementId) -> str:
+ """Gets the endtype name of the start face.
Parameters:
- element_id: element_id
+ element_id: The element id.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> start_name = etc.get_endtype_name_start(element)
+ >>> print(f"Start endtype name: {start_name}")
Returns:
- str
+ The endtype name of the start face.
"""
-def get_endtype_name_start(element_id: int) -> str:
- """Gets the endtypename of the start face
+def get_endtype_name_end(element_id: ElementId) -> str:
+ """Gets the endtype name of the end face.
Parameters:
- element_id: element_id
+ element_id: The element id.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> end_name = etc.get_endtype_name_end(element)
+ >>> print(f"End endtype name: {end_name}")
Returns:
- str
+ The endtype name of the end face.
"""
-def get_endtype_name_end(element_id: int) -> str:
- """Gets the endtypename of the end face
+def get_endtype_name_facet(element_id: ElementId, face_number: int) -> str:
+ """Gets the endtype name of the face with a number.
Parameters:
- element_id: element_id
+ element_id: The element id.
+ face_number: The face number. 0 <= aFaceNumber < element face count.
- Returns:
- str
- """
+ Note:
+ Endtypes can only be set on faces that are placed at start or end points.
+ Endtypes cannot be placed on arbitrary faces.
-def get_endtype_name_facet(a0: int, a1: int) -> str:
- """get endtype name facet
+ Examples:
+ >>> import element_controller as ec
+ >>> import endtype_controller as etc
- Parameters:
- a0: a0
- a1: a1
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> element = selected_elements[0]
+ >>> face_number = 2
+ >>> facet_name = etc.get_endtype_name_facet(element, face_number)
+ >>> print(f"Facet endtype name: {facet_name}")
Returns:
- str
+ The endtype name of the face.
"""
-def get_existing_tenon_ids() -> List[int]:
- """Get the existing tenon endtypeIDs
+def get_existing_tenon_ids() -> list[EndtypeId]:
+ """Get the existing tenon endtype id list.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> tenon_ids = etc.get_existing_tenon_ids()
+ >>> print(f"Available tenon endtype IDs: {tenon_ids}")
Returns:
- list of existing tenon endtypeIDs
+ List of existing tenon endtype id.
"""
-def get_existing_lengthening_ids() -> List[int]:
- """Get the existing lengthening endtypeIDs
+def get_existing_lengthening_ids() -> list[EndtypeId]:
+ """Get the existing lengthening endtype id list.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> lengthening_ids = etc.get_existing_lengthening_ids()
+ >>> print(f"Available lengthening endtype IDs: {lengthening_ids}")
Returns:
- list of existing lengthening endtypeIDs
+ List of existing lengthening endtype id.
"""
-def get_existing_dovetail_ids() -> List[int]:
- """Get the existing dovetail endtypeIDs
+def get_existing_dovetail_ids() -> list[EndtypeId]:
+ """Get the existing dovetail endtype id list.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> dovetail_ids = etc.get_existing_dovetail_ids()
+ >>> print(f"Available dovetail endtype IDs: {dovetail_ids}")
Returns:
- list of existing dovetail endtypeIDs
+ List of existing dovetail endtype id.
"""
-def get_existing_dovetail_dado_ids() -> List[int]:
- """Get the existing dado endtypeIDs
+def get_existing_dovetail_dado_ids() -> list[EndtypeId]:
+ """Get the existing dado endtype id list.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> dado_ids = etc.get_existing_dovetail_dado_ids()
+ >>> print(f"Available dado endtype IDs: {dado_ids}")
Returns:
- list of existing dado endtypeIDs
+ List of existing dado endtype id.
"""
-def get_existing_japanese_tenon_ids() -> List[int]:
- """Get the existing japanese-tenon endtypeIDs
+def get_existing_japanese_tenon_ids() -> list[EndtypeId]:
+ """Get the existing japanese-tenon endtype id list.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> japanese_tenon_ids = etc.get_existing_japanese_tenon_ids()
+ >>> print(f"Available japanese-tenon endtype IDs: {japanese_tenon_ids}")
Returns:
- list of existing japanese-tenon endtypeIDs
+ List of existing japanese-tenon endtype id.
"""
def start_endtype_dialog() -> int:
- """Start endtype dialog
+ """Start endtype dialog.
+
+ Examples:
+ >>> import endtype_controller as etc
+
+ >>> selected_endtype_id = etc.start_endtype_dialog()
+ >>> print(f"User selected endtype ID: {selected_endtype_id}")
Returns:
- Selected endtypeID
+ Selected endtype id.
"""
-
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 c719900..ba7d6fe 100644
--- a/src/file_controller/__init__.pyi
+++ b/src/file_controller/__init__.pyi
@@ -1,366 +1,595 @@
-from typing import List
-from cadwork import point_3d
+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
+from cadwork.dxf_layer_format_type import dxf_layer_format_type
+from cadwork.dxf_export_version import dxf_export_version
+from cadwork.display_attribute import display_attribute
+from cadwork.api_types import *
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+def export_stl_file(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports an STL file.
Parameters:
- error_code: error_code
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
- Returns:
- error string
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.stl"
+ >>> fc.export_stl_file(selected_elements, output_path)
"""
-def export_stl_file(element_id_list: List[int], file_path: str) -> None:
- """Exports an STL file
+
+def import_step_file(file_path: str, scale_factor: float) -> list[ElementId]:
+ """Imports a STEP file.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
+ file_path: The input file path.
+ scale_factor: The file scale factor.
Returns:
- None
+ The imported list of element id.
"""
-def import_step_file(file_path: str, scale_factor: float) -> List[int]:
- """Imports a STEP file
+
+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:
- file_path: file_path
- scale_factor: scale_factor
+ file_path: The input file path.
+ scale_factor: The file scale factor.
+ hide_message: Hide message.
Returns:
- imported element ID list
+ The imported list of element id.
"""
-def import_step_file_with_message_option(file_path: str, scale_factor: float, hide_message: bool) -> List[int]:
- """Imports a STEP file
- Parameters:
- file_path: file_path
- scale_factor: scale_factor
- hide_message: hide_message
+def export_webgl(element_id_list: list[ElementId], file_path: str) -> bool:
+ """Exports a WebGL file.
- Returns:
- imported element ID list
- """
+ Parameters:
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
-def export_webgl(element_id_list: List[int], file_path: str) -> bool:
- """Exports a WebGL file
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
- Parameters:
- element_id_list: element_id_list
- file_path: file_path
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.html"
+ >>> success = fc.export_webgl(selected_elements, output_path)
+ >>> if success:
+ >>> print("WebGL export completed successfully")
Returns:
- did operation succeed
+ True on successful export, false otherwise.
"""
-def export_3d_file(element_id_list: List[int], file_path: str) -> bool:
- """Exports a 3D file
+
+def export_3d_file(element_id_list: list[ElementId], file_path: str) -> bool:
+ """Exports a 3D file.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.3d"
+ >>> success = fc.export_3d_file(selected_elements, output_path)
+ >>> if success:
+ >>> print("3D file export completed successfully")
Returns:
- did operation succeed
+ True on successful export, false otherwise.
"""
-def import_sat_file(file_path: str, scale_factor: float, binary: bool) -> List[int]:
- """Imports an SAT file
+
+def import_sat_file(file_path: str, scale_factor: float, binary: bool) -> list[ElementId]:
+ """Imports an SAT file.
Parameters:
- file_path: file_path
- scale_factor: scale_factor
- binary: binary
+ file_path: The input file path.
+ scale_factor: The scale factor.
+ binary: Is the import file binary.
Returns:
- imported element ID list
+ The imported list of element id.
"""
-def import_3dc_file(file_path: str) -> List[int]:
- """Imports a 3DC file
+
+def import_3dc_file(file_path: str) -> list[ElementId]:
+ """Imports a 3DC file.
Parameters:
- file_path: file_path
+ file_path: The input file path.
Returns:
- imported element ID list
+ The imported list of element id.
"""
-def import_rhino_file(file_path: str, without_dialog: bool) -> List[int]:
- """Imports a Rhino file
+
+def import_rhino_file(file_path: str, without_dialog: bool) -> list[ElementId]:
+ """Imports a Rhino file.
Parameters:
- file_path: file_path
- without_dialog: without_dialog
+ file_path: The input file path.
+ without_dialog: Import without dialog?
Returns:
- imported element ID list
+ The imported list of element id.
"""
-def export_step_file(element_list: List[int], file_path: str, scale_factor: float, version: int, text_mode: bool) -> None:
- """Exports a STEP file
+
+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.
Parameters:
- element_list: element_list
- file_path: file_path
- scale_factor: scale_factor
- version: version
- text_mode: text_mode
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ scale_factor: The file scale factor.
+ version: The file export version :
+ - 214 = STEP AP214
+ - 203 = STEP AP203 (default value)
+ text_mode: Use text mode. PARAMETER UNUSED
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.stp"
+ >>> scale_factor = 1_000.0
+ >>> version = 214 # STEP version
+ >>> text_mode = False
+ >>> fc.export_step_file(selected_elements, output_path, scale_factor, version, text_mode)
"""
+
def import_3dz_file(file_path: str) -> None:
- """Imports a 3DZ file
+ """Imports a 3DZ file.
Parameters:
- file_path: file_path
-
- Returns:
- None
+ file_path: The input file path.
"""
-def export_obj_file(elements: List[int], file_path: str) -> None:
- """Exports a OBJ file
+
+def export_obj_file(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports a OBJ file.
Parameters:
- elements: elements
- file_path: file_path
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.obj"
+ >>> fc.export_obj_file(selected_elements, output_path)
"""
-def import_sat_file_silently(file_path: str, scale_factor: float, binary: bool) -> List[int]:
- """Imports a SAT File without messages
+
+def import_sat_file_silently(file_path: str, scale_factor: float, binary: bool) -> list[ElementId]:
+ """Imports a SAT File without messages.
Parameters:
- file_path: file_path
- scale_factor: scale_factor
- binary: binary
+ file_path: The input file path.
+ scale_factor: The scale factor.
+ binary: Is the import file binary.
Returns:
- List[int]
+ The imported list of element id.
"""
-def export_fbx_file(elements: List[int], file_path: str, fbx_format: int) -> None:
- """Exports a FBX file
- Parameters:
- elements: elements
- file_path: file_path
- fbx_format: fbx_format
+def export_fbx_file(element_id_list: list[ElementId], file_path: str, fbx_format: int) -> None:
+ """Exports a FBX file.
- Returns:
- None
+ Parameters:
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ fbx_format: The FBX format.
+
+ Available values :
+
+
+ - 1 = "FBX binary(*.fbx)";
+ - 2 = "FBX ascii(*.fbx)";
+ - 3 = "FBX encrypted(*.fbx)";
+ - 4 = "FBX 6.0 binary(*.fbx)";
+ - 5 = "FBX 6.0 ascii(*.fbx)";
+ - 6 = "FBX 6.0 encrypted(*.fbx)";
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.fbx"
+ >>> fbx_format = 1 # FBX binary format
+ >>> fc.export_fbx_file(selected_elements, output_path, fbx_format)
+
+ >>> # Export as ASCII format
+ >>> fbx_format = 2 # FBX ascii format
+ >>> fc.export_fbx_file(selected_elements, output_path, fbx_format)
"""
-def clear_errors() -> None:
- """clear errors
- Returns:
- None
+def clear_errors() -> None:
+ """Clears all errors.
"""
-def import_3dc_file_with_glide(file_path: str) -> List[int]:
- """Imports a 3DC file with glide
+
+def import_3dc_file_with_glide(file_path: str) -> list[ElementId]:
+ """Imports a 3DC file with glide.
Parameters:
- file_path: file_path
+ file_path: The input file path.
Returns:
- imported element ID list
+ The imported list of element id.
"""
+
def import_btl_file(file_path: str) -> None:
- """Imports a BTL file
+ """Imports a BTL file.
Parameters:
- file_path: file_path
-
- Returns:
- None
+ file_path: The input file path.
"""
-def export_3dc_file(element_id_list: List[int], file_path: str) -> None:
- """Exports a 3D file
+
+def export_3dc_file(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports a 3D file.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.3dc"
+ >>> fc.export_3dc_file(selected_elements, output_path)
"""
+
def import_btl_file_for_nesting(file_path: str) -> None:
- """Imports a BTL file for nesting
+ """Imports a BTL file for nesting.
Parameters:
- file_path: file_path
-
- Returns:
- None
+ file_path: The input file path.
"""
+
def export_btl_file_for_nesting(file_path: str) -> None:
- """Exports a BTL file for nesting
+ """Exports a BTL file for nesting.
Parameters:
- file_path: file_path
+ file_path: The output file path.
- Returns:
- None
+ Examples:
+ >>> import file_controller as fc
+
+ >>> output_path = r"C:/exports/nesting_project.btl"
+ >>> fc.export_btl_file_for_nesting(output_path)
"""
-def export_rhino_file(element_id_list: List[int], file_path: str, version: int, use_default_assignment: bool, write_standard_attributes: bool) -> None:
- """Exports a 3dm rhino file
+
+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.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
- version: version
- use_default_assignment: use_default_assignment
- write_standard_attributes: write_standard_attributes
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ version: The rhino version :
- Returns:
- None
+
+ - 5 = V5.0,
+ - 6 = V6.0,
+ - 7 = V7.0,
+ - 8 = V8.0
+ use_default_assignment: True if default assignment is used. False if no attributes are exported.
+ write_standard_attributes: True if exported with standard attribute, false otherwise.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.3dm"
+ >>> version = 8 # Rhino version
+ >>> use_default_assignment = True
+ >>> write_standard_attributes = False
+ >>> fc.export_rhino_file(selected_elements, output_path, version, use_default_assignment, write_standard_attributes)
"""
-def import_bxf_file(file_path: str, insert_position: point_3d) -> List[int]:
- """import bxf file
+
+def import_bxf_file(file_path: str, insert_position: point_3d) -> list[ElementId]:
+ """Imports a BXF file.
Parameters:
- file_path: file_path
- insert_position: insert_position
+ file_path: The import file path.
+ insert_position: The position where the imported elements will be inserted.
Returns:
- List[int]
+ The list of IDs of the imported elements.
"""
+
def get_blum_export_path() -> str:
- """get blum export path
+ """Gets the path of the Blum export.
Returns:
- str
+ The path of the Blum export.
"""
+
def set_blum_export_path(path: str) -> None:
- """set blum export path
+ """Sets the path of the Blum export.
Parameters:
- path: path
-
- Returns:
- None
+ path: The new path for the Blum export.
"""
-def export_sat_file(elements: List[int], file_path: str, scale_factor: float, binary: bool, version: int) -> None:
- """exports a SAT File
+
+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:
- elements: elements
- file_path: file_path
- scale_factor: scale_factor
- binary: binary
- version: version
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ scale_factor: The file scale factor.
+ binary: Whether to write the SAT file in binary or a human readable format.
+ version: The ACIS version to use :
- Returns:
- None
+
+ - 3400 = v34.0
+ - 3200 = v32.0
+ - 2100 = v21.0
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.sat"
+ >>> scale_factor = 1.0
+ >>> binary_format = True
+ >>> version = 25000 # SAT version
+ >>> fc.export_sat_file(selected_elements, output_path, scale_factor, binary_format, version)
"""
-def export_glb_file(elements: List[int], file_path: str) -> None:
- """exports a GLB File
+
+def export_glb_file(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports a GLB File.
Parameters:
- elements: elements
- file_path: file_path
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
- Returns:
- None
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.glb"
+ >>> fc.export_glb_file(selected_elements, output_path)
"""
-def import_variant_file(file_path: str, insert_position: point_3d) -> List[int]:
- """imports a variant by .val-File
+
+def import_variant_file(file_path: str, insert_position: point_3d) -> list[ElementId]:
+ """Imports a variant (.val-File).
Parameters:
- file_path: file_path
- insert_position: insert_position
+ file_path: The import file path.
+ insert_position: The position where the imported variant elements will be inserted.
Returns:
- imported element ID list
+ The imported list of element id.
"""
-def import_element_light(a0: str, a1: point_3d) -> int:
- """import element light
+
+def import_element_light(file_path: str, insert_position: point_3d) -> int:
+ """Imports a light element from a file.
Parameters:
- a0: a0
- a1: a1
+ file_path: The import file path.
+ insert_position: The position where the imported light element will be inserted.
Returns:
- int
+ The ID of the imported light element.
"""
-def export_rhino_file_with_options(element_id_list: List[int], 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
+
+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.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
- version: version
- use_default_assignment: use_default_assignment
- write_standard_attributes: write_standard_attributes
- rhino_options: rhino_options
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ version: The rhino version :
- Returns:
- None
+
+ - 5 = V5.0,
+ - 6 = V6.0,
+ - 7 = V7.0,
+ - 8 = V8.0
+ use_default_assignment: True if default assignment is used. False if no attributes are exported.
+ write_standard_attributes: True if exported with standard attribute, false otherwise.
+ rhino_options: The Rhino export option.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model.3dm"
+ >>> version = 8 # Rhino version
+ >>> use_default_assignment = True
+ >>> write_standard_attributes = False
+ >>> rhino_options = None # Use default options
+ >>> fc.export_rhino_file_with_options(selected_elements, output_path, version, use_default_assignment, write_standard_attributes, rhino_options)
"""
-def import_3dc_file_with_options(file_path: str, import3dc_options: None) -> List[int]:
- """imports a 3d or a 3dc file depending on the import options
+
+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:
- file_path: file_path
- import3dc_options: import3dc_options
+ file_path: The input file path.
+ import_3dc_options: The 3dc import options.
Returns:
- imported element ID list
+ The imported list of element id.
"""
+
def get_import_3dc_options() -> import_3dc_options:
- """get import 3dc options
+ """Get the 3dc import options.
Returns:
- import_3dc_options
+ The 3dc import options.
"""
+
def load_webgl_preset_file(file_path: str) -> None:
- """loads a preset file for the WebGl export
+ """Loads a preset file for the WebGl export.
+
+ Parameters:
+ file_path: The preset file path.
+ """
+
+
+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.
Parameters:
- file_path: file_path
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ scale_factor: The file scale factor.
+ version: The file export version :
+ - 214 = STEP AP214
+ - 203 = STEP AP203 (default value)
+ text_mode: Use text mode. PARAMETER UNUSED
+ imperial_units: Use imperial units.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model_with_drillings.step"
+ >>> scale_factor = 1.0
+ >>> version = 214 # STEP version
+ >>> text_mode = False
+ >>> imperial_units = False
+ >>> fc.export_step_file_extrude_drillings(selected_elements, output_path, scale_factor, version, text_mode, imperial_units)
+ """
+
+
+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.
+
+ Parameters:
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ scale_factor: The file scale factor.
+ version: The file export version :
+ - 214 = STEP AP214
+ - 203 = STEP AP203 (default value)
+ text_mode: Use text mode. PARAMETER UNUSED
+ imperial_units: Use imperial units.
+
+ Examples:
+ >>> import element_controller as ec
+ >>> import file_controller as fc
+
+ >>> selected_elements = ec.get_all_identifiable_element_ids()
+ >>> output_path = r"C:/exports/model_cut_drillings.step"
+ >>> scale_factor = 1.0
+ >>> version = 214 # STEP version
+ >>> text_mode = False
+ >>> imperial_units = False
+ >>> fc.export_step_file_cut_drillings(selected_elements, output_path, scale_factor, version, text_mode, imperial_units)
+ """
+
+
+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).
+
+ Parameters:
+ element_id_list: The list of element id to export.
+ file_path: The output file path.
+ scale_factor: The file scale factor.
+ binary: Whether to write the SAT file in binary or a human readable format.
+ version: The ACIS version to use :
+
+
+ - 3400 = v34.0
+ - 3200 = v32.0
+ - 2100 = v21.0
+ """
+
+
+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:
+ element_id_list: The list of element id to export.
Returns:
- None
+ The result object with a result code and a share link. If the code is not ok (0), the share link string is empty.
"""
-def export_step_file_extrude_drillings(elements: List[int], file_path: str, scale_factor: float, version: int, text_mode: bool, imperial_units: bool) -> None:
- """Exports a STEP file with extruded drillings
+
+def export_dxf_file(file_path: str, dxf_layer_format_type: dxf_layer_format_type,
+ dxf_export_version: dxf_export_version) -> bool:
+ """Exports visible elements in the scene to a DXF file.
Parameters:
- elements: elements
- file_path: file_path
- scale_factor: scale_factor
- version: version
- text_mode: text_mode
- imperial_units: imperial_units
+ file_path: The output file path.
+ dxf_layer_format_type: The format type of how to organize layers.
+ dxf_export_version: The dxf version to use for the export.
Returns:
- None
+ True on successful export, false otherwise.
"""
+
+def export_dstv_file(file_path: str) -> bool:
+ """Exports active elements in the scene to a DSTV (.stp) file.
+
+ Parameters:
+ file_path: The output file path.
+
+ Returns:
+ True on successful export, false otherwise.
+ """
+
+
+def set_webgl_hierarchy(stage: int, attribute: display_attribute) -> None:
+ """Sets the WebGL hierarchy based on the given stage and attribute.
+
+ Parameters:
+ stage: The hierarchy stage to set.
+ attribute: The display attribute to use for the hierarchy.
+ """
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 516f4de..e81d50d 100644
--- a/src/geometry_controller/__init__.pyi
+++ b/src/geometry_controller/__init__.pyi
@@ -1,1022 +1,913 @@
-from typing import List
-from cadwork import facet_list
-from cadwork import point_3d
+from cadwork.api_types import ElementId, UnsignedInt
+from cadwork.facet_list import facet_list
+from cadwork.point_3d import point_3d
-def get_last_error(error_code: int) -> str:
- """Gets the last error
- Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
-
-def rotate_height_axis_90(element_id_list: List[int]) -> None:
- """Rotates the element height axis 90 degrees
+def rotate_height_axis_90(element_id_list: list[ElementId]) -> None:
+ """Rotates the element height axis 90 degrees.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def rotate_height_axis_180(element_id_list: List[int]) -> None:
- """Rotates the element height axis 180 degrees
+def rotate_height_axis_180(element_id_list: list[ElementId]) -> None:
+ """Rotates the element height axis 180 degrees.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_over_width(element_id_list: List[int], value: float) -> None:
- """Sets the element overwidth
+def set_over_width(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element overwidth.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element overwidth.
"""
-def set_over_height(element_id_list: List[int], value: float) -> None:
- """Sets the element overheight
+def set_over_height(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element overheight.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element overheight.
"""
-def set_over_length(element_id_list: List[int], value: float) -> None:
- """Sets the element overlength
+def set_over_length(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element overlength.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element overlength.
"""
-def set_rounding_width(element_id_list: List[int], value: float) -> None:
- """Sets the element rounding width
+def set_rounding_width(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element rounding width.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element rounding width.
"""
-def set_rounding_height(element_id_list: List[int], value: float) -> None:
- """Sets the element rounding height
+def set_rounding_height(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element rounding height.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element rounding height.
"""
-def set_rounding_length(element_id_list: List[int], value: float) -> None:
- """Sets the element rounding length
+def set_rounding_length(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element rounding length.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element rounding length.
"""
-def set_cross_correction_negative_width(element_id_list: List[int], value: float) -> None:
- """Sets the element negative width cross correction
+def set_cross_correction_negative_width(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element negative width cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element negative width cross correction.
"""
-def set_cross_correction_positive_width(element_id_list: List[int], value: float) -> None:
- """Sets the element positive width cross correction
+def set_cross_correction_positive_width(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element positive width cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element positive width cross correction.
"""
-def set_cross_correction_negative_height(element_id_list: List[int], value: float) -> None:
- """Sets the element negative height cross correction
+def set_cross_correction_negative_height(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element negative height cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element negative height cross correction.
"""
-def set_cross_correction_positive_height(element_id_list: List[int], value: float) -> None:
- """Sets the element positive height cross correction
+def set_cross_correction_positive_height(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element positive height cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element positive height cross correction.
"""
-def set_cross_correction_negative_length(element_id_list: List[int], value: float) -> None:
- """Sets the element negative length cross correction
+def set_cross_correction_negative_length(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element negative length cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element negative length cross correction.
"""
-def set_cross_correction_positive_length(element_id_list: List[int], value: float) -> None:
- """Sets the element positive length cross correction
+def set_cross_correction_positive_length(element_id_list: list[ElementId], value: float) -> None:
+ """Sets the element positive length cross correction.
Parameters:
- element_id_list: element_id_list
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The element positive length cross correction.
"""
-def apply_global_scale(element_id_list: List[int], scale: float, origin: point_3d) -> None:
- """Applies a global scale to element
+def apply_global_scale(element_id_list: list[ElementId], scale: float, origin: point_3d) -> None:
+ """Applies a global scale to element.
Parameters:
- element_id_list: element_id_list
- scale: scale
- origin: origin
-
- Returns:
- None
+ element_id_list: The element id list.
+ scale: The global scale.
+ origin: The scaling origin.
"""
-def auto_regenerate_axes(element_id_list: List[int]) -> None:
- """Automatically regenerates axes on element
+def auto_regenerate_axes(element_id_list: list[ElementId]) -> None:
+ """Automatically regenerates axes on element.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def rotate_length_axis_90(element_id_list: List[int]) -> None:
- """Rotates element length axis 90 degrees
+def rotate_length_axis_90(element_id_list: list[ElementId]) -> None:
+ """Rotates element length axis 90 degrees.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def rotate_length_axis_180(element_id_list: List[int]) -> None:
- """Rotates element length axis 180 degrees
+def rotate_length_axis_180(element_id_list: list[ElementId]) -> None:
+ """Rotates element length axis 180 degrees.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def invert_model(element_id_list: List[int]) -> None:
- """Inverts element model
+def invert_model(element_id_list: list[ElementId]) -> None:
+ """Inverts element model.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The element id list.
"""
-def set_width_real(elements: List[int], width: float) -> None:
- """Sets the element real width
+def set_width_real(element_id_list: list[ElementId], width: float) -> None:
+ """Sets the element real width.
Parameters:
- elements: elements
- width: width
-
- Returns:
- None
+ element_id_list: The element id list.
+ width: The element real width.
"""
-def set_height_real(elements: List[int], height: float) -> None:
- """Sets the element real height
+def set_height_real(element_id_list: list[ElementId], height: float) -> None:
+ """Sets the element real height.
Parameters:
- elements: elements
- height: height
-
- Returns:
- None
+ element_id_list: The element id list.
+ height: The element real height.
"""
-def set_length_real(elements: List[int], length: float) -> None:
- """Gets the element real length
+def set_length_real(element_id_list: list[ElementId], length: float) -> None:
+ """Sets the element real length.
Parameters:
- elements: elements
- length: length
-
- Returns:
- None
+ element_id_list: The element id list.
+ length: The element real length.
"""
-def rotate_height_axis_2_points(elements: List[int], point1: point_3d, point2: point_3d) -> None:
- """Rotates the element height axis via 2 points
+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:
- elements: elements
- point1: point1
- point2: point2
-
- Returns:
- None
+ element_id_list: The element id list.
+ point1: The first point.
+ point2: The second point.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
-def set_drilling_tolerance(elements: List[int], tolerance: float) -> None:
- """Gets the division zone points
+def set_drilling_tolerance(element_id_list: list[ElementId], tolerance: float) -> None:
+ """Sets the drilling tolerance of the axis.
Parameters:
- elements: elements
- tolerance: tolerance
-
- Returns:
- None
+ element_id_list: The element id list.
+ tolerance: The new drilling tolerance.
"""
-def auto_regenerate_axes_silently(a0: List[int]) -> None:
- """auto regenerate axes silently
+def auto_regenerate_axes_silently(element_id_list: list[ElementId]) -> None:
+ """Automatically regenerates axes on elements without any user interaction.
Parameters:
- a0: a0
-
- Returns:
- None
+ element_id_list: The list of element IDs for which the axes will be regenerated.
"""
-def rotate_length_axis_2_points(elements: List[int], point1: point_3d, point2: point_3d) -> None:
- """Rotates the element length axis via 2 points
+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:
- elements: elements
- point1: point1
- point2: point2
-
- Returns:
- None
+ element_id_list: The element id list.
+ point1: The first point.
+ point2: The second point.
"""
-def get_width(element_id: int) -> float:
- """Gets the element width
+def get_width(element_id: ElementId) -> float:
+ """Gets the element width.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element width
+ The element width.
"""
-def get_height(element_id: int) -> float:
- """Gets the element height
+def get_height(element_id: ElementId) -> float:
+ """Gets the element height.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element height
+ The element height.
"""
-def get_length(element_id: int) -> float:
- """Gets the element length
+def get_length(element_id: ElementId) -> float:
+ """Gets the element length.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element length
+ The element length.
"""
-def get_p1(element_id: int) -> point_3d:
- """Gets the element P1
+def get_p1(element_id: ElementId) -> point_3d:
+ """Gets the element P1.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element P1
+ The element P1.
"""
-def get_p2(element_id: int) -> point_3d:
- """Gets the element P2
+def get_p2(element_id: ElementId) -> point_3d:
+ """Gets the element P2.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element P2
+ The element P2.
"""
-def get_p3(element_id: int) -> point_3d:
- """Gets the element P3
+def get_p3(element_id: ElementId) -> point_3d:
+ """Gets the element P3.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element P3
+ The element P3.
"""
-def get_start_height_cut_angle(element_id: int) -> float:
- """Gets the element start height cut angle
+def get_start_height_cut_angle(element_id: ElementId) -> float:
+ """Gets the element start height cut angle.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element start height cut angle
+ The element start height cut angle.
"""
-def get_start_width_cut_angle(element_id: int) -> float:
- """Gets the element start width cut angle
+def get_start_width_cut_angle(element_id: ElementId) -> float:
+ """Gets the element start width cut angle.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element start width cut angle
+ The element start width cut angle.
"""
-def get_end_height_cut_angle(element_id: int) -> float:
- """Gets the element end height cut angle
+def get_end_height_cut_angle(element_id: ElementId) -> float:
+ """Gets the element end height cut angle.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element end height cut angle
+ The element end height cut angle.
"""
-def get_end_width_cut_angle(element_id: int) -> float:
- """Gets the element end width cut angle
+def get_end_width_cut_angle(element_id: ElementId) -> float:
+ """Gets the element end width cut angle.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element end width cut angle
+ The element end width cut angle.
"""
-def get_over_width(element_id: int) -> float:
- """Gets the element overwidth
+def get_over_width(element_id: ElementId) -> float:
+ """Gets the element overwidth.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element overwidth
+ The element overwidth.
"""
-def get_over_height(element_id: int) -> float:
- """Gets the element overheight
+def get_over_height(element_id: ElementId) -> float:
+ """Gets the element overheight.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element overheight
+ The element overheight.
"""
-def get_over_length(element_id: int) -> float:
- """Gets the element overlength
+def get_over_length(element_id: ElementId) -> float:
+ """Gets the element overlength.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element overlength
+ The element overlength.
"""
-def get_rounding_width(element_id: int) -> float:
- """Gets the element rounding width
+def get_rounding_width(element_id: ElementId) -> float:
+ """Gets the element rounding width.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element rounding width
+ The element rounding width.
"""
-def get_rounding_height(element_id: int) -> float:
- """Gets the element rounding height
+def get_rounding_height(element_id: ElementId) -> float:
+ """Gets the element rounding height.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element rounding height
+ The element rounding height.
"""
-def get_rounding_length(element_id: int) -> float:
- """Gets the element rounding length
+def get_rounding_length(element_id: ElementId) -> float:
+ """Gets the element rounding length.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element rounding length
+ The element rounding length.
"""
-def get_cross_correction_negative_width(element_id: int) -> float:
- """Gets the element negative width cross correction
+def get_cross_correction_negative_width(element_id: ElementId) -> float:
+ """Gets the element negative width cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element negative width cross correction
+ The element negative width cross correction.
"""
-def get_cross_correction_positive_width(element_id: int) -> float:
- """Gets the element positive width cross correction
+def get_cross_correction_positive_width(element_id: ElementId) -> float:
+ """Gets the element positive width cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element positive width cross correction
+ The element positive width cross correction.
"""
-def get_cross_correction_negative_height(element_id: int) -> float:
- """Gets the element negative height cross correction
+def get_cross_correction_negative_height(element_id: ElementId) -> float:
+ """Gets the element negative height cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element negative height cross correction
+ The element negative height cross correction.
"""
-def get_cross_correction_positive_height(element_id: int) -> float:
- """Gets the element positive height cross correction
+def get_cross_correction_positive_height(element_id: ElementId) -> float:
+ """Gets the element positive height cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element positive height cross correction
+ The element positive height cross correction.
"""
-def get_cross_correction_negative_length(element_id: int) -> float:
- """Gets the element negative length cross correction
+def get_cross_correction_negative_length(element_id: ElementId) -> float:
+ """Gets the element negative length cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element negative length cross correction
+ The element negative length cross correction.
"""
-def get_cross_correction_positive_length(element_id: int) -> float:
- """Gets the element positive length cross correction
+def get_cross_correction_positive_length(element_id: ElementId) -> float:
+ """Gets the element positive length cross correction.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element positive length cross correction
+ The element positive length cross correction.
"""
-def get_weight(element_id: int) -> float:
- """Gets the element real weight
+def get_weight(element_id: ElementId) -> float:
+ """Gets the element real weight.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element real weight
+ The element real weight.
"""
-def get_list_weight(element_id: int) -> float:
- """Gets the element list weight
+def get_list_weight(element_id: ElementId) -> float:
+ """Gets the element list weight.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element list weight
+ The element list weight.
"""
-def get_volume(element_id: int) -> float:
- """Gets the element rough volume (does not include negative geometry operations, such as end-types, drillings, connectors, openings, and MEP elements)
+def get_volume(element_id: ElementId) -> float:
+ """Gets the element rough volume (does not include negative geometry operations, such as end-types, drillings, connectors, openings, and MEP elements).
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element rough volume
+ The element rough volume.
"""
-def get_list_volume(element_id: int) -> float:
- """Gets the element list volume
+def get_list_volume(element_id: ElementId) -> float:
+ """Gets the element list volume.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element list volume
+ The element list volume.
"""
-def get_xl(element_id: int) -> point_3d:
- """Gets the element XL vector
+def get_xl(element_id: ElementId) -> point_3d:
+ """Gets the element length axis direction (direction from P1 to P2).
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element XL vector
+ The element XL vector.
"""
-def get_yl(element_id: int) -> point_3d:
- """Gets the element YL vector
+def get_yl(element_id: ElementId) -> point_3d:
+ """Gets the element width axis direction (ZL cross XL).
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element YL vector
+ The element YL vector.
"""
-def get_zl(element_id: int) -> point_3d:
- """Gets the element ZL vector
+def get_zl(element_id: ElementId) -> point_3d:
+ """Gets the element height/thickness axis direction (direction from P1 to P3).
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element ZL vector
+ The element ZL vector.
"""
-def get_center_of_gravity(element_id: int) -> point_3d:
- """Gets the element center of gravity
+def get_center_of_gravity(element_id: ElementId) -> point_3d:
+ """Gets the element center of gravity.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element center of gravity
+ The element center of gravity position.
"""
-def get_reference_side(element_id: int) -> int:
- """Gets the element reference side
+def get_reference_side(element_id: ElementId) -> int:
+ """Gets the element reference side.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element reference side
+ The element reference side.
"""
-def get_element_vertices(element_id: int) -> List[point_3d]:
- """Gets the element vertices
+def get_element_vertices(element_id: ElementId) -> list[point_3d]:
+ """Gets the element vertices.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element vertices
+ The element vertice list.
"""
-def get_element_facets(element_id: int) -> facet_list:
- """Gets the element facets
+def get_element_facets(element_id: ElementId) -> facet_list:
+ """Gets the element facet list.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element facets
+ The element facet list.
"""
-def get_list_width(element_id: int) -> float:
- """Get the element list width
+def get_list_width(element_id: ElementId) -> float:
+ """Gets the element list width.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element list width
+ The element list width.
"""
-def get_list_height(element_id: int) -> float:
- """Gets the element list height
+def get_list_height(element_id: ElementId) -> float:
+ """Gets the element list height.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element list height
+ The element list height.
"""
-def get_list_length(element_id: int) -> float:
- """Gets the element list length
+def get_list_length(element_id: ElementId) -> float:
+ """Gets the element list length.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- element list length
+ The element list length.
"""
-def get_minimum_distance_between_elements(first_id: int, second_id: int) -> float:
- """Gets the minimum distance between 2 elements
+def get_minimum_distance_between_elements(first_id: ElementId, second_id: ElementId) -> float:
+ """Gets the minimum distance between 2 elements.
Parameters:
- first_id: first_id
- second_id: second_id
+ first_id: The first element id.
+ second_id: The second element id.
Returns:
- minimum distance
+ The minimum distance.
"""
-def get_total_area_of_all_faces(element: int) -> float:
- """Gets the total area of all faces for element
+def get_total_area_of_all_faces(element_id: ElementId) -> float:
+ """Gets the total area of all faces for element.
Parameters:
- element: element
+ element_id: The element Id.
Returns:
- element total faces area
+ The element total faces area.
"""
-def get_area_of_front_face(element: int) -> float:
- """Gets the front face are for element
+def get_area_of_front_face(element_id: ElementId) -> float:
+ """Gets the front face area for element.
Parameters:
- element: element
+ element_id: The element Id.
Returns:
- element front face area
+ The element front face area.
"""
-def get_door_surface(elements: List[int]) -> float:
- """Gets the element door surface
+def get_door_surface(element_id_list: list[ElementId]) -> float:
+ """Gets the element door surface.
Parameters:
- elements: elements
+ element_id_list: The element id list.
Returns:
- element door surface
+ The element door surface.
"""
-def get_window_surface(elements: List[int]) -> float:
- """Gets the element window surface
+def get_window_surface(element_id_list: list[ElementId]) -> float:
+ """Gets the element window surface.
Parameters:
- elements: elements
+ element_id_list: The element id list.
Returns:
- element window surface
+ The element window surface.
"""
def get_local_x() -> point_3d:
- """Gets the local X vector
+ """Gets the rotated global coordinate direction (X').
Returns:
- local X vector
+ The local X vector.
"""
def get_local_z() -> point_3d:
- """Gets the local Y vector
+ """Gets the rotated global coordinate direction (Z').
Returns:
- local Y vector
+ The local Y vector.
"""
def get_local_y() -> point_3d:
- """Gets the local Z vector
+ """Gets the rotated global coordinate direction (Y').
Returns:
- local Z vector
+ The local Z vector.
"""
-def get_drilling_tolerance(element: int) -> float:
- """Gets the drilling tolerance of an axis
+def get_drilling_tolerance(element_id: ElementId) -> float:
+ """Gets the drilling tolerance of an axis.
Parameters:
- element: element
+ element_id: The element Id.
Returns:
- the drilling tolerance
+ The drilling tolerance.
"""
-def get_element_reference_face_vertices(element_id: int) -> List[point_3d]:
- """Gets the vertices of the reference side
+def get_element_reference_face_vertices(element_id: ElementId) -> list[point_3d]:
+ """Gets the vertices of the reference side.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- vertexlist of all points
+ The vertexlist of all points.
"""
-def get_element_reference_face_area(element_id: int) -> float:
- """Gets the area of the reference side
+def get_element_reference_face_area(element_id: ElementId) -> float:
+ """Gets the area of the reference side.
Parameters:
- element_id: element_id
+ element_id: The element Id.
Returns:
- area(size) of reference face
+ The area(size) of reference face.
"""
-def get_center_of_gravity_for_list(elements: List[int]) -> point_3d:
- """get center of gravity for list
+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:
- elements: elements
+ element_id_list: The list of element IDs.
Returns:
- point_3d
+ The center of gravity as a vector3D.
"""
-def get_center_of_gravity_for_list_considering_materials(elements: List[int]) -> point_3d:
- """get center of gravity for list considering materials
+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:
- elements: elements
+ element_id_list: The list of element IDs.
Returns:
- point_3d
+ The center of gravity as a vector3D.
"""
-def get_element_facet_count(element_id: int) -> int:
- """get element facet count
+def get_element_facet_count(element_id: ElementId) -> UnsignedInt:
+ """Gets the count of facets for a specific element.
Parameters:
- element_id: element_id
+ element_id: The ID of the element.
Returns:
- int
+ The count of facets.
"""
-def get_weight_real(element_id: int) -> float:
- """get weight real
+def get_weight_real(element_id: ElementId) -> float:
+ """Gets the real weight of the element.
Parameters:
- element_id: element_id
+ element_id: The ID of the element.
Returns:
- float
+ The real weight of the element.
"""
-def get_actual_physical_weight(a0: int) -> float:
- """get actual physical weight
+def get_actual_physical_weight(element_id: ElementId) -> float:
+ """Gets the actual physical weight.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- float
+ The actual physical weight.
"""
-def get_actual_physical_volume(element_id: int) -> float:
- """Gets actual physical volume (includes negative geometry operations, such as end-types, drillings, connectors, openings, and MEP elements) (it might also take into account different drilling bodies and counterbores in a connector)
+def get_actual_physical_volume(element_id: ElementId) -> float:
+ """Gets actual physical volume (includes negative geometry operations, such as end-types, drillings, connectors, openings, and MEP elements; it might also take into account different drilling bodies and counterbores in a connector).
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- actual physical volume
+ The actual physical volume.
"""
-def are_facets_coplanar(first_facet: List[point_3d], second_facet: List[point_3d]) -> bool:
- """Tests if facets are coplanar
+def are_facets_coplanar(first_facet: list[point_3d], second_facet: list[point_3d]) -> bool:
+ """Tests if facets are coplanar.
Parameters:
- first_facet: first_facet
- second_facet: second_facet
+ first_facet: The first facet.
+ second_facet: The second facet.
Returns:
- facet coplanarity
+ True if facets are coplanar, false otherwise.
"""
-def get_round_machine_rough_part_negative_width(element_id: int) -> bool:
- """get round machine rough part negative width
+def get_round_machine_rough_part_negative_width(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartNegativeWidth.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartNegativeWidth value.
"""
-def set_round_machine_rough_part_negative_width(elements: List[int], value: bool) -> None:
- """set round machine rough part negative width
+def set_round_machine_rough_part_negative_width(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartNegativeWidth.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartNegativeWidth value.
"""
-def get_round_machine_rough_part_positive_width(element_id: int) -> bool:
- """get round machine rough part positive width
+def get_round_machine_rough_part_positive_width(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartPositiveWidth.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartPositiveWidth value.
"""
-def set_round_machine_rough_part_positive_width(elements: List[int], value: bool) -> None:
- """set round machine rough part positive width
+def set_round_machine_rough_part_positive_width(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartPositiveWidth.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartPositiveWidth value.
"""
-def get_round_machine_rough_part_negative_height(element_id: int) -> bool:
- """get round machine rough part negative height
+def get_round_machine_rough_part_negative_height(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartNegativeHeight.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartNegativeHeight value.
"""
-def set_round_machine_rough_part_negative_height(elements: List[int], value: bool) -> None:
- """set round machine rough part negative height
+def set_round_machine_rough_part_negative_height(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartNegativeHeight.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartNegativeHeight value.
"""
-def get_round_machine_rough_part_positive_height(element_id: int) -> bool:
- """get round machine rough part positive height
+def get_round_machine_rough_part_positive_height(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartPositiveHeight.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartPositiveHeight value.
"""
-def set_round_machine_rough_part_positive_height(elements: List[int], value: bool) -> None:
- """set round machine rough part positive height
+def set_round_machine_rough_part_positive_height(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartPositiveHeight.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartPositiveHeight options.
"""
-def get_round_machine_rough_part_negative_length(element_id: int) -> bool:
- """get round machine rough part negative length
+def get_round_machine_rough_part_negative_length(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartNegativeLength.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartNegativeLength value.
"""
-def set_round_machine_rough_part_negative_length(elements: List[int], value: bool) -> None:
- """set round machine rough part negative length
+def set_round_machine_rough_part_negative_length(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartNegativeLength.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartNegativeLength value.
"""
-def get_round_machine_rough_part_positive_length(element_id: int) -> bool:
- """get round machine rough part positive length
+def get_round_machine_rough_part_positive_length(element_id: ElementId) -> bool:
+ """Gets the value of option RoundMachineRoughPartPositiveLength.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ The option RoundMachineRoughPartPositiveLength value.
"""
-def set_round_machine_rough_part_positive_length(elements: List[int], value: bool) -> None:
- """set round machine rough part positive length
+def set_round_machine_rough_part_positive_length(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets the value of option RoundMachineRoughPartPositiveLength.
Parameters:
- elements: elements
- value: value
-
- Returns:
- None
+ element_id_list: The element id list.
+ value: The new option RoundMachineRoughPartPositiveLength value.
"""
def get_standard_element_width_from_guid(standard_element_guid: str) -> float:
- """get standard element width from guid
+ """Gets the standard element width from guid.
Parameters:
- standard_element_guid: standard_element_guid
+ standard_element_guid: The standard element guid.
Returns:
- float
+ The standard element width.
"""
def get_standard_element_height_from_guid(standard_element_guid: str) -> float:
- """get standard element height from guid
+ """Gets the standard element height from guid.
Parameters:
- standard_element_guid: standard_element_guid
+ standard_element_guid: The standard element guid.
Returns:
- float
+ The standard element height.
"""
def get_standard_element_length_from_guid(standard_element_guid: str) -> float:
- """get standard element length from guid
+ """Gets the standard element length from guid.
Parameters:
- standard_element_guid: standard_element_guid
+ standard_element_guid: The standard element guid.
Returns:
- float
+ The standard element length.
"""
def get_standard_element_width_from_name(standard_element_name: str) -> float:
- """get standard element width from name
+ """Gets the standard element width from name.
Parameters:
- standard_element_name: standard_element_name
+ standard_element_name: The standard element name.
Returns:
- float
+ The standard element width.
"""
def get_standard_element_height_from_name(standard_element_name: str) -> float:
- """get standard element height from name
+ """Gets the standard element height from name.
Parameters:
- standard_element_name: standard_element_name
+ standard_element_name: The standard element name.
Returns:
- float
+ The standard element height.
"""
def get_standard_element_length_from_name(standard_element_name: str) -> float:
- """get standard element length from name
+ """Gets the standard element length from name.
Parameters:
- standard_element_name: standard_element_name
+ standard_element_name: The standard element name.
Returns:
- float
+ The standard element length.
"""
-
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 6ec68f8..3f33c97 100644
--- a/src/list_controller/__init__.pyi
+++ b/src/list_controller/__init__.pyi
@@ -1,168 +1,120 @@
-from typing import List
+from cadwork.api_types import ElementId, UnsignedInt
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+def export_production_list(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports a production list to the given file path.
Parameters:
- error_code: error_code
-
- Returns:
- error string
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
"""
-def export_production_list(element_id_list: List[int], file_path: str) -> None:
- """Exports a production list
+def export_part_list(element_id_list: list[ElementId], file_path: str) -> None:
+ """Exports a part list to the specified file path.
Parameters:
- element_id_list: element_id_list
- file_path: file_path
-
- Returns:
- None
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
"""
-def export_part_list(element_id_list: List[int], file_path: str) -> None:
- """Exports a part list
-
- Parameters:
- element_id_list: element_id_list
- file_path: file_path
+def check_position_numbers_production_list() -> list[ElementId]:
+ """Checks the production list numbers and returns the element IDs that have discrepancies.
Returns:
- None
+ The element IDs with discrepancies.
"""
-def check_position_numbers_production_list() -> List[int]:
- """Checks the production list numbers and returns the element ids with discrepancies
+def check_position_numbers_part_list() -> list[ElementId]:
+ """Checks the part list numbers and returns the element IDs that have discrepancies.
Returns:
- element ids with discrepancies
- """
-
-def check_position_numbers_part_list() -> List[int]:
- """Checks the part list numbers and returns the element ids with discrepancies
-
- Returns:
- element ids with discrepancies
+ The element IDs with discrepancies.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
-def export_production_list_with_settings(element_id_list: List[int], file_path: str, settings_file_path: str) -> None:
- """export production list with settings
+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:
- element_id_list: element_id_list
- file_path: file_path
- settings_file_path: settings_file_path
-
- Returns:
- None
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
+ settings_file_path: The path to the settings file to be used for export.
"""
-def export_part_list_with_settings(element_id_list: List[int], file_path: str, settings_file_path: str) -> None:
- """export part list with settings
+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:
- element_id_list: element_id_list
- file_path: file_path
- settings_file_path: settings_file_path
-
- Returns:
- None
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
+ settings_file_path: The path to the settings file to be used for export.
"""
-def generate_new_production_list_numbers(a0: List[int]) -> None:
- """generate new production list numbers
+def generate_new_production_list_numbers(element_id_list: list[ElementId]) -> None:
+ """Generates new production list numbers for the specified elements.
Parameters:
- a0: a0
-
- Returns:
- None
+ element_id_list: The list of elements to generate numbers for.
"""
-def generate_new_part_list_numbers(a0: List[int]) -> None:
- """generate new part list numbers
+def generate_new_part_list_numbers(element_id_list: list[ElementId]) -> None:
+ """Generates new part list numbers for the specified elements.
Parameters:
- a0: a0
-
- Returns:
- None
+ element_id_list: The list of elements to generate numbers for.
"""
-def load_production_list_calculation_settings(a0: str) -> None:
- """load production list calculation settings
+def load_production_list_calculation_settings(settings_file_path: str) -> None:
+ """Loads the production list calculation settings from a file.
Parameters:
- a0: a0
-
- Returns:
- None
+ settings_file_path: The path to the settings file to be loaded.
"""
-def load_part_list_calculation_settings(a0: str) -> None:
- """load part list calculation settings
+def load_part_list_calculation_settings(settings_file_path: str) -> None:
+ """Loads the part list calculation settings from a file.
Parameters:
- a0: a0
-
- Returns:
- None
+ settings_file_path: The path to the settings file to be loaded.
"""
-def generate_new_production_list_silently(a0: List[int], a1: int, a2: bool, a3: bool) -> None:
- """generate new production list silently
+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.
Parameters:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
-
- Returns:
- None
+ element_id_list: The list of elements to generate numbers for.
+ starting_number: The number from which to start assigning new numbers.
+ keep_existing_numbers: Whether or not to retain already assigned numbers in the list.
+ with_containers: Whether to include container elements in the number generation.
"""
-def generate_new_part_list_silently(a0: List[int], a1: int, a2: bool, a3: bool) -> None:
- """generate new part list silently
+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.
Parameters:
- a0: a0
- a1: a1
- a2: a2
- a3: a3
-
- Returns:
- None
+ element_id_list: The list of elements to generate numbers for.
+ starting_number: The number from which to start assigning new numbers.
+ keep_existing_numbers: Whether or not to retain already assigned numbers in the list.
+ with_containers: Whether to include container elements in the number generation.
"""
-def export_cover_list(element_id_list: List[int], file_path: str) -> None:
- """Exports a Wall/Roof/Floor list
+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:
- element_id_list: element_id_list
- file_path: file_path
-
- Returns:
- None
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
"""
-def export_cover_list_with_settings(element_id_list: List[int], file_path: str, settings_file_path: str) -> None:
- """Exports a Wall/Roof/Floor list with settings file
+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:
- element_id_list: element_id_list
- file_path: file_path
- settings_file_path: settings_file_path
-
- Returns:
- None
+ element_id_list: The list of element IDs to be exported.
+ file_path: The path of the target file for the export.
+ settings_file_path: The path to the settings file to be used for export.
"""
-
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 745ac2f..8ff0020 100644
--- a/src/machine_controller/__init__.pyi
+++ b/src/machine_controller/__init__.pyi
@@ -1,141 +1,309 @@
-from typing import List
+from cadwork import vertex_list
+from cadwork.api_types import ElementId
+from cadwork.btl_version import btl_version
+from cadwork.hundegger_machine_type import hundegger_machine_type
+from cadwork.weinmann_mfb_version import weinmann_mfb_version
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+
+def export_btl(btl_version: btl_version, file_path: str) -> None:
+ """Exports a BTL file.
Parameters:
- error_code: error_code
+ btl_version: The BTL version.
+ file_path: The export file path.
- Returns:
- error string
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> btl_version = cadwork.btl_version.btlx_2_1.value
+ >>> output_path = "C:/exports/timber_project.btlx"
+ >>> mc.export_btl(btl_version, output_path)
"""
-def export_btl(btl_version: int, file_path: str) -> None:
- """Exports a BTL file
+def export_weinmann_mfb(mfb_version: weinmann_mfb_version) -> None:
+ """Exports a Weinmann MFB file.
Parameters:
- btl_version: btl_version
- file_path: file_path
+ mfb_version: The Weinmann MFB version.
- Returns:
- None
+ Examples:
+ >>> import machine_controller as mc
+
+ >>> mfb_version = cadwork.weinmann_mfb_version.wup_3_4.value
+ >>> mc.export_weinmann_mfb(mfb_version)
"""
-def export_weinmann_mfb(mfb_version: int) -> None:
- """Exports a WUP file
+def export_hundegger(hundeggertype: hundegger_machine_type) -> None:
+ """Exports a Hundegger file.
Parameters:
- mfb_version: mfb_version
+ hundeggertype: The Hundegger machine type.
- Returns:
- None
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> mc.export_hundegger(hundegger_type)
"""
-def export_hundegger(hundeggertype: int) -> None:
- """Exports a Hundegger file
+def export_hundegger_with_file_path(hundeggertype: hundegger_machine_type, file_path: str) -> None:
+ """Exports a Hundegger file.
Parameters:
- hundeggertype: hundeggertype
+ hundeggertype: The Hundegger machine type.
+ file_path: The export file path.
- Returns:
- None
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> output_path = "C:/exports/hundegger_project.k2"
+ >>> mc.export_hundegger_with_file_path(hundegger_type, output_path)
"""
-def clear_errors() -> None:
- """clear errors
+def export_hundegger_with_file_path_and_presetting(hundeggertype: hundegger_machine_type, file_path: str, presetting: str) -> None:
+ """Exports a Hundegger file.
- Returns:
- None
+ Parameters:
+ hundeggertype: The Hundegger machine type.
+ file_path: The export file path.
+ presetting: The presetting file path (.xml).
+
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> output_path = r"C:/exports/hundegger_project.k2"
+ >>> presetting_file = r"...3d/Machine/Hundegger/K2/hundegger_settings.xml"
+ >>> mc.export_hundegger_with_file_path_and_presetting(hundegger_type, output_path, presetting_file)
"""
-def export_hundegger_with_file_path(hundeggertype: int, file_path: str) -> None:
- """Exports a Hundegger file
+def export_btl_with_presetting(btl_version: btl_version, file_path: str, presetting: str) -> None:
+ """Exports a BTL file with a presetting file.
Parameters:
- hundeggertype: hundeggertype
- file_path: file_path
+ btl_version: The BTL version.
+ file_path: The export file path.
+ presetting: The presetting file path (.xml).
+
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> btl_version = cadwork.btl_version.btlx_2_1.value
+ >>> output_path = r"C:/exports/timber_project.btlx"
+ >>> presetting_file = r"...3d/Machine/BTL/btl_settings.xml"
+ >>> mc.export_btl_with_presetting(btl_version, output_path, presetting_file)
+ """
- Returns:
- None
+def calculate_btl_machine_data(element_id_list: list[ElementId], btl_version: btl_version) -> None:
+ """Calculates the Machine Data for BTL.
+
+ Parameters:
+ element_id_list: The list of element Id.
+ btl_version: The BTL version.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> beam_elements = ec.get_all_identifiable_element_ids()
+ >>> btl_version = cadwork.btl_version.btlx_2_1.value
+ >>> mc.calculate_btl_machine_data(beam_elements, btl_version)
"""
-def export_hundegger_with_file_path_and_presetting(hundeggertype: int, file_path: str, presetting: str) -> None:
- """Exports a Hundegger file
+def calculate_hundegger_machine_data(element_id_list: list[ElementId], hundeggertype: hundegger_machine_type) -> None:
+ """Calculates the Machine Data for Hundegger.
Parameters:
- hundeggertype: hundeggertype
- file_path: file_path
- presetting: presetting
+ element_id_list: The list of element Id.
+ hundeggertype: The Hundegger machine type.
- Returns:
- None
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> beam_elements = ec.get_all_identifiable_element_ids()
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> mc.calculate_hundegger_machine_data(beam_elements, hundegger_type)
"""
-def export_btl_with_presetting(btl_version: int, file_path: str, presetting: str) -> None:
- """Exports a BTL file with a presetting file
+def load_hundegger_calculation_set(hundeggertype: hundegger_machine_type, file_path: str) -> None:
+ """Loads the Hundegger calculation set.
Parameters:
- btl_version: btl_version
- file_path: file_path
- presetting: presetting
+ hundeggertype: The Hundegger machine type.
+ file_path: The file path of the calculation set.
+ """
- Returns:
- None
+def export_hundegger_with_file_path_silent(hundeggertype: hundegger_machine_type, file_path: str) -> None:
+ """Exports a Hundegger file silently.
+
+ Parameters:
+ hundeggertype: The Hundegger machine type.
+ file_path: The export file path.
+
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> output_path = r"C:/exports/hundegger_project.k2"
+ >>> mc.export_hundegger_with_file_path_silent(hundegger_type, output_path)
"""
-def calculate_btl_machine_data(elements: List[int], btl_version: int) -> None:
- """Calculates the Machine Data for BTL
+def export_hundegger_with_file_path_and_presetting_silent(hundeggertype: hundegger_machine_type, file_path: str, presetting: str) -> None:
+ """Exports a Hundegger file silently.
Parameters:
- elements: elements
- btl_version: btl_version
+ hundeggertype: The Hundegger machine type.
+ file_path: The export file path.
+ presetting: The presetting file path (.xml).
+
+ Examples:
+ >>> import cadwork
+ >>> import machine_controller as mc
+
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> output_path = r"C:/exports/hundegger_project.k2"
+ >>> presetting_file = r"...3d/Machine/Hundegger/K2/hundegger_settings.xml"
+ >>> mc.export_hundegger_with_file_path_and_presetting_silent(hundegger_type, output_path, presetting_file)
+ """
+
+
+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:
+ element_id: The element id.
+ hundeggertype: The Hundegger machine type.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> hundegger_type = cadwork.hundegger_machine_type.k2.value
+ >>> processings = mc.get_element_hundegger_processings(element, hundegger_type)
+ >>> print(f"Found {len(processings)} Hundegger processings")
Returns:
- None
+ A list of element IDs representing the processings.
"""
-def calculate_hundegger_machine_data(elements: List[int], hunderggertype: int) -> None:
- """Calculates the Machine Data for Hundegger
+
+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:
- elements: elements
- hunderggertype: hunderggertype
+ element_id: The element id.
+ btl_version: The BTL version.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> btl_version = cadwork.btl_version.btlx_2_1.value
+ >>> processings = mc.get_element_btl_processings(element, btl_version)
+ >>> print(f"Found {len(processings)} BTL processings")
Returns:
- None
+ A list of element IDs representing the processings.
"""
-def load_hundegger_calculation_set(hundeggertype: int, file_path: str) -> None:
- """load hundegger calculation set
+
+def get_processing_name(reference_element_id: ElementId, processing_id: ElementId) -> str:
+ """Gets the name of a specific processing.
Parameters:
- hundeggertype: hundeggertype
- file_path: file_path
+ reference_element_id: The reference element id.
+ processing_id: The processing id.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> name = mc.get_processing_name(element, processing)
Returns:
- None
+ The name of the processing.
"""
-def export_hundegger_with_file_path_silent(hundeggertype: int, file_path: str) -> None:
- """Exports a Hundegger file silently
+
+def get_processing_code(reference_element_id: ElementId, processing_id: ElementId) -> str:
+ """Gets the code of a specific processing.
Parameters:
- hundeggertype: hundeggertype
- file_path: file_path
+ reference_element_id: The reference element id.
+ processing_id: The processing id.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> code = mc.get_processing_code(element, processing)
Returns:
- None
+ The code of the processing.
"""
-def export_hundegger_with_file_path_and_presetting_silent(hundeggertype: int, file_path: str, presetting: str) -> None:
- """Exports a Hundegger file silently
+
+def get_processing_points(reference_element_id: ElementId, processing_id: ElementId) -> vertex_list:
+ """Gets the points of a specific processing.
Parameters:
- hundeggertype: hundeggertype
- file_path: file_path
- presetting: presetting
+ reference_element_id: The reference element id.
+ processing_id: The processing id.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> points = mc.get_processing_points(element, processing)
Returns:
- None
+ A list of vertices representing the points of the processing.
"""
+
+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:
+ reference_element_id: The reference element id.
+ processing_id: The processing id.
+
+ Examples:
+ >>> import cadwork
+ >>> import element_controller as ec
+ >>> import machine_controller as mc
+
+ >>> element: int = 123456789
+ >>> processings = mc.get_element_btl_processings(element, cadwork.btl_version.btlx_2_1.value)
+ >>> for processing in processings:
+ >>> parameters = mc.get_processing_btl_parameter_set(element, processing)
+
+ Returns:
+ A list of strings representing the BTL parameter set of the processing.
+ """
\ No newline at end of file
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 aad072c..5c39c8b 100644
--- a/src/material_controller/__init__.pyi
+++ b/src/material_controller/__init__.pyi
@@ -1,850 +1,760 @@
-from typing import List
+from cadwork.api_types import MaterialId, UnsignedInt
-def get_last_error(error_code: int) -> str:
- """Gets the last error
+def create_material(name: str) -> MaterialId:
+ """Creates new material.
Parameters:
- error_code: error_code
+ name: The material name.
Returns:
- error string
+ The material id.
"""
-def create_material(name: str) -> int:
- """Creates new material
+def set_name(material_id: MaterialId, name: str) -> None:
+ """Sets the material name.
Parameters:
- name: name
-
- Returns:
- material ID
+ material_id: The material id.
+ name: The material name.
"""
-def set_name(material_id: int, name: str) -> None:
- """Sets the material name
+def set_group(material_id: MaterialId, group: str) -> None:
+ """Sets the material group.
Parameters:
- material_id: material_id
- name: name
-
- Returns:
- None
+ material_id: The material id.
+ group: The material group.
"""
-def set_group(material_id: int, group: str) -> None:
- """Sets the material group
+def set_code(material_id: MaterialId, code: str) -> None:
+ """Sets the material code.
Parameters:
- material_id: material_id
- group: group
-
- Returns:
- None
+ material_id: The material id.
+ code: The material code.
"""
-def set_code(material_id: int, code: str) -> None:
- """Sets the material code
+def set_modulus_elasticity_1(material_id: MaterialId, modulus_elasticity1: float) -> None:
+ """Sets the material modulus of elasticity 1.
Parameters:
- material_id: material_id
- code: code
-
- Returns:
- None
+ material_id: The material id.
+ modulus_elasticity1: The material modulus of elasticity 1.
"""
-def set_modulus_elasticity_1(material_id: int, modulus_elasticity1: float) -> None:
- """Sets the material modulus of elasticity 1
+def set_modulus_elasticity_2(material_id: MaterialId, modulus_elasticity2: float) -> None:
+ """Sets the material modulus of elasticity 2.
Parameters:
- material_id: material_id
- modulus_elasticity1: modulus_elasticity1
-
- Returns:
- None
- """
-
-def set_modulus_elasticity_2(material_id: int, modulus_elasticity2: float) -> None:
- """Sets the material modulus of elasticity 2
-
- Parameters:
- material_id: material_id
- modulus_elasticity2: modulus_elasticity2
-
- Returns:
- None
+ material_id: The material id.
+ modulus_elasticity2: The material modulus of elasticity 2.
"""
-def set_modulus_elasticity_3(material_id: int, modulus_elasticity3: float) -> None:
- """Sets the material modulus of elasticity 3
+def set_modulus_elasticity_3(material_id: MaterialId, modulus_elasticity3: float) -> None:
+ """Sets the material modulus of elasticity 3.
Parameters:
- material_id: material_id
- modulus_elasticity3: modulus_elasticity3
-
- Returns:
- None
+ material_id: The material id.
+ modulus_elasticity3: The material modulus of elasticity 3.
"""
-def set_shear_modulus_1(material_id: int, shear_modulus1: float) -> None:
- """Sets the material shear modulus 1
+def set_shear_modulus_1(material_id: MaterialId, shear_modulus1: float) -> None:
+ """Sets the material shear modulus 1.
Parameters:
- material_id: material_id
- shear_modulus1: shear_modulus1
-
- Returns:
- None
+ material_id: The material id.
+ shear_modulus1: The material shear modulus 1.
"""
-def set_shear_modulus_2(material_id: int, shear_modulus2: float) -> None:
- """Sets the material shear modulus 2
+def set_shear_modulus_2(material_id: MaterialId, shear_modulus2: float) -> None:
+ """Sets the material shear modulus 2.
Parameters:
- material_id: material_id
- shear_modulus2: shear_modulus2
-
- Returns:
- None
+ material_id: The material id.
+ shear_modulus2: The material shear modulus 2.
"""
-def set_price(material_id: int, price: float) -> None:
- """Sets the material price
+def set_price(material_id: MaterialId, price: float) -> None:
+ """Sets the material price.
Parameters:
- material_id: material_id
- price: price
-
- Returns:
- None
+ material_id: The material id.
+ price: The material price.
"""
-def set_price_type(material_id: int, price_type: str) -> None:
- """Sets the material price type
+def set_price_type(material_id: MaterialId, price_type: str) -> None:
+ """Sets the material price type.
Parameters:
- material_id: material_id
- price_type: price_type
-
- Returns:
- None
+ material_id: The material id.
+ price_type: The material price type.
"""
-def set_thermal_conductivity(material_id: int, thermal_conductivity: float) -> None:
- """Sets the material thermal conductivity
+def set_thermal_conductivity(material_id: MaterialId, thermal_conductivity: float) -> None:
+ """Sets the material thermal conductivity.
Parameters:
- material_id: material_id
- thermal_conductivity: thermal_conductivity
-
- Returns:
- None
+ material_id: The material id.
+ thermal_conductivity: The material thermal conductivity.
"""
-def set_heat_capacity(material_id: int, heat_capacity: float) -> None:
- """Sets the material heat capacity
+def set_heat_capacity(material_id: MaterialId, heat_capacity: float) -> None:
+ """Sets the material heat capacity.
Parameters:
- material_id: material_id
- heat_capacity: heat_capacity
-
- Returns:
- None
+ material_id: The material id.
+ heat_capacity: The material heat capacity.
"""
-def set_u_min(material_id: int, u_min: float) -> None:
- """Sets the material U min
+def set_u_min(material_id: MaterialId, u_min: float) -> None:
+ """Sets the material U min.
Parameters:
- material_id: material_id
- u_min: u_min
-
- Returns:
- None
+ material_id: The material id.
+ u_min: The material U min.
"""
-def set_u_max(material_id: int, u_max: float) -> None:
- """Sets the material U max
+def set_u_max(material_id: MaterialId, u_max: float) -> None:
+ """Sets the material U max.
Parameters:
- material_id: material_id
- u_max: u_max
-
- Returns:
- None
+ material_id: The material id.
+ u_max: The material U max.
"""
-def set_fire_resistance_class(material_id: int, fire_resistance_class: str) -> None:
- """Sets the material fire resistance class
+def set_fire_resistance_class(material_id: MaterialId, fire_resistance_class: str) -> None:
+ """Sets the material fire resistance class.
Parameters:
- material_id: material_id
- fire_resistance_class: fire_resistance_class
-
- Returns:
- None
+ material_id: The material id.
+ fire_resistance_class: The material fire resistance class.
"""
-def set_smoke_class(material_id: int, smoke_class: str) -> None:
- """Sets the material smoke class
+def set_smoke_class(material_id: MaterialId, smoke_class: str) -> None:
+ """Sets the material smoke class.
Parameters:
- material_id: material_id
- smoke_class: smoke_class
-
- Returns:
- None
+ material_id: The material id.
+ smoke_class: The material smoke class.
"""
-def set_drop_forming_class(material_id: int, drop_forming_class: str) -> None:
- """Sets the material drop forming class
+def set_drop_forming_class(material_id: MaterialId, drop_forming_class: str) -> None:
+ """Sets the material drop forming class.
Parameters:
- material_id: material_id
- drop_forming_class: drop_forming_class
-
- Returns:
- None
+ material_id: The material id.
+ drop_forming_class: The material drop forming class.
"""
-def set_burn_off_rate(material_id: int, burn_off_rate: float) -> None:
- """Sets the material burn-off rate
+def set_burn_off_rate(material_id: MaterialId, burn_off_rate: float) -> None:
+ """Sets the material burn-off rate.
Parameters:
- material_id: material_id
- burn_off_rate: burn_off_rate
-
- Returns:
- None
+ material_id: The material id.
+ burn_off_rate: The material burn off rate.
"""
-def set_weight(material_id: int, weight: float) -> None:
- """Sets the material weight
+def set_weight(material_id: MaterialId, weight: float) -> None:
+ """Sets the material weight.
Parameters:
- material_id: material_id
- weight: weight
-
- Returns:
- None
+ material_id: The material id.
+ weight: The material weight.
"""
-def set_weight_type(material_id: int, weight_type: str) -> None:
- """Sets the material weight type
+def set_weight_type(material_id: MaterialId, weight_type: str) -> None:
+ """Sets the material weight type.
Parameters:
- material_id: material_id
- weight_type: weight_type
-
- Returns:
- None
+ material_id: The material id.
+ weight_type: The material weight type.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
-def set_grade(a0: int, a1: str) -> None:
- """set grade
- Parameters:
- a0: a0
- a1: a1
+def set_grade(material_id: MaterialId, grade: str) -> None:
+ """Sets the grade of a material.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ grade: The grade to set.
"""
-def set_quality(a0: int, a1: str) -> None:
- """set quality
- Parameters:
- a0: a0
- a1: a1
+def set_quality(material_id: MaterialId, quality: str) -> None:
+ """Sets the quality of a material.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ quality: The quality to set.
"""
-def set_composition(a0: int, a1: str) -> None:
- """set composition
- Parameters:
- a0: a0
- a1: a1
+def set_composition(material_id: MaterialId, composition: str) -> None:
+ """Sets the composition of a material.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ composition: The composition to set.
"""
-def get_material_id(material_name: str) -> int:
- """Gets the material with a given name
+def get_material_id(material_name: str) -> MaterialId:
+ """Gets the material with a given name.
Parameters:
- material_name: material_name
+ material_name: The material name.
Returns:
- material ID
+ The material id.
"""
-def get_name(material_id: int) -> str:
- """Gets the material name
+def get_name(material_id: MaterialId) -> str:
+ """Gets the material name.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material name
+ The material name.
"""
-def get_group(material_id: int) -> str:
- """Gets the material group
+def get_group(material_id: MaterialId) -> str:
+ """Gets the material group.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material group
+ The material group.
"""
-def get_code(material_id: int) -> str:
- """Gets the material code
+def get_code(material_id: MaterialId) -> str:
+ """Gets the material code.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material code
+ The material code.
"""
-def get_modulus_elasticity_1(material_id: int) -> float:
- """Gets the material modulus of elasticity 1
+def get_modulus_elasticity_1(material_id: MaterialId) -> float:
+ """Gets the material modulus of elasticity 1.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material modulus of elasticity 1
+ The material modulus of elasticity 1.
"""
-def get_modulus_elasticity_2(material_id: int) -> float:
- """Gets the material modulus of elasticity 2
+def get_modulus_elasticity_2(material_id: MaterialId) -> float:
+ """Gets the material modulus of elasticity 2.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material modulus of elasticity 2
+ The material modulus of elasticity 2.
"""
-def get_modulus_elasticity_3(material_id: int) -> float:
- """Gets the material modulus of elasticity 3
+def get_modulus_elasticity_3(material_id: MaterialId) -> float:
+ """Gets the material modulus of elasticity 3.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material modulus of elasticity 3
+ The material modulus of elasticity 3.
"""
-def get_shear_modulus_1(material_id: int) -> float:
- """Gets the material shear modulus 1
+def get_shear_modulus_1(material_id: MaterialId) -> float:
+ """Gets the material shear modulus 1.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material shear modulus 1
+ The material shear modulus 1.
"""
-def get_shear_modulus_2(material_id: int) -> float:
- """Gets the material shear modulus 2
+def get_shear_modulus_2(material_id: MaterialId) -> float:
+ """Gets the material shear modulus 2.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material shear modulus 2
+ The material shear modulus 2.
"""
-def get_price(material_id: int) -> float:
- """Gets the material price
+def get_price(material_id: MaterialId) -> float:
+ """Gets the material price.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material price
+ The material price.
"""
-def get_price_type(material_id: int) -> str:
- """Sets the material price type
+def get_price_type(material_id: MaterialId) -> str:
+ """Gets the material price type.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material price type
+ The material price type.
"""
-def get_thermal_conductivity(material_id: int) -> float:
- """Gets the material thermal conductivity
+def get_thermal_conductivity(material_id: MaterialId) -> float:
+ """Gets the material thermal conductivity.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material thermal conductivity
+ The material thermal conductivity.
"""
-def get_heat_capacity(material_id: int) -> float:
- """Gets the material heat capacity
+def get_heat_capacity(material_id: MaterialId) -> float:
+ """Gets the material heat capacity.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material heat capacity
+ The material heat capacity.
"""
-def get_u_min(material_id: int) -> float:
- """Gets the material U min
+def get_u_min(material_id: MaterialId) -> float:
+ """Gets the material U min.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material U min
+ The material U min.
"""
-def get_u_max(material_id: int) -> float:
- """Gets the material U max
+def get_u_max(material_id: MaterialId) -> float:
+ """Gets the material U max.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material U max
+ The material U max.
"""
-def get_fire_resistance_class(material_id: int) -> str:
- """Gets the material fire resistance class
+def get_fire_resistance_class(material_id: MaterialId) -> str:
+ """Gets the material fire resistance class.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material fire resistance class
+ The material fire resistance class.
"""
-def get_smoke_class(material_id: int) -> str:
- """Gets the material smoke class
+def get_smoke_class(material_id: MaterialId) -> str:
+ """Gets the material smoke class.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material smoke class
+ The material smoke class.
"""
-def get_drop_forming_class(material_id: int) -> str:
- """Gets the material drop forming class
+def get_drop_forming_class(material_id: MaterialId) -> str:
+ """Gets the material drop forming class.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material drop forming class
+ The material drop forming class.
"""
-def get_burn_off_rate(material_id: int) -> float:
- """Gets the material burn-off rate
+def get_burn_off_rate(material_id: MaterialId) -> float:
+ """Gets the material burn-off rate.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material burn off rate
+ The material burn off rate.
"""
-def get_weight(material_id: int) -> float:
- """Gets the material weight
+def get_weight(material_id: MaterialId) -> float:
+ """Gets the material weight.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material weight
+ The material weight.
"""
-def get_weight_type(material_id: int) -> str:
- """Gets the material weight type
+def get_weight_type(material_id: MaterialId) -> str:
+ """Gets the material weight type.
Parameters:
- material_id: material_id
+ material_id: The material id.
Returns:
- material weight type
+ The material weight type.
"""
-def get_all_materials() -> List[int]:
- """Gets all the materials
+def get_all_materials() -> list[MaterialId]:
+ """Retrieves a list of all materials.
Returns:
- material ID list
+ A list of all material id.
"""
-def get_grade(a0: int) -> str:
- """get grade
+
+def get_grade(material_id: MaterialId) -> str:
+ """Gets the grade of a material.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- str
+ The grade of the material.
"""
-def get_quality(a0: int) -> str:
- """get quality
+
+def get_quality(material_id: MaterialId) -> str:
+ """Gets the quality of a material.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- str
+ The quality of the material.
"""
-def get_composition(a0: int) -> str:
- """get composition
+
+def get_composition(material_id: MaterialId) -> str:
+ """Gets the composition of a material.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- str
+ The composition of the material.
"""
-def get_short_name(a0: int) -> str:
- """get short name
+
+def get_short_name(material_id: MaterialId) -> str:
+ """Gets the short name of a material.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- str
+ The short name of the material.
"""
-def get_all_material_groups() -> List[str]:
- """Gets all the material groups
+def get_all_material_groups() -> list[MaterialId]:
+ """Retrieves a list of all material groups.
Returns:
- group names
+ A list of all material group names.
"""
def get_parent_group(group: str) -> str:
- """Gets the parent group of a material group
+ """Gets the parent group of a given group.
Parameters:
- group: group
+ group: The name of the group.
Returns:
- parent group name
+ The name of the parent group.
"""
-def get_material_color_assignment_for_nodes(a0: int) -> int:
- """get material color assignment for nodes
+
+def get_material_color_assignment_for_nodes(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for nodes.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for nodes.
"""
-def set_material_color_assignment_for_nodes(a0: int, a1: int) -> None:
- """set material color assignment for nodes
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_nodes(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for nodes.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for nodes.
"""
-def get_material_color_assignment_for_standard_axes(a0: int) -> int:
- """get material color assignment for standard axes
+
+def get_material_color_assignment_for_standard_axes(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for standard axes.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for standard axes.
"""
-def set_material_color_assignment_for_standard_axes(a0: int, a1: int) -> None:
- """set material color assignment for standard axes
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_standard_axes(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for standard axes.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for standard axes.
"""
-def get_material_color_assignment_for_drillings(a0: int) -> int:
- """get material color assignment for drillings
+
+def get_material_color_assignment_for_drillings(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for drillings.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for drillings.
"""
-def set_material_color_assignment_for_drillings(a0: int, a1: int) -> None:
- """set material color assignment for drillings
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_drillings(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for drillings.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for drillings.
"""
-def get_material_color_assignment_for_mep_axes(a0: int) -> int:
- """get material color assignment for mep axes
+
+def get_material_color_assignment_for_mep_axes(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for MEP axes.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for MEP axes.
"""
-def set_material_color_assignment_for_mep_axes(a0: int, a1: int) -> None:
- """set material color assignment for mep axes
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_mep_axes(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for MEP axes.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for MEP axes.
"""
-def get_material_color_assignment_for_beams(a0: int) -> int:
- """get material color assignment for beams
+
+def get_material_color_assignment_for_beams(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for beams.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for beams.
"""
-def set_material_color_assignment_for_beams(a0: int, a1: int) -> None:
- """set material color assignment for beams
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_beams(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for beams.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for beams.
"""
-def get_material_color_assignment_for_panels(a0: int) -> int:
- """get material color assignment for panels
+
+def get_material_color_assignment_for_panels(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for panels.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for panels.
"""
-def set_material_color_assignment_for_panels(a0: int, a1: int) -> None:
- """set material color assignment for panels
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_panels(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for panels.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for panels.
"""
-def get_material_color_assignment_for_auxiliary_elements(a0: int) -> int:
- """get material color assignment for auxiliary elements
+
+def get_material_color_assignment_for_auxiliary_elements(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for auxiliary elements.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for auxiliary elements.
"""
-def set_material_color_assignment_for_auxiliary_elements(a0: int, a1: int) -> None:
- """set material color assignment for auxiliary elements
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_auxiliary_elements(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for auxiliary elements.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for auxiliary elements.
"""
-def get_material_color_assignment_for_surfaces(a0: int) -> int:
- """get material color assignment for surfaces
+
+def get_material_color_assignment_for_surfaces(color_nb: UnsignedInt) -> MaterialId:
+ """Gets the material color assignment for surfaces.
Parameters:
- a0: a0
+ color_nb: The color number. [1-255]
Returns:
- int
+ The material id assigned to the color number for surfaces.
"""
-def set_material_color_assignment_for_surfaces(a0: int, a1: int) -> None:
- """set material color assignment for surfaces
- Parameters:
- a0: a0
- a1: a1
+def set_material_color_assignment_for_surfaces(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material color assignment for surfaces.
- Returns:
- None
+ Parameters:
+ color_nb: The color number. [1-255]
+ material_id: The material ID to assign to the color number for surfaces.
"""
-def get_texture_color(a0: int) -> int:
- """get texture color
+
+def get_texture_color(material_id: MaterialId) -> int:
+ """Gets the texture color for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- int
+ The color of the texture. [1-255]
"""
-def set_texture_color(a0: int, a1: int) -> None:
- """set texture color
- Parameters:
- a0: a0
- a1: a1
+def set_texture_color(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the texture color for a given material ID.
- Returns:
- None
+ Parameters:
+ color_nb: The color to set for the texture. [1-255]
+ material_id: The material id.
"""
-def get_texture_transparency(a0: int) -> int:
- """get texture transparency
+
+def get_texture_transparency(material_id: MaterialId) -> int:
+ """Gets the texture transparency for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- int
+ The transparency of the texture.
"""
-def set_texture_transparency(a0: int, a1: int) -> None:
- """set texture transparency
- Parameters:
- a0: a0
- a1: a1
+def set_texture_transparency(color_nb: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the texture transparency for a given material ID.
- Returns:
- None
+ Parameters:
+ color_nb: The transparency to set for the texture.
+ material_id: The material id.
"""
-def get_texture_rotation_angle(a0: int) -> float:
- """get texture rotation angle
+
+def get_texture_rotation_angle(material_id: MaterialId) -> float:
+ """Gets the texture rotation angle for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- float
+ The rotation angle of the texture.
"""
-def set_texture_rotation_angle(a0: int, a1: float) -> None:
- """set texture rotation angle
- Parameters:
- a0: a0
- a1: a1
+def set_texture_rotation_angle(material_id: MaterialId, angle: float) -> None:
+ """Sets the texture rotation angle for a given material ID.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ angle: The rotation angle to set for the texture.
"""
-def get_texture_length_alignment(a0: int) -> bool:
- """get texture length alignment
+
+def get_texture_length_alignment(material_id: MaterialId) -> bool:
+ """Gets the texture length alignment for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- bool
+ True if Texture Random Placement is enabled, false otherwise.
"""
-def set_texture_length_alignment(a0: int, a1: bool) -> None:
- """set texture length alignment
- Parameters:
- a0: a0
- a1: a1
+def set_texture_length_alignment(material_id: MaterialId, flag: bool) -> None:
+ """Sets the texture length alignment for a given material ID.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ flag: True if Texture Random Placement is enabled, false otherwise.
"""
-def get_texture_zoom_x(a0: int) -> float:
- """get texture zoom x
+
+def get_texture_zoom_x(material_id: MaterialId) -> float:
+ """Gets the texture zoom factor in the X direction for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- float
+ The zoom factor of the texture in the X direction.
"""
-def set_texture_zoom_x(a0: int, a1: float) -> None:
- """set texture zoom x
- Parameters:
- a0: a0
- a1: a1
+def set_texture_zoom_x(material_id: MaterialId, value: float) -> None:
+ """Sets the texture zoom factor in the X direction for a given material ID.
- Returns:
- None
+ Parameters:
+ material_id: The material id.
+ value: The zoom factor to set in the X direction.
"""
-def get_texture_zoom_y(a0: int) -> float:
- """get texture zoom y
+
+def get_texture_zoom_y(material_id: MaterialId) -> float:
+ """Gets the texture zoom factor in the Y direction for a given material ID.
Parameters:
- a0: a0
+ material_id: The material id.
Returns:
- float
+ The zoom factor of the texture in the Y direction.
"""
-def set_texture_zoom_y(a0: int, a1: float) -> None:
- """set texture zoom y
- Parameters:
- a0: a0
- a1: a1
-
- Returns:
- None
- """
+def set_texture_zoom_y(material_id: MaterialId, value: float) -> None:
+ """Sets the texture zoom factor in the Y direction for a given material ID.
+ Parameters:
+ material_id: The material id.
+ value: The zoom factor to set.
+ """
\ No newline at end of file
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 7e6614a..39ca11f 100644
--- a/src/menu_controller/__init__.pyi
+++ b/src/menu_controller/__init__.pyi
@@ -1,10 +1,10 @@
-def display_simple_menu(menu_items: List[str]) -> str:
- """display simple menu
+def display_simple_menu(menu_items: list[str]) -> str:
+ """Displays a simple menu.
Parameters:
- menu_items: menu_items
+ menu_items: The menu items.
Returns:
- str
+ The selected menu item.
"""
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 a1ad114..5e0a32e 100644
--- a/src/multi_layer_cover_controller/__init__.pyi
+++ b/src/multi_layer_cover_controller/__init__.pyi
@@ -1,261 +1,595 @@
-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
-def set_element_multi_layer_set(element_id: int, set_id: None) -> None:
- """Sets the multi layer set id of a cover
+def set_element_multi_layer_set(element_id: ElementId, set_id: MultiLayerSetId) -> None:
+ """Sets the multi layer set id of a cover.
Parameters:
- element_id: element_id
- set_id: set_id
+ element_id: The element id of the cover.
+ set_id: The multi layer set id.
- Returns:
- None
+ Examples:
+ >>> cover_id = element.create_cover(points, normal_vector)
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Wall Type A")
+ >>> mlc.set_element_multi_layer_set(cover_id, multi_layer_set_id)
"""
-def set_multi_layer_set_name(set_id: None, set_name: str) -> None:
- """Sets the name for a multi layer set
+def set_multi_layer_set_name(set_id: MultiLayerSetId, set_name: str) -> None:
+ """Sets the name for a multi layer set.
Parameters:
- set_id: set_id
- set_name: set_name
+ set_id: The multi layer set id.
+ set_name: The multi layer set name.
- Returns:
- None
+ Examples:
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Default Wall")
+ >>> mlc.set_multi_layer_set_name(multi_layer_set_id, "Exterior Wall Type B")
"""
-def set_cover_name(set_id: None, cover_name: str) -> None:
- """Sets the cover name of the multi layer set
+def set_cover_name(set_id: MultiLayerSetId, cover_name: str) -> None:
+ """Sets the cover name of the multi layer set.
Parameters:
- set_id: set_id
- cover_name: cover_name
+ set_id: The multi layer set id.
+ cover_name: The cover name.
- Returns:
- None
+ Examples:
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Default Wall")
+ >>> mlc.set_cover_name(multi_layer_set_id, "Exterior Facade")
+ """
+
+def set_cover_material(set_id: MultiLayerSetId, cover_material: MaterialId) -> None:
+ """Sets the cover material of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ cover_material: The cover material.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Default Wall")
+ >>> material_id = mc.get_material_id("Cement Board")
+ >>> mlc.set_cover_material(multi_layer_set_id, material_id)
+ """
+
+def set_cover_thickness(set_id: MultiLayerSetId, cover_thickness: float) -> None:
+ """Sets the cover thickness of the multi layer set. Only allowed for simple walls (cover without layer).
+
+ Parameters:
+ set_id: The multi layer set id.
+ cover_thickness: The cover thickness.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Simple Wall")
+ >>> mlc.set_cover_thickness(multi_layer_set_id, 150.0)
"""
-def set_cover_material(set_id: None, cover_material: int) -> None:
- """Sets the cover material of the multi layer set
+def create_multi_layer_wall(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer wall with given name and default values.
Parameters:
- set_id: set_id
- cover_material: cover_material
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> wall_set_id = mlc.create_multi_layer_wall("Exterior Insulated Wall")
+ >>> print(f"Created new multi-layer wall with ID: {wall_set_id}")
Returns:
- None
+ The multi layer set id.
+ """
+
+def add_layer(set_id: MultiLayerSetId, layer_type: multi_layer_type, name: str, material_id: MaterialId, thickness: float) -> None:
+ """Adds a new layer to the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ layer_type: The type of the layer.
+ name: The name of the layer.
+ material_id: The material id of the layer.
+ thickness: The thickness of the layer.
+
+ Examples:
+ >>> material_id_1 = mc.get_material_id("material_1")
+ >>> material_id_2 = mc.get_material_id("material_2")
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("MultiLayerWall")
+ >>> layer1_thickness = 200
+ >>> layer2_thickness = 15
+ >>> mlc.add_layer(multi_layer_set_id, cadwork.multi_layer_type.structure.value, "Layer1", material_id_1, layer1_thickness)
+ >>> mlc.add_layer(multi_layer_set_id, cadwork.multi_layer_type.panel.value, "Layer2", material_id_2, layer2_thickness)
+ """
+
+def set_layer_name(set_id: MultiLayerSetId, layer_index: UnsignedInt, name: str) -> None:
+ """Sets the name of a layer of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+ name: The name of the layer.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> mlc.set_layer_name(multi_layer_set_id, 0, "Exterior Cladding")
+ >>> mlc.set_layer_name(multi_layer_set_id, 1, "Insulation Layer")
"""
-def set_cover_thickness(set_id: None, cover_thickness: float) -> None:
- """Sets the cover thickness of the multi layer set. Only allowed for simple walls (cover without layer)
+def set_layer_material(set_id: MultiLayerSetId, layer_index: UnsignedInt, material_id: MaterialId) -> None:
+ """Sets the material of a layer of the multi layer set.
Parameters:
- set_id: set_id
- cover_thickness: cover_thickness
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+ material_id: The material id of the layer.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> insulation_material_id = mc.get_material_id("Mineral Wool")
+ >>> mlc.set_layer_material(multi_layer_set_id, 1, insulation_material_id)
+ """
+
+def set_layer_thickness(set_id: MultiLayerSetId, layer_index: UnsignedInt, thickness: float) -> None:
+ """Sets the thickness of a layer of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+ thickness: The layer thickness.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> mlc.set_layer_thickness(multi_layer_set_id, 0, 25.0) # Set first layer to 25mm
+ >>> mlc.set_layer_thickness(multi_layer_set_id, 1, 120.0) # Set second layer to 120mm
+ """
+
+def set_layer_type(set_id: MultiLayerSetId, layer_index: UnsignedInt, layer_type: multi_layer_type) -> None:
+ """Sets the type of a layer of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+ layer_type: The layer type.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> layer_count = mlc.get_layer_count(multi_layer_set_id)
+ >>> layer_mid_point_idx = layer_count // 2
+ >>> mlc.set_layer_type(multi_layer_set_id, layer_mid_point_idx, cadwork.multi_layer_type.structure.value)
+ """
+
+def set_cover_color(set_id: MultiLayerSetId, cover_color: ColorId) -> None:
+ """Sets the cover color of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ cover_color: The cover color.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.create_multi_layer_wall("Default Wall")
+ >>> blue_color_id = vc.get_color_id("blue")
+ >>> mlc.set_cover_color(multi_layer_set_id, blue_color_id)
+ """
+
+def get_multi_layer_walls() -> list[MultiLayerSetId]:
+ """Gets all multi layer wall ids.
+
+ Examples:
+ >>> wall_ids = mlc.get_multi_layer_walls()
+ >>> print(f"Found {len(wall_ids)} multi-layer wall definitions")
+ >>> for wall_id in wall_ids:
+ ... name = mlc.get_multi_layer_set_name(wall_id)
+ ... print(f"Wall ID: {wall_id}, Name: {name}")
Returns:
- None
+ The multi layer wall ids.
"""
-def create_multi_layer_wall(set_name: str) -> int:
- """Creates a new multi layer wall with given name and default values
+def get_multi_layer_set_name(set_id: MultiLayerSetId) -> str:
+ """Gets the name for a multi layer set.
Parameters:
- set_name: set_name
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> set_name = mlc.get_multi_layer_set_name(multi_layer_set_id)
+ >>> print(f"Element uses multi-layer definition: {set_name}")
Returns:
- multiLayerSetID
+ The multi layer set name.
"""
-def add_layer(set_id: None, element_grouping_type: None, name: str, material_id: int, thickness: float) -> None:
- """Adds a new layer to the multi layer set
+def get_element_multi_layer_set(element_id: ElementId) -> MultiLayerSetId:
+ """Gets the multi layer set id of a cover.
Parameters:
- set_id: set_id
- element_grouping_type: element_grouping_type
- name: name
- material_id: material_id
- thickness: thickness
+ element_id: The element id of the cover.
+
+ Examples:
+ >>> cover_ids = element.get_covers()
+ >>> for cover_id in cover_ids:
+ ... multi_layer_set_id = mlc.get_element_multi_layer_set(cover_id)
+ ... set_name = mlc.get_multi_layer_set_name(multi_layer_set_id)
+ ... print(f"Cover {cover_id} uses wall type: {set_name}")
Returns:
- None
+ The multi layer set id.
"""
-def set_layer_name(set_id: None, layer_index: int, name: str) -> None:
- """Sets the name of a layer of the multi layer set
+def get_cover_name(set_id: MultiLayerSetId) -> str:
+ """Gets the cover name defined in the multi layer set.
Parameters:
- set_id: set_id
- layer_index: layer_index
- name: name
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> cover_name = mlc.get_cover_name(multi_layer_set_id)
+ >>> print(f"Cover name: {cover_name}")
Returns:
- None
+ The cover name.
"""
-def set_layer_material(set_id: None, layer_index: int, material_id: int) -> None:
- """Sets the material of a layer of the multi layer set
+def get_cover_material(set_id: MultiLayerSetId) -> MaterialId:
+ """Gets the cover material defined in the multi layer set.
Parameters:
- set_id: set_id
- layer_index: layer_index
- material_id: material_id
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> material_id = mlc.get_cover_material(multi_layer_set_id)
+ >>> material_name = mc.get_material_name(material_id)
+ >>> print(f"Cover uses material: {material_name}")
Returns:
- None
+ The cover material.
"""
-def set_layer_thickness(set_id: None, layer_index: int, thickness: float) -> None:
- """Sets the thickness of a layer of the multi layer set
+def get_cover_thickness(set_id: MultiLayerSetId) -> float:
+ """Gets the cover thickness of the multi layer set.
Parameters:
- set_id: set_id
- layer_index: layer_index
- thickness: thickness
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> thickness = mlc.get_cover_thickness(multi_layer_set_id)
+ >>> print(f"Cover thickness: {thickness}mm")
Returns:
- None
+ The cover thickness.
"""
-def set_layer_type(set_id: None, layer_index: int, element_grouping_type: None) -> None:
- """Sets the type of a layer of the multi layer set
+def get_layer_count(set_id: MultiLayerSetId) -> UnsignedInt:
+ """Gets the number of layers of the multi layer set.
Parameters:
- set_id: set_id
- layer_index: layer_index
- element_grouping_type: element_grouping_type
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> count = mlc.get_layer_count(multi_layer_set_id)
+ >>> print(f"Wall has {count} layers")
Returns:
- None
+ The number of layers.
"""
-def set_cover_color(set_id: None, cover_color: None) -> None:
- """Sets the cover color of the multi layer set
+def get_layer_name(set_id: MultiLayerSetId, layer_index: UnsignedInt) -> str:
+ """Gets the name of a layer of the multi layer set.
Parameters:
- set_id: set_id
- cover_color: cover_color
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> layer_count = mlc.get_layer_count(multi_layer_set_id)
+ >>> for i in range(layer_count):
+ ... layer_name = mlc.get_layer_name(multi_layer_set_id, i)
+ ... print(f"Layer {i}: {layer_name}")
Returns:
- None
+ The layer name.
"""
-def get_multi_layer_walls() -> List[int]:
- """Gets all multi layer wall ids
+def get_layer_thickness(set_id: MultiLayerSetId, layer_index: UnsignedInt) -> float:
+ """Gets the thickness of a layer of the multi layer set.
+
+ Parameters:
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> layer_count = mlc.get_layer_count(multi_layer_set_id)
+ >>> total_thickness = 0
+ >>> for i in range(layer_count):
+ ... thickness = mlc.get_layer_thickness(multi_layer_set_id, i)
+ ... total_thickness += thickness
+ ... print(f"Layer {i} thickness: {thickness}mm")
+ >>> print(f"Total wall thickness: {total_thickness}mm")
Returns:
- List[int]
+ The layer thickness.
"""
-def get_multi_layer_set_name(set_id: None) -> str:
- """Gets the name for a multi layer set
+def get_layer_material(set_id: MultiLayerSetId, layer_index: UnsignedInt) -> MaterialId:
+ """Gets the material of a layer of the multi layer set.
Parameters:
- set_id: set_id
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> layer_count = mlc.get_layer_count(multi_layer_set_id)
+ >>> for i in range(layer_count):
+ ... material_id = mlc.get_layer_material(multi_layer_set_id, i)
+ ... material_name = mc.get_material_name(material_id)
+ ... print(f"Layer {i} material: {material_name}")
Returns:
- string
+ The layer material.
"""
-def get_element_multi_layer_set(element_id: int) -> int:
- """Gets the multi layer set id of a cover
+def get_layer_type(set_id: MultiLayerSetId, layer_index: UnsignedInt) -> multi_layer_type:
+ """Gets the type of a layer of the multi layer set.
Parameters:
- element_id: element_id
+ set_id: The multi layer set id.
+ layer_index: The layer index.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> layer_count = mlc.get_layer_count(multi_layer_set_id)
+ >>> for i in range(1, layer_count + 1):
+ ... layer_type = mlc.get_layer_type(multi_layer_set_id, i)
+ ... layer_name = mlc.get_layer_name(multi_layer_set_id, i)
+ ... type_str = "Structure" if layer_type == cadwork.multi_layer_type.structure.value else "your logic..."
+ ... print(f"Layer {i} ({layer_name}): Type = {type_str}")
Returns:
- multiLayerSetID
+ The layer type.
"""
-def get_cover_name(set_id: None) -> str:
- """Gets the cover name defined in the multi layer set
+def get_cover_color(set_id: MultiLayerSetId) -> ColorId:
+ """Gets the cover color defined in the multi layer set.
Parameters:
- set_id: set_id
+ set_id: The multi layer set id.
+
+ Examples:
+ >>> multi_layer_set_id = mlc.get_element_multi_layer_set(element_id)
+ >>> color_id = mlc.get_cover_color(multi_layer_set_id)
+ >>> color_name = vc.get_color_name(color_id)
+ >>> print(f"Cover uses color: {color_name}")
Returns:
- string
+ The cover color.
"""
-def get_cover_material(set_id: None) -> int:
- """Gets the cover material defined in the multi layer set
+def get_multi_layer_framed_floors() -> list[MultiLayerSetId]:
+ """Gets all framed multi layer floor ids.
+
+ Examples:
+ >>> floor_ids = mlc.get_multi_layer_framed_floors()
+ >>> print(f"Found {len(floor_ids)} multi-layer floor definitions")
+ >>> for floor_id in floor_ids:
+ ... name = mlc.get_multi_layer_set_name(floor_id)
+ ... print(f"Floor ID: {floor_id}, Name: {name}")
+
+ Returns:
+ The multi layer floor ids.
+ """
+
+def create_multi_layer_framed_floor(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer floor with given name and default values.
Parameters:
- set_id: set_id
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_framed_floor("Standard Floor")
+ >>> print(f"Created new multi-layer floor with ID: {set_id}")
Returns:
- materialID
+ The multi layer set id.
"""
-def get_cover_thickness(set_id: None) -> float:
- """Gets the cover thickness of the multi layer set
+def get_multi_layer_framed_roofs() -> list[MultiLayerSetId]:
+ """Gets all multi layer roof ids.
+
+ Examples:
+ >>> roof_ids = mlc.get_multi_layer_framed_roofs()
+ >>> print(f"Found {len(roof_ids)} multi-layer roof definitions")
+ >>> for roof_id in roof_ids:
+ ... name = mlc.get_multi_layer_set_name(roof_id)
+ ... print(f"Roof ID: {roof_id}, Name: {name}")
+
+ Returns:
+ The multi layer roof ids.
+ """
+
+def get_multi_layer_solid_floors() -> list[MultiLayerSetId]:
+ """Gets all solid multi layer floor ids.
+
+ Examples:
+ >>> floor_ids = mlc.get_multi_layer_solid_floors()
+ >>> print(f"Found {len(floor_ids)} multi-layer floor definitions")
+ >>> for floor_id in floor_ids:
+ ... name = mlc.get_multi_layer_set_name(floor_id)
+ ... print(f"Floor ID: {floor_id}, Name: {name}")
+
+ Returns:
+ The multi layer floor ids.
+ """
+
+def create_multi_layer_solid_floor(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer solid floor with given name and default values.
Parameters:
- set_id: set_id
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_solid_floor("Standard Solid Floor")
+ >>> print(f"Created new multi-layer solid floor with ID: {set_id}")
Returns:
- double
+ The multi layer set id.
"""
-def get_layer_count(set_id: None) -> int:
- """Gets the Number of Layers of the multi layer set
+def create_multi_layer_framed_roof(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer roof with given name and default values.
Parameters:
- set_id: set_id
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_framed_roof("Pitched Roof")
+ >>> print(f"Created new multi-layer roof with ID: {set_id}")
Returns:
- uint64_t
+ The multi layer set id.
"""
-def get_layer_name(set_id: None, layer_index: int) -> str:
- """Gets the name of a layer of the multi layer set
+def create_multi_layer_framed_wall(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer wall with given name and default values.
Parameters:
- set_id: set_id
- layer_index: layer_index
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_framed_wall("Standard Wall")
+ >>> print(f"Created new multi-layer wall with ID: {set_id}")
Returns:
- string
+ The multi layer set id.
"""
-def get_layer_thickness(set_id: None, layer_index: int) -> float:
- """Gets the thickness of a layer of the multi layer set
+def get_multi_layer_sets() -> list[MultiLayerSetId]:
+ """Gets all multi layer set ids of all types.
+
+ Examples:
+ >>> all_ids = mlc.get_multi_layer_sets()
+ >>> print(f"Found {len(all_ids)} multi-layer definitions in total")
+ >>> for set_id in all_ids:
+ ... name = mlc.get_multi_layer_set_name(set_id)
+ ... print(f"Set ID: {set_id}, Name: {name}")
+
+ Returns:
+ The multi layer set ids.
+ """
+
+def create_multi_layer_by_cover_type(set_name: str, cover_type: multi_layer_cover_type) -> MultiLayerSetId:
+ """Creates a new multi layer set of specified type with given name and default values.
Parameters:
- set_id: set_id
- layer_index: layer_index
+ set_name: The multi layer set name.
+ cover_type: The cover type.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_by_cover_type("Custom Solid Wall", cadwork.multi_layer_cover_type.solidWall)
+ >>> print(f"Created new multi-layer set with ID: {set_id}")
Returns:
- double
+ The multi layer set id.
"""
-def get_layer_material(set_id: None, layer_index: int) -> int:
- """Gets the material of a layer of the multi layer set
+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:
- set_id: set_id
- layer_index: layer_index
+ cover_type: The cover type.
+
+ Examples:
+ >>> set_ids = mlc.get_multi_layer_sets_for_cover_type(cadwork.multi_layer_cover_type.solidWall)
+
+ Returns:
+ The multi layer set ids.
+ """
+
+
+def get_multi_layer_log_walls() -> list[MultiLayerSetId]:
+ """Gets all multi layer log wall ids.
+
+ Examples:
+ >>> log_wall_ids = mlc.get_multi_layer_log_walls()
+ >>> print(f"Found {len(log_wall_ids)} multi-layer log wall definitions")
+ >>> for log_wall_id in log_wall_ids:
+ ... name = mlc.get_multi_layer_set_name(log_wall_id)
+ ... print(f"Log Wall ID: {log_wall_id}, Name: {name}")
Returns:
- string
+ The multi layer log wall ids.
"""
-def get_layer_type(set_id: None, layer_index: int) -> int:
- """Gets the type of a layer of the multi layer set
+def create_multi_layer_log_wall(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer log wall with given name and default values.
Parameters:
- set_id: set_id
- layer_index: layer_index
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_log_wall("Standard Log Wall")
+ >>> print(f"Created new multi-layer log wall with ID: {set_id}")
+
+ Returns:
+ The multi layer set id.
+ """
+
+def get_multi_layer_solid_roofs() -> list[MultiLayerSetId]:
+ """Gets all multi layer solid roof ids.
+
+ Examples:
+ >>> solid_roof_ids = mlc.get_multi_layer_solid_roofs()
+ >>> print(f"Found {len(solid_roof_ids)} multi-layer solid roof definitions")
+ >>> for solid_roof_id in solid_roof_ids:
+ ... name = mlc.get_multi_layer_set_name(solid_roof_id)
+ ... print(f"Solid Roof ID: {solid_roof_id}, Name: {name}")
Returns:
- multiLayerType
+ The multi layer solid roof ids.
"""
-def get_cover_color(set_id: None) -> int:
- """Gets the cover color defined in the multi layer set
+def create_multi_layer_solid_roof(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer solid roof with given name and default values.
Parameters:
- set_id: set_id
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_solid_roof("Standard Solid Roof")
+ >>> print(f"Created new multi-layer solid roof with ID: {set_id}")
+
+ Returns:
+ The multi layer set id.
+ """
+
+def get_multi_layer_solid_walls() -> list[MultiLayerSetId]:
+ """Gets all multi layer solid wall ids.
+
+ Examples:
+ >>> solid_wall_ids = mlc.get_multi_layer_solid_walls()
+ >>> print(f"Found {len(solid_wall_ids)} multi-layer solid wall definitions")
+ >>> for solid_wall_id in solid_wall_ids:
+ ... name = mlc.get_multi_layer_set_name(solid_wall_id)
+ ... print(f"Solid Wall ID: {solid_wall_id}, Name: {name}")
Returns:
- colorID
+ The multi layer solid wall ids.
"""
+def create_multi_layer_solid_wall(set_name: str) -> MultiLayerSetId:
+ """Creates a new multi layer solid wall with given name and default values.
+
+ Parameters:
+ set_name: The multi layer set name.
+
+ Examples:
+ >>> set_id = mlc.create_multi_layer_solid_wall("Standard Solid Wall")
+ >>> print(f"Created new multi-layer solid wall with ID: {set_id}")
+
+ Returns:
+ The multi layer set id.
+ """
\ No newline at end of file
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 4424bf2..60cee98 100644
--- a/src/roof_controller/__init__.pyi
+++ b/src/roof_controller/__init__.pyi
@@ -1,47 +1,70 @@
-from typing import List
+from cadwork.api_types import ElementId
-def get_profile_length(element_id: int) -> float:
- """Gets the profile length
+def get_profile_length(element_id: ElementId) -> float:
+ """Gets the profile length.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- profile length
+ The profile length.
"""
-def get_edge_length(element_id: int, edge_type: str) -> float:
- """Gets the edge length
+def get_edge_length(element_id: ElementId, edge_type: str) -> float:
+ """Gets the edge length.
Parameters:
- element_id: element_id
- edge_type: edge_type
+ element_id: The element id.
+ edge_type: The edge type :
- Returns:
- edge length
- """
+
+ - "none"
-def get_all_caddy_element_ids() -> List[int]:
- """Gets all caddy elements
+ - "ridge"
- Returns:
- element ID list
- """
+ - "eave"
-def get_last_error(a0: int) -> str:
- """get last error
+ - "vergeright"
+ - "vergeleft"
+ - "vergeoblique"
- Parameters:
- a0: a0
+ - "hip"
+
+ - "valley"
+
+ - "userdefined1"
+ - "userdefined2"
+
+ - "userdefinedmitrejoint1"
+ - "userdefinedmitrejoint2"
+
+ - "wallconnection"
+ - "wallconnectionright"
+ - "wallconnectionleft"
+ - "wallconnectiontop"
+ - "wallconnectionbottom"
+
+ - "roofcutout"
+ - "roofcutoutright"
+ - "roofcutoutleft"
+ - "roofcutouttop"
+ - "roofcutoutbottom"
+
+ - "roofedgeontoproofsurface"
+ - "roofedgeonbottomroofsurface"
Returns:
- str
+ The edge length.
"""
-def clear_errors() -> None:
- """clear errors
+def get_all_caddy_element_ids() -> list[ElementId]:
+ """Gets all caddy elements
Returns:
- None
+ The list of all caddy element id.
+ """
+
+def clear_errors() -> None:
+ """Clears all errors.
"""
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 ad1cee5..76970e0 100644
--- a/src/scene_controller/__init__.pyi
+++ b/src/scene_controller/__init__.pyi
@@ -1,184 +1,159 @@
-from typing import List
-
-def get_last_error(error_code: int) -> str:
- """Gets the last error
-
- Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
+from cadwork.api_types import *
def add_scene(name: str) -> bool:
- """Adds a new scene
+ """Adds a new scene.
Parameters:
- name: name
+ name: The scene name.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
def rename_scene(old_name: str, new_name: str) -> bool:
- """Renames a scene
+ """Renames a scene.
Parameters:
- old_name: old_name
- new_name: new_name
+ old_name: The old scene name.
+ new_name: The new scene name.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
def delete_scene(name: str) -> bool:
- """Deletes a scene
+ """Deletes a scene.
Parameters:
- name: name
+ name: The scene name.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
-def add_elements_to_scene(name: str, element_i_ds: List[int]) -> bool:
- """Adds elements to a scene
+def add_elements_to_scene(name: str, element_id_list: list[ElementId]) -> bool:
+ """Adds elements to a scene.
Parameters:
- name: name
- element_i_ds: element_i_ds
+ name: The scene name.
+ element_id_list:: The element id list.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
-def remove_elements_from_scene(name: str, element_i_ds: List[int]) -> bool:
- """Removes elements from a scene
+def remove_elements_from_scene(name: str, element_id_list: list[ElementId]) -> bool:
+ """Removes elements from a scene.
Parameters:
- name: name
- element_i_ds: element_i_ds
+ name: The scene name.
+ element_id_list:: The element id list.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
-def get_elements_from_scene(name: str) -> List[int]:
- """Gets the elements from a scene
+def get_elements_from_scene(name: str) -> list[ElementId]:
+ """Gets the elements from a scene.
Parameters:
- name: name
+ name: The scene name.
Returns:
- element ID list
+ The element id list.
"""
def activate_scene(name: str) -> bool:
- """Activates a scene
+ """Activates a scene.
Parameters:
- name: name
+ name: The scene name.
Returns:
- did operation succeed
+ True if the operation succeeded, false otherwise.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
-def get_scene_list() -> List[str]:
- """get scene list
+def get_scene_list() -> list[str]:
+ """Gets the list of scenes.
Returns:
- List[str]
+ The list of scene names.
"""
-def group_scences(a0: List[str]) -> int:
- """group scences
+def group_scences(scene_names: list[str]) -> UnsignedInt:
+ """Groups the scenes to a scene group.
Parameters:
- a0: a0
+ scene_names: The scene names.
Returns:
- int
+ The index of the new group.
"""
-def ungroup_scences(a0: int) -> None:
- """ungroup scences
+def ungroup_scences(group_index: UnsignedInt) -> None:
+ """Deletes the group of scenes.
Parameters:
- a0: a0
-
- Returns:
- None
+ group_index: The index of the group.
"""
def is_scene_present(name: str) -> bool:
- """Queries of scene with name is present
+ """Checks if a scene is present.
Parameters:
- name: name
+ name: The name of the scene to check.
Returns:
- presence of scene
+ True if the scene is present, false otherwise.
"""
-def set_group_tab_color(scene_group_name: str, red: int, green: int, blue: int) -> None:
- """set group tab color
+def set_group_tab_color(scene_group_name: str, red: int, green: int, blue: int, alpha: int) -> None:
+ """Sets the group tab color.
Parameters:
- scene_group_name: scene_group_name
- red: red
- green: green
- blue: blue
-
- Returns:
- None
+ scene_group_name: The name of the scene group.
+ red: Red component.
+ green: Green component.
+ blue: Blue component.
"""
def rename_scene_group(old_name: str, new_name: str) -> None:
- """rename scene group
+ """Renames a scene group.
Parameters:
- old_name: old_name
- new_name: new_name
-
- Returns:
- None
+ old_name: The old scene group name.
+ new_name: The new scene group name.
"""
-def get_group_index_by_name(scene_group_name: str) -> int:
- """get group index by name
+def get_group_index_by_name(scene_group_name: str) -> UnsignedInt:
+ """Gets the index of a scene group by its name.
Parameters:
- scene_group_name: scene_group_name
+ scene_group_name: The group name.
Returns:
- int
+ The index of the group, or a maximum uint64_t if not found.
"""
-def rename_scene_group_by_index(group_index: int, new_name: str) -> None:
- """rename scene group by index
+def rename_scene_group_by_index(group_index: UnsignedInt, new_name: str) -> None:
+ """Renames a scene group by its index.
Parameters:
- group_index: group_index
- new_name: new_name
-
- Returns:
- None
+ group_index: The index of the group.
+ new_name: The new scene group name.
"""
-def group_scences_with_name(a0: List[str], a1: str) -> int:
- """group scences with name
+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:
- a0: a0
- a1: a1
+ scene_names: The scene names to group.
+ group_name: The name of the new group.
Returns:
- int
+ The index of the new group.
"""
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 fdf444f..d7e3ba9 100644
--- a/src/shop_drawing_controller/__init__.pyi
+++ b/src/shop_drawing_controller/__init__.pyi
@@ -1,203 +1,139 @@
-from typing import List
-from cadwork import point_3d
+from cadwork.point_3d import point_3d
+from cadwork.api_types import *
-def get_last_error(error_code: int) -> str:
- """Gets the last error
- Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
-
-def export_2d_wireframe_with_clipboard(clipboard_number: int, with_layout: bool) -> None:
- """Exports a 2D wireframe to the clipboard
+def export_2d_wireframe_with_clipboard(clipboard_number: UnsignedInt, with_layout: bool) -> None:
+ """Exports a 2D wireframe to the clipboard.
Parameters:
- clipboard_number: clipboard_number
- with_layout: with_layout
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ with_layout: Use layout, false by default.
"""
-def export_2d_hidden_lines_with_clipboard(clipboard_number: int, with_layout: bool) -> None:
- """Exports a 2D hidden lines to the clipboard
+def export_2d_hidden_lines_with_clipboard(clipboard_number: UnsignedInt, with_layout: bool) -> None:
+ """Exports a 2D hidden lines to the clipboard.
Parameters:
- clipboard_number: clipboard_number
- with_layout: with_layout
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ with_layout: Use layout, false by default.
"""
def export_2d_wireframe_with_2dc(file_path: str, with_layout: bool) -> None:
- """Exports a 2D wireframe to a 2DC file
+ """Exports a 2D wireframe to a 2DC file.
Parameters:
- file_path: file_path
- with_layout: with_layout
-
- Returns:
- None
+ file_path: The export file path.
+ with_layout: Use layout, false by default.
"""
def export_2d_hidden_lines_with_2dc(file_path: str, with_layout: bool) -> None:
- """Exports a 2D hidden lines to a 2DC file
+ """Exports a 2D hidden lines to a 2DC file.
Parameters:
- file_path: file_path
- with_layout: with_layout
-
- Returns:
- None
+ file_path: The export file path.
+ with_layout: Use layout, false by default.
"""
-def export_wall_with_clipboard(clipboard_number: int, element_id_list: List[int]) -> None:
- """Exports a wall to the clipboard
+def export_wall_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None:
+ """Exports a wall to the clipboard.
Parameters:
- clipboard_number: clipboard_number
- element_id_list: element_id_list
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ element_id_list: The elements to export.
"""
-def export_export_solid_with_clipboard(clipboard_number: int, element_id_list: List[int]) -> None:
- """Exports an export solid to the clipboard
+def export_export_solid_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None:
+ """Exports an export solid to the clipboard.
Parameters:
- clipboard_number: clipboard_number
- element_id_list: element_id_list
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ element_id_list: The elements to export.
"""
-def export_piece_by_piece_with_clipboard(clipboard_number: int, element_id_list: List[int]) -> None:
- """Exports a piece-by-piece to the clipboard
+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:
- clipboard_number: clipboard_number
- element_id_list: element_id_list
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ element_id_list: The elements to export.
"""
-def assign_export_solid(ceo_element: List[int], element_id_list: List[int]) -> None:
- """Assigns elements to an export solid
+def assign_export_solid(ceo_element_id_list: list[ElementId], element_id_list: list[ElementId]) -> None:
+ """Assigns elements to an export solid.
Parameters:
- ceo_element: ceo_element
- element_id_list: element_id_list
-
- Returns:
- None
+ ceo_element_id_list: The export solid to assign.
+ element_id_list: The elements to assign.
"""
-def export_container_with_clipboard(clipboard_number: int, elements: List[int]) -> None:
- """Export a container to the clipboard
+def export_container_with_clipboard(clipboard_number: UnsignedInt, element_id_list: list[ElementId]) -> None:
+ """Export a container to the clipboard.
Parameters:
- clipboard_number: clipboard_number
- elements: elements
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ element_id_list: The elements to export.
"""
-def add_wall_section_horizontal(element: int, position: point_3d) -> None:
- """Adds a horizontal wall section
+def add_wall_section_horizontal(element_id: ElementId, position: point_3d) -> None:
+ """Adds a horizontal wall section.
Parameters:
- element: element
- position: position
-
- Returns:
- None
+ element_id: The element id.
+ position: The section position.
"""
-def add_wall_section_vertical(element: int, position: point_3d) -> None:
- """Adds a vertical wall section
+def add_wall_section_vertical(element_id: ElementId, position: point_3d) -> None:
+ """Adds a vertical wall section.
Parameters:
- element: element
- position: position
-
- Returns:
- None
+ element_id: The element id.
+ position: The section position.
"""
-def export_wall_with_clipboard_and_presetting(clipboard_number: int, element_id_list: List[int], presetting_file: str) -> None:
- """Exports a wall to the clipboard
+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:
- clipboard_number: clipboard_number
- element_id_list: element_id_list
- presetting_file: presetting_file
-
- Returns:
- None
+ clipboard_number: The clipboard number.
+ element_id_list: The element id list to export.
+ presetting_file: The presetting file path.
"""
def load_export_piece_by_piece_settings(settings_file_path: str) -> None:
- """Loads piece by piece export settings
+ """Loads piece by piece export settings.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
+ settings_file_path: The settings file path.
"""
def save_export_piece_by_piece_settings(settings_file_path: str) -> None:
- """Saves piece by piece export settings
+ """Saves piece by piece export settings.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
+ settings_file_path: The settings file path.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
def load_export_wall_settings(settings_file_path: str) -> None:
- """Loads wall export settings
+ """Loads wall export settings.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
+ settings_file_path: The settings file path.
"""
def load_export_solid_settings(settings_file_path: str) -> None:
- """Loads export solid settings
+ """Loads export solid settings.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
+ settings_file_path: The settings file path.
"""
def load_export_container_settings(settings_file_path: str) -> None:
- """Loads container export settings
+ """Loads container export settings.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
- """
-
+ settings_file_path: The settings file path.
+ """
\ No newline at end of file
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 a6249ad..6863d3e 100644
--- a/src/utility_controller/__init__.pyi
+++ b/src/utility_controller/__init__.pyi
@@ -1,1059 +1,1101 @@
-from typing import List
-from typing import Tuple
-from cadwork import point_3d
-from cadwork import window_geometry
+from cadwork.api_types import ElementId
+from cadwork.point_3d import point_3d
+from cadwork.window_geometry import window_geometry
+from cadwork.shortcut_key import shortcut_key
+from cadwork.shortcut_key_modifier import shortcut_key_modifier
-def get_last_error(error_code: int) -> str:
- """Gets the last error
-
- Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
def get_3d_version() -> int:
- """Gets the 3D version
+ """Gets the 3D version.
Returns:
- 3D version
+ The 3D version.
"""
def get_3d_build() -> int:
- """Gets the 3D build
+ """Gets the 3D build.
Returns:
- 3D build
+ The 3D build.
"""
def get_3d_file_path() -> str:
- """Gets the 3D file path
+ """Gets the 3D file path.
Returns:
- 3D file path
+ The 3D file path.
"""
-def set_project_data(element_id: str, data: str) -> None:
- """Sets the project data
+def set_project_data(project_data_id: str, data: str) -> None:
+ """Sets the project data.
Parameters:
- element_id: element_id
- data: data
-
- Returns:
- None
+ project_data_id: The project data id.
+ data: The data to set.
"""
+
def print_error(message: str) -> None:
- """Prints an error
+ """Prints an error to the bottom toolbar of Cadwork 3d.
- Parameters:
- message: message
+ Notes:
+ Attention, this function is blocking. User will need to click to
+ continue the process.
- Returns:
- None
+ Parameters:
+ message: The error message.
"""
+
def get_language() -> str:
- """Gets the 3D language
+ """Gets the 3D language.
Returns:
- 3D language
+ The language.
"""
-def print_message(message: str, column: int) -> None:
- """Prints a message
- Parameters:
- message: message
- column: column
+def print_message(message: str, row: int, column: int) -> None:
+ """Prints a message that will be visualized in the bottom toolbar of the
+ 3D view. You can arrange the message in the desired position by specifying the row and column.
- Returns:
- None
+ Examples:
+ >>> import utility_controller as uc
+ >>> uc.print_message("Hello World!", 1, 1)
+
+ Parameters:
+ message: The message to print.
+ row: The row to print the message in.
+ column: The column to print the message in.
"""
+
def get_user_int(message: str) -> int:
- """Prompts the user for an integer
+ """Prompts the user for an integer.
Parameters:
- message: message
+ message: The message to display.
Returns:
- user integer
+ The user input integer.
"""
+
def get_user_double(message: str) -> float:
- """Prompts the user for a double
+ """Prompts the user for a double.
Parameters:
- message: message
+ message: The message to display.
Returns:
- user double
+ The user input double.
"""
+
def get_user_bool(message: str, default_yes: bool) -> bool:
- """Prompts the user for a boolean
+ """Prompts the user for a boolean.
Parameters:
- message: message
- default_yes: default_yes
+ message: The message to display.
+ default_yes: The default value, True by default.
Returns:
- user boolean
+ The user input boolean.
"""
+
def get_user_string(message: str) -> str:
- """Prompts the user for a string
+ """Prompts the user for a string.
Parameters:
- message: message
+ message: The message to display.
Returns:
- user string
+ The user input string.
"""
+
def set_project_name(project_name: str) -> None:
- """Sets the project name
+ """Sets the project name.
Parameters:
- project_name: project_name
-
- Returns:
- None
+ project_name: The project name.
"""
+
def set_project_number(project_number: str) -> None:
- """Sets the project number
+ """Sets the project number.
Parameters:
- project_number: project_number
-
- Returns:
- None
+ project_number: The project number.
"""
+
def set_project_part(project_part: str) -> None:
- """Sets the project part
+ """Sets the project part.
Parameters:
- project_part: project_part
-
- Returns:
- None
+ project_part: The project part.
"""
+
def set_project_architect(project_architect: str) -> None:
- """Sets the project architect
+ """Sets the project architect.
Parameters:
- project_architect: project_architect
-
- Returns:
- None
+ project_architect: The project architect.
"""
+
def set_project_customer(project_customer: str) -> None:
- """Sets the project customer
+ """Sets the project customer.
Parameters:
- project_customer: project_customer
-
- Returns:
- None
+ project_customer: The project customer.
"""
+
def set_project_designer(project_designer: str) -> None:
- """Sets the project designer
+ """Sets the project designer.
Parameters:
- project_designer: project_designer
-
- Returns:
- None
+ project_designer: The project designer.
"""
+
def set_project_deadline(project_deadline: str) -> None:
- """Sets the project deadline
+ """Sets the project deadline.
Parameters:
- project_deadline: project_deadline
-
- Returns:
- None
+ project_deadline: The project deadline.
"""
+
def set_project_user_attribute(number: int, user_attribute: str) -> None:
- """Sets the project user attribute
+ """Sets the project user attribute.
Parameters:
- number: number
- user_attribute: user_attribute
-
- Returns:
- None
+ number: The project user attribute number.
+ user_attribute: The project user attribute.
"""
+
def set_project_user_attribute_name(number: int, user_attribute_name: str) -> None:
- """Sets the project user attribute name
+ """Sets the project user attribute name.
Parameters:
- number: number
- user_attribute_name: user_attribute_name
-
- Returns:
- None
+ number: The project user attribute number.
+ user_attribute_name: The project user attribute name.
"""
+
def set_project_latitude(latitude: float) -> None:
- """Sets the project latitude
+ """Sets the project latitude.
Parameters:
- latitude: latitude
-
- Returns:
- None
+ latitude: The project latitude.
"""
+
def set_project_longitude(longitude: float) -> None:
- """Sets the project longitude
+ """Sets the project longitude.
Parameters:
- longitude: longitude
-
- Returns:
- None
+ longitude: The project longitude.
"""
+
def set_project_address(address: str) -> None:
- """Sets the project address
+ """Sets the project address.
Parameters:
- address: address
-
- Returns:
- None
+ address: The project address.
"""
+
def set_project_postal_code(postal_code: str) -> None:
- """Sets the project postal code
+ """Sets the project postal code.
Parameters:
- postal_code: postal_code
-
- Returns:
- None
+ postal_code: The project postal code.
"""
+
def set_project_city(city: str) -> None:
- """Sets the project city
+ """Sets the project city.
Parameters:
- city: city
-
- Returns:
- None
+ city: The project city.
"""
+
def set_project_country(country: str) -> None:
- """Sets the project country
+ """Sets the project country.
Parameters:
- country: country
-
- Returns:
- None
+ country: The project country.
"""
+
def get_user_file_from_dialog(name_filter: str) -> str:
- """Gets a file with a dialog
+ """Gets a file with a dialog.
Parameters:
- name_filter: name_filter
+ name_filter: The dialog file filter.
Returns:
- file path
+ The file path.
"""
+
def get_client_number() -> str:
- """Gets the client number
+ """Gets the client number.
Returns:
- client number
+ The client number.
"""
+
def get_user_point() -> point_3d:
- """Gets a point from the user
+ """Gets a point from the user.
Returns:
- user point
+ The user point.
"""
-def disable_auto_display_refresh() -> None:
- """Disables automatic display refresh
- Returns:
- None
+def disable_auto_display_refresh() -> None:
+ """Disables automatic display refresh.
+ This function prevents the display from updating automatically,
+ which can significantly improve performance during operations that involve multiple changes or computations.
+ The display will remain static until explicitly refreshed by the user.
"""
+
def enable_auto_display_refresh() -> None:
- """Enables automatic display refresh
+ """Enables automatic display refresh.
+ This function restores the default behavior where the display updates automatically after each operation.
+ Use this function to resume normal display updates after previously disabling them with disable_auto_display_refresh().
+ It's recommended to call this function after completing operations that required disabled display refreshing.
- Returns:
- None
+ Examples:
+ >>> import cadwork
+ >>> import utility_controller as uc
+ >>> import element_controller as ec
+ >>> uc.disable_auto_display_refresh()
+ >>> # Perform operations that require disabled display refresh
+ >>> your_list_of_elements: list[int] = []
+ >>> uc.enable_auto_display_refresh()
+ >>> ec.recreate_elements(your_list_of_elements)
+
+ Note:
+ If elements were created while display refresh was disabled, it's important
+ to recreate these elements after enabling the display refresh to ensure they
+ are properly visualized in cadwork.
"""
+
def create_new_guid() -> str:
- """Creates a new GUID
+ """Creates a new GUID.
Returns:
- GUID
+ The new GUID.
"""
+
def print_to_console(message: str) -> None:
- """Prints a message to the console
+ """Prints a message to the Cadwork debug console.
Parameters:
- message: message
-
- Returns:
- None
+ message: The message.
"""
+
def export_screen_to_image(file_path: str, factor: int) -> None:
- """Exports the screen to an image
+ """Exports the screen to an image.
Parameters:
- file_path: file_path
- factor: factor
-
- Returns:
- None
+ file_path: The file path.
+ factor: The image factor.
"""
+
def get_new_user_file_from_dialog(name_filter: str) -> str:
- """Gets a new file with a dialog
+ """Gets a new file with a dialog.
Parameters:
- name_filter: name_filter
+ name_filter: The dialog file filter.
Returns:
- file path
+ The file path.
"""
+
def api_autostart(api_name: str, option: int) -> int:
- """api autostart
+ """Sets an API autostart option.
Parameters:
- api_name: api_name
- option: option
+ api_name: The name of the API be managed.
+ option: The autostart option to use.
+
+
+ - -1: Checks if API is configured for autostart without making changes. Returns 1 if API is found, 0 if not, or -1 in case of errors.
+ - 1: Enables autostart for the specified API.
+ - 0: Disables autostart for the specified API.
+
+ Note:
+ This function reads and updates alias and module configuration files
+ to manage the autostart state of the API.
+
+ Examples:
+ >>> api_autostart("my_api", 1) # Enable autostart
+ >>> api_autostart("my_api", 0) # Disable autostart
+ >>> api_autostart("my_api", -1) # Check current autostart state
Returns:
- int
+ The value of option if the operation is successful, or -1 in case of errors.
"""
+
def enable_autostart(api_name: str) -> None:
- """enable autostart
+ """Enables autostart for a given API.
Parameters:
- api_name: api_name
-
- Returns:
- None
+ api_name: The name of the API for which to enable autostart.
"""
+
def disable_autostart(api_name: str) -> None:
- """disable autostart
+ """Disables autostart for a given API.
Parameters:
- api_name: api_name
-
- Returns:
- None
+ api_name: The name of the API for which to disable autostart.
"""
+
def check_autostart(api_name: str) -> bool:
- """check autostart
+ """Checks if autostart is enabled for a given API.
Parameters:
- api_name: api_name
+ api_name: The name of the API to check.
Returns:
- bool
+ True if autostart is enabled, false otherwise.
"""
+
def delete_project_data(element_id: str) -> None:
- """Deletes the project data
+ """Deletes the project data.
Parameters:
- element_id: element_id
-
- Returns:
- None
+ element_id: The project data id.
"""
+
def run_external_program(name: str) -> bool:
- """Runs a 3D external program
+ """Runs a 3D external program.
Parameters:
- name: name
+ name: The external program name.
Returns:
- external program return
+ False if the program could not be run, true otherwise.
"""
-def save_3d_file_silently() -> None:
- """Saves the 3D file silently
- Returns:
- None
+def save_3d_file_silently() -> None:
+ """Saves the 3D file silently.
"""
+
def get_licence_first_part() -> str:
- """Gets the first part of the licence
+ """Gets the first part of the licence.
Returns:
- first part of licence
+ The first part of the licence.
"""
+
def get_licence_second_part() -> str:
- """Gets the second part of the licence
+ """Gets the second part of the licence.
Returns:
- second part of licence
+ The second part of the licence.
"""
-def show_progress_bar() -> None:
- """Shows a ProgressBar in the CommandBar
- Returns:
- None
+def show_progress_bar() -> None:
+ """Shows a ProgressBar in the CommandBar.
"""
+
def update_progress_bar(value: int) -> None:
- """Updates the ProgressBar with a value
+ """Updates the ProgressBar with a value.
Parameters:
- value: value
-
- Returns:
- None
+ value: A value between 0 and 100.
"""
-def hide_progress_bar() -> None:
- """Hides the ProgressBar
- Returns:
- None
+def hide_progress_bar() -> None:
+ """Hides the ProgressBar.
"""
+
def get_user_color(initial_color: int) -> int:
- """Gets a color choosen by the user
+ """Gets a color choosen by the user.
Parameters:
- initial_color: initial_color
+ initial_color: The initial color.
Returns:
- the colornumber
+ The color number.
"""
+
def get_3d_linear_units() -> str:
- """Gets the current linear units
+ """Gets the current linear units.
Returns:
- str
+ The current linear units.
"""
+
def get_3d_linear_display_units() -> str:
- """Gets the current display units
+ """Gets the current display units.
Returns:
- str
+ The current display units.
"""
+
def get_3d_angular_units() -> str:
- """Gets the current angular units
+ """Gets the current angular units.
Returns:
- str
+ The current angular units.
"""
+
def get_3d_angular_display_units() -> str:
- """Gets the current angular display units
+ """Gets the current angular display units.
Returns:
- str
+ The current angular display units.
"""
+
def get_3d_build_date() -> str:
- """Gets the current build date
+ """Gets the current build date.
Returns:
- str
+ The current build date.
"""
+
def set_project_elevation(elevation: float) -> None:
- """Sets the project elevation
+ """Sets the project elevation.
Parameters:
- elevation: elevation
-
- Returns:
- None
+ elevation: The project elevation.
"""
-def clear_errors() -> None:
- """clear errors
- Returns:
- None
+def clear_errors() -> None:
+ """Clears all errors.
"""
-def push_check_and_query_data() -> None:
- """push check and query data
- Returns:
- None
+def push_check_and_query_data() -> None:
+ """Pushes the current state of check and query data onto a stack.
"""
-def pop_check_and_query_data() -> None:
- """pop check and query data
- Returns:
- None
+def pop_check_and_query_data() -> None:
+ """Pops the most recent state of check and query data from the stack.
"""
-def change_check_and_query_data_to_no_queries() -> None:
- """change check and query data to no queries
- Returns:
- None
+def change_check_and_query_data_to_no_queries() -> None:
+ """Changes the current state of check and query data to no queries.
"""
-def change_check_and_query_data_to_queries() -> None:
- """change check and query data to queries
- Returns:
- None
+def change_check_and_query_data_to_queries() -> None:
+ """Changes the current state of check and query data to allow queries.
"""
+
def is_direct_info_enabled() -> bool:
- """is direct info enabled
+ """Checks if Direct Info is enabled.
Returns:
- bool
+ True if Direct Info is enabled, false otherwise.
"""
-def enable_direct_info() -> None:
- """enable direct info
- Returns:
- None
+def enable_direct_info() -> None:
+ """Enables Direct Info.
"""
-def disable_direct_info() -> None:
- """disable direct info
- Returns:
- None
+def disable_direct_info() -> None:
+ """Disables Direct Info.
"""
+
def load_attribute_display_settings(file_path: str) -> None:
- """load attribute display settings
+ """Loads attribute display settings from a file.
Parameters:
- file_path: file_path
-
- Returns:
- None
+ file_path: The path to the file containing the settings.
"""
+
def set_project_description(description: str) -> None:
- """set project description
+ """Sets the project description.
Parameters:
- description: description
-
- Returns:
- None
+ description: The new description for the project.
"""
-def start_project_data_dialog() -> None:
- """start project data dialog
- Returns:
- None
+def start_project_data_dialog() -> None:
+ """Starts the project data dialog.
"""
-def init_LxSDK() -> None:
- """init LxSDK
- Returns:
- None
+def init_LxSDK() -> None:
+ """Initializes the LxSDK.
"""
-def load_element_attribute_display_settings(file_path: str, elements: List[int]) -> None:
- """load element attribute display settings
- Parameters:
- file_path: file_path
- elements: elements
+def load_element_attribute_display_settings(file_path: str, elements: list[ElementId]) -> None:
+ """Loads element attribute display settings from a file.
- Returns:
- None
+ Parameters:
+ file_path: The path to the file containing the settings.
+ elements: The element list for which to load the settings.
"""
+
def get_global_x_offset() -> float:
- """get global x offset
+ """Gets the global X offset.
Returns:
- float
+ The global X offset.
"""
+
def set_global_x_offset(offset: float) -> None:
- """set global x offset
+ """Sets the global X offset.
Parameters:
- offset: offset
-
- Returns:
- None
+ offset: The new global X offset.
"""
+
def get_global_y_offset() -> float:
- """get global y offset
+ """Gets the global Y offset.
Returns:
- float
+ The global Y offset.
"""
+
def set_global_y_offset(offset: float) -> None:
- """set global y offset
+ """Sets the global Y offset.
Parameters:
- offset: offset
-
- Returns:
- None
+ offset: The new global Y offset.
"""
+
def get_global_z_offset() -> float:
- """get global z offset
+ """Gets the global Z offset.
Returns:
- float
+ The global Z offset.
"""
+
def set_global_z_offset(offset: float) -> None:
- """set global z offset
+ """Sets the global Z offset.
Parameters:
- offset: offset
-
- Returns:
- None
+ offset: The new global Z offset.
"""
-def show_north_arrow() -> None:
- """show north arrow
- Returns:
- None
+def show_north_arrow() -> None:
+ """Shows the north arrow on the 3D view.
"""
-def hide_north_arrow() -> None:
- """hide north arrow
- Returns:
- None
+def hide_north_arrow() -> None:
+ """Hides the north arrow on the 3D view.
"""
+
def is_north_arrow_visible() -> bool:
- """is north arrow visible
+ """Checks if the north arrow is visible on the 3D view.
Returns:
- bool
+ True if the north arrow is visible, false otherwise.
"""
+
def get_north_angle() -> float:
- """get north angle
+ """Gets the angle of the north direction.
Returns:
- float
+ The angle of the north direction in degrees.
"""
+
def set_north_angle(north_angle: float) -> None:
- """set north angle
+ """Sets the angle of the north direction.
Parameters:
- north_angle: north_angle
-
- Returns:
- None
+ north_angle: The angle of the north direction in degrees.
"""
+
def get_user_file_from_dialog_in_path(name_filter: str, path: str) -> str:
- """get user file from dialog in path
+ """Gets a user file from a dialog in a specified path.
Parameters:
- name_filter: name_filter
- path: path
+ name_filter: The filter for the dialog.
+ path: The path in which to get the user file.
Returns:
- str
+ A string containing the user file.
"""
+
def get_new_user_file_from_dialog_in_path(name_filter: str, path: str) -> str:
- """get new user file from dialog in path
+ """Gets a new user file from a dialog in a specified path.
Parameters:
- name_filter: name_filter
- path: path
+ name_filter: The filter for the dialog.
+ path: The path in which to get the new user file.
Returns:
- str
+ A string containing the new user file.
"""
-def enable_update_variant() -> None:
- """enable update variant
- Returns:
- None
+def enable_update_variant() -> None:
+ """Enables the update variant.
"""
-def disable_update_variant() -> None:
- """disable update variant
- Returns:
- None
+def disable_update_variant() -> None:
+ """Disables the update variant.
"""
-def get_user_points() -> List[point_3d]:
- """get user points
+
+def get_user_points() -> list[point_3d]:
+ """Gets user points.
Returns:
- List[point_3d]
+ A list of user points.
"""
-def get_user_points_with_count(a0: int) -> List[point_3d]:
- """get user points with count
+
+def get_user_points_with_count(count: int) -> list[point_3d]:
+ """Gets user points with a specified count.
Parameters:
- a0: a0
+ count: The number of user points to get.
Returns:
- List[point_3d]
+ A list of user points.
"""
+
def get_user_path_from_dialog() -> str:
- """get user path from dialog
+ """Gets the user path from a dialog.
Returns:
- str
+ A string containing the user path.
"""
-def get_user_path_from_dialog_in_path(a0: str) -> str:
- """get user path from dialog in path
+
+def get_user_path_from_dialog_in_path(path: str) -> str:
+ """Gets the user path from a dialog in a specified path.
Parameters:
- a0: a0
+ path: The path in which to get the user path.
Returns:
- str
+ A string containing the user path.
"""
-def execute_shortcut(a0: int, a1: int) -> None:
- """execute shortcut
- Parameters:
- a0: a0
- a1: a1
+def execute_shortcut(shortcut_key_modifier: shortcut_key_modifier, shortcut_key: shortcut_key) -> None:
+ """Executes a shortcut.
- Returns:
- None
+ Parameters:
+ shortcut_key_modifier: The modifier key for the shortcut.
+ shortcut_key: The key for the shortcut.
"""
+
def run_external_program_from_custom_directory(file_path: str) -> bool:
- """Runs a 3D external program from a custom file path
+ """Runs a 3D external program from a custom directory.
Parameters:
- file_path: file_path
+ file_path: The external program file path.
Returns:
- external program return
+ False if error, true otherwise.
"""
+
def get_3d_file_name() -> str:
- """Gets the 3D file name
+ """Gets the 3D file name.
Returns:
- 3D file name
+ The 3D file name.
"""
+
def get_project_data(element_id: str) -> str:
- """Gets the project data
+ """Gets the project data.
Parameters:
- element_id: element_id
+ element_id: The project data id.
Returns:
- project data
+ The project data.
"""
+
def get_project_name() -> str:
- """Gets the project name
+ """Gets the project name.
Returns:
- project name
+ The project name.
"""
+
def get_project_part() -> str:
- """Sets the project part
+ """Gets the project part.
Returns:
- project part
+ The project part.
"""
+
def get_project_architect() -> str:
- """Gets the project architect
+ """Gets the project architect.
Returns:
- project architect
+ The project architect.
"""
+
def get_project_number() -> str:
- """Gets the project number
+ """Gets the project number.
Returns:
- project number
+ The project number.
"""
+
def get_project_customer() -> str:
- """Gets the project customer
+ """Gets the project customer.
Returns:
- project customer
+ The project customer.
"""
+
def get_project_designer() -> str:
- """Gets the project designer
+ """Gets the project designer.
Returns:
- project designer
+ The project designer.
"""
+
def get_project_deadline() -> str:
- """Gets the project deadline
+ """Gets the project deadline.
Returns:
- project deadline
+ The project deadline.
"""
+
def get_project_user_attribute(number: int) -> str:
- """Gets the project user attribute
+ """Gets the project user attribute.
Parameters:
- number: number
+ number: The project user attribute number.
Returns:
- project user attribute
+ The project user attribute.
"""
+
def get_project_user_attribute_name(number: int) -> str:
- """Gets the project user attribute name
+ """Gets the project user attribute name.
Parameters:
- number: number
+ number: The project user attribute number.
Returns:
- project user attribute name
+ The project user attribute name.
"""
+
def get_project_latitude() -> float:
- """Gets the project latitude
+ """Gets the project latitude.
Returns:
- project latitude
+ The project latitude.
"""
+
def get_project_longitude() -> float:
- """Gets the project longitude
+ """Gets the project longitude.
Returns:
- project longitude
+ The project longitude.
"""
+
def get_project_postal_code() -> str:
- """Gets the project postal code
+ """Gets the project postal code.
Returns:
- project postal code
+ The project postal code.
"""
+
def get_project_address() -> str:
- """Gets the project address
+ """Gets the project address.
Returns:
- project address
+ The project address.
"""
+
def get_project_city() -> str:
- """Gets the project city
+ """Gets the project city.
Returns:
- project city
+ The project city.
"""
+
def get_project_country() -> str:
- """Gets the project country
+ """Gets the project country.
Returns:
- project country
+ The project country.
"""
+
def get_project_elevation() -> float:
- """Gets the project elevation
+ """Gets the project elevation.
Returns:
- project elevation
+ The project elevation.
"""
+
def get_project_description() -> str:
- """get project description
+ """Gets the project description.
Returns:
- str
+ A string containing the project description.
"""
+
def get_project_guid() -> str:
- """Gets the project GUID
+ """Gets the project GUID.
Returns:
- project GUID
+ The project GUID.
"""
+
def get_3d_userprofil_path() -> str:
- """Gets the 3D userprofil path
+ """Gets the 3D userprofil path.
Returns:
- the 3D userprofil path
+ The 3D userprofil path.
"""
+
def get_plugin_path() -> str:
- """get plugin path
+ """Gets the plugin path.
Returns:
- str
+ A string containing the plugin path.
"""
+
def get_millimetre_from_imperial_string(value: str) -> float:
- """get millimetre from imperial string
+ """Converts an imperial string to millimetres.
Parameters:
- value: value
+ value: The imperial string to convert.
Returns:
- float
+ The value in millimetres.
"""
+
def get_imperial_string_from_millimetre(value: float) -> str:
- """get imperial string from millimetre
+ """Converts a value in millimetres to an imperial string.
Parameters:
- value: value
+ value: The value in millimetres to convert.
Returns:
- str
+ The value as an imperial string.
"""
+
def get_user_catalog_path() -> str:
- """get user catalog path
+ """Gets the user catalog path.
Returns:
- str
+ A string containing the user catalog path.
"""
+
def get_3d_hwnd() -> int:
- """Gets the 3D HWND
+ """Gets the 3D HWND.
Returns:
- 3D HWND
+ The 3D HWND.
"""
-def close_cadwork_document_saved() -> None:
- """close cadwork saved
- Returns:
- None
+def close_cadwork_document_saved() -> None:
+ """close cadwork saved.
"""
-def close_cadwork_document_unsaved() -> None:
- """close cadwork document unsaved
- Returns:
- None
+def close_cadwork_document_unsaved() -> None:
+ """close cadwork unsaved.
"""
+
def get_use_of_global_coordinates() -> bool:
- """get use of global coordinates
+ """Gets the use of global coordinates.
Returns:
- bool
+ True if global coordinates are used, false otherwise.
"""
+
def set_use_of_global_coordinates(use_of_global_coordinates: bool) -> None:
- """Sets the use of global coordinates
+ """Sets the use of global coordinates.
Parameters:
- use_of_global_coordinates: use_of_global_coordinates
-
- Returns:
- None
+ use_of_global_coordinates: True to use global coordinates, false otherwise.
"""
+
def get_global_origin() -> point_3d:
- """Gets the global origin
+ """Gets the global origin.
Returns:
- global origin
+ The global origin.
"""
+
def set_global_origin(global_origin: point_3d) -> None:
- """Sets the global origin
+ """Sets the global origin.
Parameters:
- global_origin: global_origin
-
- Returns:
- None
+ global_origin: The global origin.
"""
+
def create_snapshot() -> str:
- """get snapshot from screen
+ """Get snapshot from screen.
Returns:
- snapshot
+ The snapshot as a string.
"""
-def get_3d_gui_upper_left_screen_coordinates() -> Tuple[int, int]:
- """get 3d gui upper left screen coordinates
+
+def get_3d_gui_upper_left_screen_coordinates() -> tuple[int, int]:
+ """Get the coordinates of the upper left corner of the 3D GUI.
Returns:
- coordinates of the upper left corner of the 3D GUI
+ The coordinates of the upper left corner of the 3D GUI.
"""
+
def get_3d_main_window_geometry() -> 'window_geometry':
- """get 3d main window geometry
+ """Get the geometry of 3d main window.
Returns:
- window geometry
+ The geometry of the 3D main window.
"""
-def get_project_data_keys() -> List[str]:
- """get project data keys
+
+def get_project_data_keys() -> list[str]:
+ """Gets all keys for project data.
Returns:
- List[str]
+ The list of project data keys.
"""
+
+def get_user_int_with_default_value(message: str, default_value: int) -> int:
+ """Prompts the user for an integer with a default value.
+
+ Parameters:
+ message: The message to display.
+ default_value: The default value.
+
+ Returns:
+ The user integer.
+ """
+
+
+def get_user_double_with_default_value(message: str, default_value: float) -> float:
+ """Prompts the user for a double with a default value.
+
+ Parameters:
+ message: The message to display.
+ default_value: The default value.
+
+ Returns:
+ The user double.
+ """
+
+
+def get_user_string_with_default_value(message: str, default_value: str) -> str:
+ """Prompts the user for a string with a default value.
+
+ Parameters:
+ message: The message to display.
+ default_value: The default value.
+
+ Returns:
+ The user string.
+ """
+
+
+def get_3d_version_name() -> str:
+ """Gets the 3D version name.
+
+ Returns:
+ The 3D version name.
+ """
+
+
+def redirect_python_output_to_logger() -> None:
+ """Redirects output from Python's print function to the cadwork logger.
+ This function is used to redirect the output of the Python interpreter to the logger.
+ This is useful for debugging and logging purposes.
+ """
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 e8b63d7..69a36dd 100644
--- a/src/visualization_controller/__init__.pyi
+++ b/src/visualization_controller/__init__.pyi
@@ -1,503 +1,435 @@
-from typing import List
-from cadwork import camera_data
-from cadwork import point_3d
-from cadwork import rgb_color
+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 get_last_error(error_code: int) -> str:
- """Gets the last error
+def set_color(element_id_list: list[ElementId], color_id: ColorId) -> None:
+ """Sets the element color.
Parameters:
- error_code: error_code
-
- Returns:
- error string
- """
-
-def set_color(element_id_list: List[int], color_id: int) -> None:
- """Sets the element color
-
- Parameters:
- element_id_list: element_id_list
- color_id: color_id
-
- Returns:
- None
+ element_id_list: The list of element id.
+ color_id: The color ID to set.
"""
-def set_opengl_color(element_id_list: List[int], color: None) -> None:
- """Sets the element OpenGL color
+def set_opengl_color(element_id_list: list[ElementId], color: rgb_color) -> None:
+ """Sets the element OpenGL color.
Parameters:
- element_id_list: element_id_list
- color: color
-
- Returns:
- None
+ element_id_list: The list of element id.
+ color: The OpenGL color to set.
"""
-def is_active(element_id: int) -> bool:
- """Tests if element is active
+def is_active(element_id: ElementId) -> bool:
+ """Tests if element is active.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element active
+ True if the element is active, false otherwise.
"""
-def set_active(element_id_list: List[int]) -> None:
- """Sets element active
+def set_active(element_id_list: list[ElementId]) -> None:
+ """Sets element active.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def set_inactive(element_id_list: List[int]) -> None:
- """Sets the element inactive
+def set_inactive(element_id_list: list[ElementId]) -> None:
+ """Sets the element inactive.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def is_visible(element_id: int) -> bool:
- """Tests if element is visible
+def is_visible(element_id: ElementId) -> bool:
+ """Tests if element is visible.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element visible
+ True if the element is visible, false otherwise.
"""
-def set_visible(element_id_list: List[int]) -> None:
- """Sets the element visible
+def set_visible(element_id_list: list[ElementId]) -> None:
+ """Sets the element visible.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def set_invisible(element_id_list: List[int]) -> None:
- """Sets the element invisible
+def set_invisible(element_id_list: list[ElementId]) -> None:
+ """Sets the element invisible.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def is_immutable(element_id: int) -> bool:
- """Tests if the element is immutable
+def is_immutable(element_id: ElementId) -> bool:
+ """Tests if the element is immutable.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- is element immutable
+ True if the element is immutable, false otherwise.
"""
-def set_immutable(element_id_list: List[int]) -> None:
- """Sets the element immutable
+def set_immutable(element_id_list: list[ElementId]) -> None:
+ """Sets the element immutable.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def set_mutable(element_id_list: List[int]) -> None:
- """Sets the element mutable
+def set_mutable(element_id_list: list[ElementId]) -> None:
+ """Sets the element mutable.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
def show_all_elements() -> None:
- """Shows all elements
-
- Returns:
- None
+ """Shows all elements.
"""
def hide_all_elements() -> None:
- """Hides all elements
-
- Returns:
- None
+ """Hides all elements.
"""
def zoom_all_elements() -> None:
- """Zooms on all elements
-
- Returns:
- None
+ """Zooms on all elements.
"""
def zoom_active_elements() -> None:
- """Zooms on all active elements
-
- Returns:
- None
+ """Zooms on all active elements.
"""
def refresh() -> None:
- """Refresh the drawing area
-
- Returns:
- None
+ """Refresh the drawing area.
"""
-def set_material(element_id_list: List[int], element_id: int) -> None:
- """Sets the element material
+def set_material(element_id_list: list[ElementId], element_id: ElementId) -> None:
+ """Sets the element material.
Parameters:
- element_id_list: element_id_list
- element_id: element_id
-
- Returns:
- None
+ element_id_list: The list of element id.
+ element_id: The material ID to set.
"""
-def save_visibility_state() -> visibility_state:
- """Saves the visibility state
+def save_visibility_state() -> "visibility_state":
+ """Saves the visibility state.
Returns:
- visibility state
+ The visibility state.
"""
def restore_visibility_state(state: None) -> None:
- """Restores the visibility state
+ """Restores the visibility state.
Parameters:
- state: state
-
- Returns:
- None
+ state: The visibility state to restore.
"""
-def save_activation_state() -> activation_state:
- """Saves the activation state
+def save_activation_state() -> "activation_state":
+ """Saves the activation state.
Returns:
- activation state
+ The activation state.
"""
def restore_activation_state(state: None) -> None:
- """Restores the activation state
+ """Restores the activation state.
Parameters:
- state: state
-
- Returns:
- None
+ state: The activation state to restore.
"""
def show_view_positive_x() -> None:
- """Sets the view to +X
-
- Returns:
- None
+ """Sets the view to +X.
"""
def show_view_negative_x() -> None:
- """Sets the view to -X
-
- Returns:
- None
+ """Sets the view to -X.
"""
def show_view_positive_y() -> None:
- """Sets the view to +Y
-
- Returns:
- None
+ """Sets the view to +Y.
"""
def show_view_negative_y() -> None:
- """Sets the view to -Y
-
- Returns:
- None
+ """Sets the view to -Y.
"""
def show_view_positive_z() -> None:
- """Sets the view to +Z
-
- Returns:
- None
+ """Sets the view to +Z.
"""
def show_view_negative_z() -> None:
- """Sets the view to -Z
-
- Returns:
- None
+ """Sets the view to -Z.
"""
def show_view_standard_axo() -> None:
- """Sets the view to standard axonometry
-
- Returns:
- None
+ """Sets the view to standard axonometry.
"""
def show_view_wireframe() -> None:
- """Sets the view to wireframe
-
- Returns:
- None
+ """Sets the view to wireframe.
"""
def show_view_hidden_lines() -> None:
- """Sets the view to hidden lines
-
- Returns:
- None
+ """Sets the view to hidden lines.
"""
def show_view_dashed_hidden_lines() -> None:
- """Sets the view to dashed hidden lines
-
- Returns:
- None
+ """Sets the view to dashed hidden lines.
"""
def show_view_shaded2() -> None:
- """Sets the view to shaded 2
-
- Returns:
- None
+ """Sets the view to shaded 2.
"""
def show_view_shaded1() -> None:
- """Sets the view to shaded 1
-
- Returns:
- None
+ """Sets the view to shaded 1.
"""
-def is_selectable(element_id: int) -> bool:
- """Returns if the element is selectable
+def is_selectable(element_id: ElementId) -> bool:
+ """Returns if the element is selectable.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- bool
+ True if the element is selectable, false otherwise.
"""
-def set_unselectable(element_id_list: List[int]) -> None:
- """Sets a list of elements unselectable
+def set_unselectable(element_id_list: list[ElementId]) -> None:
+ """Sets a list of elements unselectable.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
-def set_selectable(element_id_list: List[int]) -> None:
- """Sets a list of elements selectable
+def set_selectable(element_id_list: list[ElementId]) -> None:
+ """Sets a list of elements selectable.
Parameters:
- element_id_list: element_id_list
-
- Returns:
- None
+ element_id_list: The list of element id.
"""
def clear_errors() -> None:
- """clear errors
-
- Returns:
- None
+ """Clears all errors.
"""
def load_marking_settings(settings_file_path: str) -> None:
- """Loads marking settings file
+ """Loads marking settings file.
Parameters:
- settings_file_path: settings_file_path
-
- Returns:
- None
+ settings_file_path: The path to the settings file.
"""
def is_plane_2d() -> bool:
- """returns if plane 2d is active
+ """returns if plane 2d is active.
Returns:
- bool
+ True if plane 2D is active, false otherwise.
"""
def set_camera(position: point_3d, target: point_3d) -> None:
"""Sets the position of the camera, pointing to a target.
Parameters:
- position: position
- target: target
-
- Returns:
- None
+ position: The position of the camera.
+ target: The target the camera is pointing at.
"""
def show_perspective_central() -> None:
- """changes the viewmode to Perpective
-
- Returns:
- None
+ """changes the viewmode to Perspective.
"""
-def set_color_without_material(a0: List[int], a1: int) -> None:
- """set color without material
- Parameters:
- a0: a0
- a1: a1
+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.
- Returns:
- None
+ Parameters:
+ element_id_list: A list of element id.
+ color_id: The color ID to set.
"""
-def set_texture_rotated(a0: List[int], a1: bool) -> None:
- """set texture rotated
- Parameters:
- a0: a0
- a1: a1
+def set_texture_rotated(element_id_list: list[ElementId], flag: bool) -> None:
+ """Sets the rotation of the texture for a list of elements.
- Returns:
- None
+ Parameters:
+ element_id_list: A list of element id.
+ flag: True to rotate the texture, false to not rotate it.
"""
def show_reference_side_beam(show: bool) -> None:
- """show reference side beam
+ """Shows or hides the reference side beam.
Parameters:
- show: show
-
- Returns:
- None
+ show: True to show the reference side beam, false to hide it.
"""
def show_reference_side_panel(show: bool) -> None:
- """show reference side panel
+ """Shows or hides the reference side panel.
Parameters:
- show: show
-
- Returns:
- None
+ show: True to show the reference side panel, false to hide it.
"""
def show_reference_side_wall(show: bool) -> None:
- """show reference side wall
+ """Shows or hides the reference side wall.
Parameters:
- show: show
-
- Returns:
- None
+ show: True to show the reference side wall, false to hide it.
"""
def show_view_axo() -> None:
- """changes the viewmode to Axo
-
- Returns:
- None
+ """changes the viewmode to Axo.
"""
-def get_color(element_id: int) -> int:
- """Gets the element color
+def get_color(element_id: ElementId) -> int:
+ """Gets the element color.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- color ID
+ The color ID of the element.
"""
-def get_opengl_color(element_id: int) -> rgb_color:
- """Gets the element OpenGL color
+
+def get_opengl_color(element_id: ElementId) -> rgb_color:
+ """Gets the element OpenGL color.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- RBG color
+ The OpenGL color of the element.
"""
-def get_material(element_id: int) -> int:
- """Gets the element material
+def get_material(element_id: ElementId) -> MaterialId:
+ """Gets the element material.
Parameters:
- element_id: element_id
+ element_id: The element id.
Returns:
- material ID
+ The material id.
"""
-def get_rgb_from_cadwork_color_id(color_id: None) -> rgb_color:
- """get rgb from cadwork color id
+
+def get_rgb_from_cadwork_color_id(color_id: ColorId) -> rgb_color:
+ """Gets the RGB color from a Cadwork color ID.
Parameters:
- color_id: color_id
+ color_id: The Cadwork color ID.
Returns:
- colorRGB
+ The RGB color corresponding to the Cadwork color ID.
"""
-def is_texture_rotated(a0: int) -> bool:
- """is texture rotated
+
+def is_texture_rotated(element_id: ElementId) -> bool:
+ """Checks if the texture of an element is rotated.
Parameters:
- a0: a0
+ element_id: The element id.
Returns:
- bool
+ True if the texture is rotated, false otherwise.
"""
def get_camera_data() -> camera_data:
- """Get the camera data
+ """Get the camera data.
Returns:
- camera data
+ The camera data.
"""
-def set_camera_data(camera_data: None) -> None:
- """Set the camera data - this will override the current camera data
- Parameters:
- camera_data: camera_data
+def set_camera_data(camera_data: camera_data) -> None:
+ """Set the camera data - this will override the current camera data.
- Returns:
- None
+ Parameters:
+ camera_data: The camera data to set.
"""
def is_cadwork_window_in_light_mode() -> bool:
- """Check if Cadwork window is in light mode
+ """Check if Cadwork window is in light mode.
Returns:
- window is in light mode
+ True if the window is in light mode, false otherwise.
"""
def is_cadwork_window_in_dark_mode() -> bool:
- """Check if Cadwork window is in dark mode
+ """Check if Cadwork window is in dark mode.
Returns:
- window is in dark mode
+ True if the window is in dark mode, false otherwise.
"""
+def enter_working_plane(plane_normal: point_3d, plane_origin: point_3d) ->None:
+ """Enter 2d working plane.
+
+ Parameters:
+ plane_normal: A normalized plane vector.
+ plane_origin: A plane origin.
+ """
+
+def get_element_transparency(element_id: ElementId) ->int:
+ """Gets the element transparency.
+
+ Parameters:
+ element_id: The element id.
+
+ Returns:
+ Transparency value as percentage.
+ """
+
+def set_element_transparency(element_id_list: list[ElementId], value: int) -> None:
+ """Sets the element transparency.
+
+ Parameters:
+ element_id_list: The element id list.
+ value: Transparency value as percentage.
+ """
+
+def get_use_material_texture(element_id: ElementId) -> bool:
+ """Check if element is using material texture.
+
+ Parameters:
+ element_id: The element id.
+
+ Returns:
+ True if the element is using material texture, false otherwise.
+ """
+
+def set_use_material_texture(element_id_list: list[ElementId], value: bool) -> None:
+ """Sets element to use material texture.
+
+ Parameters:
+ element_id_list: The element id list.
+ value: True to use material texture, false otherwise.
+ """
+
+
+def display_bitmaps_as_texture_representation_in_shaded1(flag: bool) -> None:
+ """Set the graphic option to display bitmaps as textures in shaded 1.
+
+ Parameters:
+ flag: True to display bitmaps as textures in shaded 1, false otherwise.
+ """
+
+
+def display_bitmaps_as_texture_representation_in_shaded2(flag: bool) -> None:
+ """Set the graphic option to display bitmaps as textures in shaded 2.
+
+ Parameters:
+ flag: True to display bitmaps as textures in shaded 2, false otherwise.
+ """
\ No newline at end of file
diff --git a/src/visualization_controller/py.typed b/src/visualization_controller/py.typed
new file mode 100644
index 0000000..e69de29