|
![](/i/fill.gif) |
Hi,
I'm not quite sure, but I think the problem is caused by the 'clipped_by' in
bend.inc. Bend.inc cuts your object into several slices and then transforms
each of it, but the individual slices are no solid objects anymore because
the have been 'clipped_by' some planes. This way ist impossible for the csg
to decide whats inside and whats outside of the 'bent_object'
It's strage to me that an 'intersection' with the same 'bent_object'
works...
If you want exactly this object for your scene you should place the cubes
using a #while loop to rotate them into position.
If you need a more complex object to be bent by the include-file and then
subtracted from an other object I think the only way is to re-write the
include file not to use clipped_by but true csg-operations to slice the
'bend_object'...
Again, this is just a guess, has anyone another explaination for this?
-sascha
"Peter" <nos### [at] yahoo co nz> wrote in message
news:3da66bea@news.povray.org...
>
> Hi - can someone please help me get this difference right? I'm just new
to
> povray, so there is probably something simple I'm missing.
>
> Aim: to get a curved row of square holes in a ring.
> I thought I'd use a torus for the ring, some boxes for the holes and
> difference to punch the holes in the ring.
>
> The script below illustrates what I'm after. Set the switch swt at the
top
> to see different parts;
> swt = 0 shows the plain ring
> swt = 1 shows the bent row of boxes by themselves
> swt = 2 shows a straight row of holes in the ring
> swt = 3 shows a bent row of holes in the ring - except it doesn't work.
>
> Can someone please advise me how to get this difference function working?
> (Or advise a better way to do this?)
>
> TIA
>
> Peter
>
> PS the bend.inc file is by Chris Colefax.
> http://www.geocities.com/SiliconValley/Lakes/1434/bend.html
> -----------------------------
> // test piece for bend.inc tool
>
> light_source { <-10,10,-20> color rgb <1,1,1> }
>
> camera { location <0, -2, -5>
> look_at <0, 0, 0>
> right x*image_width/image_height
> }
>
> #declare swt = 0; // swt = 0, 1, 2, 3
>
> #declare torus1 = torus { 1.273, 0.3
> rotate<90,0,0>
> scale<1,1,.2>
> }
>
> #declare boxes = union {
> box{< 0.0, -1.47, -1> < 0.2, -1.27, 1>}
> box{< 0.2, -1.27, -1> < 0.4, -1.07, 1>}
> box{< 0.4, -1.47, -1> < 0.6, -1.27, 1>}
> box{< 0.6, -1.27, -1> < 0.8, -1.07, 1>}
> box{< 0.8, -1.47, -1> < 1.0, -1.27, 1>}
> box{< 1.0, -1.27, -1> < 1.2, -1.07, 1>}
> box{< 1.2, -1.47, -1> < 1.4, -1.27, 1>}
> box{< 1.4, -1.27, -1> < 1.6, -1.07, 1>}
> box{< 1.6, -1.47, -1> < 1.8, -1.27, 1>}
> box{< 1.8, -1.27, -1> < 2.0, -1.07, 1>}
> }
>
> #if (swt = 0) #declare theshape = object { torus1 }
>
> #else
>
> // bend options
> #declare object_axis1 = < 0, -1.27, 0>;
> #declare object_axis2 = < 2, -1.27, 0>;
> #declare bend_angle = 90;
> #declare bend_direction = y;
> #declare bend_object = object{ boxes }
> #declare bent_object = object{
> #include "Bend.inc"
> }
> #if (swt = 1) #declare theshape = object{ bent_object }
>
> #else
>
> #if (swt = 2)
> #declare theshape = difference{
> object{ torus1 }
> object{ bend_object }
> }
>
> #else
> #declare theshape = difference{
> object{ torus1 }
> object{ bent_object }
> }
> #end
> #end
> #end
>
> object{ theshape
> pigment{color rgb<.4,.3,.8>}
> }
> -----------------------------
>
Post a reply to this message
|
![](/i/fill.gif) |