metapolator/metapolator — pull request #239 by graphicore (2014-10-18 01:38:40+00:00)
Title: Improve import export details

This commit will make metapolator much more useful, especially because it takes care of some edge cases when importing outlines and working with masters.

Now skeleton transformations are easier to perform and produce better results, because the relations of outline points to their skeletons have been defined more carefully. Also, there are strategies to handle control points that share the same position as their on-curve points:
* a tension of Infinity is allowed and works as expected
* on import, such a control point is positioned on its on-curve point explicitly. e.g. `in: on;`

A big addition is that the calculation of the final off-curve points is now also done directly within CPS (on-curve points did this already). This gives great flexibility, like optionally using plain Beziérs instead of Hobbys/tensions or like explicitly positioning control points at certain coordinates (see above "strategies to handle control points") . Therefore some functions of the hobby module have been made available as operators in CPS. See the file `app/lib/project/parameters/outputConverter.js` for more details.
The rendering code got simpler by this change.

The most work went into 'app/lib/project/import/StrokeContour.js' and its surroundings in the hope to make it easier to work with it and to smooth the way for further refactorings. Also, there is now an algorithm that tries to find useful control directions even if there was no magnitude for the vector. These directions are not used directly, but will be a convenient starting point if an author chooses to use some of his control points that where imported "unused".