//Used a .txt file because Instructables.com does not (yet?) support .scad files //Copy and paste this file into openSCAD and it should work //This file is used to make adapters to fit two different connection types for front wheels //for these two different types, see the schematics in the instructable //all dimensions in millimeters //type 1 = similar to the Miele connection //type 2 = similar to the Samsung connection //type 3 and type 4 have not yet been found and so will not return realistic results //to choose the adapter type adapter_type = 1; //If you have a an adapter of type 1, fill in these variables //Adapter type 1 variables connection_diameter_top = 7.00; connection_diameter_bottom = 7.00; useable_height1 = 21.43; min_diameter_indentation = 5.22; end_indentation_fromTop = 10.02; indentation_length = 3.70; //If you have a an adapter of type 2, fill in these variables //Adapter type 2 variables regular_diameter = 14.45; protrusion_diameter = 15.70; protrusion_height_fromToptoTop = 0; protrusion_length = 3.00; useable_heigth2 = 18.35; //Adapter type 3 variables max_diameter_type3 = 10; useable_height3 = 20; //Adapter type 4 variables max_diameter_type4 = 12; useable_height4 = 40; module __Customizer_Limit__ () {} // This actually works shown_by_customizer = false; //print settings amount_layers_flange = 4; wall_count = 2; wall_thickness = 0.40; layer_height = 0.20; max_print_angle = 45; //adapter dimensions outer_radius_adapter = 10.20; cutout_width = 3.00; width_snapfit = 2.00; depth_snapfit = 1.65; distance_top_snapfit = 0.50; straight_snapfit = 0.85; snapfit_totalHeight = 2.50; standard_tolerancing = 0.40; //Calculations base adapter inner_radius_adapter = outer_radius_adapter - (wall_count * wall_thickness); snapfit_angled = snapfit_totalHeight - straight_snapfit; w1 = 3.00; w2 = -2.00; w3 = -10.00; w4 = 20.00; bottom = connection_diameter_bottom; top = connection_diameter_top; biggest_connection_diameter = connection_diameter_bottom > connection_diameter_top ? connection_diameter_bottom : connection_diameter_top; //choosing the right additionValue which is added to the useable height to get the adapter height a = adapter_type; b3 = 3; d2 = a == b3 ? w3 : w4; b2 = 2; d1 = a == b2 ? w2 : d2; b1 = 1; additionValue = a == b1 ? w1 : d1; //using the biggest diameter of the right type to figure out if the it fits into the main part b6 = 3; d4 = a == b6 ? max_diameter_type3 : max_diameter_type4; b5 = 2; d3 = a == b5 ? protrusion_diameter : d4; b4 = 1; toBeCheckedDiameter = a == b4 ? biggest_connection_diameter : d3; //getting the right useable height depending on the adapter type f3 = 3; g2 = a == f3 ? useable_height3 : useable_height4; f2 = 2; g1 = a == f2 ? useable_heigth2 : g2; f1 = 1; useable_height = a == f1 ? useable_height1 : g1; adapter_height = useable_height + additionValue; cutout_length = adapter_height/2; cutout_bottom = adapter_height - cutout_length; //modelling base adapter cutout_points = [[-(cutout_width/2),adapter_height+5],[cutout_width/2,adapter_height+5],[-(cutout_width/2),cutout_bottom],[cutout_width/2,cutout_bottom]]; cutout_paths = [[0,1,3,2]]; snapfit_cutoff_points1 = [[(outer_radius_adapter + depth_snapfit),(width_snapfit)/2],[-(outer_radius_adapter + depth_snapfit),(width_snapfit)/2],[(outer_radius_adapter + depth_snapfit),(outer_radius_adapter + depth_snapfit)],[-(outer_radius_adapter + depth_snapfit),(outer_radius_adapter + depth_snapfit)]]; snapfit_cutoff_points2 = [[(outer_radius_adapter + depth_snapfit),-(width_snapfit)/2],[-(outer_radius_adapter + depth_snapfit),-(width_snapfit)/2],[(outer_radius_adapter + depth_snapfit),-(outer_radius_adapter + depth_snapfit)],[-(outer_radius_adapter + depth_snapfit),-(outer_radius_adapter + depth_snapfit)]]; snapfit_cutoff_path = [[0,1,3,2]]; // ///* if((toBeCheckedDiameter/2) < inner_radius_adapter){ union(){ difference(){ difference(){ //base cylinders cylinder(h=adapter_height, r=outer_radius_adapter,$fn=100); translate([0,0,-5]) cylinder(h=adapter_height+10,r=inner_radius_adapter,$fn=100);} //cutout for bendability rotate(a= [90,0,0]) linear_extrude(height =outer_radius_adapter*2+10, center = true, convexity = 10, twist = 0) union(){ polygon(cutout_points,cutout_paths); translate([0,cutout_bottom,0]) circle(cutout_width/2,$fn=100);}} difference(){ //snap fits union(){ translate([0,0,adapter_height-distance_top_snapfit-straight_snapfit]) linear_extrude(height = straight_snapfit, center = false, convexity = 10, twist = 0) difference(){ circle(r=outer_radius_adapter + depth_snapfit,$fn=100); polygon(snapfit_cutoff_points1,snapfit_cutoff_path); polygon(snapfit_cutoff_points2,snapfit_cutoff_path);} translate([0,0,adapter_height - distance_top_snapfit-straight_snapfit]) rotate([180,0,0]) linear_extrude(height = snapfit_angled, center = false, convexity = 10, twist = 0,scale = [outer_radius_adapter/(outer_radius_adapter + depth_snapfit),1]) difference(){ circle(r=outer_radius_adapter + depth_snapfit,$fn=100); polygon(snapfit_cutoff_points1,snapfit_cutoff_path); polygon(snapfit_cutoff_points2,snapfit_cutoff_path);}} cylinder(h=adapter_height, r=outer_radius_adapter,$fn=100); } } } //*/ //Miele if(adapter_type == 1 && (toBeCheckedDiameter/2) < inner_radius_adapter) { infill_height = adapter_height/6; radius_top_connectionWithTolerances = connection_diameter_top/2 + standard_tolerancing; inner_radius_connectionWithTolerances = biggest_connection_diameter / 2 + standard_tolerancing; inner_radius_connectionWithTolerancesAndWalls = inner_radius_connectionWithTolerances + wall_count*wall_thickness; //Z tolerance is used to gain a small distance between the bottom of the vacuum and the top of the adapter Z_tolerance_ridge = 1.5; middle_ridge_height = useable_height - end_indentation_fromTop + (indentation_length/2) - Z_tolerance_ridge; //might need to slightly change the tolerances in this next line, depending on your measurements inner_radius_ridge_Dia = radius_top_connectionWithTolerances - standard_tolerancing;// + standard_tolerancing/4; inner_radius_ridge_Ind = min_diameter_indentation/2 + standard_tolerancing; j = inner_radius_ridge_Dia; k = inner_radius_ridge_Ind; inner_radius_ridge = j > k ? inner_radius_ridge_Dia : inner_radius_ridge_Ind; //finding height of angled part of ridge using the max print angle of 45 degrees ridge_height = 2*indentation_length/3; straight_ridge = layer_height; union(){ translate([0,0,useable_height-Z_tolerance_ridge]) difference(){ difference(){ //spherical top of connection hole sphere(r=inner_radius_connectionWithTolerancesAndWalls,$fn=100); sphere(r=inner_radius_connectionWithTolerances,$fn=100);} translate([0,0,-inner_radius_connectionWithTolerancesAndWalls]) cube(2*inner_radius_connectionWithTolerancesAndWalls,center = true);} difference(){ //hole for connection cylinder(r=inner_radius_connectionWithTolerancesAndWalls,h=useable_height-Z_tolerance_ridge,$fn=100); translate([0,0,-5]) cylinder(r=inner_radius_connectionWithTolerances,h=useable_height-Z_tolerance_ridge+5,$fn=100);} difference(){ //infill for tolerances and strength cylinder(r=inner_radius_adapter,h=infill_height,$fn=100); translate([0,0,-5]) cylinder(r=inner_radius_connectionWithTolerances,h=infill_height+5,$fn=100);}} //inner ridge translate([0,0,middle_ridge_height]) rotate_extrude(angle = 360, convexity = 10,$fn=100) polygon(ridge_points,ridge_path); ridge_points = [[inner_radius_connectionWithTolerances,ridge_height/2], [inner_radius_ridge,straight_ridge/2], [inner_radius_ridge,-(straight_ridge/2)], [inner_radius_connectionWithTolerances,-(ridge_height/2)]]; ridge_path = [[0,1,2,3]]; } if(adapter_type == 2 && (toBeCheckedDiameter/2) < inner_radius_adapter) { //calculations radius_protrusion = protrusion_diameter /2; inner_radius_ridge2 = 0.995 * radius_protrusion; //inner_radius_ridge = radius_protrusion - standard_tolerancing; angled_ridge2 = (inner_radius_adapter - inner_radius_ridge2) * tan(max_print_angle); straight_ridge2 = layer_height; extra_tolerance = 1.50; distance_topRidge_topAdapter = (protrusion_height_fromToptoTop + protrusion_length) + standard_tolerancing + extra_tolerance; total_height_ridge2 = 2*angled_ridge2 + straight_ridge2; depth_ridge2 = inner_radius_adapter - inner_radius_ridge2; middle_ridge_height2 = adapter_height - distance_topRidge_topAdapter - (total_height_ridge2/2); flanges_extent_x = 0.5*outer_radius_adapter; flange_height = amount_layers_flange * layer_height; ///* difference(){ union(){ //flanges translate([0,0,adapter_height]) linear_extrude(height = flange_height, center = false, convexity = 10, twist = 0) difference(){ circle(r=outer_radius_adapter,$fn=100); square([2*flanges_extent_x,2*outer_radius_adapter], center = true); } //*/ //ridge translate([0,0,middle_ridge_height2]) rotate_extrude(angle = 360, convexity = 10,$fn=100) polygon(ridge_points2, ridge_path2); ridge_points2 = [[inner_radius_adapter, total_height_ridge2/2], [(inner_radius_adapter - depth_ridge2), 0.5*straight_ridge2], [(inner_radius_adapter - depth_ridge2), -(0.5*straight_ridge2)], [inner_radius_adapter, -(total_height_ridge2/2)] ]; ridge_path2 = [[0,1,2,3]]; } //cutout of adapter (through the ridge) rotate(a= [90,0,0]) linear_extrude(height = outer_radius_adapter*2+10, center = true, convexity = 10, twist = 0) union(){ polygon(cutout_points,cutout_paths); translate([0,cutout_bottom,0]) circle(cutout_width/2,$fn=100);} } } //If diameter is too big to fit into the wheel holder, and thus it would not work (though fairly unrealistic?) //this will error in case the diameter is too big if((toBeCheckedDiameter/2) > inner_radius_adapter) { linear_extrude(4) text("It... it is too big"); }