t-oster/VisiCut — pull request #152 by t-oster (2013-05-18 09:46:28+00:00)
Title: Feature: Parametric SVGs

Hi,
I think you might have seen this:
http://www.giplt.nl/svg/

I want to have a similar format for VisiCut. I implemented a version in the feature-psvg branch, please test.

Idea:
You can assign some parameters to an svg-file and then the user can customize the file. E.g. if you create a template for a box, you can keep the material-thickness and box-dimensions as parameters, so the user can create boxes for all sizes just by adjusting the parameters.

The Format of http://www.giplt.nl/svg/ has a big disadvantage though: It is not editable by usual SVG editors (Inkscape).
Thus I invented my own format, which uses Thymeleaf (http://www.thymeleaf.org/) as Template engine. This means, all "code" is in attributes, so the document is still a well formed XML/SVG document and can be viewed and edited like a normal SVG. The file-suffix is ".parametric.svg", so it is still ".svg" for programs, that don't recognize the ending.

Just install the version from http://137.226.142.25:5080/wwwshare/VisiCutNightly/feature-psvg and try the fils in "File->Examples->built in->Parametric".

Have a look at the XML code and try experimenting.
I support also the ".psvg"-Format of the mentioned website (the smiley and candle-holder work) by internally translating it to .parametric.svg. However they seem to use stuff for their boxes, which is not (yet) supported by VisiCut (lines with 'mill' and 'joint' attributes).

What do you think?