factored out common methods into GeometricOpertaions.pde

https://github.com/whyi/SketchFormer/issues/23