I am using OpenSCAD 2026.02.13 on a Mac.
I am designing a name tag similar to the familiar “Hello my name is” ones to be 3D printed. I've reduced the code to show the anomaly. The white color bar is designed to be printed on the bottom (the printer build plate).
white_height = 0.6;
b = [80,55,2];
top_bar = 15;
bottom_bar = 5;
eps = 0.001;
module base()
{
translate([0,0,b.z / 2])
cube(b, center=true);
}
module bar()
{
translate([0,(bottom_bar - top_bar) / 2, white_height / 2 - eps])
cube([b.x + 1, b.y - bottom_bar - top_bar + 1, white_height], center=true);
}
color("white")
intersection()
{
base();
bar();
}
color("red")
difference()
{
base();
bar();
}
When previewed, the white color does not show up. When rendered, it does and the exported .3mf file prints as desired.
Preview
Render
On 5/12/26 5:06 AM, Mark Erbaugh via Discuss wrote:
When previewed, the white color does not show up. When rendered, it does and the exported .3mf file prints as desired.
There are no flickering artifacts in either the preview or the render. As suggested in the wiki cite, the code already includes the epsilon (eps in the code) offset.
On May 12, 2026, at 8:17 AM, Cory Cross via Discuss discuss@lists.openscad.org wrote:
On 5/12/26 5:06 AM, Mark Erbaugh via Discuss wrote:
When previewed, the white color does not show up. When rendered, it does and the exported .3mf file prints as desired.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
I think the intersection removes the EPs part. You could try swapping the
order of the white and red bits.
On Tue, 12 May 2026, 13:25 Mark Erbaugh via Discuss, <
discuss@lists.openscad.org> wrote:
There are no flickering artifacts in either the preview or the render. As
suggested in the wiki cite, the code already includes the epsilon (eps in
the code) offset.
On May 12, 2026, at 8:17 AM, Cory Cross via Discuss <
discuss@lists.openscad.org> wrote:
On 5/12/26 5:06 AM, Mark Erbaugh via Discuss wrote:
When previewed, the white color does not show up. When rendered, it
does and the exported .3mf file prints as desired.
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
If you swap the order, the color changes, but it still previews as a single color.
Sent from my iPad
On May 12, 2026, at 9:46 AM, nop head <nop.head@gmail.com> wrote:
I think the intersection removes the EPs part. You could try swapping the order of the white and red bits.
On Tue, 12 May 2026, 13:25 Mark Erbaugh via Discuss, <discuss@lists.openscad.org> wrote:
There are no flickering artifacts in either the preview or the render. As suggested in the wiki cite, the code already includes the epsilon (eps in the code) offset.
> On May 12, 2026, at 8:17 AM, Cory Cross via Discuss <discuss@lists.openscad.org> wrote:
>
>
>
> On 5/12/26 5:06 AM, Mark Erbaugh via Discuss wrote:
>> When previewed, the white color does not show up. When rendered, it does and the exported .3mf file prints as desired.
>
> https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/FAQ#What_are_those_strange_flickering_artifacts_in_the_preview?
> _______________________________________________
> OpenSCAD mailing list
> To unsubscribe send an email to discuss-leave@lists.openscad.org
_______________________________________________
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
Hi Mark,
It is not an anomaly. f5 render was meant to be quicker, (it is if you
use f6 as cgal, for a large file, not so much if you use manifold). It
is two different rendering engines. f5 using OpenGL, afaik, was for
quick preview, since cgal is very thorough and therefore slow. In any
case, you can only export an f6 render. Also, booleans and colours are
'interesting'.
On 12/05/2026 13:06, Mark Erbaugh via Discuss wrote:
I am using OpenSCAD 2026.02.13 on a Mac.
I am designing a name tag similar to the familiar “Hello my name is” ones to be 3D printed. I've reduced the code to show the anomaly. The white color bar is designed to be printed on the bottom (the printer build plate).
white_height = 0.6;
b = [80,55,2];
top_bar = 15;
bottom_bar = 5;
eps = 0.001;module base()
{
translate([0,0,b.z / 2])
cube(b, center=true);
}module bar()
{
translate([0,(bottom_bar - top_bar) / 2, white_height / 2 - eps])
cube([b.x + 1, b.y - bottom_bar - top_bar + 1, white_height], center=true);
}color("white")
intersection()
{
base();
bar();
}color("red")
difference()
{
base();
bar();
}
When previewed, the white color does not show up. When rendered, it does and the exported .3mf file prints as desired.
Preview
Render
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org
On 5/12/26 5:25 AM, Mark Erbaugh via Discuss wrote:
There are no flickering artifacts in either the preview or the render. As suggested in the wiki cite, the code already includes the epsilon (eps in the code) offset.
There is flickering in the Preview. Just tried it myself.
Your epsilon use is wrong.
The result of the intersection is that volume that is in both the base
and the bar. Since the small slice of the bar that extends below Z=0 is
not in the base, it's not included, negating part of the advantage of
that +epsilon slice.
In theory, you've then got a white piece that exactly matches the cutout
from the red piece.
The previewer simply hates coincident faces, even if they are faces that
have been cut away. The bottom (cut away) red face of the base is
coincident with the (intersected) white bottom of the bar. It doesn't
particularly surprise me that something bad happens.
I say "in theory", because the intersection itself is black magic; I
don't know how it actually works.
Slapping a render() in front of either the intersection() or the
difference(), or both, makes the problem go away.
My experiments with multi-color models with invisibly coincident faces
suggest that liberally applying render(), inside the color(), is helpful.
On 5/12/2026 10:40 AM, Cory Cross via Discuss wrote:
On 5/12/26 5:25 AM, Mark Erbaugh via Discuss wrote:
There are no flickering artifacts in either the preview or the
render. As suggested in the wiki cite, the code already includes the
epsilon (eps in the code) offset.
There is flickering in the Preview. Just tried it myself.
Might depend on the graphics stack. I don't get any.
(And yes, it's an anomaly. Any time that the visual presentation
doesn't match the theoretical result is an anomaly. That doesn't mean
that we can do anything about it. The previewer is vulnerable to some
anomalies; the renderer is vulnerable to different anomalies.)
When you do the intersection the eps bit is removed because it is
outside the other shape. All the bottom surfaces are then coincident.
On Tue, 12 May 2026 at 18:49, Jordan Brown via Discuss <
discuss@lists.openscad.org> wrote:
On 5/12/2026 10:40 AM, Cory Cross via Discuss wrote:
On 5/12/26 5:25 AM, Mark Erbaugh via Discuss wrote:
There are no flickering artifacts in either the preview or the render. As
suggested in the wiki cite, the code already includes the epsilon (eps in
the code) offset.
There is flickering in the Preview. Just tried it myself.
Might depend on the graphics stack. I don't get any.
(And yes, it's an anomaly. Any time that the visual presentation doesn't
match the theoretical result is an anomaly. That doesn't mean that we can
do anything about it. The previewer is vulnerable to some anomalies; the
renderer is vulnerable to different anomalies.)
OpenSCAD mailing list
To unsubscribe send an email to discuss-leave@lists.openscad.org