From 1669db97d1fa461ecce4394418bb86de4a15ad74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roman=20Dvo=C5=99=C3=A1k?= Date: Sun, 26 May 2024 20:29:23 +0200 Subject: [PATCH] Update pack's function docstring --- src/build123d/pack.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/build123d/pack.py b/src/build123d/pack.py index 47893c4a..88ca5804 100644 --- a/src/build123d/pack.py +++ b/src/build123d/pack.py @@ -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,