format all files
add 3dprinter.scad where to simulate the whole 3dprinter should look like
This commit is contained in:
		
							
								
								
									
										62
									
								
								3dprinter.scad
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								3dprinter.scad
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,62 @@
 | 
				
			|||||||
 | 
					use <angle_bracket.scad>;
 | 
				
			||||||
 | 
					use <horizontal_angle_bracket.scad>;
 | 
				
			||||||
 | 
					use <Motorhalter.scad>;
 | 
				
			||||||
 | 
					use <YRollHolder.scad>;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					bottmoutline();
 | 
				
			||||||
 | 
					bottomAngleBrackets();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					horizontalProfile();
 | 
				
			||||||
 | 
					YAxis();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module bottmoutline() {
 | 
				
			||||||
 | 
					    // draw alu profiles
 | 
				
			||||||
 | 
					    translate([0, - 40, 0]) aluProfile(400);
 | 
				
			||||||
 | 
					    translate([0, 400, 0]) aluProfile(400);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    translate([0, - 40, 0]) rotate([0, 0, 90]) aluProfile(480);
 | 
				
			||||||
 | 
					    translate([440, - 40, 0]) rotate([0, 0, 90]) aluProfile(480);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module bottomAngleBrackets() {
 | 
				
			||||||
 | 
					    // draw angle bracktes
 | 
				
			||||||
 | 
					    angle_bracket();
 | 
				
			||||||
 | 
					    translate([400, 0, 0]) rotate([0, 0, 90]) angle_bracket();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    translate([400, 400, 0]) rotate([0, 0, 180]) angle_bracket();
 | 
				
			||||||
 | 
					    translate([0, 400, 0]) rotate([0, 0, 270]) angle_bracket();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module horizontalProfile() {
 | 
				
			||||||
 | 
					    height = 600;
 | 
				
			||||||
 | 
					    translate([- 40, 180, 0]) rotate([0, - 90, 0]) halfAluProfile(height);
 | 
				
			||||||
 | 
					    translate([460, 180, 0]) rotate([0, - 90, 0]) halfAluProfile(height);
 | 
				
			||||||
 | 
					    // upper part
 | 
				
			||||||
 | 
					    translate([- 60, 180, height]) halfAluProfile(520);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // add the horitzontal angle bracktes
 | 
				
			||||||
 | 
					    translate([- 40, 135, 0]) rotate([0, 0, 90]) horizontal_angle_bracket();
 | 
				
			||||||
 | 
					    translate([440, 265, 0]) rotate([0, 0, 270]) horizontal_angle_bracket();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // angle brackets up
 | 
				
			||||||
 | 
					    translate([- 40, 220, height]) rotate([90, 90, 0]) angle_bracket();
 | 
				
			||||||
 | 
					    translate([440, 180, height]) rotate([-90, 90, 0]) angle_bracket();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module YAxis() {
 | 
				
			||||||
 | 
					    translate([160, 0, 0]) Motorhalter();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    translate([214, 400, 0]) rotate([0, 0, 180]) YRollHolder();
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// -- MODULES -- //
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module aluProfile(length) {
 | 
				
			||||||
 | 
					    color("#dddddd") cube([length, 40, 40]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					module halfAluProfile(length) {
 | 
				
			||||||
 | 
					    color("#dddddd") cube([length, 40, 20]);
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
@@ -1,64 +1,71 @@
 | 
				
			|||||||
$fn=50;
 | 
					$fn = 50;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
motorheight=42.1;
 | 
					motorheight = 42.1;
 | 
				
			||||||
motorwidth=40.5;
 | 
					motorwidth = 40.5;
 | 
				
			||||||
wanddickemotor=3;
 | 
					wanddickemotor = 3;
 | 
				
			||||||
wanddickelinks=5.5;
 | 
					wanddickelinks = 5.5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
cylinderdiameter=22.2;
 | 
					cylinderdiameter = 22.2;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
motorholedistance=(motorheight-31) /2;
 | 
					motorholedistance = (motorheight - 31) / 2;
 | 
				
			||||||
leftholedist=7;
 | 
					leftholedist = 7;
 | 
				
			||||||
M3HoleDiam=3.4;
 | 
					M3HoleDiam = 3.4;
 | 
				
			||||||
M3HeadDiam=5.8;
 | 
					M3HeadDiam = 5.8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
render() difference() {
 | 
					Motorhalter();
 | 
				
			||||||
    mainbody();
 | 
					
 | 
				
			||||||
    translate([motorwidth,wanddickelinks,0]) motorholes();
 | 
					module Motorhalter() {
 | 
				
			||||||
    leftholes();
 | 
					    render() difference() {
 | 
				
			||||||
 | 
					        mainbody();
 | 
				
			||||||
 | 
					        translate([motorwidth, wanddickelinks, 0]) motorholes();
 | 
				
			||||||
 | 
					        leftholes();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//modules
 | 
					//modules
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module mainbody(){
 | 
					module mainbody() {
 | 
				
			||||||
    cube([motorwidth + wanddickemotor, wanddickelinks ,motorheight]);
 | 
					    cube([motorwidth + wanddickemotor, wanddickelinks, motorheight]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
translate([motorwidth,wanddickelinks,0])cube([wanddickemotor, motorheight, motorheight]);
 | 
					    translate([motorwidth, wanddickelinks, 0])cube([wanddickemotor, motorheight, motorheight]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([motorwidth + wanddickemotor,motorheight * 2 /3,motorheight]) rotate([0,0,180]) linear_extrude(3) polygon([[0,0], [0, motorheight * 2 /3], [motorwidth * 2 /3, motorheight* 2 /3]]);
 | 
					    translate([motorwidth + wanddickemotor, motorheight * 2 / 3, motorheight]) rotate([0, 0, 180]) linear_extrude(3)
 | 
				
			||||||
 | 
					        polygon([[0, 0], [0, motorheight * 2 / 3], [motorwidth * 2 / 3, motorheight * 2 / 3]]);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module motorholes(){  
 | 
					module motorholes() {
 | 
				
			||||||
    translate([0,motorheight/2,motorheight/2])rotate([0,90,0])cylinder(h=wanddickemotor, d=cylinderdiameter, $fn=130);
 | 
					    translate([0, motorheight / 2, motorheight / 2])rotate([0, 90, 0])cylinder(h = wanddickemotor, d = cylinderdiameter,
 | 
				
			||||||
 | 
					    $fn = 130);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([0,motorheight - motorholedistance,motorheight - motorholedistance]) MotorM3Hole();
 | 
					    translate([0, motorheight - motorholedistance, motorheight - motorholedistance]) MotorM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([0,motorheight - motorholedistance, motorholedistance]) MotorM3Hole();
 | 
					    translate([0, motorheight - motorholedistance, motorholedistance]) MotorM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([0,motorholedistance,motorheight - motorholedistance]) MotorM3Hole();
 | 
					    translate([0, motorholedistance, motorheight - motorholedistance]) MotorM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([0,motorholedistance, motorholedistance]) MotorM3Hole();
 | 
					    translate([0, motorholedistance, motorholedistance]) MotorM3Hole();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module leftholes() {
 | 
					module leftholes() {
 | 
				
			||||||
    // bottom left
 | 
					    // bottom left
 | 
				
			||||||
    translate([leftholedist,0,leftholedist]) LeftM3Hole();
 | 
					    translate([leftholedist, 0, leftholedist]) LeftM3Hole();
 | 
				
			||||||
    //bottom right
 | 
					    //bottom right
 | 
				
			||||||
    translate([motorwidth - leftholedist,0,leftholedist]) LeftM3Hole();
 | 
					    translate([motorwidth - leftholedist, 0, leftholedist]) LeftM3Hole();
 | 
				
			||||||
    // upper left
 | 
					    // upper left
 | 
				
			||||||
    translate([leftholedist,0,motorwidth - leftholedist]) LeftM3Hole();
 | 
					    translate([leftholedist, 0, motorwidth - leftholedist]) LeftM3Hole();
 | 
				
			||||||
    // upper right
 | 
					    // upper right
 | 
				
			||||||
    translate([motorwidth - leftholedist,0,motorwidth - leftholedist]) LeftM3Hole();
 | 
					    translate([motorwidth - leftholedist, 0, motorwidth - leftholedist]) LeftM3Hole();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module MotorM3Hole() {
 | 
					module MotorM3Hole() {
 | 
				
			||||||
    rotate([0,90,0])cylinder(h=wanddickemotor, d=M3HoleDiam);
 | 
					    rotate([0, 90, 0])cylinder(h = wanddickemotor, d = M3HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module LeftM3Hole() {
 | 
					module LeftM3Hole() {
 | 
				
			||||||
    rotate([270,0,0])cylinder(h=wanddickelinks, d=M3HoleDiam);
 | 
					    rotate([270, 0, 0])cylinder(h = wanddickelinks, d = M3HoleDiam);
 | 
				
			||||||
    translate([0,wanddickelinks-3,0]) rotate([270,0,0])cylinder(h=3, d=M3HeadDiam);
 | 
					    translate([0, wanddickelinks - 3, 0]) rotate([270, 0, 0])cylinder(h = 3, d = M3HeadDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,41 +1,45 @@
 | 
				
			|||||||
$fn=33;
 | 
					$fn = 33;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M3HoleDiam=3.4;
 | 
					M3HoleDiam = 3.4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
height=40;
 | 
					height = 40;
 | 
				
			||||||
thickness=3;
 | 
					thickness = 3;
 | 
				
			||||||
length=30;
 | 
					length = 30;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// cambelt has 6mm width
 | 
					// cambelt has 6mm width
 | 
				
			||||||
innerspace=8;
 | 
					innerspace = 8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
render() difference() {
 | 
					// call main
 | 
				
			||||||
    frame();
 | 
					YRollHolder();
 | 
				
			||||||
    holes();
 | 
					
 | 
				
			||||||
 | 
					module YRollHolder() {
 | 
				
			||||||
 | 
					    render() difference() {
 | 
				
			||||||
 | 
					        frame();
 | 
				
			||||||
 | 
					        holes();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module frame() {
 | 
					module frame() {
 | 
				
			||||||
    cube([innerspace + 2 * thickness,thickness,height]);
 | 
					    cube([innerspace + 2 * thickness, thickness, height]);
 | 
				
			||||||
    translate([0, thickness, 0]) cube([thickness, length, height]);
 | 
					    translate([0, thickness, 0]) cube([thickness, length, height]);
 | 
				
			||||||
    translate([innerspace + thickness, thickness, 0]) cube([thickness, length, height]);
 | 
					    translate([innerspace + thickness, thickness, 0]) cube([thickness, length, height]);
 | 
				
			||||||
    
 | 
					 | 
				
			||||||
    
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module holes(){
 | 
					module holes() {
 | 
				
			||||||
    // two inner holes
 | 
					    // two inner holes
 | 
				
			||||||
    translate([innerspace / 2 + thickness, 0, height / 4]) M3Hole();
 | 
					    translate([innerspace / 2 + thickness, 0, height / 4]) M3Hole();
 | 
				
			||||||
    translate([innerspace / 2 + thickness, 0, height / 4 * 3]) M3Hole();
 | 
					    translate([innerspace / 2 + thickness, 0, height / 4 * 3]) M3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([0, length / 4 *3, height / 2]) SideM3Hole();
 | 
					    translate([0, length / 4 * 3, height / 2]) SideM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([innerspace + thickness, length / 4 * 3, height / 2]) SideM3Hole();
 | 
					    translate([innerspace + thickness, length / 4 * 3, height / 2]) SideM3Hole();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module M3Hole() {
 | 
					module M3Hole() {
 | 
				
			||||||
    rotate([0,90,90])cylinder(h=thickness, d=M3HoleDiam);
 | 
					    rotate([0, 90, 90])cylinder(h = thickness, d = M3HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module SideM3Hole() {
 | 
					module SideM3Hole() {
 | 
				
			||||||
    rotate([0,90,0])cylinder(h=thickness, d=M3HoleDiam);
 | 
					    rotate([0, 90, 0])cylinder(h = thickness, d = M3HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
@@ -1,55 +1,59 @@
 | 
				
			|||||||
$fn=33;
 | 
					$fn = 33;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
height=40;
 | 
					height = 40;
 | 
				
			||||||
width=60;
 | 
					width = 60;
 | 
				
			||||||
b=3;
 | 
					b = 3;
 | 
				
			||||||
triagleheight=5;
 | 
					triagleheight = 5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
M4HoleDiam=4.4;
 | 
					M4HoleDiam = 4.4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
holedistance=10;
 | 
					holedistance = 10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// main call
 | 
				
			||||||
 | 
					angle_bracket();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
difference() {
 | 
					module angle_bracket() {
 | 
				
			||||||
    frame();
 | 
					    render() difference() {
 | 
				
			||||||
    holes();
 | 
					        frame();
 | 
				
			||||||
 | 
					        holes();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module frame() {
 | 
					module frame() {
 | 
				
			||||||
    // x plate
 | 
					    // x plate
 | 
				
			||||||
cube([width,b,height]);
 | 
					    cube([width, b, height]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// y plate
 | 
					    // y plate
 | 
				
			||||||
translate([b, 0,0]) rotate([0,0,90]) cube([width,b,height]);
 | 
					    translate([b, 0, 0]) rotate([0, 0, 90]) cube([width, b, height]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//bottom triangle
 | 
					    //bottom triangle
 | 
				
			||||||
translate([b,b,0]) stabilizetriangle();
 | 
					    translate([b, b, 0]) stabilizetriangle();
 | 
				
			||||||
// upper triangle
 | 
					    // upper triangle
 | 
				
			||||||
translate([b,b,height-triagleheight]) stabilizetriangle();
 | 
					    translate([b, b, height - triagleheight]) stabilizetriangle();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module holes() {
 | 
					module holes() {
 | 
				
			||||||
    // y holes
 | 
					    // y holes
 | 
				
			||||||
    translate([0,holedistance,height-holedistance]) YM3Hole();
 | 
					    translate([0, holedistance, height - holedistance]) YM3Hole();
 | 
				
			||||||
    translate([0,width-holedistance,height-holedistance]) YM3Hole();
 | 
					    translate([0, width - holedistance, height - holedistance]) YM3Hole();
 | 
				
			||||||
    translate([0,holedistance,holedistance]) YM3Hole();
 | 
					    translate([0, holedistance, holedistance]) YM3Hole();
 | 
				
			||||||
    translate([0,width-holedistance,holedistance]) YM3Hole();
 | 
					    translate([0, width - holedistance, holedistance]) YM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    translate([holedistance,0,height-holedistance]) XM3Hole();
 | 
					    translate([holedistance, 0, height - holedistance]) XM3Hole();
 | 
				
			||||||
    translate([width-holedistance,0,height-holedistance]) XM3Hole();
 | 
					    translate([width - holedistance, 0, height - holedistance]) XM3Hole();
 | 
				
			||||||
    translate([holedistance,0,holedistance]) XM3Hole();
 | 
					    translate([holedistance, 0, holedistance]) XM3Hole();
 | 
				
			||||||
    translate([width-holedistance,0,holedistance]) XM3Hole();
 | 
					    translate([width - holedistance, 0, holedistance]) XM3Hole();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module stabilizetriangle() {
 | 
					module stabilizetriangle() {
 | 
				
			||||||
    linear_extrude(triagleheight) polygon([[0,0], [0, width-b], [width-b, 0]]);
 | 
					    linear_extrude(triagleheight) polygon([[0, 0], [0, width - b], [width - b, 0]]);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module YM3Hole() {
 | 
					module YM3Hole() {
 | 
				
			||||||
    rotate([0,90,0])cylinder(h=b, d=M4HoleDiam);
 | 
					    rotate([0, 90, 0])cylinder(h = b, d = M4HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module XM3Hole() {
 | 
					module XM3Hole() {
 | 
				
			||||||
    rotate([270,0,0])cylinder(h=b, d=M4HoleDiam);
 | 
					    rotate([270, 0, 0])cylinder(h = b, d = M4HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,60 +1,65 @@
 | 
				
			|||||||
$fn=33;
 | 
					$fn = 33;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
height=40;
 | 
					height = 40;
 | 
				
			||||||
hwidth=40;
 | 
					hwidth = 40;
 | 
				
			||||||
thickness=5;
 | 
					thickness = 5;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
vthickness=20;
 | 
					vthickness = 20;
 | 
				
			||||||
vwidth=40.3;
 | 
					vwidth = 40.3;
 | 
				
			||||||
vheight=80;
 | 
					vheight = 80;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//https://de.wikipedia.org/wiki/Durchgangsbohrung
 | 
					//https://de.wikipedia.org/wiki/Durchgangsbohrung
 | 
				
			||||||
M4HoleDiam=4.4;
 | 
					M4HoleDiam = 4.4;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
holedistance=10;
 | 
					holedistance = 10;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
horizontalcenterholes=true;
 | 
					horizontalcenterholes = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
difference() {
 | 
					// calling main
 | 
				
			||||||
    frame();
 | 
					horizontal_angle_bracket();
 | 
				
			||||||
    holes();
 | 
					
 | 
				
			||||||
 | 
					module horizontal_angle_bracket() {
 | 
				
			||||||
 | 
					    render() difference() {
 | 
				
			||||||
 | 
					        frame();
 | 
				
			||||||
 | 
					        holes();
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module frame(){
 | 
					module frame() {
 | 
				
			||||||
    // left tile 
 | 
					    // left tile 
 | 
				
			||||||
    cube([hwidth,thickness,height]);
 | 
					    cube([hwidth, thickness, height]);
 | 
				
			||||||
    translate([0,thickness,0]) sidetriangle();
 | 
					    translate([0, thickness, 0]) sidetriangle();
 | 
				
			||||||
    translate([0,thickness,height - thickness]) sidetriangle();
 | 
					    translate([0, thickness, height - thickness]) sidetriangle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // left to back tile
 | 
					    // left to back tile
 | 
				
			||||||
    translate([hwidth,0,0]) cube([thickness, vthickness, height]);
 | 
					    translate([hwidth, 0, 0]) cube([thickness, vthickness, height]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // left triangle
 | 
					    // left triangle
 | 
				
			||||||
    translate([hwidth,0,height]) rotate([90, 0, 90]) middletriangle();
 | 
					    translate([hwidth, 0, height]) rotate([90, 0, 90]) middletriangle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // covers upper edge of above
 | 
					    // covers upper edge of above
 | 
				
			||||||
    translate([hwidth, vthickness, 0]) cube([vwidth + thickness * 2, thickness, vheight]);
 | 
					    translate([hwidth, vthickness, 0]) cube([vwidth + thickness * 2, thickness, vheight]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// right to back tile
 | 
					    // right to back tile
 | 
				
			||||||
    translate([hwidth + vwidth + thickness,0,0]) cube([thickness, vthickness, height]);
 | 
					    translate([hwidth + vwidth + thickness, 0, 0]) cube([thickness, vthickness, height]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // right triangle
 | 
					    // right triangle
 | 
				
			||||||
        translate([hwidth + vwidth + thickness,0,height]) rotate([90, 0, 90]) middletriangle();
 | 
					    translate([hwidth + vwidth + thickness, 0, height]) rotate([90, 0, 90]) middletriangle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// right tile
 | 
					    // right tile
 | 
				
			||||||
    translate([hwidth + vwidth + thickness * 2, 0, 0]) cube([hwidth,thickness,height]);
 | 
					    translate([hwidth + vwidth + thickness * 2, 0, 0]) cube([hwidth, thickness, height]);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        translate([hwidth * 2 + vwidth + thickness * 2,thickness,thickness]) rotate([0, 180,0 ]) sidetriangle();
 | 
					    translate([hwidth * 2 + vwidth + thickness * 2, thickness, thickness]) rotate([0, 180, 0]) sidetriangle();
 | 
				
			||||||
        translate([hwidth * 2 + vwidth + thickness * 2,thickness,height]) rotate([0, 180,0 ]) sidetriangle();
 | 
					    translate([hwidth * 2 + vwidth + thickness * 2, thickness, height]) rotate([0, 180, 0]) sidetriangle();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module middletriangle(){
 | 
					module middletriangle() {
 | 
				
			||||||
    linear_extrude(thickness) polygon([[0,0], [vthickness, 0], [vthickness, vheight-height]]);
 | 
					    linear_extrude(thickness) polygon([[0, 0], [vthickness, 0], [vthickness, vheight - height]]);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module sidetriangle() {
 | 
					module sidetriangle() {
 | 
				
			||||||
    linear_extrude(5) polygon([[0,0], [hwidth, 0], [hwidth, vthickness]]);
 | 
					    linear_extrude(5) polygon([[0, 0], [hwidth, 0], [hwidth, vthickness]]);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module holes() {
 | 
					module holes() {
 | 
				
			||||||
@@ -62,13 +67,13 @@ module holes() {
 | 
				
			|||||||
    leftholes();
 | 
					    leftholes();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // right holes
 | 
					    // right holes
 | 
				
			||||||
    translate([hwidth + vwidth + thickness * 2,0,0]) leftholes();
 | 
					    translate([hwidth + vwidth + thickness * 2, 0, 0]) leftholes();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    // center holes
 | 
					    // center holes
 | 
				
			||||||
    translate([hwidth + thickness,vthickness,0]) centerholes();
 | 
					    translate([hwidth + thickness, vthickness, 0]) centerholes();
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module leftholes(){
 | 
					module leftholes() {
 | 
				
			||||||
    translate([holedistance, 0, holedistance]) XM3Hole();
 | 
					    translate([holedistance, 0, holedistance]) XM3Hole();
 | 
				
			||||||
    translate([hwidth - holedistance, 0, holedistance]) XM3Hole();
 | 
					    translate([hwidth - holedistance, 0, holedistance]) XM3Hole();
 | 
				
			||||||
    translate([holedistance, 0, height - holedistance]) XM3Hole();
 | 
					    translate([holedistance, 0, height - holedistance]) XM3Hole();
 | 
				
			||||||
@@ -81,13 +86,13 @@ module centerholes() {
 | 
				
			|||||||
    translate([holedistance, 0, vheight - holedistance]) XM3Hole();
 | 
					    translate([holedistance, 0, vheight - holedistance]) XM3Hole();
 | 
				
			||||||
    translate([vwidth - holedistance, 0, vheight - holedistance]) XM3Hole();
 | 
					    translate([vwidth - holedistance, 0, vheight - holedistance]) XM3Hole();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    if(horizontalcenterholes){
 | 
					    if (horizontalcenterholes) {
 | 
				
			||||||
    // center holes
 | 
					        // center holes
 | 
				
			||||||
    translate([vwidth - holedistance, 0, vheight / 2]) XM3Hole();
 | 
					        translate([vwidth - holedistance, 0, vheight / 2]) XM3Hole();
 | 
				
			||||||
    translate([holedistance, 0, vheight / 2]) XM3Hole();
 | 
					        translate([holedistance, 0, vheight / 2]) XM3Hole();
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
module XM3Hole() {
 | 
					module XM3Hole() {
 | 
				
			||||||
    rotate([270,0,0])cylinder(h=thickness, d=M4HoleDiam);
 | 
					    rotate([270, 0, 0])cylinder(h = thickness, d = M4HoleDiam);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
		Reference in New Issue
	
	Block a user