← All bug reports

FS#916SVG export: make zero line width behaviour configurable

Type
Feature Request
Status
Closed
Resolution
Won't implement
Category
QCAD (main)
Severity
Low
Priority
Low
Reported version
3.2.2
Operating system
All
Reported
2013-09-17 by hungerburg
Closed
2013-09-18 by andrew

Somewhere in the 3.1 series the SVG exporter (both precise and PG) started to make lines that are zero (0) width in CAD 0.01 (@scale 1:1) points wide in exported files (0.1 @scale 1:10). I use such lines to constrain exported files to a common size and rather not have them show. In my view, this is a regression, as there is no reason for changing line weight, isnt it? If I wanted the lines to have weight, I'd draw them with a weight.

Comments (4)

andrew 2013-09-17

The problem here is that most users expect a line to show up in the SVG drawing if it also shows up in QCAD.

In the context of CAD, zero width lines are defined as 'as thin as possible' (thinnest plotter pen or thinnest line a printer can produce).
In the context of SVG, zero width means zero width (i.e. not visible).

In that sense this is intended behavior. As always in such cases, a configuration option might be the solution, so I'll change this into a feature request for such an option.

hungerburg 2013-09-17

Thank You Andrew for the explanation. I consider mine a legitimate use case still, so thank you for turning this into an enhancement request. I single stepped the exporter. Unfortunately, I cannot patch the script, and as RS.PointTolerance is immutable, I can not help myself at the moment. I liked QCAD more, when the PRO scripts lived in the filesystem, but you surely know your reasons ;)

I also cannot think of another way, how to determine a fixed plane (viewbox) for my exports, can you? Possibly, thats a better feature request?

hungerburg 2013-09-17

Andrew, I guess I got it! No need for lines, just put two points in diagonally opposing corners of my plane, they will be used to calculate the viewbox in the resulting SVG (at least if nothing else sticks outer there), even when export points is false! No need for another configuration switch, at least not for me :)

andrew 2013-09-17

Great, thanks for the update. I really should have thought of that since I'm doing exactly the same for all the figures in the QCAD book.

Closure comment

Feature might not be necessary (see comments).