Hi,
I ran into a bug with one of my openscad model where surface is open instead of closed. Not sure about the terminology.
The model is defined by two shapes (ie. arrays of points), that are extruded and mirrorred. This constitutes a block that I stack one on each other and it creates tower. The top most block of tower that is >= 2 blocks high is broken:
As viewed in slic3r.
If it is broken or not depends on viewer I use:
Also note:
The stl files also look ok in meshlab and freecad for me.
edit: and simplify3d
Netfabb basic says it has holes, looks like two blocks are not joined.
I'll have a look at your code.
You have coincident faces.
Moving the slot a smidgeon 'embeds' one solid in the other.
module block() {
translate([0, -0.01, 4.65])//+ 0.001 - 0.00001
It seems to handle the mirror condition tho.
In general you can't butt two faces together, when joining, one needs to penetrate the surface of the other (by any amount).
When differencing you also don't want to take away exactly the same face as another surface. This can make life hard, but 0.01 (depending on original size) isn't really noticeable.
Ok, I see what @MichaelAtOz means; I also noticed that adding or subtracting small amounts (like 0.0001) from any axis fixes it.
If this kind of issues is to be expected I can live with it.
It is a consequence of using floating point. CGAL can actually union surfaces that are exactly coplanar but it is hard to ensure they are when the vertices are represented by floating point numbers and there are any rotations involved.
adding or subtracting small amounts (like 0.0001)
This also helps with z-fighting in preview. But here the size of the offset depends on the overall model size, 0.05 is a good size to use.
as a practice, i set a small value as a parameter, and wherever i need to ensure i don't have coincident faces, i use it.
eps = 0.01;
Most helpful comment
You have coincident faces.
Moving the slot a smidgeon 'embeds' one solid in the other.
It seems to handle the mirror condition tho.
In general you can't butt two faces together, when joining, one needs to penetrate the surface of the other (by any amount).
When differencing you also don't want to take away exactly the same face as another surface. This can make life hard, but 0.01 (depending on original size) isn't really noticeable.