Skip to content

Commit 1307241

Browse files
authored
Merge pull request #212 from cwapi3d/feature/add-new-cwapi3d-functions
- add new cwapi3d functions for build >= 30.0.593
2 parents 33767f9 + 18678d8 commit 1307241

File tree

11 files changed

+361
-6
lines changed

11 files changed

+361
-6
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# BIMteam upload
2+
3+
::: src.cadwork.bim_team_upload_result
4+
rendering:
5+
show_root_heading: false
6+
show_source: true

docs/documentation/enums.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,10 @@
6666
rendering:
6767
show_root_heading: false
6868
show_source: true
69+
70+
## BIMteam upload
71+
72+
::: src.cadwork.bim_team_upload_result_code
73+
rendering:
74+
show_root_heading: false
75+
show_source: true

docs/release_notes.md

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,80 @@ def set_element_group_multi_select_mode() ->None:
5454

5555
```
5656

57+
#### get_elements_in_collision
58+
59+
```python
60+
def get_elements_in_collision(element: int) ->List[int]:
61+
"""get elements in collision
62+
63+
Parameters:
64+
element: element
65+
66+
Returns:
67+
List[int]
68+
"""
69+
70+
```
71+
72+
## New Items
73+
### Functions file_controller
74+
#### export_step_file_cut_drillings
75+
76+
```python
77+
def export_step_file_cut_drillings(elements: List[int], file_path: str, scale_factor: float, version: int,
78+
text_mode: bool, imperial_units: bool) -> None:
79+
"""Exports a STEP file with extruded drillings
80+
81+
Parameters:
82+
elements: elements
83+
file_path: file_path
84+
scale_factor: scale_factor
85+
version: version
86+
text_mode: text_mode
87+
imperial_units: imperial_units
88+
89+
Returns:
90+
None
91+
"""
92+
93+
```
94+
95+
#### export_sat_file_cut_drillings
96+
97+
```python
98+
def export_sat_file_cut_drillings(elements: List[int], file_path: str,
99+
scale_factor: float, binary: bool, version: int) ->None:
100+
"""export sat file cut drillings
101+
102+
Parameters:
103+
elements: elements
104+
file_path: file_path
105+
scale_factor: scale_factor
106+
binary: binary
107+
version: version
108+
109+
Returns:
110+
None
111+
"""
112+
113+
```
114+
115+
#### upload_to_bim_team_and_create_share_link
116+
117+
```python
118+
def upload_to_bim_team_and_create_share_link(elements: None
119+
) ->bim_team_upload_result:
120+
"""upload to bim team and create share link
121+
122+
Parameters:
123+
elements: elements
124+
125+
Returns:
126+
bim_team_upload_result
127+
"""
128+
129+
```
130+
57131
## New Items
58132
### Functions visualization_controller
59133
#### enter_working_plane
@@ -71,3 +145,4 @@ def enter_working_plane(plane_normal: point_3d, plane_origin: point_3d) ->None:
71145
"""
72146

73147
```
148+

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ nav:
5353
- Layer Settings: documentation/layer_settings.md
5454
- Text Object Options: documentation/text_object_options.md
5555
- Window Geometry: documentation/window_geometry.md
56+
- BIMteam Upload Result: documentation/bim_team_upload_result.md
5657
- Connector Axis Controller: documentation/connector_axis_controller.md
5758
- Dimension Controller: documentation/dimension_controller.md
5859
- Element Controller: documentation/element_controller.md

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "cwapi3d"
3-
version = "30.0.533"
3+
version = "30.0.593"
44
authors = [{ name = "Cadwork", email = "it@cadwork.ca" }]
55
requires-python = ">= 3.10"
66
description = 'Python bindings for CwAPI3D'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
from src.cadwork.bim_team_upload_result_code import bim_team_upload_result_code
2+
3+
4+
class bim_team_upload_result:
5+
"""bim team upload result
6+
"""
7+
8+
def __init__(self):
9+
"""
10+
Instance of the bim_team_upload_result class.
11+
12+
Attributes:
13+
upload_result_code (bim_team_upload_result_code): The result code of the upload.
14+
share_link (str): The share link for the uploaded BIM team result.
15+
"""
16+
self.upload_result_code = bim_team_upload_result_code.ok
17+
self.share_link = ""
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
from enum import IntEnum, unique
2+
3+
4+
@unique
5+
class bim_team_upload_result_code(IntEnum):
6+
"""bim team upload result code
7+
8+
Examples:
9+
>>> cadwork.bim_team_upload_result_code.ok
10+
ok
11+
"""
12+
ok = 0
13+
""""""
14+
error_general_error = 1
15+
""""""
16+
error_too_many_models = 2
17+
""""""
18+
error_insufficient_storage = 3
19+
""""""
20+
error_invalid_project_id = 4
21+
""""""
22+
error_authentication_failed = 5
23+
""""""
24+
25+
def __int__(self) -> int:
26+
return self.value

src/element_controller/__init__.pyi

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1987,3 +1987,14 @@ def slice_elements_with_plane_and_get_new_elements(element: int, cut_plane_norma
19871987
List[int]
19881988
"""
19891989

1990+
def get_elements_in_collision(element: int) ->List[int]:
1991+
"""get elements in collision
1992+
1993+
Parameters:
1994+
element: element
1995+
1996+
Returns:
1997+
List[int]
1998+
"""
1999+
2000+

0 commit comments

Comments
 (0)