🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.postscript
Article #3188

Re: is this PostScript from fig2dev OK or not?

#3188
From: Glenn Reid
Date: Tue, 25 Sep 1990 19:42
90 lines
4087 bytes
In article <637@keele.keele.ac.uk> cca13@seq1.keele.ac.uk (G.D. Pratt) writes:
>Hi,
>I've been using xfig v2.0 to create a diagram and whenever I convert
>the *.fig file to a *.ps file via f2ps or with the latest version of
>transfig I get this error from the PostScript printer (Agfa PS400) 
>
>> psif: seq1:gerry ps start - Mon Sep 24 16:28:26 1990
>> %%[ Error: undefinedresult; OffendingCommand: arcto ]%%
>> %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
>> psif: end - Mon Sep 24 16:29:31 1990

I get the same error on my NeXT.  Upon inspection of the file, there
are a few instances where the X1,Y1 and X2,Y2 points passed to arcto
are identical.  It is these cases that raise the "undefinedresult"
error, which may be a divide by zero in computing the arctangent.

Here is a little redefinition for "arcto" which filters out the problem
cases and changes their values slightly.  It caused your example
program to start working, at least:

	/*arcto /arcto load def
	/arcto {
	    5 copy pop 3 -1 roll eq 3 1 roll eq and { %if
		exch 1 add exch 3 -1 roll 1 sub 3 1 roll
	    } if
	    *arcto
	} bind def

If you put this somewhere in the beginning of the file, after the
comments, it should "fix" the problem, although it is a hack.  If
the arguments to "arcto" are identical, it adds 1 to the Y value
and subtracts 1 from the X value of the second point :-)

/Glenn

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		PostScript/NeXT developers
 ..{adobe,next}!heaven!glenn		415-851-1785
Newsgroups: comp.lang.postscript,comp.graphics,comp.windows.x
Subject: Re: is this PostScript from fig2dev OK or not?
Summary: 
Expires: 
References: <637@keele.keele.ac.uk>
Sender: 
Reply-To: glenn@heaven.woodside.ca.us (Glenn Reid)
Followup-To: 
Distribution: 
Organization: RightBrain Software, Woodside, CA
Keywords: PostScript xfig v2.0 pl8 transfig fig2dev arcto

In article <637@keele.keele.ac.uk> cca13@seq1.keele.ac.uk (G.D. Pratt) writes:
>Hi,
>I've been using xfig v2.0 to create a diagram and whenever I convert
>the *.fig file to a *.ps file via f2ps or with the latest version of
>transfig I get this error from the PostScript printer (Agfa PS400) 
>
>> psif: seq1:gerry ps start - Mon Sep 24 16:28:26 1990
>> %%[ Error: undefinedresult; OffendingCommand: arcto ]%%
>> %%[ Flushing: rest of job (to end-of-file) will be ignored ]%%
>> psif: end - Mon Sep 24 16:29:31 1990

I get the same error on my NeXT.  Upon inspection of the file, there
are a few instances where the X1,Y1 and X2,Y2 points passed to arcto
are identical.  It is these cases that raise the "undefinedresult"
error, which may be a divide by zero in computing the arctangent.

Here is a little redefinition for "arcto" which filters out the problem
cases and changes their values slightly.  It caused your example
program to start working, at least:

	/*arcto /arcto load def
	/arcto {
	    5 copy pop 3 -1 roll eq 3 1 roll eq and { %if
		exch 1 add exch 3 -1 roll 1 sub 3 1 roll
	    } if
	    *arcto
	} bind def

If you put this somewhere in the beginning of the file, after the
comments, it should "fix" the problem, although it is a hack.  If
the arguments to "arcto" are identical, it adds 1 to the Y value
and subtracts 1 from the X value of the second point :-)

/Glenn

-- 
 Glenn Reid				RightBrain Software
 glenn@heaven.woodside.ca.us		PostScript/NeXT developers
 ..{adobe,next}!heaven!glenn		415-851-1785
Technical Details
Message-ID: <281@heaven.woodside.ca.us>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!pacbell.com!decwrl!adobe!heaven!glenn
References: <637@keele.keele.ac.uk>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!ucsd!pacbell.com!decwrl!adobe!heaven!glenn
From: glenn@heaven.woodside.ca.us (Glenn Reid)
Newsgroups: comp.lang.postscript
Subject: Re: is this PostScript from fig2dev OK or not?
Summary: not on Adobe interpreters
Keywords: PostScript xfig v2.0 pl8 transfig fig2dev arcto
Message-ID: <281@heaven.woodside.ca.us>
Date: 25 Sep 90 19:42:37 GMT
References: <637@keele.keele.ac.uk>
Reply-To: glenn@heaven.woodside.ca.us (Glenn Reid)
Organization: RightBrain Software, Woodside, CA
Lines: 90