POV-Ray : Newsgroups : povray.newusers : Generating cut-aways Server Time
24 Nov 2024 10:58:00 EST (-0500)
  Generating cut-aways (Message 1 to 4 of 4)  
From: rtwas
Subject: Generating cut-aways
Date: 14 Feb 2009 07:55:05
Message: <web.4996becdd7a07582a386ad060@news.povray.org>
Hello,

I've researched this problem a bit. It doesn't look like povray can do things
the way I hoped it would.

Basically I want to generate a "cut away" of a complex assembly. I routinely use
povray as a modeling tool to render mechanical designs before I fabricate them.
As one might imagine generating a cut-away of the design is quite useful.

The logical choice here would be to use the "difference" command. The problem
is that although it is *claimed* that objects are assumed to be solid, in
reality it seems "difference" puts a *cap* on the (hollow) object its
differencing. Evidence of this can be seen when using the pigment "Clear" on
the object being differenced.

ie.,

difference
  {
  cylinder
    {
    <0.0, 0.0, 1.0>
    <0.0, 0.0,-1.0>
    1.0
    pigment{Yellow}
    }

  box
    {
    <0.0, 2.0, 2.0>
    <2.0,-2.0,-2.0>
    pigment{Clear}
    }
  }

()Produces a hollow cylinder cut in half.

The idea that after something is *subtracted* from another thing, leaves
something of itself behind in the result
(ie., 7-3 = 4 + (bits of "3" sprinkled on it) doesn't seem consistent with the
idea of a *difference* to me.

Anyway, the only answer I can see is to live with a *single* pigment bounding
the cutaway regions (unfortunate since I'd loose all the pigments of the various
sub-components) or meticulously cut away each sub-component separately to
produce a combined cut-away object with the pigments of the various
sub-components preserved.

Suggestions appreciated.

Thanks.

Robert W.


Post a reply to this message

From: Chris B
Subject: Re: Generating cut-aways
Date: 14 Feb 2009 08:30:01
Message: <4996c759$1@news.povray.org>
"rtwas" <nomail@nomail> wrote in message 
news:web.4996becdd7a07582a386ad060@news.povray.org...
> Hello,
>
> I've researched this problem a bit. It doesn't look like povray can do 
> things
> the way I hoped it would.
>
> Basically I want to generate a "cut away" of a complex assembly.
> ... snip ...
>  with the pigments of the various
> sub-components preserved.
>
> Suggestions appreciated.
>
> Thanks.
>
> Robert W.
>

The 'cutaway_textures' keyword can be added to the CSG object to tell 
POV-Ray to use textures from the surfaces that have been cut into, rather 
than from the object used to cut them.

Regards,
Chris B.


Post a reply to this message

From: Warp
Subject: Re: Generating cut-aways
Date: 14 Feb 2009 12:16:28
Message: <4996fc6c@news.povray.org>
rtwas <nomail@nomail> wrote:
> Anyway, the only answer I can see is to live with a *single* pigment bounding
> the cutaway regions (unfortunate since I'd loose all the pigments of the various
> sub-components) or meticulously cut away each sub-component separately to
> produce a combined cut-away object with the pigments of the various
> sub-components preserved.

  Or use cutaway_textures.

-- 
                                                          - Warp


Post a reply to this message

From: Alain
Subject: Re: Generating cut-aways
Date: 14 Feb 2009 13:59:14
Message: <49971482$1@news.povray.org>
rtwas nous illumina en ce 2009-02-14 07:54 -->
> Hello,
> 
> I've researched this problem a bit. It doesn't look like povray can do things
> the way I hoped it would.
> 
> Basically I want to generate a "cut away" of a complex assembly. I routinely use
> povray as a modeling tool to render mechanical designs before I fabricate them.
> As one might imagine generating a cut-away of the design is quite useful.
> 
> The logical choice here would be to use the "difference" command. The problem
> is that although it is *claimed* that objects are assumed to be solid, in
> reality it seems "difference" puts a *cap* on the (hollow) object its
> differencing. Evidence of this can be seen when using the pigment "Clear" on
> the object being differenced.
> 
> ie.,
> 
  difference
    {
    cylinder
      {
      <0.0, 0.0, 1.0>
      <0.0, 0.0,-1.0>
      1.0
      pigment{Yellow}
      }

    box
      {
      <0.0, 2.0, 2.0>
      <2.0,-2.0,-2.0>
      //pigment{Clear} remove this pigment
      }
cutaway_textures // add this.
    }
> 
> ()Produces a hollow cylinder cut in half.
> 
> The idea that after something is *subtracted* from another thing, leaves
> something of itself behind in the result
> (ie., 7-3 = 4 + (bits of "3" sprinkled on it) doesn't seem consistent with the
> idea of a *difference* to me.
> 
> Anyway, the only answer I can see is to live with a *single* pigment bounding
> the cutaway regions (unfortunate since I'd loose all the pigments of the various
> sub-components) or meticulously cut away each sub-component separately to
> produce a combined cut-away object with the pigments of the various
> sub-components preserved.
> 
> Suggestions appreciated.
> 
> Thanks.
> 
> Robert W.
> 
> 
> 
> 
> 
> 


-- 
Alain
-------------------------------------------------
Any society that would give up a little liberty to gain a little security will 
deserve neither and lose both.
Benjamin Franklin


Post a reply to this message

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