[Gmsh] Remarks about EPS output

Christophe Geuzaine Christophe.Geuzaine at ulg.ac.be
Fri Oct 26 11:35:13 CEST 2001


NDQ wrote:
> 
> Hi,
> Just tried the lastest version 1.27 of Gmsh (Linux platform).
> I have some remarks about EPS output format.
> 1) In menu [File]-[Save as]- I see 2 sub-menus pour EPS format (Yes, I
> see EPS and not PS!!). When I edit EPS file created by Gmsh, I see :
> 
> -------8<-------------------
> %!PS-Adobe-3.0
> ....
> -------8<-------------------
> 
> But after "Encapsulated Postscript File Format Speccification" (version
> 3.0, 1 may 1992, Adobe System Incorporated), the two required DSC header
> comments are:
> 
> -------8<-------------------
> %!PS-Adobe-3.0 EPSF-3.0
> %%BoundingBox: llx lly urx ury
> -------8<-------------------
> 
> So I think Gmsh's EPS output is Postscript format, not EPS format like
> the menu name.

Well, maybe I should change the header to "%!PS-Adobe-3.0 EPSF-3.0",
then. We could also maybe provide a true 'PS' output, with appropriate
scaling of the image to fit a entire page ?

> 
> 2) For EPS format, the header comments :
> 
> %%PageOrder: Ascend
> %%Page: 1 1
> 
> seems not need at all, right?

Ok.

> 
> 3) The output format of point coordinates seems not very nice, for
> example :
> 
> ...
> 0.2 W
> 0 0 0 C
> 624.186 21.2533 635 35 L
> 662.982 29.4516 635 35 L
> 635.253 61.0815 635 35 L
> ...
> 
> Which point should be computed with more precision then others?

There are not: I simply use the '%g' format, i.e., from the manpage:

g,G The  double  argument is converted in style f or e (or F or E for G
    conversions).  The precision specifies the  number  of  significant
    digits.   If  the  precision is missing, 6 digits are given; if the
    precision is zero, it is treated as 1.  Style  e  is  used  if  the
    exponent  from  its  conversion  is less than -4 or greater than or
    equal to the precision.  Trailing zeros are removed from the  frac-
    tional  part  of  the result; a decimal point appears only if it is
    followed by at least one digit.

So, 635 simply means that the number was exactly 635.000.

> Why not use the same decimal number for all output?

It produces bigger files (check the '.00' below)...

> For example Samcef (www.samcef.com) uses format:
> 
> 567.00  331.95 m  567.00  337.41 d
> 564.28  334.68 m  569.73  334.68 d
> 567.00  334.68 m  567.00  311.38 d
> 515.98  334.68 m  567.00  334.68 d
> 

Christophe

-- 
Christophe Geuzaine

Tel: 32 (0) 4 366 37 10    http://geuz.org
Fax: 32 (0) 4 366 29 10    mailto:Christophe.Geuzaine at ulg.ac.be