POV-Ray : Newsgroups : povray.newusers : Need help with "declare" Server Time
6 Sep 2024 14:13:17 EDT (-0400)
  Need help with "declare" (Message 1 to 2 of 2)  
From: yang444
Subject: Need help with "declare"
Date: 30 Apr 1998 23:20:11
Message: <35493F6B.866E9DB3@pacbell.net>
The code below gives the error:
   no matching { in difference, box found instead

There must be something about declaring that I couldn't find in the doc.
Would some kind soul please explain why I get this error?

-----------------------------
#include "colors.inc"

#declare Dflgg = box {
    <0, 0, 0>, <1, 1, .001>
    pigment  { color Red }
    finish { ambient .8 }
    scale <40, 24, 1>
}

difference
{
 Dflgg
 box
  {
    <0, 0, -1>, <1, 1, .002>
    pigment  { color  Blue  }
    finish { ambient .8 }
  }
}

-----------------------------

--
Alan


Post a reply to this message

From: Jerry Anning
Subject: Re: Need help with "declare"
Date: 30 Apr 1998 23:42:12
Message: <35494494.643708C8@dhol.com>
yan### [at] pacbellnet wrote:
> 
> The code below gives the error:
>    no matching { in difference, box found instead
> 
> There must be something about declaring that I couldn't find in the doc.
> Would some kind soul please explain why I get this error?
> 
> -----------------------------
> #include "colors.inc"
> 
> #declare Dflgg = box {
>     <0, 0, 0>, <1, 1, .001>
>     pigment  { color Red }
>     finish { ambient .8 }
>     scale <40, 24, 1>
> }
> 
> difference
> {
>  Dflgg
>  box
>   {
>     <0, 0, -1>, <1, 1, .002>
>     pigment  { color  Blue  }
>     finish { ambient .8 }
>   }
> }

In the difference, say object { Dfflg } instead of just Dfflg.  You
don't always need to do this, but it doesn't hurt and the habit will
save problems like this.

Jerry Anning
cle### [at] dholcom


Post a reply to this message

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