SVG export, can it reflect object coordinates?

If you are having problems with QCAD 2.1/2.2, post here. Please report bugs here.

Moderator: andrew

Locked
woodr
Registered Member
Posts: 1
Joined: Mon Jun 02, 2008 5:40 am

SVG export, can it reflect object coordinates?

Post by woodr » Mon Jun 02, 2008 6:01 am

Summary:
SVG export coordinates do not match those of my drawing.
The coordinates appear to be "normalized" in some way
and report units as mm even when I'm working in inches
(though it doesn't actually convert the measures just
reports the units).

Detail:
Trying to use qcad to outline objecst to import into blender.
Have tried this in past , but blender's dxf import did not handle
qcad files.

When I learned about the SVG export feature, I upgraded to
2.2.1.0 hoping that it would be useful. While the SVG geometry
does import better than the dxf, the positions and scaling are
wrong, so the feature is useless to me as-is.
I realize that SVG is oriented towards presentation, but
if there were a mode that maintained the actual draiwng
coordinates it would be a great help.

From other threads, I see the SVG feature is an afterthought
that isn't meant for "futher processing", but it did offer a
hope of a useful way to get geometry out of qcad.

Robert Wood

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

Post by andrew » Mon Jun 02, 2008 12:25 pm

SVG export is indeed not intended for data transfers. DXF should always be your first choice if you need to get the geometry across.

Here's what QCad does when exporting SVG:
- Object coordinates are translated, so that the left bottom corner of the SVG viewbox is at 0/0.
- 1 unit is added to the viewbox on each side to make sure that thick lines in the border areas are not cut off by the viewbox limits.

Knowing this, you can achieve a 1:1 coordinate export by creating a rectangular frame for example from 1/1 to 99/99. This will give you a viewbox of 100x100 in the SVG output. If your drawing is entirely inside the box, the geometry will be exported without any offsets. QCad does not generated output with the SVG unit set to Inches as you have noted correctly. You would have to post process the SVG to change this.

Locked

Return to “QCAD 2.1/2.2 Troubleshooting and Problems”