POV-Ray : Newsgroups : povray.general : cabinet macro Server Time
4 Nov 2024 19:21:55 EST (-0500)
  cabinet macro (Message 1 to 5 of 5)  
From: mysdn
Subject: cabinet macro
Date: 25 Jun 2009 05:25:01
Message: <web.4a434115517ce48fe4e47a1b0@news.povray.org>
Hello again,
I heartily thank all commentators on my previous posts. Now we are in a
different ballpark, problem on rotations still remains to a lesser degree cause
I'm progressing on it daily. This post is about macros, I don't want to look
like I'm trying to get you do my work for me since I post attachments, I post
attachments cause I want you to see the issue in its totality. I'm trying to
learn cause I must be doing all of my work. I must confess I find this forum to
be pretty helpful and knowledgeable, but most of all, nice people like you guys
make it a better place. I believe in Povray, I've been using it for a little
over a year. I see it has a glorious past, I want to see it shine brightly in
the future.

in the zip a working cabinet macro is presented.
it has a few issues explained in it also, thank you.

www.optimadekor.com/yesdownload/cabinet_macro.zip

ibrahim dogan
Turkey


Post a reply to this message

From: mysdn
Subject: Re: cabinet macro
Date: 26 Jun 2009 18:40:01
Message: <web.4a454d8f2c18cb70e4e47a1b0@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote:
>
> in the zip a working cabinet macro is presented.
> it has a few issues explained in it also, thank you.

I solved most of the problems I presented in the zip file, still working on
rotation though. Now I would like to ask something else
does povray if statement support 2 conditions at once. such as C# if statements.

instead of this
eg.  #if (DoorCount < 1)// no door
          #if(IsGlassDoor) //door is glass

I want to write this
#if (DoorCount < 1) or (IsGlassDoor)

//bla bla

#end
thank you

ibrahim


Post a reply to this message

From: StephenS
Subject: Re: cabinet macro
Date: 26 Jun 2009 18:55:00
Message: <web.4a4550a62c18cb7088b072750@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote:
>... Now I would like to ask something else
> does povray if statement support 2 conditions at once. such as C# if statements.
>
> instead of this
> eg.  #if (DoorCount < 1)// no door
>           #if(IsGlassDoor) //door is glass
>
> I want to write this
> #if (DoorCount < 1) or (IsGlassDoor)
>
> //bla bla
>
> #end
> thank you
>
> ibrahim

In winpov help 3.2.1.3.3 Operators/ logical expressions

(A & B)  true only if both A and B are true, false otherwise
(A | B)  true if either A or B or both are true

Hope this helps

Stephen S


Post a reply to this message

From: mysdn
Subject: Re: cabinet macro
Date: 26 Jun 2009 19:10:01
Message: <web.4a4554e72c18cb70e4e47a1b0@news.povray.org>
> StephenS wrote
>(A & B)  true only if both A and B are true, false otherwise
>(A | B)  true if either A or B or both are true

>Hope this helps

exactly what I needed thank you, impressed with the speed of your post too.


Post a reply to this message

From: clipka
Subject: Re: cabinet macro
Date: 26 Jun 2009 23:00:00
Message: <web.4a458aa82c18cb70371b08450@news.povray.org>
"mysdn" <kam### [at] hotmailcom> wrote:
> instead of this
> eg.  #if (DoorCount < 1)// no door
>           #if(IsGlassDoor) //door is glass
>
> I want to write this
> #if (DoorCount < 1) or (IsGlassDoor)

Try this one:

  #if ((DoorCount < 1) | IsGlassDoor)

Note that in POV-Ray this denotes logical "or", not bit-wise as in C#; POV-Ray
does not have a "||" operator.

As you may already guess, "&" is used to denote logical "and".


Post a reply to this message

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