[OpenSCAD] Object appears in F6 render but not F5 preview

Jamie Bainbridge jamie.bainbridge at gmail.com
Wed Apr 11 07:39:48 EDT 2018


Hello,

I have the following code which appears fine in F6 render (and makes a
manifold mesh afaics) but does not appear in the F5 preview.

I tried adding convexity=10 to each union/difference/hull which often
works for me, but made no difference here.

I realise I am abusing hull() to avoid making proper polyhedrons out
of laziness, but this code theoretically still should work shouldn't
it?

Jamie

$fn = 180;
e = 0.001;
f = 0.25;

module dual_bushing_holder() {
    union() {
        // body
        difference() {
            cylinder(d=15,h=40);
            translate([0,0,-1]) #cylinder(d=14,h=42);
        }

        // left middle tab
        difference() {
            hull() {
                translate([-14.5,-1,18.25]) cube([e,2,3.5]);
                translate([-7.5+f,-1,8.5]) cube([e,2,23]);
            }
            // screw hole
            translate([-11.25,-2,20]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
        }

        // right upper tab
        difference() {
            hull() {
                translate([7.5-f,-1,25]) cube([e,2,15]);
                translate([14.5,-1,32.25]) cube([e,2,7.75]);

            }
            // screw hole
            translate([11.25,-2,35.25]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
        }

        // right lower tab
        difference() {
            hull() {
                translate([7.5-f,-1,0]) cube([e,2,15]);
                translate([14.5,-1,0]) cube([e,2,7.75]);

            }
            // screw hole
            translate([11.25,-2,4.75]) rotate([-90,0,0]) cylinder(d=3.3,h=4);
        }
    }
}

dual_bushing_holder();



More information about the Discuss mailing list