//Copy and paste this text in openSCAD to use this file, //Instructables.com does not yet support .scad files //if you have a broken or leaking hose, but do have a different //hose from a different vacuum cleaner availabe ,this is the model for you. //Fill in the dimensions shown below for your hose and hose_hole? //then this model will generate an adapter that should allow you to fit //your hose onto your vacuum. //Use of calipers (or other precise measuring tools) is advised, otherwise //it might require a lot of tweaking on your part. //This model is made to be made of FDM printed PLA, other materials/methods //might require different values //The dimensions of your *new* hose //so these measurements are used for the part the hose fits into outer_diameter_hose = 45.30; topHose_bottomSnapfit = 27.30; max_useable_hoseHeight = 38.50; //and the dimensions of the hole this hose should fit into inner_diameter_hole = 46.90; topHole_bottomSnapfit = 2; max_useable_holeHeight = 24.60; //then the adapter consists of three parts: //the part that fits into the vacuum cleaner //the part the hose fits into //and the connection between these parts //which part is to be printed? Added in in case values need to be tweaked. //the entire thing = 1 //the part that fits into vacuum = 2 //the connection = 3 //the part the hose fits onto = 4 //to make sure only the required parameters are shown in the customizer module __Customizer_Limit__ () {} // This actually works shown_by_customizer = false; toBePrintedPart = 1; //printer variables //the more walls used the stronger the part, but also the longer the printing time //5 walls of 0.40 seemed strong enough to do the job wall_thickness = 0.40; wall_count_hosePart = 5; total_wall_count_vacPart = 5; wall_count_innerVacPart = 2; wall_count_outerVacPart = total_wall_count_vacPart - wall_count_innerVacPart; //tolerancing variables standard_tolerancing = 0.40; tolerancing = standard_tolerancing*1.25; //extra space to allow for easy pressing the snapfits and allow for easy removal pressRoom = 5 - standard_tolerancing; //variables part that fits into vacuum outer_radius_vacPart = inner_diameter_hole/2 - tolerancing; inner_radius_vacPart = outer_radius_vacPart - wall_count_outerVacPart*wall_thickness; inner_inner_radius_vacPart = inner_radius_vacPart - wall_count_innerVacPart*wall_thickness; height_vacPart = max_useable_holeHeight - tolerancing + pressRoom; solid_bottom_height = 3; //snapfit variables cutout_width = 0.80; snapfit_depth=2;//was 1.40; straight_snapfit=0.40; snapfit_height=4; bottomheight_snapfit=height_vacPart - pressRoom - topHole_bottomSnapfit - standard_tolerancing; length_snapfitBeam = height_vacPart - solid_bottom_height; //calculations used to make the width of the snapfit beam automatically change based on part length //as well as caculations to automatically leave enough space for the snapfits to bend //The calculations for the automatically changing of the width of the snapfit is not ideal because it will only be useable (and not even perfect) for this specific case //calculations are based on a comparison with a test print with satisfactory characteristics //calculations used to find the right deflection at the right place //calculations based on cantilevered beam fixed at one end l1_new = length_snapfitBeam; l2_new = bottomheight_snapfit - solid_bottom_height - straight_snapfit; l1_ori = 35; l2_ori = 26.60; width_factor = (l1_new^2 * l2_new)/(l1_ori^2 * l2_ori); delta_total = (snapfit_depth * l1_new) / l2_new; //These calculations are used to adapt the width of the snapfit, but these are not ideal Izz_factor = width_factor; r_new=outer_radius_vacPart/2 - tolerancing; r_original = 38/2 - tolerancing; relative_width_percentage = 99.442*Izz_factor^0.1381*(r_new/r_original)^0.4523750000; relative_width = relative_width_percentage/100; //would also be better if it could also change the amount of walls instead of only the width snapfit_width = relative_width * 20; //automatically leaving enough space for the snapfit to bend snapfit_space_X = sqrt(inner_radius_vacPart^2 - (snapfit_width/2)^2) - delta_total; //variables part the hose fits into inner_radius_hosePart = outer_diameter_hose/2 + tolerancing; outer_radius_hosePart= inner_radius_hosePart + wall_count_hosePart*wall_thickness; height_hosePart = max_useable_hoseHeight + standard_tolerancing; //+ tolerancing??; //the variables for the ridge the snapfits on the hose fit into depth_ridge = 1.50; straight_ridge = 0.40; ridge_height = 4; distanceTop_toBottomRidge = topHose_bottomSnapfit - standard_tolerancing; //print angle used to print the connection between the parts //could increase this print angle, but that would result in the snapfits to be less easily accesible print_angle = 46; //Make this dependent on the the snapfit_space_x value and the outer radius of the hose part //Has to take the biggest of these two values, to make sure the connection height is a realistic value a = outer_radius_hosePart; b = snapfit_space_X;//outer_radius_vacPart; radius_difference = a > b ? outer_radius_hosePart - snapfit_space_X : snapfit_space_X - outer_radius_hosePart; connection_height = tan(print_angle)*(radius_difference); //Variables are defined, now the building of the parts start //The part that fits into the hole if(toBePrintedPart == 1 || toBePrintedPart == 2) { //bottom of part that fits into hole linear_extrude(solid_bottom_height) difference(){ circle(outer_radius_vacPart,$fn=100); intersection() { circle(inner_inner_radius_vacPart,$fn=100); square([(snapfit_space_X-(wall_count_innerVacPart*wall_thickness))*2,(inner_inner_radius_vacPart)*2],center=true); } } difference(){ //outer radius part that fits into hole difference(){ cylinder(r=outer_radius_vacPart,h=height_vacPart,$fn=100); cylinder(r=inner_radius_vacPart,h=height_vacPart,$fn=100); } //////////checken nog zo //cutouts for snapfits translate([0,0,0.5*height_vacPart+solid_bottom_height]) rotate([0,90,0]) linear_extrude(height = outer_radius_vacPart*2,center=true,twist=0) difference(){ square([height_vacPart,snapfit_width+cutout_width*2],center=true); square([height_vacPart,snapfit_width],center=true); } } //snapfits translate([0,0,bottomheight_snapfit]) difference(){ rotate_extrude(angle=360,$fn=100) polygon(snapfit_points,snapfit_path); //the points and path used for this polygon are below here snapfit_points = [[outer_radius_vacPart,-snapfit_height], [outer_radius_vacPart,0], [outer_radius_vacPart+snapfit_depth,0], [outer_radius_vacPart+snapfit_depth,-straight_snapfit]]; snapfit_path=[[3,2,1,0]]; translate([0,0,-snapfit_height]) linear_extrude(height=snapfit_height,center=false,twist=0) difference(){ square((outer_radius_vacPart+snapfit_depth)*2,center=true); square([(outer_radius_vacPart+snapfit_depth)*2,snapfit_width],center=true); } } //inner shape part that fits into hole linear_extrude(height_vacPart) difference(){ intersection() { circle(inner_radius_vacPart,$fn=100); square([snapfit_space_X*2,inner_radius_vacPart*2],center=true); } intersection() { circle(inner_inner_radius_vacPart,$fn=100); square([(snapfit_space_X-(wall_count_innerVacPart*wall_thickness))*2,(inner_inner_radius_vacPart)*2],center=true); } } } //*/ ///* //connection between two parts if(toBePrintedPart == 1 || toBePrintedPart ==3) { difference(){ //outer side of connection hull() { translate([0,0,height_vacPart]) linear_extrude(0.1) intersection() { circle(outer_radius_vacPart,$fn=100); square([snapfit_space_X*2,outer_radius_vacPart*2],center=true); } translate ([0, 0, height_vacPart+connection_height]) linear_extrude (0.1) circle (outer_radius_hosePart,$fn = 100); } //inner side of connection hull() { translate([0,0,height_vacPart]) linear_extrude(0.1) intersection() { circle(inner_inner_radius_vacPart,$fn=100); square([(snapfit_space_X-(wall_count_innerVacPart*wall_thickness))*2,(inner_inner_radius_vacPart)*2],center=true); } translate ([0, 0, height_vacPart+connection_height]) linear_extrude (0.1) circle (inner_radius_hosePart,$fn = 100); } } } //the part the hose fits into if(toBePrintedPart == 1 || toBePrintedPart == 4) { //cylinder part the hose fits into difference(){ translate([0,0,height_vacPart+connection_height]) difference(){ cylinder(r=outer_radius_hosePart,h=height_hosePart,$fn=100); cylinder(r=inner_radius_hosePart,h=height_hosePart,$fn=100); } //ridge the snapfits fall into translate([0,0,height_vacPart+connection_height+height_hosePart - (max_useable_hoseHeight - topHose_bottomSnapfit) + standard_tolerancing]) rotate_extrude(angle=360,$fn=100) polygon(ridge_points,ridge_path); //the points and path used for this polygon are below here ridge_points = [[inner_radius_hosePart,0], [inner_radius_hosePart+depth_ridge,0], [inner_radius_hosePart+depth_ridge,-straight_ridge], [inner_radius_hosePart,-ridge_height]]; ridge_path = [[0,1,2,3]]; } }