Skip to content

Commit 953dda7

Browse files
committed
[UNASSIGNED] better docstrings describing order retrieval of vertices of bbox and aabb
1 parent 512394e commit 953dda7

1 file changed

Lines changed: 30 additions & 5 deletions

File tree

src/element_controller/__init__.pyi

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,7 +1084,7 @@ def create_bounding_box_local(reference_element: ElementId, element_id_list: Lis
10841084
10851085
Parameters:
10861086
reference_element: The ID of the reference element.
1087-
element_id_list: The list of elements for which to create the bounding box.
1087+
element_id_list: The list of elements for which to create the bounding box.
10881088
10891089
Returns:
10901090
The ID of the created bounding box element.
@@ -1787,24 +1787,49 @@ def get_element_cadwork_guid(element_id: ElementId) -> str:
17871787
"""
17881788

17891789
def get_bounding_box_vertices_local(reference_element: ElementId, element_id_list: List[ElementId]) -> List[point_3d]:
1790-
"""Retrieves the local bounding box vertices for a list of elements relative to a reference element.
1790+
"""Retrieve the local bounding box vertices for a list of elements relative to a reference element.
1791+
1792+
Returns a list of 8 point_3d vertices representing the corners of the bounding box in the
1793+
coordinate system of a reference element (local coordinates). The vertex ordering follows
1794+
the same pattern as get_bounding_box_vertices_global, but all coordinates are relative to
1795+
the reference element's local axis system (origin at reference element's P1, X-axis along
1796+
reference direction, etc.).
1797+
1798+
Use this function when you need to perform calculations relative to a specific element's
1799+
orientation rather than in global world coordinates.
17911800
17921801
Parameters:
1793-
reference_element: The ID of the reference element.
1802+
reference_element: The ID of the reference element defining the local coordinate system.
17941803
element_id_list: The list of elements for which to retrieve the bounding box vertices.
17951804
17961805
Returns:
1797-
The list of vertices representing the local bounding box of the elements.
1806+
A list of 8 point_3d vertices representing the local bounding box corners.
17981807
"""
17991808

18001809
def get_bounding_box_vertices_global(element_id_list: List[ElementId]) -> List[point_3d]:
18011810
"""Get the global bounding box vertices for a list of elements.
18021811
1812+
Returns a list of 8 point_3d vertices representing the corners of an axis-aligned
1813+
bounding box in global (world) coordinates. The vertices are ordered as follows:
1814+
0: (min_x, min_y, min_z) — bottom-front-left
1815+
1: (max_x, min_y, min_z) — bottom-front-right
1816+
2: (max_x, max_y, min_z) — bottom-back-right
1817+
3: (min_x, max_y, min_z) — bottom-back-left
1818+
4: (min_x, min_y, max_z) — top-front-left
1819+
5: (max_x, min_y, max_z) — top-front-right
1820+
6: (max_x, max_y, max_z) — top-back-right
1821+
7: (min_x, max_y, max_z) — top-back-left
1822+
1823+
This ordering allows edges to be constructed by connecting:
1824+
- Bottom square: (0→1→2→3→0)
1825+
- Top square: (4→5→6→7→4)
1826+
- Vertical edges: (0-4), (1-5), (2-6), (3-7)
1827+
18031828
Parameters:
18041829
element_id_list: The list of elements for which to retrieve the bounding box vertices.
18051830
18061831
Returns:
1807-
The list of vertices representing the global bounding box of the elements.
1832+
A list of 8 point_3d vertices representing the global bounding box corners.
18081833
"""
18091834

18101835
def get_all_nesting_raw_parts() -> List[ElementId]:

0 commit comments

Comments
 (0)