POV-Ray : Newsgroups : povray.general : CSG with mesh2 : Re: CSG with mesh2 Server Time
29 Jul 2024 16:34:01 EDT (-0400)
  Re: CSG with mesh2  
From: Alain
Date: 18 Jan 2011 23:22:57
Message: <4d366721@news.povray.org>

> Hi All,
>
> I want to do CSG with a mesh2 object, but I'm not sure if POVRay supports what I
> need to do: the mesh2 object that I have is closed, but also contains internal
> triangles (almost every triangle is transparent, so the internal triangles are
> visible). I want to be able to do CSG with the *boundary* of the mesh2, and
> ignore the internal triangles as far as CSG is concerned. Is this possible?
>
>  From the documentation, it seems like it wouldn't do what I want, because it
> seems that based on whether the number of triangles intersected is odd or even
> POV will consider the point as inside/outside. But what I want is for POV to
> only intersect the triangles on the mesh2's *boundary* when doing this test, and
> ignore the internal triangles. So any point inside the boundary triangles should
> be regarded as "inside" regardless of how many triangles intersect a particular
> ray.
>
> What I want to achieve is this: I have several mesh2 objects, all of which have
> a well-defined boundary but also contain internal triangles. I want to be able
> to, for example, subtract mesh B from mesh A, so that all the triangles in mesh
> A (including the internal triangles) are clipped by the *boundary* of mesh B
> (ignoring B's internal triangles). How can I achieve this?
>
> Thanks in advance!
>
>

Make a mesh with the outside triangles and one with the inside 
triangles. Don't forget to give an inside vector to the outside mesh.

Unless the inside mesh is supposed to also be solid, don't give it an 
inside vector.

Bind them in a single union.

Have the second mesh made as the first outside one. DON'T union it with 
it's inside triangles.

Perform your difference or intersection.

If you want to use clipped_by, the clipping object MUST be texture-less.
So, you need to define your meshes that are subject to be used as 
clipping objects without any material/texture/pigment, and only apply 
the texture if needed.

A clipping mesh may be unioned with a non-solid iner mesh, as long as 
they are both texture-less.

Texture-less also mean that you can't have any per triangle/vertice 
texture. NO texture ANYWHERE in the mesh definition.




Alain


Post a reply to this message

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