Page 1 of 1

Solid fill hatch rendered badly in SVG export

Posted: Thu Aug 08, 2019 8:09 am
by slcasner
I have reduced the DXF file from https://qcad.org/rsforum/viewtopic.php? ... 322#p24286 to provide a simplified example of one problem. In the attached cable.dxf file there is a closed shape composed of parallel lines and arcs representing a USB cable. The ends are closed and the shape is filled with a solid-fill hatch. When exported as SVG, the hatch approximates each arch with three line segments as shown in cable.svg, which is very crude. I have manually edited the SVG file in cable.hacked.svg to reorder all the lines and arcs of the shape to be sequential in one <path> element, and then specified the fill color for that path. This renders the shape perfectly.

Does a hatch object retain knowledge of the closed shape from which it was created? If so, it should be possible to generate the filled path in SVG automatically. Or at least it should be possible to create separate filled objects for each linear and arc segment of the shape.

Re: Solid fill hatch rendered badly in SVG export

Posted: Thu Aug 08, 2019 12:53 pm
by CVH
That would be:
https://qcad.org/rsforum/viewtopic.php?f=33&t=6466

Yes, weird.
I tried poly with same fill
And with succes tried centerline poly with global width
referencing:
https://qcad.org/rsforum/viewtopic.php?f=33&t=6485

Re: Solid fill hatch rendered badly in SVG export

Posted: Thu Aug 08, 2019 3:59 pm
by slcasner
Thanks for correcting the URL to https://qcad.org/rsforum/viewtopic.php? ... 322#p24286
after my badly done copy/paste.

Also, I forgot to mention that this is with QCAD-Pro 3.23.0 on MacOS 10.14.4.

Added attachment showing the correct rendering with the SVG I hacked manually.

Re: Solid fill hatch rendered badly in SVG export

Posted: Fri Aug 09, 2019 9:49 am
by andrew
Thanks for your report.

Bug report at:
https://www.qcad.org/bugtracker/index.p ... sk_id=1931