Solid fill hatch rendered badly in SVG export

If you are having problems with QCAD, post here. Please report bugs through our Bug Tracker instead.

Always attach your original DXF or DWG file and mentions your QCAD version and the platform you are on.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
slcasner
Junior Member
Posts: 21
Joined: Tue May 07, 2019 10:23 pm

Solid fill hatch rendered badly in SVG export

Post by slcasner » Thu Aug 08, 2019 8:09 am

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.
Attachments
cable.hacked.svg
(866 Bytes) Downloaded 603 times
cable.svg
(2.95 KiB) Downloaded 657 times
cable.dxf
(109.63 KiB) Downloaded 590 times
cable.png
cable.png (230.62 KiB) Viewed 7344 times

CVH
Premier Member
Posts: 3419
Joined: Wed Sep 27, 2017 4:17 pm

Re: Solid fill hatch rendered badly in SVG export

Post by CVH » Thu Aug 08, 2019 12:53 pm

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

slcasner
Junior Member
Posts: 21
Joined: Tue May 07, 2019 10:23 pm

Re: Solid fill hatch rendered badly in SVG export

Post by slcasner » Thu Aug 08, 2019 3:59 pm

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.
Attachments
cable.hacked.png
cable.hacked.png (52.55 KiB) Viewed 7319 times

User avatar
andrew
Site Admin
Posts: 9037
Joined: Fri Mar 30, 2007 6:07 am

Re: Solid fill hatch rendered badly in SVG export

Post by andrew » Fri Aug 09, 2019 9:49 am

Thanks for your report.

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

Post Reply

Return to “QCAD Troubleshooting and Problems”