Skip to content

Commit

Permalink
Merge pull request #212 from cwapi3d/feature/add-new-cwapi3d-functions
Browse files Browse the repository at this point in the history
- add new cwapi3d functions for build >= 30.0.593
  • Loading branch information
Brunner246 authored Oct 3, 2024
2 parents 33767f9 + 18678d8 commit 1307241
Show file tree
Hide file tree
Showing 11 changed files with 361 additions and 6 deletions.
6 changes: 6 additions & 0 deletions docs/documentation/bim_team_upload_result.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# BIMteam upload

::: src.cadwork.bim_team_upload_result
rendering:
show_root_heading: false
show_source: true
7 changes: 7 additions & 0 deletions docs/documentation/enums.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,10 @@
rendering:
show_root_heading: false
show_source: true

## BIMteam upload

::: src.cadwork.bim_team_upload_result_code
rendering:
show_root_heading: false
show_source: true
75 changes: 75 additions & 0 deletions docs/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,80 @@ def set_element_group_multi_select_mode() ->None:

```

#### get_elements_in_collision

```python
def get_elements_in_collision(element: int) ->List[int]:
"""get elements in collision
Parameters:
element: element
Returns:
List[int]
"""

```

## New Items
### Functions file_controller
#### export_step_file_cut_drillings

```python
def export_step_file_cut_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
Parameters:
elements: elements
file_path: file_path
scale_factor: scale_factor
version: version
text_mode: text_mode
imperial_units: imperial_units
Returns:
None
"""

```

#### export_sat_file_cut_drillings

```python
def export_sat_file_cut_drillings(elements: List[int], file_path: str,
scale_factor: float, binary: bool, version: int) ->None:
"""export sat file cut drillings
Parameters:
elements: elements
file_path: file_path
scale_factor: scale_factor
binary: binary
version: version
Returns:
None
"""

```

#### upload_to_bim_team_and_create_share_link

```python
def upload_to_bim_team_and_create_share_link(elements: None
) ->bim_team_upload_result:
"""upload to bim team and create share link
Parameters:
elements: elements
Returns:
bim_team_upload_result
"""

```

## New Items
### Functions visualization_controller
#### enter_working_plane
Expand All @@ -71,3 +145,4 @@ def enter_working_plane(plane_normal: point_3d, plane_origin: point_3d) ->None:
"""

```

1 change: 1 addition & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ nav:
- Layer Settings: documentation/layer_settings.md
- Text Object Options: documentation/text_object_options.md
- Window Geometry: documentation/window_geometry.md
- BIMteam Upload Result: documentation/bim_team_upload_result.md
- Connector Axis Controller: documentation/connector_axis_controller.md
- Dimension Controller: documentation/dimension_controller.md
- Element Controller: documentation/element_controller.md
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "cwapi3d"
version = "30.0.533"
version = "30.0.593"
authors = [{ name = "Cadwork", email = "[email protected]" }]
requires-python = ">= 3.10"
description = 'Python bindings for CwAPI3D'
Expand Down
17 changes: 17 additions & 0 deletions src/cadwork/bim_team_upload_result.pyi
Original file line number Diff line number Diff line change
@@ -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 = ""
26 changes: 26 additions & 0 deletions src/cadwork/bim_team_upload_result_code.pyi
Original file line number Diff line number Diff line change
@@ -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
11 changes: 11 additions & 0 deletions src/element_controller/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -1987,3 +1987,14 @@ def slice_elements_with_plane_and_get_new_elements(element: int, cut_plane_norma
List[int]
"""

def get_elements_in_collision(element: int) ->List[int]:
"""get elements in collision
Parameters:
element: element
Returns:
List[int]
"""


Loading

0 comments on commit 1307241

Please sign in to comment.