POV-Ray : Newsgroups : povray.general : Round_Box-weirdness : Re: Round_Box-weirdness Server Time
29 Jul 2024 16:18:44 EDT (-0400)
  Re: Round_Box-weirdness  
From: Slime
Date: 13 Feb 2011 21:37:47
Message: <4d58957b$1@news.povray.org>
> Jim already posted the proper solution; to understand what is
 > happening, let's reformat your code to better see the structure
 > (which is always a good idea when you get errors you don't
 > understand):

I agree that code formatting is important. However, when you reformatted 
it, you actually removed the error! (Thus underscoring how easy it is to 
overlook errors in poorly formatted code.)

The original code was this:

#declare listBox=union{
         Round_Box_Union
(
         //<-7, 0.25, 6> <-1, 1.25, -7>, 0.2)
         <-7, 0.25, 6> <-1, 1.5, -7>, 0.2)
         texture {T_Gold_1A}
}

         Round_Box_Union
(
         //<-7, 0.25, 6> <-1, 1.25, -7>, 0.2)
         <-8.5, 0.25, 6> <-7.5, 1.25, -7>, 0.1)
         texture {T_Gold_1A}
}


If we carefully reformat it, we get:

#declare listBox = union
{
     Round_Box_Union( <-7, 0.25, 6> <-1, 1.5, -7>, 0.2 )
     texture { T_Gold_1A }
}

Round_Box_Union( <-8.5, 0.25, 6> <-7.5, 1.25, -7>, 0.1 )
texture { T_Gold_1A }

}


See the problem now? Look how obvious it becomes with proper indentation!

  - Slime


Post a reply to this message

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