discuss@lists.openscad.org

OpenSCAD general discussion Mailing-list

View all threads

seeing holes in difference

JB
Jon Bondy
Sun, Jul 21, 2024 5:26 PM

I define eps = 0.01 and use it all over the place.  It helps me remember
why I added in the 1 or the 0.1 or the 0.01

On 7/21/2024 1:21 PM, Rogier Wolff via Discuss wrote:

On Sat, Jul 20, 2024 at 09:08:01PM -0400, Bob Roos via Discuss wrote:

Hello Discuss,

This program shows 3 cubes one with a visible clear hole the other without.

In the old days the overlapping top and bottom surfaces of the
cylinder and cube would be guaranteed to lead to problems. The program
would be uncertain if passing that surface of the cube and subtracted
cylinder at the same time would put you inside the remaining solid or
not.

Nowadays openscad is a lot better, you can often get away with doing
this. Apparently you've found a case where you can't.

I always do stuff like:

ch = 3;
difference () {
cube ([10,10,ch]);
translate (5,5,-1]) cylinder (d=3, h=ch+2);
}

that the subtracted object is always sticking out a little bit. .01mm
is enough, but nowadays I often just use 1mm.

Roger.

--
This email has been checked for viruses by AVG antivirus software.
www.avg.com

I define eps = 0.01 and use it all over the place.  It helps me remember why I added in the 1 or the 0.1 or the 0.01 On 7/21/2024 1:21 PM, Rogier Wolff via Discuss wrote: > On Sat, Jul 20, 2024 at 09:08:01PM -0400, Bob Roos via Discuss wrote: >> Hello Discuss, >> >> This program shows 3 cubes one with a visible clear hole the other without. > In the old days the overlapping top and bottom surfaces of the > cylinder and cube would be guaranteed to lead to problems. The program > would be uncertain if passing that surface of the cube and subtracted > cylinder at the same time would put you inside the remaining solid or > not. > > Nowadays openscad is a lot better, you can often get away with doing > this. Apparently you've found a case where you can't. > > I always do stuff like: > > ch = 3; > difference () { > cube ([10,10,ch]); > translate (5,5,-1]) cylinder (d=3, h=ch+2); > } > > that the subtracted object is always sticking out a little bit. .01mm > is enough, but nowadays I often just use 1mm. > > Roger. > -- This email has been checked for viruses by AVG antivirus software. www.avg.com