hohlraum/gdsCAD — pull request #17 by cjermain (2014-12-05 22:47:46+00:00)
Title: Fixed missing area methods and prevented integer array issue

The `core.Cell` method expects that each element has an `area` method, which are not implemented in `shapes.py`. These methods are implemented, with the exception of the RegPolygon -- since I was too lazy, but an exception was left to tell that it has yet to be implemented.

I had noticed that if a `shapes.Rectangle` was defined with all integers then the points array would have `dtype=np.int64`. This caused significant problems when translating the rectangle, since the points were cast as integers and the translation was rounded. The `core.ElementBase` class is fixed to use `np.float32` by default, but can be changed on construction. Each child class of `core.ElementBase` is updated so that the dtype can be propagated through the inheritance.