POV-Ray : Newsgroups : povray.general : POV File I/O Server Time
5 Nov 2024 22:23:17 EST (-0500)
  POV File I/O (Message 1 to 3 of 3)  
From: Niytaan
Subject: POV File I/O
Date: 23 Dec 2002 20:35:22
Message: <3e07b9da@news.povray.org>
I guess this would be the best place for this:

How do you think I should go about getting the following lines to output to
a .pov file with indents?

#declare TriBegin="triangle{\n";
#declare TriMid=",\n";
#declare TriEnd="}\n";
#fopen Mesh "mesh.pov" append

#declare P1=<0,0,0>;
#declare P2=<0,0,0>;
#declare P3=<0,0,0>;

#write(Mesh,TriBegin,P1,TriMid,P2,TriMid,P3,TriEnd)
#ifdef(Mesh)
#fclose Mesh
#end

I want that code to output as

triangle{
    <0,0,0>,
    <0,0,0>,
    <0,0,0>
}

but instead it comes out as

triangle{
<0,0,0> ,
<0,0,0> ,
<0,0,0>
}

I have this dreadful feeling that what I want to do is impossible without
writing my own patch for the problem since I've tried several ways to do
this already. Thanks ahead of time to anyone who can help. :)


Post a reply to this message

From: Niytaan
Subject: Re: POV File I/O
Date: 23 Dec 2002 20:43:32
Message: <3e07bbc4$1@news.povray.org>
Nevermind, apparently my brain was a little slow today and totally missed
the "\t" in the help file. Ignore me, please.


Post a reply to this message

From: ingo
Subject: Re: POV File I/O
Date: 24 Dec 2002 04:31:10
Message: <Xns92EE6BF1D37DCseed7@povray.org>
in news:3e07bbc4$1@news.povray.org Niytaan wrote:

>  Ignore me, please.

No

You could also do,

#declare TriBegin="triangle{\n   ";
#declare TriMid=",\n    ";

or,

#write(Mesh,TriBegin,"   ",P1,TriMid,"   ",P2,TriMid,"   ",P3,TriEnd)

that is, if you prefer spaces over tabs.

Ingo


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.