|
|
Wasn't it BoudewijnDocter who wrote:
>Hi,
>
>I'm having trouble using the cutaway_textures feature when trying to cut
>something with a complex csg. The following simplified code illustrates my
>problem:
>
>#include "colors.inc"
>
>camera {location <3,4,-4> look_at 0 }
>light_source {<10,20,-5>, rgb 3}
>
>#declare MyObject = union {
> box {<-1,-1,-1>,<1,0,1> pigment {Red} }
> box {<-1,0,-1>,<1,1,1> pigment {Blue}}
>}
>
>#declare MyCuttingObject = difference {
> cylinder {<0,-2,0>,<0,2,0>,1}
> box {<0,-3,-1>,<1,3,0>}
>}
>
>difference {
> object {MyObject}
> object {MyCuttingObject}
> cutaway_textures
>}
>
>I've got two colored boxes on top of each other, which I want to cut with an
>object that is a construction of two objects. Obviously I would like to see the
>colors inside the cut, hence the cutaway_textures, but this doesn't seem to
>work. Is there anyone who has the golden tip?
It looks like a bug. A rather ugly workround is to do this:
union {
difference {
object {MyObject}
cylinder {<0,-2,0>,<0,2,0>,1}
cutaway_textures
}
intersection {
object {MyObject}
box {<0,-3,-1>,<1,3,0>}
cutaway_textures
}
}
--
Mike Williams
Gentleman of Leisure
Post a reply to this message
|
|