upverter/schematic-file-converter — Issue #17: Add a method to translate parts
Author: zakhomuth
Created: 2011-12-14 21:51:01+00:00
State: open

My goal with having a list of Points as the basis for each Shape was to have a common interface for dealing with Shapes. As it stands, there is no consistent way to do anything with the shapes (think of moving one to a different point: you need to special-case each shape and handle that, my version can do it by mapping one common lambda function across the same instance variable, no matter which subclass of Shape. see https://github.com/patrickyeon/schematic-file-converter/blob/master/extra/render.py#L59 ) It may not be the closest representation to the JSON format, but that's why there are json() methods, right?