142 lines
4.0 KiB
OpenSCAD
142 lines
4.0 KiB
OpenSCAD
// spindle params
|
|
inner_dia = 80;
|
|
dia_offset = 1;
|
|
|
|
// threaded insert params
|
|
insert_height = 7;
|
|
insert_dia = 5;
|
|
insert_bottom_dia = 4.2;
|
|
|
|
// magnet params
|
|
magnet_dia = 3;
|
|
magnet_height = 1;
|
|
magnet_number = 10;
|
|
|
|
// shape params
|
|
extra_offset = 4;
|
|
width = magnet_dia+extra_offset;
|
|
wedge_size = insert_dia + 3;
|
|
thickness = insert_dia + 3;
|
|
wedge_width = insert_height;
|
|
spacing_distance = 5;
|
|
|
|
$fn=100;
|
|
|
|
module ring(){
|
|
difference(){
|
|
linear_extrude(height=thickness, center=false, convexity=10, twist=0) {
|
|
difference(){
|
|
union(){
|
|
radius = (inner_dia+dia_offset)/2+width;
|
|
circle(r=radius);
|
|
|
|
squ_width = wedge_size+width;
|
|
squ_height = 2*wedge_width + spacing_distance + 1;
|
|
translate([-wedge_size/2-radius,0,0])
|
|
square(size=[squ_width, squ_height], center=true);
|
|
}
|
|
|
|
union(){
|
|
radius = (inner_dia+dia_offset)/2;
|
|
circle(r=radius);
|
|
|
|
squ_width = wedge_size+width+20;
|
|
squ_height = spacing_distance + 1;
|
|
translate([-wedge_size/2-radius,0,0])
|
|
square(size=[squ_width, squ_height], center=true);
|
|
}
|
|
}
|
|
}
|
|
|
|
for(i = [0:magnet_number]){
|
|
rotate([0,0,i*36])
|
|
translate([0, (inner_dia+dia_offset)/2+width/2-0.5, -0.01])
|
|
cube(size=[15, 5, 3], center=true);
|
|
}
|
|
|
|
// threaded insert hole
|
|
translate([-(inner_dia+dia_offset)/2-width-wedge_size/1.5, (spacing_distance + 1)/2-0.005, thickness/2])
|
|
threaded_insert();
|
|
|
|
// bolt hole
|
|
translate([-(inner_dia+dia_offset)/2-width-wedge_size/1.5, -(spacing_distance + 1)/2+0.005, thickness/2])
|
|
rotate([90,0,0])
|
|
cylinder(h=insert_height+0.01, r=3.5/2, center=false);
|
|
}
|
|
}
|
|
|
|
module threaded_insert(){
|
|
rotate([-90,0,0])
|
|
cylinder(h=insert_height+0.01, r1=insert_bottom_dia/2, r2=insert_dia/2, center=false);
|
|
}
|
|
|
|
// vacuum params
|
|
vacuum_pipe_dia_start = 32;
|
|
vacuum_pipe_dia_end = 30;
|
|
pipe_thickness = 2;
|
|
pipe_length = 50;
|
|
rotation_angle = 60;
|
|
|
|
pipe_height = 50;
|
|
|
|
module pipe(){
|
|
// hollow pipe for vacuum cleaner
|
|
rotate([0,rotation_angle,0])
|
|
difference(){
|
|
cylinder(h=pipe_length, r1=vacuum_pipe_dia_end/2+pipe_thickness, r2=vacuum_pipe_dia_start/2+pipe_thickness, center=false);
|
|
translate([0,0,-0.005])
|
|
cylinder(h=pipe_length+0.01, r1=vacuum_pipe_dia_end/2, r2=vacuum_pipe_dia_start/2, center=false);
|
|
}
|
|
}
|
|
|
|
module vacuum_vent() {
|
|
rotate([180,0,0])
|
|
difference(){
|
|
linear_extrude(height=pipe_height, center=false, convexity=10, twist=0) {
|
|
difference(){
|
|
union(){
|
|
radius = (inner_dia+dia_offset)/2+width;
|
|
circle(r=radius);
|
|
}
|
|
|
|
union(){
|
|
radius = (inner_dia+dia_offset)/2+2;
|
|
circle(r=radius);
|
|
}
|
|
}
|
|
}
|
|
|
|
for(i = [0:magnet_number]){
|
|
rotate([0,0,i*36])
|
|
translate([0, (inner_dia+dia_offset)/2+width/2, -0.01])
|
|
cylinder(r=(magnet_dia+0.5)/2, h=magnet_height+0.5, center=false);
|
|
}
|
|
|
|
// Ring for metal
|
|
translate([0,0,-8])
|
|
cylinder(r=(inner_dia+dia_offset)/2+6, h=10, center=false);
|
|
}
|
|
}
|
|
|
|
|
|
ring();
|
|
// pipe_x = cos(rotation_angle)*(vacuum_pipe_dia_end+pipe_thickness)/2;
|
|
// difference(){
|
|
// vacuum_vent();
|
|
// translate([-pipe_x+(inner_dia+dia_offset)/2+2,0,-30])
|
|
// hull(){pipe();}
|
|
|
|
// // threaded insert holes
|
|
// for(i = [0:magnet_number]){
|
|
// rotate([0,0,i*36])
|
|
// translate([0, (inner_dia+dia_offset)/2+width+0.9-7, -pipe_height+5])
|
|
// rotate([0,0,0])
|
|
// threaded_insert();
|
|
// }
|
|
// }
|
|
// difference(){
|
|
// translate([-pipe_x+(inner_dia+dia_offset)/2+2,0,-30])
|
|
// pipe();
|
|
// translate([0,0,-pipe_height/2])
|
|
// cylinder(r=(inner_dia+dia_offset)/2+2, h=pipe_height, center=true);
|
|
// } |