initial commit
This commit is contained in:
60
test.scad
Normal file
60
test.scad
Normal file
@@ -0,0 +1,60 @@
|
||||
$fn=90;
|
||||
tol=0.25;
|
||||
ht=10;
|
||||
diam=15;
|
||||
|
||||
difference()
|
||||
{
|
||||
difference()
|
||||
{
|
||||
rotate_extrude()
|
||||
{
|
||||
difference()
|
||||
{
|
||||
// basic shape
|
||||
square([diam/2-tol,ht]);
|
||||
|
||||
// bottom chamfer
|
||||
polygon([[diam/2-tol,0],[diam/2-tol,.5],[diam/2-0.5-tol,0]]);
|
||||
|
||||
// top chamfer
|
||||
polygon([[diam/2-tol,ht],[diam/2-tol,ht-.5],[diam/2-0.5-tol,ht]]);
|
||||
|
||||
// retention ring
|
||||
polygon([[diam/2-tol,ht/2+1+tol],[diam/2-tol,ht/2+2+tol],[diam/2-tol-1,ht/2+1+tol],[diam/2-tol-1,ht/2-1-tol],[diam/2-tol,ht/2-2-tol],[diam/2-tol,ht/2-1-tol]]);
|
||||
|
||||
}
|
||||
}
|
||||
// label
|
||||
translate([0,0,ht-0.6])
|
||||
linear_extrude(0.6, convexity=10)
|
||||
text(text=str(tol), size=4, halign="center", valign="center");
|
||||
}
|
||||
|
||||
// hole (for rotation with screwdriver bit)
|
||||
cylinder(d=7.8, h=ht-2, $fn=6);
|
||||
}
|
||||
|
||||
intersection()
|
||||
{
|
||||
rotate_extrude()
|
||||
translate([diam/2,0])
|
||||
{
|
||||
difference()
|
||||
{
|
||||
// basic shape
|
||||
square([4,ht]);
|
||||
|
||||
// bottom chamfer
|
||||
polygon([[0,0],[.5,0],[0,.5]]);
|
||||
|
||||
// top chamfer
|
||||
polygon([[0,ht],[.5,ht],[0,ht-.5]]);
|
||||
}
|
||||
|
||||
// retention ring
|
||||
polygon([[0,ht/2+2],[-1,ht/2+1],[-1,ht/2-1],[0,ht/2-2]]);
|
||||
}
|
||||
|
||||
cylinder(d=diam+8, h=ht, $fn=6);
|
||||
}
|
||||
Reference in New Issue
Block a user