From: Tomas Mudrunka Date: Sat, 18 Jan 2025 18:16:27 +0000 (+0100) Subject: progress X-Git-Url: http://git.harvie.cz/?a=commitdiff_plain;h=380d98198fa61cad62d04553379ad54b490c38be;p=mirrors%2FDesigns.git progress --- diff --git a/openscad/cam_turret.scad b/openscad/cam_turret.scad index 9c5357c..89b9397 100644 --- a/openscad/cam_turret.scad +++ b/openscad/cam_turret.scad @@ -1,13 +1,14 @@ $fn=100; dia=45; +tol=0.3; //Worst case scenario for well maintained ender3 :-) -module camball(d, cutout=0, lens=30) { - sphere(d=d); +module camball(d, cutout=0, toler=0, lens=30) { + sphere(d=d+(toler*2)); if(cutout) { - union() { - sphere(d=d); - translate([0,0,-d]) cylinder(d=d-4, h=d); - } + //Hole to insert the ball + translate([0,0,-d]) cylinder(d1=d+4, d2=d-4, h=d); + + //Range of ball rotation: hull() for ( i = [-10 : 20 : 90] ) { rotate([i,0,0]) cylinder(d1=d/1.5, d2=d/1.3, h=d); } @@ -15,46 +16,64 @@ module camball(d, cutout=0, lens=30) { } module screw() { - cylinder(d=5, h=100, center=true); - rotate([0, 0,0]) translate([0,0,5]) cylinder(d=10, h=100); - rotate([0,180,0]) translate([0,0,5]) cylinder(d=10, h=100); + rotate([0,0,30]) cylinder(d=5, h=100, center=true, $fn=6); + $fn=6; + rotate([0, 0,40]) translate([0,0,20]) cylinder(d=10, h=100); + rotate([180,0,40]) translate([0,0,20]) cylinder(d=10, h=100); } module ballholder(d) { difference() { + //Outer cone shape hull() { sphere(d=d+4); translate([0,0,-d/2-5]) cylinder(d=d+30, h=5); } + + //This makes everything more flexy + hull() { + sphere(d=d+4); + translate([0,d/2,-d/2-10]) cylinder(d=d/2, h=10); + } + + //Split to make it clamp translate([0,-500,0]) cube([1.5,1000,1000], center=true); + + //Clamp screw hole translate([0,-d/1.5,-d/2.1]) rotate([0,90,0]) screw(); } } -module baseplate(d) { +module baseplate(d, toler=0) { + dt = toler*2; difference() { + //Flange union() { - translate([0,0,-d/2-2]) cylinder(d1=d+3, d2=d, h=2); - translate([0,0,-d/2-5]) cylinder(d1=d, d2=d+3, h=3); - translate([0,0,-d/2-9.99]) cylinder(d=d+30, h=5); + translate([0,0,-d/2-2]) cylinder(d1=d+3+dt, d2=d+dt, h=2); + translate([0,0,-d/2-5]) cylinder(d1=d+dt, d2=d+3+dt, h=3); + translate([0,0,-d/2-9.99]) cylinder(d1=d+30+dt, d2=d+30+dt, h=5+toler); } + + //Hole for cables cylinder(d=d-10, h=1000, center=true); - //Standart EU junction box mounting holes - for(i = [0 : 90 : 360]) { - rotate([0,0,i]) translate([30,0,0]) - cylinder(d=4, h=1000, center=true); + //Standart EU junction box mounting holes (60mm pitch) + if(!toler) for(i = [0 : 90 : 360]) { + rotate([0,0,i]) translate([30,0,0]) { + cylinder(d=4, h=1000, center=true); + translate([0,0,-29]) cylinder(d1=7, d2=10, h=2.1); + } } } } -//camball(d=dia, cutout=0); +camball(d=dia, cutout=0); %difference() { ballholder(dia); - camball(d=dia, cutout=1); - baseplate(dia); + camball(d=dia, cutout=1, toler=tol); + baseplate(dia, toler=tol); } //camball(d=dia, cutout=1); diff --git a/openscad/camera_aliexpress.scad b/openscad/camera_aliexpress.scad index 6ab4855..afd8926 100644 --- a/openscad/camera_aliexpress.scad +++ b/openscad/camera_aliexpress.scad @@ -1,21 +1,28 @@ -$fn=256; - -module camera(zclr=0) { - translate([0,0,-zclr/2]) cube([21.5,21.5,18+zclr], center=true); - cylinder(d=18, h=9+5+zclr); +module camera(zclr=0) union() { + cylinder(d=19, h=9+5+zclr, $fn=24); //lens + cube([21.5,21.5,18], center=true); //body + if(zclr) hull() { + translate([0,0,-9]) cube([21.5,21.5,1], center=true); + translate([0,0,-67]) cylinder(d=31, h=45); + } + } module camera_ball() { difference() { intersection() { - sphere(d=45); + sphere(d=45, $fn=256); translate([0,0,2]) cube([1000,1000,35], center=true); } translate([0,0,6.5]) { camera(zclr=100); } + //translate([0,0,-45/1.5]) sphere(d=45); } } -camera_ball(); -//translate([0,0,6.5]) camera(); \ No newline at end of file +//sphere(d=45); +rotate([180,0,0]) { + camera_ball(); + //translate([0,0,6.5]) camera(zclr=100); +} \ No newline at end of file