POV-Ray : Newsgroups : povray.general : Mesh in CSG Bug Server Time
18 Nov 2024 09:13:53 EST (-0500)
  Mesh in CSG Bug (Message 1 to 5 of 5)  
From: Ken
Subject: Mesh in CSG Bug
Date: 11 Sep 2002 09:27:03
Message: <3D7F459A.BABE7B59@pacbell.net>
Seeking confirmation that the below behavior is a bug when using
mesh objects in a CSG operation.

----------------------------------------------------------------

Bug report -

Mesh object evluated properly only when it is the top level object
in a CSG operation. The behavior is incorrect when it is a second
level object.


#macro Box_Mesh(Vec1,Vec2,In_Vect)

#if (Vec1.x=Vec2.x | Vec1.y=Vec2.y | Vec1.z=Vec2.z) 

#debug "\n  Box_Mesh detected identical vector values.\n" #end

#local P1=<Vec1.x, Vec1.y, Vec1.z>;
#local P2=<Vec2.x, Vec1.y, Vec1.z>; 
#local P3=<Vec2.x, Vec1.y, Vec2.z>;
#local P4=<Vec1.x, Vec1.y, Vec2.z>;
#local P5=<Vec1.x, Vec2.y, Vec1.z>;
#local P6=<Vec2.x, Vec2.y, Vec1.z>;
#local P7=<Vec2.x, Vec2.y, Vec2.z>;
#local P8=<Vec1.x, Vec2.y, Vec2.z>;

mesh
{
    triangle { P5, P1, P2} triangle { P5, P6, P2}
    triangle { P6, P2, P3} triangle { P6, P7, P3}
    triangle { P7, P3, P4} triangle { P7, P8, P4}
    triangle { P8, P4, P1} triangle { P8, P5, P1}
    triangle { P8, P5, P6} triangle { P8, P7, P6}
    triangle { P4, P1, P2} triangle { P4, P3, P2}
    inside_vector In_Vect
}
#end


camera { location<-2,3,-5> look_at y*.5 }

light_source { <-5,5,-5> 1 }

default { pigment {red 1} finish { ambient .4 diffuse .6 }}


// Works as expected - mesh as top level object in csg

difference
{
   Box_Mesh(<-1,-1,-1>,<1,1,1>,<0,0,1>)
   box{<-.75,-.75,-1.1>,<.75,.75,1.1> pigment{rgb 1}}
  translate x*-1.2
}

// Does not work as expected - mesh as second level object in csg

difference
{
   box{<-1,-1,-1>,<1,1,1> pigment{rgb 1}}
   Box_Mesh(<-.75,-.75,-1.1>,<.75,.75,1.1>,<0,0,1>)
  translate x*1.2
}

// Does not work as expected - mesh as top and second level object in csg

difference
{
   Box_Mesh(<-1,-1,-1>,<1,1,1>, <0,0,1>)
   Box_Mesh(<-.75,-.75,-1.1>,<.75,.75,1.1>,<0,0,1>)
  translate y*2
}


Post a reply to this message

From: ABX
Subject: Re: Mesh in CSG Bug
Date: 11 Sep 2002 09:57:10
Message: <iliunu4fjdc31gua0qif4802jjmiam528r@4ax.com>
On Wed, 11 Sep 2002 06:31:06 -0700, Ken <tyl### [at] pacbellnet> wrote:
> Seeking confirmation that the below behavior is a bug when using
> mesh objects in a CSG operation.

I can confirm it produces not expected behaviour.

ABX


Post a reply to this message

From: Alf Peake
Subject: Re: Mesh in CSG Bug
Date: 11 Sep 2002 17:04:12
Message: <3d7fafcc@news.povray.org>
"Ken" <tyl### [at] pacbellnet> wrote in message
news:3D7F459A.BABE7B59@pacbell.net...


> mesh
> {
>     triangle { P5, P1, P2} triangle { P5, P6, P2}
>     triangle { P6, P2, P3} triangle { P6, P7, P3}
>     triangle { P7, P3, P4} triangle { P7, P8, P4}
>     triangle { P8, P4, P1} triangle { P8, P5, P1}
>     triangle { P8, P5, P6} triangle { P8, P7, P6}
>     triangle { P4, P1, P2} triangle { P4, P3, P2}
>     inside_vector In_Vect
> }

Confirmed, but I get this 4 times:
Warning: Patch objects not allowed in intersection.

3.5.icl.win32. Win98SE

Alf


Post a reply to this message

From: John VanSickle
Subject: Re: Mesh in CSG Bug
Date: 12 Sep 2002 14:09:22
Message: <3D80D862.3D6FFE4D@hotmail.com>
Ken wrote:
> 
> Seeking confirmation that the below behavior is a bug when using
> mesh objects in a CSG operation.

Patch objects don't have a defined interior; the interior is used
to determine whether an object in CSG is cut away, or inside another.

Regards,
John


Post a reply to this message

From: Christopher James Huff
Subject: Re: Mesh in CSG Bug
Date: 12 Sep 2002 15:28:39
Message: <chrishuff-953C3D.15281212092002@netplex.aussie.org>
In article <3D80D862.3D6FFE4D@hotmail.com>,
 John VanSickle <evi### [at] hotmailcom> wrote:

> Patch objects don't have a defined interior; the interior is used
> to determine whether an object in CSG is cut away, or inside another.

This specific case is with meshes using the inside_vector feature, these 
meshes *do* have a defined interior.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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