On Wed, 1 Oct 2003 07:02:36 EDT, "mmm" <mik### [at] comcastnet> wrote:
> I'm writing a macro that takes the union of from 1 to n objects. If there
> is one object, POV rightfully issues a warning message. How can I get
> around the problem?
Is below sufficient ?
#macro Get_Nth_Object(Nth) // Nth is 0-based
sphere{ ... }
#end
#macro Get_Objects_In_One_Body(N)
#if(N=1)
#local Object = Get_Nth_Object(0)
#else
#local Object = union{
#local Counter = 0;
#while (Counter < N )
Get_Nth_Object(Counter)
#local Counter = Counter + 1;
#end
}
#end
Object
#end
difference{
object{ Get_Objects_In_One_Body(3) }
object{ Get_Objects_In_One_Body(1) }
}
ABX
Post a reply to this message
|