How Do I Export .SVG

Use this forum to ask questions about how to do things in QCAD.

Moderator: andrew

Forum rules

Always indicate your operating system and QCAD version.

Attach drawing files and screenshots.

Post one question per topic.

Post Reply
Fivecorners
Junior Member
Posts: 15
Joined: Wed Aug 21, 2024 4:12 pm

How Do I Export .SVG

Post by Fivecorners » Tue Aug 12, 2025 7:05 pm

Hi Everyone,
It's the new guy again. Version 3.30.1.0 in Windows 7. When I export something as .SVG, the line widths all end up being very thin. Exporting as bitmap or .PDF seems to work OK. Are my export settings incorrect, or is something not set up correctly in my drawing? Or is it something else?

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

Re: How Do I Export .SVG

Post by CVH » Tue Aug 12, 2025 8:26 pm

Hi,

CAD Lineweights (0.00, 0.05 - 2.11mm) don't scale when put to paper.
These are the sizes of the physical pens from the days we drew directly with ink on paper.
In design mode QCAD may use Screen-based Linetypes and weights (NL) so that certain things are still visible.

Presuming that QCAD converts Lineweights to Stroke widths in SVG.
The Stroke width in SVG may be subject to scaling when fitting the content to a page or a limited box on screen.
An SVG may even be scaled down so much that it can be used as QCAD command button icons.


With example files we would could help you more efficiently.
Also see above forum rules in red.

Regards,
CVH
Last edited by CVH on Sat Aug 23, 2025 6:45 am, edited 1 time in total.

Fivecorners
Junior Member
Posts: 15
Joined: Wed Aug 21, 2024 4:12 pm

Re: How Do I Export .SVG

Post by Fivecorners » Thu Aug 14, 2025 5:51 pm

Thank you for responding, CVH.

While preparing a test drawing to attach here, I discovered that the .SVG export appears to be OK. I guess I hadn't looked closely enough. Probably just a matter of scaling the drawing (or something).
Your explanation about the various sizes of pens in those Hewlett Packard plotters brought back some memories.
Since the printed output and a .PDF export look good, I figured that maybe my problem involves the particulars of the .SVG format (or using Inkscape).
lineweight.dxf
(99.67 KiB) Downloaded 22 times
Or maybe I need to figure out what I am trying to accomplish. Maybe I need to find out what format is best for exporting an image from QCAD into the library of a printed-circuit board design app.
So for now, perhaps you can take a look at the attached test drawing and let me know if there is a better way to call out line weights. Am I limited to one specific line weight per layer? Is there a setting that allows different line weights to show up in the design view?
Thank you in advance.

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

Re: How Do I Export .SVG

Post by CVH » Mon Aug 18, 2025 5:10 am

It is common practice in CAD that the line-art attributes are controlled by the layer on which they live.
The attributes Color, Lineweight and Linetype are then set 'By Layer'.
Also see tutorial Working with Layers.
The first line of text is already the most important one.

This allows for changing the appearance of all the entities on a specific layer at once.

But you are not limited to that.
You can assign specific attributes for each entity.
A dashed red and thin line is thus perfectly possible on a layer intended for continuous thick lines in green.


Screen-based Linetypes (and weights) (NL) is typically active in design mode.
This is a pixel based hybrid mode that ensures that things look somewhat thicker/thinner and or dashed/dotted in any zoom state.
Only on screen ... The drawing is never printed or exported this way.

When not active you could zoom in so far that:
- The weight of a line fills the entire screen.
- You zoom in on the space between dots or dashes and see no line at all.
Or zoom out so that dashes and dots are displayed as (almost) continuous.

Screen-based Linetypes are typically turned OFF for printing or exporting to PDF ... When in Print Preview Mode.
And typically turned ON when switching to design mode by preference.
See menu Edit .. Application Preferences .. Graphics View .. Appearance .. Linetypes and Lineweights
You might want to deactivate this preference and/or NL to always see the actual size on screen in Model view.


You also might want to investigate the use of polylines with custom widths (The term 'weight' is wrong here).
See tutorial Custom Lineweights.
Remark that they use a flat pen for a custom width instead of the round pen for default CAD weights.
Rendering at corners and/or discontinuities may be off, especially when exploded to outlines.
These outlines are used for the SVG export as filled paths.


In your drawing I see the use of a custom Grid for a drawing in inch what is configured to use a decimal format.
Grid points every 0.05 unit and the Meta Grid (lines) spacing is the same but then without the leading zero.
See menu Edit .. Drawing Preferences .. General .. Grid

Also meaning that the minimal Grid and Meta Grid spacing is set to these values.
At the bottom right of the graphics panel you see the current spacing: '2.5 < 0' on open and auto zoomed.
What stands for: Grid points every 2.5 unit and no Meta Grid.

Depending a set of application preferences this may be: '0 < 0' on open and auto zoomed.
See menu Edit .. Application Preferences .. Graphics View .. Grid .. Automatically scale grid/meta grid.

When these preferences are active, the minimal spacing when zooming in far is: '0.05 < 0.05'.
Because of an unattended bug the next step on zooming out is sqr(5)=25 based: '0.25 < 0.05'.
Instead of increasing in a decimal manner or in 10 based steps.
Zooming out a little further it becomes: '0.25 < 0' - '2.5 < 0' - '25 < 0' and so on (10 based of sqr(5)) .

At this point a user defined grid/meta grid spacing is only possible when automatically scaling is turned OFF.
Also see this related topic.

Regards,
CVH

Fivecorners
Junior Member
Posts: 15
Joined: Wed Aug 21, 2024 4:12 pm

Re: How Do I Export .SVG

Post by Fivecorners » Thu Aug 21, 2025 6:31 pm

Thank you for responding, CVH...
A lot of good information here. I will follow up and check out your suggestions.

Regards,

Michael

Post Reply

Return to “QCAD 'How Do I' Questions”