vector postscript output

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

Moderator: andrew

Locked
Fuetterer
Newbie Member
Posts: 4
Joined: Tue Jul 22, 2008 10:31 am

vector postscript output

Post by Fuetterer » Tue Jul 22, 2008 10:43 am

I need postscript output but qcad 2.0.4.0 does not give vector output! How can I get real postscript as for example xfig is producing?
Thanks a lot!

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

Post by andrew » Tue Jul 22, 2008 11:03 am

Under Linux: Print to a file.

Under Windows: Install a PostScript printer driver (included with Windows) and then print to a file with that driver.

If you let me know what you need the PostScript output for and what operating system you are using, I might be able to provide more detailed help for your problem.

Fuetterer
Newbie Member
Posts: 4
Joined: Tue Jul 22, 2008 10:31 am

Post by Fuetterer » Tue Jul 22, 2008 2:05 pm

Thanks! :-) I am using Linux (SUSE 10.2) and the suggested printer solution produces indeed Postscript but it's not vector but bitmap Postscript. If you zoom you may see the artefacts. If you draw a circle with xfig-Postscript outputs you can go as deep as you want (as far as the precision of the floating point numbers permit). As I am drawing and printing extremely small features I would need a good resolution.

Cheers!


andrew wrote:Under Linux: Print to a file.

Under Windows: Install a PostScript printer driver (included with Windows) and then print to a file with that driver.

If you let me know what you need the PostScript output for and what operating system you are using, I might be able to provide more detailed help for your problem.
:D

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

Post by andrew » Tue Jul 22, 2008 2:10 pm

I cannot reproduce this. Of course QCad should output vectors to PS, everything else hardly makes sense. Are you using a QCad package that was downloaded from our web site or something that came with a Linux distribution?

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

Post by andrew » Tue Jul 22, 2008 2:13 pm

You also might want to give a more recent version of QCad a try (2.2.1.0 is the latest).

Fuetterer
Newbie Member
Posts: 4
Joined: Tue Jul 22, 2008 10:31 am

Post by Fuetterer » Tue Jul 22, 2008 2:35 pm

andrew wrote:I cannot reproduce this. Of course QCad should output vectors to PS, everything else hardly makes sense. Are you using a QCad package that was downloaded from our web site or something that came with a Linux distribution?
Do you have the postscript viewer "gv"? Draw a circle with qcad and xfig, save it as a ps file. Magnify at maximum (10x) and use the magnifying glass (center mouse button) to magnify another 64 times and you may see the difference.

In xfig the ps-output consists mainly of following lines:

% here starts figure with depth 50
% Ellipse
7.500 slw
n 3870 3465 910 910 0 360 DrawEllipse gs col0 s gr
% here ends figure;
$F2psEnd
rs
showpage

This is what I would call "vector graphics" as there is a command for a circle (ellipse is a more general circle :-) )

In the qcad output a circle seems to be represented as a polygone (LT stands probably for "line to"):

1632 5600 MT
1632 5598 LT
1632 5596 LT
1632 5594 LT
1632 5592 LT
1632 5590 LT
1632 5588 LT
1632 5586 LT
1632 5584 LT
...

Why do they do that? It is weird to draw thousand lines if there is a special compact and practical command for circles...

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

Post by andrew » Tue Jul 22, 2008 3:06 pm

Your observation is correct: QCad uses indeed lines and not the PostScript ellipse commands. This is because the PostScript engine of Qt has problems with the precision of arcs with a large radius (angles, center and radius are rounded to integers).

In other words, with the ellipse or arc commands of PostScript, your arcs would look nice and smooth but they would be slightly displaced and the endpoints of arcs would not exactly connect for example to a line that starts at the same position.

QCad 2.2.1.0 exports at a higher resolution which makes arcs and circles both smooth and precise.

BTW: Line graphics are also a vector graphics. The alternative to vector graphics are raster graphics (a large number of small squares or dots).

Fuetterer
Newbie Member
Posts: 4
Joined: Tue Jul 22, 2008 10:31 am

Post by Fuetterer » Tue Jul 22, 2008 3:46 pm

andrew wrote:Your observation is correct: QCad uses indeed lines and not the PostScript ellipse commands. This is because the PostScript engine of Qt has problems with the precision of arcs with a large radius (angles, center and radius are rounded to integers).

In other words, with the ellipse or arc commands of PostScript, your arcs would look nice and smooth but they would be slightly displaced and the endpoints of arcs would not exactly connect for example to a line that starts at the same position.

QCad 2.2.1.0 exports at a higher resolution which makes arcs and circles both smooth and precise.

BTW: Line graphics are also a vector graphics. The alternative to vector graphics are raster graphics (a large number of small squares or dots).

Dear Andrew
Thank you very much!

Cheers, Claus

Locked

Return to “QCAD 2.1/2.2 Troubleshooting and Problems”