QCAD - 2D CAD System.
Please search for existing tasks (also closed ones) before opening a new task.
Please make sure that you are using the latest Version of QCAD before posting a bug (menu Help - Check for Updates)
FS#138 - SVG Export entity properties "By Layer" and "By Block"
Opened by Peter (hungerburg) - Friday, 08 July 2011, 15:08 GMT
Last edited by Andrew (andrew) - Sunday, 10 July 2011, 13:33 GMT
If I understand correctly, SVG export uses svg groups to keep QCAD block entities. This in itself is very useful. There is no way to correctly keep layer information, as QCAD blocks can contain elements on different layers, while SVG only knows about groups. That is a deficiency of SVG.
To save on file size, there was some potential to get rid of ever repeating same attributes on entities, eg: style=”stroke:#000000;stroke-width:0.25;stroke-dasharray:2.16,1.08”
To optimize “By Block” is easy: just set the attribute on the SVG group, and omit on below entities styled “By Block”.
To optimize “By Layer” is a little more involved, but might be solved by using css:
Then only individually styled entities would get a style attribute, and filesize of SVG could be halved in most cases.
This just an idea :) Having written this, I now realize, that QCAD can style weight, pattern, color each extra, so the optimazition could only be applied to entities, where everything is “By Layer” or “By Block”. But that should be the case most of the time.
Sunday, 10 July 2011, 13:33 GMT
Reason for closing: Won't implement