I thought I had the Z-fighting thing under control - make sure your
differences always exceed the thing being subtracted from; never have
the faces match.
But then after coloring a bunch of parts, I noticed Z-fighting.
It seems that if you have a face that's differenced away, it can still
sometimes cause Z-fighting with an adjacent part.
translate([0,0,-10]) cube(10);
color("blue") difference() {
cube(10);
translate([1,-1,-1]) cube([8,12,10]);
}
But if I just swap the order of the parts, there's no Z-fighting...
color("blue") difference() {
cube(10);
translate([1,-1,-1]) cube([8,12,10]);
}
translate([0,0,-10]) cube(10);
Yes all the negative objects are drawn and even though not visible in the
final object can cause Z fighting. When you make complex assemblies it is
impossible to ensure all the negative parts don't interact, so I always
render a 3D difference or intersection. Because that is slow I avoid 3D
difference as much as possible. For example, your blue shape could be a
linear_extruded 2D difference and then it won't Z-fight and will be fast to
draw.
On Mon, 6 Apr 2020 at 03:06, Jordan Brown openscad@jordan.maileater.net
wrote:
I thought I had the Z-fighting thing under control - make sure your
differences always exceed the thing being subtracted from; never have the
faces match.
But then after coloring a bunch of parts, I noticed Z-fighting.
It seems that if you have a face that's differenced away, it can still
sometimes cause Z-fighting with an adjacent part.
translate([0,0,-10]) cube(10);
color("blue") difference() {
cube(10);
translate([1,-1,-1]) cube([8,12,10]);
}
But if I just swap the order of the parts, there's no Z-fighting...
color("blue") difference() {
cube(10);
translate([1,-1,-1]) cube([8,12,10]);
}
translate([0,0,-10]) cube(10);
OpenSCAD mailing list
Discuss@lists.openscad.org
http://lists.openscad.org/mailman/listinfo/discuss_lists.openscad.org