shape

2D shapes abstraction


License
MIT
Install
pip install shape==0.1.1

Documentation

Build Status

shape is a Python package for 2D shapes handling.

Features

  • objects:
    • abstract shape
    • point
    • polygon
    • bounding box
    • rotated bounding box
    • ellipse
  • relations: intersection, closeness
  • manipulation: move and rotate
  • visualization using matplotlib

Installation

pip install shape

Documentation

See tests for now.

Alternatives

https://github.com/varunagrawal/bbox

  • bounding box only
  • lightweight

https://github.com/shapely/shapely

  • complex
  • based on C++ GEOS library