belt_width = 6; //add 2 milimeters for the lip or if you want 2 sides sides_width = 2; //Thickness of the side/s and lip number_of_sides = 1; liponoff = 1; /* if(number_of_sides == 1) { BeltTensioner(0); } if(number_of_sides == 2) { BeltTensioner(270); } */ module poly_reuse(){ polygon([[0,0],[0,50],[5,50],[15,30],[15,20],[5,0]]); } module BeltTensioner(rotation){ rotate(rotation,[0,1,0]) difference(){ union(){ linear_extrude(height = sides_width , center = false) poly_reuse(); intersection(){ linear_extrude(height = sides_width*2 + belt_width , center = false) poly_reuse(); translate([-5,0,sides_width]){ cylinder(r =10, h = belt_width); translate([0,50,0]) cylinder(r =10, h = belt_width); if(number_of_sides == 1) if (liponoff == 1){ translate([-1,0,belt_width]){ cylinder(r1 =11,r2=12,h = sides_width); translate([0,50,0]) cylinder(r1 =11,r2=12,h = sides_width); } } if(number_of_sides == 2){ translate([5,0,belt_width]) linear_extrude(height = sides_width , center = false) poly_reuse(); } } } translate([10,20,sides_width]) cube([5,10,belt_width + sides_width]); } //Bolt Hole translate([12,25,(belt_width/2)+ sides_width], $fn =8) rotate(90,[0,1,]) cylinder(r=1.7,h=10,center = true); //Nut Trap translate([9.9,25,(belt_width/2)+ sides_width]) rotate(90,[0,1,0]) rotate(90,[0,0,1]) cylinder($fn=6,r=3.2,h=3*0.7); } difference(){ intersection(){ translate([25,25,-1]) rotate(270,[1,0,0]) cylinder(r = belt_width-0.2, h = belt_width-0.2,center =true); translate([25 - belt_width,20,0]) cube((belt_width)*2); } translate([25,25,1]) cylinder(r=1.7,h=2,center = true); } }$fn=32; //belt_pitch = 3; // in mm? belt_pitch = 5; //belt_width = 6.2; belt_width = 7.0; // in mm? belt_height = 2.8; //hole_spacing = 18; //in mm? hole_spacing = 18; ram_length = 1.5; m3_diameter = 3 / cos(180 / 8) + 0.4; m3_radius = m3_diameter / 2; m3_nut_diameter = 5.5 / cos(180 / 6) + 0.4; m3_nut_radius = m3_nut_diameter / 2; m3_nut_depth = 2.5; wall = 3; extrusion_width = 0.4; clamp_height = 3.5; //belt_depth = 2; ram_height = 7; module clamp(h=10) { translate([-wall - m3_radius, 0, 0]) difference() { intersection() { translate([0, belt_width / -2 - m3_diameter - wall - extrusion_width * 2 - ((hole_spacing-10)/2), 0]) cube([wall * 2 + m3_diameter, belt_width + m3_diameter * 2 + wall * 2 + extrusion_width * 4 + (hole_spacing-10), h]); union() { translate([wall + m3_radius, belt_width / 2 + m3_radius + extrusion_width + ((hole_spacing-10)/2), 0]) cylinder(r=wall + m3_radius, h=h + 1, $fn=32); translate([wall + m3_radius, -belt_width / 2 - m3_radius - extrusion_width - ((hole_spacing-10)/2), 0]) cylinder(r=wall + m3_radius, h=h + 1, $fn=32); translate([0, -belt_width / 2 - m3_radius - extrusion_width - ((hole_spacing-10)/2), 0]) cube([wall * 2 + m3_diameter, belt_width + m3_diameter + extrusion_width * 2 + (hole_spacing-10), h + 1]); } } translate([wall + m3_radius, hole_spacing/2, -1]) cylinder(r=m3_radius, h=h + 2, $fn=16); translate([wall + m3_radius, -hole_spacing/2, -1]) cylinder(r=m3_radius, h=h + 2, $fn=16); } } module clamp_base() { difference() { clamp(belt_height + m3_nut_diameter + 1); translate([-1 - wall - m3_radius, -belt_width / 2, m3_nut_diameter + 2]) cube([wall * 4, belt_width, belt_height + 1]); translate([-1 - wall - m3_radius, 0, m3_nut_radius + 1]) rotate([0, 90, 0]) rotate([0, 0, 180 / 8]) cylinder(r=m3_radius, h=wall * 4, $fn=8); translate([-1 - wall - m3_radius, 0, m3_nut_radius + 1]) rotate([0, 90, 0]) rotate([0, 0, 180 / 6]) cylinder(r=m3_nut_radius, h=1 + m3_nut_depth, $fn=6); //translate([0, hole_spacing/2, belt_height + m3_nut_diameter + 1 - m3_nut_depth]) cylinder(r=m3_nut_radius, h=m3_nut_depth + 1, $fn=6); //translate([0, -hole_spacing/2, belt_height + m3_nut_diameter + 1 - m3_nut_depth]) cylinder(r=m3_nut_radius, h=m3_nut_depth + 1, $fn=6); translate([ - belt_pitch / 3.8, -belt_width / 2, -.8]) cube([belt_pitch / 1.9, belt_width, 2]); translate([- belt_pitch / 3.8 + belt_pitch, -belt_width / 2, -.8]) cube([belt_pitch / 1.9, belt_width, 2]); translate([- belt_pitch / 3.8 - belt_pitch, -belt_width / 2, -.8]) cube([belt_pitch / 1.9, belt_width, 2]); } } module ram() { difference() { union() { cylinder(r=m3_nut_radius, h=ram_height, $fn=32); translate([0, -m3_nut_radius, 0]) cube([ram_length + 0.1, m3_nut_diameter, ram_height]); } translate([ram_length, -m3_nut_radius - 1, -1]) cube([m3_nut_diameter + 2, m3_nut_diameter + 2, ram_height + 2]); translate([-0.5, 0, ram_height / 2]) rotate([0, 90, 0]) rotate([0, 0, 180 / 8]) cylinder(r=m3_radius, h=2 + ram_length, $fn=8); } } module polyhole(r,h) { cylinder(r=r/2,h=h); } module nut_s(d,h) { translate([0,0,h/2]) { cube([d,d/sqrt(3.0),h],center=true); rotate([0,0,120]) cube([d,d/sqrt(3.0),h],center=true); rotate([0,0,-120]) cube([d,d/sqrt(3.0),h],center=true); } } module beltclamp(){ m3_diameter=3; clamp_height = 3; clamp_width = 10; clamp_length = 18; // distance between the center of the 2 holes //belt_pitch = 2; //belt_pitch = 5; //belt_width = 10; //tooth_width = 1.3; tooth_width = 2.5; tooth_heigth = 1.75; tooth_heigth = ram_length; //offset = belt_pitch/4; offset = 0; // uncomment next line for a symetric clamp //offset = 0; difference(){ // basic shape union(0){ translate(v = [0,0,clamp_height/2]) cube([clamp_length,clamp_width,clamp_height], center=true); translate(v = [-clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); translate(v = [clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); } // screw holes translate(v = [-clamp_length/2, 0, -1])polyhole(m3_diameter, clamp_height+2); translate(v = [clamp_length/2, 0, -1]) polyhole(m3_diameter, clamp_height+2); // nut holes translate(v = [-clamp_length/2, 0, -2])nut_s(5.5,3); translate(v = [clamp_length/2, 0, -2]) nut_s(5.5,3); // belt grip translate(v = [0,offset,clamp_height-tooth_heigth]) for ( i = [round(-clamp_width/belt_pitch/2) : round(clamp_width/belt_pitch/2)]){ translate(v = [0,belt_pitch*i,tooth_heigth])cube(size = [belt_width, tooth_width, tooth_heigth*2], center = true); } } } module beltclamp3(){ m3_diameter=3; clamp_height = 3; clamp_width = 10; clamp_length = 18; // distance between the center of the 2 holes tooth_width = 2.5; tooth_heigth = 1.75; tooth_heigth = ram_length; offset = 0; difference(){ // basic shape union(0){ translate(v = [0,0,clamp_height/2]) cube([clamp_length,clamp_width,clamp_height], center=true); translate(v = [-clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); translate(v = [clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); } // screw holes translate(v = [-clamp_length/2, 0, -1])polyhole(m3_diameter, clamp_height+2); translate(v = [clamp_length/2, 0, -1]) polyhole(m3_diameter, clamp_height+2); // nut holes translate(v = [-clamp_length/2, 0, -2])nut_s(5.5,3); translate(v = [clamp_length/2, 0, -2]) nut_s(5.5,3); // belt grip //translate(v = [0,offset,clamp_height-tooth_heigth]) //for ( i = [round(-clamp_width/belt_pitch/2) : round(clamp_width/belt_pitch/2)]){ //translate(v = [0,belt_pitch*i,tooth_heigth])cube(size = [belt_width, tooth_width, tooth_heigth*2], center = true); //} } } module beltclamp2(){ m3_diameter=3; clamp_height = 8; clamp_width = 10; clamp_length = 18; // distance between the center of the 2 holes tooth_width = 2.5; tooth_heigth = 1.75; tooth_heigth = ram_length; offset = 0; // uncomment next line for a symetric clamp difference(){ // basic shape union(0){ translate(v = [0,0,clamp_height/2]) cube([clamp_length,clamp_width,clamp_height], center=true); translate(v = [-clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); translate(v = [clamp_length/2, 0, 0]) cylinder(r=clamp_width/2,h=clamp_height); } // screw holes translate(v = [-clamp_length/2, 0, -1])polyhole(m3_diameter, clamp_height+2); translate(v = [clamp_length/2, 0, -1]) polyhole(m3_diameter, clamp_height+2); // nut holes //translate(v = [-clamp_length/2, 0, +2])nut_s(5.5,3); //translate(v = [clamp_length/2, 0, +2]) nut_s(5.5,3); } } //translate([+wall * 3 + m3_diameter, -20, 0]) rotate([0,0,90]) beltclamp2(); //translate([+wall * 6 + 2*m3_diameter, -20, 0]) rotate([0,0,90]) beltclamp2(); // translate([+wall * 9 + 3*m3_diameter, -20, 0]) rotate([0,0,90]) beltclamp(); //translate([+wall * 12 + 4*m3_diameter, -20, 0]) rotate([0,0,90]) beltclamp3(); //translate([0, -20, 0])clamp_base(); //translate([-wall * 2 - m3_diameter, -20, 0]) ram();