Home

Awesome

MinimumBoundingBox

Moved to Bitbucket

https://bitbucket.org/william_rusnack/minimumboundingbox/src/master/

Finds the minimum bounding box from a point cloud.
✮✮✮✮✮✮✮✮✮✮✮✮ LIKE IT? STAR IT! ✮✮✮✮✮✮✮✮✮✮✮✮

Build Status

Example

from MinimumBoundingBox import MinimumBoundingBox

points = ( (1,2), (5,4), (-1,-3) )
bounding_box = MinimumBoundingBox(points)  # returns namedtuple

bounding_box.area  # 16
bounding_box.rectangle_center  # (1.3411764705882352, 1.0647058823529414)
bounding_box.corner_points  # {(5, 4), (-1, -3), (-2.32, -1.87), (3.68, 5.13)}

Install

pip install git+git://github.com/BebeSparkelSparkel/MinimumBoundingBox.git@master
pip3 install git+git://github.com/BebeSparkelSparkel/MinimumBoundingBox.git@master
pip3.5 install git+git://github.com/BebeSparkelSparkel/MinimumBoundingBox.git@master

MinimumBoundingBox(points)
Returns the properties of the bounding box

namedtuple('BoundingBox', ('area',
                           'length_parallel',
                           'length_orthogonal',
                           'rectangle_center',
                           'unit_vector',
                           'unit_vector_angle',
                           'corner_points'
                          )
)

✮✮✮✮✮✮✮✮✮✮✮✮ LIKE IT? STAR IT! ✮✮✮✮✮✮✮✮✮✮✮✮