POV-Ray : Newsgroups : povray.newusers : boolean operations between mesh and solid Server Time
23 Nov 2024 14:57:36 EST (-0500)
  boolean operations between mesh and solid (Message 1 to 6 of 6)  
From: Dicko
Subject: boolean operations between mesh and solid
Date: 28 Dec 2012 10:25:01
Message: <web.50ddb8edc7530fd8ed187b800@news.povray.org>
Hi all,

It seems you cannot apply a boolean operation between a mesh2 object and a
solid? Or it computes no new surfaces?
Probably I'm missing something.

Thanks, Dick


My code:

#declare myBox = mesh2 { // a simple cube
 vertex_vectors {
  8,
  <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>, <0,0,1>, <1,0,1>, <1,1,1>, <0,1,1>
 }
 face_indices {
  12,
  <0,2,3>, <0,1,2>, <0,1,5>, <0,5,4>, <1,5,2>, <5,6,2>, <2,6,7>, <2,7,3>,
<0,3,7>, <0,7,4>, <4,5,7>, <5,6,7>
 }
 inside_vector <0.5,0.5,0.5>
 texture {pigment {rgb <0,1,0>}}
}

difference {
 object { myBox }
 box {
  <0.25, -1, 0.25>
  <0.75, 3, 0.75>
  rgb <1,0,0>
 }
}


Post a reply to this message

From: James Holsenback
Subject: Re: boolean operations between mesh and solid
Date: 28 Dec 2012 10:37:32
Message: <50ddbcbc@news.povray.org>
On 12/28/2012 10:21 AM, Dicko wrote:
> Hi all,
>
> It seems you cannot apply a boolean operation between a mesh2 object and a
> solid? Or it computes no new surfaces?
> Probably I'm missing something.
>
> Thanks, Dick
>
>
> My code:
>
> #declare myBox = mesh2 { // a simple cube
>   vertex_vectors {
>    8,
>    <0,0,0>, <1,0,0>, <1,1,0>, <0,1,0>, <0,0,1>, <1,0,1>, <1,1,1>, <0,1,1>
>   }
>   face_indices {
>    12,
>    <0,2,3>, <0,1,2>, <0,1,5>, <0,5,4>, <1,5,2>, <5,6,2>, <2,6,7>, <2,7,3>,
> <0,3,7>, <0,7,4>, <4,5,7>, <5,6,7>
>   }
>   inside_vector <0.5,0.5,0.5>
>   texture {pigment {rgb <0,1,0>}}
> }
>
> difference {
>   object { myBox }
>   box {
>    <0.25, -1, 0.25>
>    <0.75, 3, 0.75>
>    rgb <1,0,0>
>   }
> }
>
>

keyword to 2nd box ;-)


Post a reply to this message

From: Stephen
Subject: Re: boolean operations between mesh and solid
Date: 28 Dec 2012 11:28:15
Message: <50ddc89f@news.povray.org>
On 28/12/2012 3:37 PM, James Holsenback wrote:
> On 12/28/2012 10:21 AM, Dicko wrote:
>> Hi all,

>>

> keyword to 2nd box ;-)

Typo aside, it is a good idea to have a default texture. I like a bright 
one so it is obvious if a texture is missing in a CSG.

#default{ texture{  pigment { colour rgb <1.0,0.0,1.0 >   }} }


-- 
Regards
     Stephen


Post a reply to this message

From: Kenneth
Subject: Re: boolean operations between mesh and solid
Date: 30 Dec 2012 01:50:06
Message: <web.50dfe215b8989330c2d977c20@news.povray.org>
> >
> worked for me ...

Same here. I rotated the box around to see the hole--red hole in a green box.
Looks successful (with lights, that is-- heh heh ;-)  )


Post a reply to this message

From: Dicko
Subject: Re: boolean operations between mesh and solid
Date: 31 Dec 2012 05:35:01
Message: <web.50e16957b8989330ed187b800@news.povray.org>
Hi all,

I assumed because the rgb keyword is enough for a box it was
also enough when in a bolean operation. As it turnes out you have to use the
texture keyword.

Thanks all!


Post a reply to this message

From: Kenneth
Subject: Re: boolean operations between mesh and solid
Date: 1 Jan 2013 19:35:01
Message: <web.50e3803fb8989330c2d977c20@news.povray.org>
"Dicko" <dic### [at] gmailcom> wrote:

> I assumed because the rgb keyword is enough for a box it was
> also enough when in a bolean operation. As it turnes out you have to use the
> texture keyword.
>

Or actually just a pigment keyword--in which case, POV-Ray will supply a
'default' finish (which is ambient .1 and diffuse .6, per the documentation at
3.5.3.1 and 3.5.3.2)


Post a reply to this message

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