summaryrefslogtreecommitdiff
path: root/x-carriage.scad
authorMichael Krelin <hacker@klever.net>2016-07-15 19:01:16 (UTC)
committer Michael Krelin <hacker@klever.net>2016-07-15 19:01:16 (UTC)
commit11828e3050d4daf21ea756c217174a8e05ab542e (patch) (unidiff)
tree16bf918a7ba057b82bed392091977fab6498cc69 /x-carriage.scad
parentdb51c14562252dff8013d1d7a4fdbed36b69ef36 (diff)
downloadcarriagery-11828e3050d4daf21ea756c217174a8e05ab542e.zip
carriagery-11828e3050d4daf21ea756c217174a8e05ab542e.tar.gz
carriagery-11828e3050d4daf21ea756c217174a8e05ab542e.tar.bz2
render for printing
Diffstat (limited to 'x-carriage.scad') (more/less context) (ignore whitespace changes)
-rw-r--r--x-carriage.scad4
1 files changed, 3 insertions, 1 deletions
diff --git a/x-carriage.scad b/x-carriage.scad
index a546bb7..e2ccc3a 100644
--- a/x-carriage.scad
+++ b/x-carriage.scad
@@ -62,50 +62,52 @@ module xcarriage() {
62 } 62 }
63 rotate([0,90,0]) cylinder(d=bearings_d-bearings_m,h=cw+2,center=true,$fn=60); 63 rotate([0,90,0]) cylinder(d=bearings_d-bearings_m,h=cw+2,center=true,$fn=60);
64 } 64 }
65 65
66 difference() { 66 difference() {
67 gap=3; 67 gap=3;
68 translate([0,-.5,-gap/2]) 68 translate([0,-.5,-gap/2])
69 cube(size=[cw+2,belt_width+2,belts_apart+2*belt_thickness+gap],center=true); 69 cube(size=[cw+2,belt_width+2,belts_apart+2*belt_thickness+gap],center=true);
70 for(mx=[0,1]) mirror([mx,0,0]) { 70 for(mx=[0,1]) mirror([mx,0,0]) {
71 ofc = mounting_holes_apart/2+screwhead_d/2+belt_thickness+belt_tooth+play_tolerance; // offset from center 71 ofc = mounting_holes_apart/2+screwhead_d/2+belt_thickness+belt_tooth+play_tolerance; // offset from center
72 r=1; 72 r=1;
73 x0 = ofc+r; x1=cw/2-r; 73 x0 = ofc+r; x1=cw/2-r;
74 z0 = r; z1 = belts_apart/2-belt_thickness; 74 z0 = r; z1 = belts_apart/2-belt_thickness;
75 difference() { 75 difference() {
76 hull() for(x=[x0,x1]) for(z=[z0,z1]) 76 hull() for(x=[x0,x1]) for(z=[z0,z1])
77 translate([x,0,z]) 77 translate([x,0,z])
78 rotate([90,0,0]) cylinder(r=r,h=belt_width+2,center=true,$fn=30); 78 rotate([90,0,0]) cylinder(r=r,h=belt_width+2,center=true,$fn=30);
79 translate([cw/2,0,belts_apart/2]) mirror([0,0,1]) belt(width=belt_width+2,l=cw/2+2,tolerance=fit_tolerance); 79 translate([cw/2,0,belts_apart/2]) mirror([0,0,1]) belt(width=belt_width+2,l=cw/2+2,tolerance=fit_tolerance);
80 } 80 }
81 bgap = belt_thickness+belt_tooth+fit_tolerance; 81 bgap = belt_thickness+belt_tooth+fit_tolerance;
82 r1 = (belts_apart/3-bgap)/2; 82 r1 = (belts_apart/3-bgap)/2;
83 echo(r1); 83 echo(r1);
84 hull() for(x=[mounting_holes_apart/2,x1]) 84 hull() for(x=[mounting_holes_apart/2,x1])
85 translate([x,0,-r1-bgap]) 85 translate([x,0,-r1-bgap])
86 rotate([90,0,0]) cylinder(r=r1,h=belt_width+2,center=true,$fn=30); 86 rotate([90,0,0]) cylinder(r=r1,h=belt_width+2,center=true,$fn=30);
87 dgn= sqrt(pow(x1-x0,2)+pow(z1-z0,2)); 87 dgn= sqrt(pow(x1-x0,2)+pow(z1-z0,2));
88 echo(dgn); 88 echo(dgn);
89 translate([x0,0,z0]) 89 translate([x0,0,z0])
90 rotate([90,0,0]) 90 rotate([90,0,0])
91 * cylinder(r=dgn/2-r-belt_thickness,h=belt_width+2,center=true,$fn=30); 91 * cylinder(r=dgn/2-r-belt_thickness,h=belt_width+2,center=true,$fn=30);
92 /* 92 /*
93 pd = 4.5;// post diameter 93 pd = 4.5;// post diameter
94 bhd = 5;// belt holder diameter 94 bhd = 5;// belt holder diameter
95 translate([cw/2-pd/2,0,belts_apart/2-belts_thickness-bhd/2]) cube(size=[pd,belt_width,bhd],center=true); 95 translate([cw/2-pd/2,0,belts_apart/2-belts_thickness-bhd/2]) cube(size=[pd,belt_width,bhd],center=true);
96 translate([(cw-pd)/2,0,0]) // TODO: z 96 translate([(cw-pd)/2,0,0]) // TODO: z
97 rotate([-90,0,0]) translate([0,0,-1]) cylinder(d=pd,h=belt_width+2,center=true,$fn=30); */ 97 rotate([-90,0,0]) translate([0,0,-1]) cylinder(d=pd,h=belt_width+2,center=true,$fn=30); */
98 } 98 }
99 } // difference 99 } // difference
100 100
101 translate([0,0,30/*heatsink height*//2]) 101 translate([0,0,30/*heatsink height*//2])
102 for(mhft = mounting_holes_from_top) translate([mhft[0],0,-mhft[1]]) { 102 for(mhft = mounting_holes_from_top) translate([mhft[0],0,-mhft[1]]) {
103 rotate([90,0,0]) cylinder(d=screw_d+2*play_tolerance,h=bearings_d+2*bearings_s+2,center=true,$fn=30); 103 rotate([90,0,0]) cylinder(d=screw_d+2*play_tolerance,h=bearings_d+2*bearings_s+2,center=true,$fn=30);
104 translate([0,belt_width/2+screwhead_h+play_tolerance,0]) 104 translate([0,belt_width/2+screwhead_h+play_tolerance,0])
105 rotate([90,0,0]) cylinder(d=screwhead_d+2*play_tolerance,h=screwhead_h+play_tolerance+1,$fn=30); 105 rotate([90,0,0]) cylinder(d=screwhead_d+2*play_tolerance,h=screwhead_h+play_tolerance+1,$fn=30);
106 } 106 }
107 } // difference 107 } // difference
108} 108}
109 109
110xcarriage(); 110print=false;
111if(print) rotate([-90,0,0]) xcarriage();
112else xcarriage();
111 113