[gl2ps] Problem with BSP printing (reason found)

Shahzad MUZAFFAR Shahzad.Muzaffar at cern.ch
Tue Feb 14 14:01:36 CET 2006


Hi,
  I noticed that although forcing
  scaleZ=100000;
fixed the problem but not completly. If i move my scene grapgh very far 
away so that the scaleZ becomes very large (order of 1000000) then there 
is very small distance left b/w the eye and the scaled Z values. And 
generated EPS files again have problem. So some how we need to force 
scaleZ to have a value for which the scaled Z values do not come very 
close to the eye. I check with scaleZ=90000; and this seems reasonable ( 
why 90000? just guess ;-) )

  OR other solution is to remember the scaleZ value (e.g. in 
gl2ps->scaleZ or add a static GLfloat scaleZ) and set the eye according 
to the scaleZ value e.g. scaleZ+10000

Cheers,
--Shahzad

Shahzad MUZAFFAR wrote:

>Hello,
>  I have already mentioned (in one of my previous email) about the 
>problem with BSP printing not working properly in 1.2.3 and up releases 
>(i.e. printing in reverse order). I think I have found the reason. The 
>problem is in the gl2psRescaleAndOffset() method. The problem occurs 
>when the scaleZ becomes > 100000. Because at scaleZ > 100000 the 
>z-coordinates of all primitive become > 100000 which is above the EYE 
>set in the gl2psPrintPrimitives() method. Thats why we see eps/pdf files 
>printed in reverse order.
> 
>I have added this line in gl2psRescaleAndOffset() method
>
>if (scaleZ > 100000.F) scaleZ=100000;
>
>to force the Z scaling. And now printing works properly. Cheers,
>--Shahzad Muzaffar
>_______________________________________________
>gl2ps mailing list
>gl2ps at geuz.org
>http://www.geuz.org/mailman/listinfo/gl2ps
>
>  
>