Wednesday, 19 February 2014

The Return of SVG Templates

After some discussion, there was a little re-think and it seemed a good idea to allow different templates to be used. Despite my focus on creating a parametric template, SVG templates are a reliable solution and have done well in the past.

My previous efforts was adapted to allow different template features to be used and it was fairly trivial to make the SVG template work. There was a lot of code duplication from the previous version which made things even easier without any loss in functionality infact. However it did need a fair few tweaks to get working.

The main change involved parsing the SVG document to obtain the width and height attributes for the document. The problem that I was having was the SVG document didn't share consistent units. What was interesting was using the new Units Framework to parse this, so in theory we shouldn't be restricted to just metric units for templates.

Here's the result:




The title block holders currently don't work at the minute. Anyway there's still more to work to do but it's starting to take shape quite nicely once again.

2 comments:

  1. Honestly I prefer it a LOT like that... I'm quite fond of svg templates. Thanks for bringing them back! That will certainly ease a lot the future integraton of your work with existing workflows.

    ReplyDelete
  2. Just wanted to say - you guys are doing some important work at FreeCAD. As a mechanical drafter I look foward to seeing FreeCAD develop. Once it has a fully functioning assembly and drawing module I think it will really begin to threaten a lot of proprietary packages out-there. I don't have the programming skills (yet) to contribute code - so I thank you guys greatly for your work.

    ReplyDelete