|
|
Hi,
I think that the error message came at the second call of the macro. I would
write something like:
#declare tempobj = union{fachwand(37,35,-5.9,0,5.6)}
object{tempobj}
or modify the fachwand macro starting by a "union{" and ending by "}"
I hope that is correct, I didn't try it.
Chaps
"marabou" <not### [at] availableyet> wrote in message
news:3c062665@news.povray.org...
>
> hello,
>
> it ain't the first time i use macros, but now i think so.
> in my code i make a call to a macro which itself is a loop which calls
> another macro. special is that the first macro-call fails and povray does
> not start render if i use the main-call in an object-construct:
> object{mymacro(xd,yd) rotate y*90}
> errormessage:
> Parsing.... ein_fach([...]
> /*[...]
> */
> union <----ERROR
> [...]no matching } in object, union found instead.
> but if i use
> mymacro(xd,yd)
> the code is interpreted without errors. (but then i do not know how rotate
> the object in macro).
> does anybody know what i did wrong or how i can solve this?
> thank for hints.
>
> btw: do not search for macro "mymacro()" in code extract.
>
> code follows (extract):
> -----------------------------code---------------------
>
> camera{cam1}
>
> light_source{}
>
> #declare ef_box_br = 0.31;
> #declare ef_box_ho = 0.07;
> #declare ef_box_ti = 0.4;
>
> //------------------------------------------ein_fach
> #macro ein_fach(ix,iy,iz)
> /*
> ix, iy, iz: verschiebung im raum
> */
> union{ <----here the error is shown
>
> difference{
> box {}
> box {}
> pigment{color White}
> }//difference
>
> difference{
> superellipsoid{}
> superellipsoid{}
> pigment{color White}
> }//difference
> translate <ix,iy,iz>
> }//union
> #end
> //------------------------------------------ein_fach
>
> //------------------------------------------fachwand
> #macro fachwand(anz_x,anz_y,ix,iy,iz)
> #local count_x = 0;
> #local count_y = 0;
> #while (count_x <= anz_x)
> #while (count_y <= anz_y)
> ein_fach(count_x*ef_box_br+ix,count_y*ef_box_ho+iy,iz)
> #declare count_y = count_y + 1;
> #end
> #declare count_y = 0;
> #declare count_x = count_x + 1;
> #end
>
> #end
> //------------------------------------------fachwand
>
> object{fachwand(37,35,-5.9,0,5.6)} <-------------fails
>
> fachwand(37,35,0,0,0) <-------------okay
>
> -----------------------------code end-----------------
>
Post a reply to this message
|
|