Final refactoring complete
[clinton/prusa3.git] / src / z-axis-bottom.scad
index 34fbc76..5c16674 100644 (file)
@@ -1,41 +1,39 @@
-module holder_base(){
-translate([0,0,0]) cube([8,40,16+25]); // plate touching the base
-translate([0,-5,0]) cube([50,15,5]); // plate touching the base
-translate([0,-5,0]) cube([18,50,5]);
+// PRUSA iteration3
+// Z axis bottom holder
+// GNU GPL v3
+// Josef Průša <iam@josefprusa.cz> and contributors
+// http://www.reprap.org/wiki/Prusa_Mendel
+// http://prusamendel.org
+
+module z_bottom_base(){
+ translate([0,0,0]) cube([8,40,16+25]); // plate touching the base
+ translate([0,-5,0]) cube([50,15,5]); // plate touching the base
+ translate([0,-5,0]) cube([18,50,5]);
 }
 
-module holder_fancy(){
+module z_bottom_fancy(){
  // corner cutouts
  translate([0.5,0.5,0]) rotate([0,0,-45-180]) translate([-15,0,-1]) cube([30,30,51]);
- translate([0.5,40-0.5,0]) rotate([0,0,-45+90]) translate([-15,0,-1]) cube([30,30,51]);
- translate([-4,40+5,5]) rotate([0,0,-45-0]) translate([0,0,0.1])cube([30,30,51]);
-
- translate([-4+11,40+5+5,0]) rotate([0,0,-45-0]) translate([0,0,-1])cube([30,30,51]);
-
-
- translate([8,0,12+20+3]) rotate([0,-45,0]) translate([0,-5,0]) cube([30,50,30]);
- translate([8,0,12+5]) rotate([45,0,0]) rotate([0,-45,0]) translate([0,-5,0]) cube([30,50,30]);
- translate([8,20,12+25]) rotate([-45,0,0]) rotate([0,-45,0]) translate([0,-5,0]) cube([30,50,30]);
-
+ translate([0.5,40-0.5,0]) rotate([0,0,-45+90]) translate([-15,0,-1])cube([30,30,51]);
+ translate([-4,40+5,5]) rotate([0,0,-35-0]) translate([0,0,0.1]) cube([30,30,51]);
+ translate([-4+11,40+5+5,0]) rotate([0,0,-45-0]) translate([0,0,-1]) cube([30,30,51]);
+ translate([8,0,12+20+3]) rotate([0,-55,0]) translate([0,-5,0]) cube([30,50,30]);
+ translate([8,0,12+10]) rotate([45,0,0]) rotate([0,-90,0]) translate([0,-5,0]) cube([30,50,30]);
+ translate([8,20,12+30]) rotate([-45,0,0]) rotate([0,-90,0]) translate([0,-5,0]) cube([30,50,30]);
  translate([50-2.5,-5+2.5,0]) rotate([0,0,-45-90]) translate([-15,0,-1]) cube([30,30,51]);
  translate([50-1.5,10-1.5,0]) rotate([0,0,-45]) translate([-15,0,-1]) cube([30,30,51]);
-
  translate([0,0,5]) rotate([45+180,0,0]) rotate([0,0,-45+90]) translate([0,0,-15]) cube([30,30,30]);
 }
 
-module holder_holes(){
- // screw holes
+module z_bottom_holes(){
+ // Frame mounting screw holes
  translate([-1,10,10+5]) rotate([0,90,0]) cylinder(h = 20, r=1.8, $fn=30);
  translate([-1,10+20,10+5]) rotate([0,90,0]) cylinder(h = 20, r=1.8, $fn=30);
-
  translate([-1,10+10,10+20+5]) rotate([0,90,0]) cylinder(h = 20, r=1.8, $fn=30);
 
- // screw heads
+ // Frame mounting screw head holes
  translate([4,10,10+5]) rotate([0,90,0]) cylinder(h = 20, r=3.1, $fn=30);
- //translate([4,10-3.1,10]) cube([10,6.2,10]);
  translate([4,10+20,10+5]) rotate([0,90,0]) cylinder(h = 20, r=3.1, $fn=30);
- //translate([4,10+20-3.1,10]) cube([10,6.2,10]);
-
  translate([4,10+10,10+20+5]) rotate([0,90,0]) cylinder(h = 20, r=3.1, $fn=30);
  translate([4,10+10-3.1,10+20+5]) cube([10,6.2,10]);
 
@@ -47,23 +45,25 @@ module holder_holes(){
  translate([25+4.3,21,-1]){
  //translate([15.5,15.5,-1]) cylinder(h = 20, r=1.8, $fn=30);
  
- translate([15.5,-15.5,3.3]) cylinder(h = 20, r=1.8, $fn=30);
- translate([-15.5,15.5,3.3]) cylinder(h = 20, r=1.8, $fn=30);
- translate([-15.5,-15.5,3.3]) cylinder(h = 20, r=1.8, $fn=30);
- translate([15.5,-15.5,-1]) cylinder(h = 4, r=3.1, $fn=30);
- translate([-15.5,15.5,-1]) cylinder(h = 4, r=3.1, $fn=30);
- translate([-15.5,-15.5,-1]) cylinder(h = 4, r=3.1, $fn=30);
+ translate([15.5,-15.5,-1]) cylinder(h = 20, r=1.8, $fn=30);
+ translate([-15.5,15.5,-1]) cylinder(h = 20, r=1.8, $fn=30);
+ translate([-15.5,-15.5,-1]) cylinder(h = 20, r=1.8, $fn=30);
  }
 
 }
 
-difference(){
- holder_base();
- holder_fancy();
- holder_holes();
+// Final part
+module z_bottom_holder(){
+ difference(){
+  z_bottom_base();
+  z_bottom_fancy();
+  z_bottom_holes();
+ }
+ translate([0,-13,0]) mirror([0,1,0]) difference(){
+  z_bottom_base();
+  z_bottom_fancy();
+  z_bottom_holes();
+ }
 }
-translate([0,-13,0]) mirror([0,1,0]) difference(){
- holder_base();
- holder_fancy();
- holder_holes();
-}
\ No newline at end of file
+
+z_bottom_holder();