45 lines
1.2 KiB
OpenSCAD
45 lines
1.2 KiB
OpenSCAD
printer_offset = 0.5;
|
|
top_slot_width = 8;
|
|
top_slot_height = 2;
|
|
middle_slot_width = 14;
|
|
middle_slot_height = 7;
|
|
|
|
length = 20;
|
|
|
|
module T_nut(){
|
|
translate([-middle_slot_width/2, length/2, middle_slot_height-printer_offset])
|
|
rotate([90, 0, 0])
|
|
linear_extrude(length)
|
|
offset(delta = -printer_offset/3)
|
|
polygon(
|
|
[
|
|
[0,0],
|
|
[0, -middle_slot_height],
|
|
[middle_slot_width, -middle_slot_height],
|
|
[middle_slot_width, 0],
|
|
[middle_slot_width - (middle_slot_width - top_slot_width)/2, 0],
|
|
[middle_slot_width - (middle_slot_width - top_slot_width)/2, top_slot_height],
|
|
[middle_slot_width - (middle_slot_width - top_slot_width)/2 - top_slot_width, top_slot_height],
|
|
[middle_slot_width - (middle_slot_width - top_slot_width)/2 - top_slot_width, 0]
|
|
]
|
|
);
|
|
}
|
|
|
|
module cylinder_outer(height,radius,fn){
|
|
fudge = 1/cos(180/fn);
|
|
cylinder(h=height,r=radius*fudge, center=true, $fn=fn);}
|
|
|
|
module hex(size, height){
|
|
cylinder_outer(height, size/2, 6);
|
|
}
|
|
|
|
difference(){
|
|
T_nut();
|
|
cylinder(r=3+printer_offset/2, h=100, center=true, $fn=30);
|
|
|
|
translate([0,0,-0.3])
|
|
rotate([0,0,30])
|
|
hex(10, 10);
|
|
}
|
|
|