POV-Ray : Newsgroups : povray.general : Round-opening hole Server Time
14 Nov 2024 23:21:31 EST (-0500)
  Round-opening hole (Message 1 to 8 of 8)  
From: Rick Measham
Subject: Round-opening hole
Date: 20 Jan 2005 17:16:22
Message: <41f02db6$1@news.povray.org>
I have a box with a hole in it. The whole was made by differencing a 
Round_Box so that the corners were nicer than the traditional square 
corners. However the opening of the hole still has hard square edges:
___      __
    |    |
    |    |
    |____|

How would you go about rounding them?
___      __
    \    /
    |    |
    |____|


I've thrown away my first idea, which was to put cylinders around the 
four sides of the box (first subtracting the radius as a box) but that 
only works along the sides of the hole. I need the corners to be nicely 
rounded too.

Any help and suggestions would be greatly appreciated.


Post a reply to this message

From: Slime
Subject: Re: Round-opening hole
Date: 20 Jan 2005 17:36:23
Message: <41f03267@news.povray.org>
> I've thrown away my first idea, which was to put cylinders around the
> four sides of the box (first subtracting the radius as a box) but that
> only works along the sides of the hole. I need the corners to be nicely
> rounded too.


You've got the right idea. The corners are harder, but can be rounded off
using a torus with a minor and major radius both equal to the
roundoff-radius. Cut out one quarter of the torus by differencing (or
intersecting with) two planes. This just leaves a little bit of space
*behind* the torus which can be filled in by a small box differenced by a
cylinder.

 - Slime
 [ http://www.slimeland.com/ ]


Post a reply to this message

From: Bonsai
Subject: Re: Round-opening hole
Date: 21 Jan 2005 02:51:11
Message: <41f0b46f$1@news.povray.org>
I would try this, maybe in a macro:

First cut out the hole like you did

> ___      __
>    |    |
>    |    |
>    |____|

Then cut out a hole not so deep but with a bigger radius

  __          __
    |_      _|
      |    |
      |____|

The last thing is placing a torus that way, that it fills the edges. The 
major radius for the torus is the radius for the bigger hole and the 
minor radius is the radius for the first hole you made.

___ _      _ ___
  | |_\    /_| |
  \___|    |___/<-- this is the torus
      |____|


I hope this is clear enough.

I also could post some code if you wish...

So long,

Bonsai

-- 
<--------------------------->
    ___ __ __  _ ___ ___  _
   | _ )  \  \( )  _) _ )( )
   | _ \() |\ \ |\ \/ _ \| |
   |___/__/_)\__)___)/ \_)_)

        www.b0n541.net
<--------------------------->


Post a reply to this message

From: Bonsai
Subject: Re: Round-opening hole
Date: 21 Jan 2005 03:07:19
Message: <41f0b837@news.povray.org>
Bonsai wrote:

Something thats incorrect because he had not enough coffee, yet. ;-)

> The last thing is placing a torus that way, that it fills the edges. The 
> major radius for the torus is the radius for the bigger hole and the 
> minor radius is the radius for the first hole you made.

The radius for the minor radius is the difference between the radii of 
the two holes.

Here is a short example scene:

#default {
   texture { pigment {color rgb 1}}
}
 

// create a regular point light source
light_source {
     <20, 40, -20>
     color rgb <1,1,1>    // light's color
}
 

// perspective (default) camera
camera {
   location  <10, 10, 0>
   look_at   <0.0, 5.0,  0.0>
   right     x*image_width/image_height
}
 

merge {
     difference {
         box { <-5, -5, -5>, < 5,  5,  5>}
         cylinder { <0, 0, 0>, <0, 6, 0>, 2 }
         cylinder { <0, 4, 0>, <0, 6, 0>, 3 }
     }
 

     torus { 3, 1 translate <0, 4, 0>}
}

Hope that helps...

So long,

Bonsai


-- 
<--------------------------->
    ___ __ __  _ ___ ___  _
   | _ )  \  \( )  _) _ )( )
   | _ \() |\ \ |\ \/ _ \| |
   |___/__/_)\__)___)/ \_)_)

        www.b0n541.net
<--------------------------->


Post a reply to this message

From: Maurice
Subject: Re: Round-opening hole
Date: 21 Jan 2005 12:02:36
Message: <41f135ac$1@news.povray.org>
Rick Measham wrote:
> I have a box with a hole in it. The whole was made by differencing a 
> Round_Box so that the corners were nicer than the traditional square 
> corners. However the opening of the hole still has hard square edges:
> ___      __
>    |    |
>    |    |
>    |____|
> 
> How would you go about rounding them?
> ___      __
>    \    /
>    |    |
>    |____|
> 
> 
> I've thrown away my first idea, which was to put cylinders around the 
> four sides of the box (first subtracting the radius as a box) but that 
> only works along the sides of the hole. I need the corners to be nicely 
> rounded too.
> 
> Any help and suggestions would be greatly appreciated.

I think the keyword you are looking for here is: *lathe*

-- 
Maurice


Post a reply to this message

From: Mike Williams
Subject: Re: Round-opening hole
Date: 21 Jan 2005 12:58:05
Message: <0UxuKBAI1T8BFwIF@econym.demon.co.uk>
Wasn't it Maurice who wrote:
>Rick Measham wrote:
>> I have a box with a hole in it. The whole was made by differencing a 
>> Round_Box so that the corners were nicer than the traditional square 
>> corners. However the opening of the hole still has hard square edges:
>> ___      __
>>    |    |
>>    |    |
>>    |____|
>> 
>> How would you go about rounding them?
>> ___      __
>>    \    /
>>    |    |
>>    |____|
>> 
>> 
>> I've thrown away my first idea, which was to put cylinders around the 
>> four sides of the box (first subtracting the radius as a box) but that 
>> only works along the sides of the hole. I need the corners to be nicely 
>> rounded too.
>> 
>> Any help and suggestions would be greatly appreciated.
>
>I think the keyword you are looking for here is: *lathe*

Wouldn't that tend to make a cylindrical hole rather than a rounded
square hole?

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Maurice
Subject: Re: Round-opening hole
Date: 21 Jan 2005 13:26:00
Message: <41f14938$1@news.povray.org>
Mike Williams wrote:
> Wasn't it Maurice who wrote:
> 
>>Rick Measham wrote:
>>
>>>I have a box with a hole in it. The whole was made by differencing a 
>>>Round_Box so that the corners were nicer than the traditional square 

>>
>>I think the keyword you are looking for here is: *lathe*
> 
> 
> Wouldn't that tend to make a cylindrical hole rather than a rounded
> square hole?
> 

Ah yes. How stupid of me. <blush>

-- 
Maurice


Post a reply to this message

From: Jim Charter
Subject: Re: Round-opening hole
Date: 21 Jan 2005 18:47:01
Message: <41f19475$1@news.povray.org>
Maurice wrote:
> Mike Williams wrote:
> 
>> Wasn't it Maurice who wrote:
>>
>>> Rick Measham wrote:
>>>
>>>> I have a box with a hole in it. The whole was made by differencing a 
>>>> Round_Box so that the corners were nicer than the traditional square 
> 
> 
>>>
>>> I think the keyword you are looking for here is: *lathe*
>>
>>
>>
>> Wouldn't that tend to make a cylindrical hole rather than a rounded
>> square hole?
>>
> 
> Ah yes. How stupid of me. <blush>
> 
But you could use the lathe the difference out the rounded corners and 
lip, no?


Post a reply to this message

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