POV-Ray : Newsgroups : povray.general : clipped_by bug?! Server Time
12 Aug 2024 01:24:31 EDT (-0400)
  clipped_by bug?! (Message 1 to 9 of 9)  
From: Rainer Mager
Subject: clipped_by bug?!
Date: 26 Apr 1999 05:36:18
Message: <37242582.0@news.povray.org>
Hi all,

    Can anyone tell me if this is a bug or correct behavior? I've trying to
make a CSG shape and I have a clipped_by statement withing a union (so it
should only affect that union, right). I also have that union differenced
from another union.
    What I am seeing, however, is that the clipped by is affecting the
entire shape, not just the local union. Any ideas? Oh, this is on POVRay
3.1e.
    What I'm trying to accomplish is that I don't want the hole going all
the way through the screw. It should stop 0.1 above the bottom.


    Here's a code snippet:


#declare Screw = difference {
 union {
  cylinder {
   <0, 0, 0>, <0, 0.1, 0>, 0.5
  }
  sphere {
   <0, 0, 0>, 0.5
   scale <1, 0.5, 1>
   translate <0, 0.1, 0>
  }
 }
 union {
  box {
   <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
   rotate x*45
   translate <0, 0.5, 0>
  }
  box {
   <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
   rotate x*45
   rotate y*90
   translate <0, 0.5, 0>
  }
  clipped_by {
   plane {
    y, 0.1
   }
  }
 }
}



Thanks,

--Rainer


Post a reply to this message

From: Bob Hughes
Subject: Re: clipped_by bug?!
Date: 26 Apr 1999 06:14:15
Message: <37242E30.552969B0@aol.com>
From what I can tell so far you are simply getting the boxes cutting all
the way though the screw head. Nothing about the 'clipped_by' that I can
see (yet).
Although, just to add a possibly relevant fact, I once had a very
stubborn CSG object using clipped_by to open the object for use as two
halves (duplicated clipped_by on each half) and previously invisible
parts were then made visible. And only because of the clipped_by near as
I could tell.
I may be back if there's more to this one here, however, as I said, all
I see is the unioned boxes are set too low, or rather, the cylinder
sphere union is not deep enough.


Rainer Mager wrote:
> 
> Hi all,
> 
>     Can anyone tell me if this is a bug or correct behavior? I've trying to
> make a CSG shape and I have a clipped_by statement withing a union (so it
> should only affect that union, right). I also have that union differenced
> from another union.
>     What I am seeing, however, is that the clipped by is affecting the
> entire shape, not just the local union. Any ideas? Oh, this is on POVRay
> 3.1e.
>     What I'm trying to accomplish is that I don't want the hole going all
> the way through the screw. It should stop 0.1 above the bottom.
> 
>     Here's a code snippet:
> 
> #declare Screw = difference {
>  union {
>   cylinder {
>    <0, 0, 0>, <0, 0.1, 0>, 0.5
>   }
>   sphere {
>    <0, 0, 0>, 0.5
>    scale <1, 0.5, 1>
>    translate <0, 0.1, 0>
>   }
>  }
>  union {
>   box {
>    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>    rotate x*45
>    translate <0, 0.5, 0>
>   }
>   box {
>    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>    rotate x*45
>    rotate y*90
>    translate <0, 0.5, 0>
>   }
>   clipped_by {
>    plane {
>     y, 0.1
>    }
>   }
>  }
> }
> 
> Thanks,
> 
> --Rainer

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto:inv### [at] aolcom?Subject=PoV-News


Post a reply to this message

From: Ken
Subject: Re: clipped_by bug?!
Date: 26 Apr 1999 06:29:10
Message: <3724315B.2C0F94CF@pacbell.net>
Rainer Mager wrote:
> 
> Hi all,
> 
>     Can anyone tell me if this is a bug or correct behavior? I've trying to
> make a CSG shape and I have a clipped_by statement withing a union (so it
> should only affect that union, right). I also have that union differenced
> from another union.
>     What I am seeing, however, is that the clipped by is affecting the
> entire shape, not just the local union. Any ideas? Oh, this is on POVRay
> 3.1e.
>     What I'm trying to accomplish is that I don't want the hole going all
> the way through the screw. It should stop 0.1 above the bottom.
> 
>     Here's a code snippet:
> 
> #declare Screw = difference {
>  union {
>   cylinder {
>    <0, 0, 0>, <0, 0.1, 0>, 0.5
>   }
>   sphere {
>    <0, 0, 0>, 0.5
>    scale <1, 0.5, 1>
>    translate <0, 0.1, 0>
>   }
>  }
>  union {
>   box {
>    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>    rotate x*45
>    translate <0, 0.5, 0>
>   }
>   box {
>    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>    rotate x*45
>    rotate y*90
>    translate <0, 0.5, 0>
>   }
>   clipped_by {
>    plane {
>     y, 0.1
>    }
>   }
>  }
> }
> 
> Thanks,
> 
> --Rainer

  Try these modifications. I too am unsure wht it won't work but it
may be the depth of the cutting boxes. Adding a scale to the first
union helped remove the hole.
 You had another problem you had not seen yet while working out the
other one. The second union of the two boxes left the interior walls
intact when trimming the top with the clipped by. Using a merge
instead took care of the interior walls problem and left me open to
use an intersection in a second declared operation. You could as
easily add the intersection out side the difference operation and
recieve the same results. I left them seperated for illustration
sake and to help me keep the operations seperated for problem solving
sake.
 Anyway the code below does produce a nice Phillips head screw driver
slot and I am content with it from a visualy accurate point of view.


#declare ScrewHead = difference {
 union {
  cylinder {
   <0,0, 0>, <0, 0.1, 0>, 0.5
  }
  sphere {
   <0, 0, 0>, 0.5
   scale <1, 0.5, 1>
   translate <0, 0.1, 0>
  }
}
merge { // union {
  box {
   <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
   rotate x*45
   translate <0, 0.5, 0>
  }
  box {
   <-0.1, -0.5, -0.6>, <0.1, 0.5, 0.5>
   rotate x*45
   rotate y*90
   translate <0, 0.5, 0>
  }
 scale<1,.7,1>
}


//  clipped_by {
//   plane {
//    y, 0.1
//   }
//  }

}

 #declare Screw = intersection {
     object {
      ScrewHead
     }
    plane {
     y, .1
   }
  pigment {
  rgb 1
 }
}

 object { Screw }



-- 
Ken Tyler

mailto://tylereng@pacbell.net


Post a reply to this message

From: Rainer Mager
Subject: Re: clipped_by bug?!
Date: 26 Apr 1999 21:57:17
Message: <37250b6d.0@news.povray.org>
I think I was a little unclear before. I didn't really have any trouble
solving the problem I was just wondering why clipped_by behaved the way it
did. My solution was this:

--Rainer



#declare Screw = difference {
 union {
  cylinder {
   <0, 0, 0>, <0, 0.1, 0>, 0.5
  }
  sphere {
   <0, 0, 0>, 0.5
   scale <1, 0.2, 1>
   translate <0, 0.1, 0>
  }
 }
 intersection {
  union {
   box {
    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
    rotate x*45
    translate <0, 0.5, 0>
   }
   box {
    <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
    rotate x*45
    rotate y*90
    translate <0, 0.5, 0>
   }
  }
  plane {
   -y, -0.01
  }
 }
}


Post a reply to this message

From: Bob Hughes
Subject: Re: clipped_by bug?!
Date: 27 Apr 1999 06:51:31
Message: <3725886A.C7395146@aol.com>
I made a quick checking script of this sort of thing based upon your
question, I understand now what you were actually getting at I think.
Though I found no problem with it. You can check the clipping test out,
I'll put it at the text.scene-files group.


Rainer Mager wrote:
> 
> I think I was a little unclear before. I didn't really have any trouble
> solving the problem I was just wondering why clipped_by behaved the way it
> did. My solution was this:
> 
> --Rainer
> 
> #declare Screw = difference {
>  union {
>   cylinder {
>    <0, 0, 0>, <0, 0.1, 0>, 0.5
>   }
>   sphere {
>    <0, 0, 0>, 0.5
>    scale <1, 0.2, 1>
>    translate <0, 0.1, 0>
>   }
>  }
>  intersection {
>   union {
>    box {
>     <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>     rotate x*45
>     translate <0, 0.5, 0>
>    }
>    box {
>     <-0.1, -0.5, -0.5>, <0.1, 0.5, 0.5>
>     rotate x*45
>     rotate y*90
>     translate <0, 0.5, 0>
>    }
>   }
>   plane {
>    -y, -0.01
>   }
>  }
> }

-- 
 omniVERSE: beyond the universe
  http://members.aol.com/inversez/homepage.htm
 mailto:inv### [at] aolcom?Subject=PoV-News


Post a reply to this message

From: Tom Melly
Subject: Re: clipped_by bug?!
Date: 27 Apr 1999 18:07:42
Message: <3726271e.0@news.povray.org>
Just out of curiosity, does anyone know why Outlook Newsreader (IE5) tries
to download Japanese character support whenever I open a posting from Rainer
Mager?

--
Tom Melly
tom### [at] aolcom
http://members.aol.com/tomandlu


Post a reply to this message

From: Ron Parker
Subject: Re: clipped_by bug?!
Date: 27 Apr 1999 18:19:41
Message: <372629ed.0@news.povray.org>
On Tue, 27 Apr 1999 22:08:57 +0100, Tom Melly <tom### [at] aolcom> wrote:
>Just out of curiosity, does anyone know why Outlook Newsreader (IE5) tries
>to download Japanese character support whenever I open a posting from Rainer
>Mager?

Because he has his newsreader set to post with the wrong MIME charset:

Content-Type: text/plain; charset="iso-2022-jp"
Content-Transfer-Encoding: 7bit


Post a reply to this message

From: Rainer Mager
Subject: Re: clipped_by bug?!
Date: 27 Apr 1999 23:15:35
Message: <37266f47.0@news.povray.org>
Actually, it is set to post the the right MIME charset. It is because I
sometimes write 日本語 but to this group I only write English. The fact that
IE5 Outlook Newsreader can't understand that you don't want to download
Japanese and that you will never want to download Japanese is a typical
Microsoft shortcoming.

Sorry about responding to 2 different people in the same paragraph :-)


--Rainer


Ron Parker <par### [at] my-dejanewscom> wrote in message
news:372629ed.0@news.povray.org...
> Because he has his newsreader set to post with the wrong MIME charset:


Post a reply to this message

From: Tom Melly
Subject: Re: clipped_by bug?!
Date: 29 Apr 1999 11:11:30
Message: <37286892.0@news.povray.org>
What makes it even more irritating is:

1. There is a checkbox on the dialog that would turn off this behaviour, but
it's greyed out in this instance.

2. In the end, I thought, sod it, let's install Japanese character support,
could be fun. Needless to say, the install crashed out.


Rainer Mager wrote in message <37266f47.0@news.povray.org>...
....
The fact that
>IE5 Outlook Newsreader can't understand that you don't want to download
>Japanese and that you will never want to download Japanese is a typical
>Microsoft shortcoming.


Post a reply to this message

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