Skip to content

Commit

Permalink
Update pack's function docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-dvorak authored May 26, 2024
1 parent f3b6393 commit 1669db9
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/build123d/pack.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,17 @@ def grow_down(w, h):


def pack(objects: Collection[Shape], padding: float, align_z: bool = False) -> Collection[Shape]:
"""Pack objects in a squarish area in Plane.XY."""
"""Pack objects in a squarish area in Plane.XY.
Args:
objects (Collection[Shape]): objects to arrange
padding (float): space between objects
align_z (bool, optional): align shape bottoms to Plane.XY. Defaults to False.
Returns:
Collection[Shape]: rearranged objects
"""

bounding_boxes = {o: o.bounding_box().size + (padding, padding) for o in objects}
translations = _pack2d(
objects,
Expand Down

0 comments on commit 1669db9

Please sign in to comment.