- Status Closed
- Percent Complete
- Task Type Refactoring
- Category QCAD (main)
-
Assigned To
Andrew - Operating System All
- Severity Low
- Priority Very Low
- Reported Version Development
- Due in Version Undecided
-
Due Date
Undecided
- Votes
- Private
Opened by Peter - 08.07.2011
Last edited by Andrew - 10.07.2011
FS#138 - SVG Export entity properties "By Layer" and "By Block"
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:
- Create a class by the name of the Layer
- add the class attribute to elements styled “By Layer”
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.
I've noticed that minimal file size seems to be very important for your use case. Out of curiosity and to better understand the problem, may I ask where this requirement is coming from? It seems somewhat exotic in the day and age of Terabyte disks and broadband Internet.