Skip to content

Commit

Permalink
use polyholes some places so holes print better... should be applied …
Browse files Browse the repository at this point in the history
…to the rest of the printer as well
  • Loading branch information
sjkelly committed Aug 17, 2013
1 parent 1322723 commit 2ca0210
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/bearing.scad
Expand Up @@ -5,6 +5,8 @@
// http://www.reprap.org/wiki/Prusa_Mendel
// http://prusamendel.org

use <polyholes.scad>

bearing_diameter = 15;

module horizontal_bearing_base(bearings=1){
Expand Down Expand Up @@ -65,8 +67,9 @@ module vertical_bearing_base(){
}

module vertical_bearing_holes(){
translate(v=[0,0,-1]) cylinder(h = 62, r=bearing_diameter/2, $fn = 60);
rotate(a=[0,0,-70]) translate(v=[8,0,31.5]) cube(size = [5,1,62], center = true);
translate(v=[0,0,-1]) poly_cylinder(h = 62, r=bearing_diameter/2);
rotate(a=[0,0,-70]) translate(v=[bearing_diameter/2-1,-0.5,-1]) cube(size = [thinwall*2,1,62]);

}

difference(){
Expand Down
42 changes: 42 additions & 0 deletions src/polyholes.scad
@@ -0,0 +1,42 @@
//
// Mendel90
//
// GNU GPL v2
// nop.head@gmail.com
// hydraraptor.blogspot.com
//
// See http://hydraraptor.blogspot.com/2011/02/polyholes.html
//
function sides(r) = max(round(4 *r),3);
function correctedRadius(r,n) = 0.1 + r / cos(180 / n);
function correctedDiameter(d) = 0.2 + d / cos(180 / sides(d / 2));

module polyCircle(r, center = false) {
n = sides(r);
circle(r = correctedRadius(r,n), $fn = n, center = center);
}

module poly_circle(r, center = false) {
polyCircle(r, center);
}

module polyCylinder(r, h, center = false) {
n = sides(r);
cylinder(h = h, r = correctedRadius(r,n), $fn = n, center = center);
}

module poly_cylinder(r, h, center = false) {
polyCylinder(r,h,center);
}

module polydCylinder(r, center = false) {
n = sides(r);
r = correctedRadius(r,n);
cylinder(h = h, r = r, $fn = n, center = center);
translate([0, -r, 0])
cube([r, 2 * r, h]);
}

module poly_d_cylinder(r, center = false) {
polydCylinder(r,center);
}
5 changes: 3 additions & 2 deletions src/x-end.scad
Expand Up @@ -6,6 +6,7 @@
// http://prusamendel.org

use <bearing.scad>
use <polyholes.scad>
rod_distance = 45;

module x_end_base(){
Expand Down Expand Up @@ -46,7 +47,7 @@ translate(v=[-15,-41.5,6]) rotate(a=[-90,0,0]) pushfit_rod(8.1,50);
// Top pushfit rod
translate(v=[-15,-41.5,rod_distance+6]) rotate(a=[-90,0,0]) pushfit_rod(8.1,50);
// Nut trap
translate(v=[0,-17,-0.5]) cylinder(h = 4, r1=3.3, r2=2.8, $fn=25);
translate(v=[0,-17,-0.5]) poly_cylinder(h = 4, r=2.6, $fn=25);
translate(v=[0,-17,3]) rotate([0,0,30]) cylinder(h = 10, r=4.5, $fn = 6);
}

Expand All @@ -63,7 +64,7 @@ x_end_plain();


module pushfit_rod(diameter,length){
cylinder(h = length, r=diameter/2, $fn=30);
poly_cylinder(h = length, r=diameter/2);
difference(){
translate(v=[0,-diameter/2.85,length/2]) rotate([0,0,45]) cube(size = [diameter/2,diameter/2,length], center = true);
translate(v=[0,-diameter/4-diameter/2-0.4,length/2]) rotate([0,0,0]) cube(size = [diameter,diameter/2,length], center = true);
Expand Down

0 comments on commit 2ca0210

Please sign in to comment.