Loading openscad/libs/utilities.scad +31 −24 Original line number Diff line number Diff line Loading @@ -1306,25 +1306,29 @@ difference(){ translate_x(-20){ cube([20,20,50],center=false); } translate_x(-6){ depth = 9; // cutout depth height = 16; // cutout height r = 3; // corner radius z_offset = 2; // cutout base height angle = 30; // angle for top of cutout translate_x(-(depth - r)){ hull(){ translate_z(15){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); } h = 99; translate_y(h/2-1){ #tangent_to_cylinder_plus(r=3, h=h, angle=30, box=10); #translate([0, h/2-1, z_offset+height-r]){ rotate_x(90){ cylinder(r=r, h=h, center=true, $fn=16); } tangent_to_cylinder_plus(r=r, h=h, angle=angle, box=depth+1); } translate_z(5){ translate_z(z_offset+r){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); cylinder(r=r, h=h, center=true, $fn=16); } } translate_z(5-3){ translate_y(-99/2){ cube([9,99,10], center=false); translate_z(z_offset){ translate_y(-h/2){ cube([depth, h, 10], center=false); } } } Loading Loading @@ -1377,26 +1381,29 @@ rotate_x(90){ ```example difference(){ cube([20,20,50],center=false); depth = 9; // cutout depth height = 16; // cutout height r = 3; // corner radius z_offset = 2; // cutout base height angle = 30; // angle for top of cutout translate_x(6){ translate_x(depth - r){ hull(){ translate_z(15){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); } h = 99; translate_y(h/2-1){ #tangent_to_cylinder_minus(r=3, h=h, angle=30, box=10); #translate([0, h/2-1, z_offset+height-r]){ rotate_x(90){ cylinder(r=r, h=h, center=true, $fn=16); } tangent_to_cylinder_minus(r=r, h=h, angle=angle, box=depth+1); } translate_z(5){ translate_z(z_offset+r){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); cylinder(r=r, h=h, center=true, $fn=16); } } translate_z(5-3){ translate([-9,-99/2,0]){ cube([9,99,10], center=false); translate_z(z_offset){ translate([-depth,-h/2,0]){ cube([depth,h,10], center=false); } } } Loading Loading
openscad/libs/utilities.scad +31 −24 Original line number Diff line number Diff line Loading @@ -1306,25 +1306,29 @@ difference(){ translate_x(-20){ cube([20,20,50],center=false); } translate_x(-6){ depth = 9; // cutout depth height = 16; // cutout height r = 3; // corner radius z_offset = 2; // cutout base height angle = 30; // angle for top of cutout translate_x(-(depth - r)){ hull(){ translate_z(15){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); } h = 99; translate_y(h/2-1){ #tangent_to_cylinder_plus(r=3, h=h, angle=30, box=10); #translate([0, h/2-1, z_offset+height-r]){ rotate_x(90){ cylinder(r=r, h=h, center=true, $fn=16); } tangent_to_cylinder_plus(r=r, h=h, angle=angle, box=depth+1); } translate_z(5){ translate_z(z_offset+r){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); cylinder(r=r, h=h, center=true, $fn=16); } } translate_z(5-3){ translate_y(-99/2){ cube([9,99,10], center=false); translate_z(z_offset){ translate_y(-h/2){ cube([depth, h, 10], center=false); } } } Loading Loading @@ -1377,26 +1381,29 @@ rotate_x(90){ ```example difference(){ cube([20,20,50],center=false); depth = 9; // cutout depth height = 16; // cutout height r = 3; // corner radius z_offset = 2; // cutout base height angle = 30; // angle for top of cutout translate_x(6){ translate_x(depth - r){ hull(){ translate_z(15){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); } h = 99; translate_y(h/2-1){ #tangent_to_cylinder_minus(r=3, h=h, angle=30, box=10); #translate([0, h/2-1, z_offset+height-r]){ rotate_x(90){ cylinder(r=r, h=h, center=true, $fn=16); } tangent_to_cylinder_minus(r=r, h=h, angle=angle, box=depth+1); } translate_z(5){ translate_z(z_offset+r){ rotate_x(90){ cylinder(r=3,h=99, center=true, $fn=16); cylinder(r=r, h=h, center=true, $fn=16); } } translate_z(5-3){ translate([-9,-99/2,0]){ cube([9,99,10], center=false); translate_z(z_offset){ translate([-depth,-h/2,0]){ cube([depth,h,10], center=false); } } } Loading