fix: lots of tolerance issues
This commit is contained in:
parent
279e941082
commit
e17a01bc0d
5 changed files with 14 additions and 16 deletions
|
@ -19,7 +19,7 @@ module case(n=5, diameter=50, tolerance=0.2, $fn=60) {
|
|||
rotate([0,0,120*j]) {
|
||||
for (i = [0:n]) {
|
||||
translate([0,diameter/4,10*i+3]) {
|
||||
cube([5, diameter/2, 3], center=true);
|
||||
cube([4+2*tolerance, diameter/2, 2+2*tolerance], center=true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ module key_dial(alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ", key="C", width=7, dia=50,
|
|||
}
|
||||
// inner ring
|
||||
rotate([0,90,0]) {
|
||||
cylinder($fn=$fn, h=width+2, d=dia-thick*2, center=true);
|
||||
cylinder($fn=$fn, h=width+2, d=dia-thick*2+2*tolerance, center=true);
|
||||
}
|
||||
// key
|
||||
rotate([45+((0.5+key_index)/len(alphabet)) * 360,0,0]) {
|
||||
|
|
|
@ -13,7 +13,7 @@ module lock(alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ", password="CHAOS", diameter=50
|
|||
for (i = [0:n-1]) {
|
||||
rotate([-key_indices[i]/len(alphabet)*360,0,0]) {
|
||||
translate([i*10,0,0]) {
|
||||
key_dial(alphabet, key=password[i], dia=diameter);
|
||||
key_dial(alphabet, key=password[i], dia=diameter, font_size=7);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -22,7 +22,7 @@ module lock(alphabet="ABCDEFGHIJKLMNOPQRSTUVWXYZ", password="CHAOS", diameter=50
|
|||
translate([-5+10*i,0,0]) {
|
||||
rotate([0,0,180]) {
|
||||
rotate([0,90,0]) {
|
||||
ring(dia=diameter-2, clicker=i>0);
|
||||
ring(dia=diameter-2, clicker=i>0, alphabet_length=len(alphabet));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ module plug(n=5, diameter=50, tolerance=0.2, $fn=60) {
|
|||
rotate([0,90,0]) {
|
||||
// inner cylinder
|
||||
difference() {
|
||||
cylinder(h=10*n+5, d=diameter-18);
|
||||
cylinder(h=10*n+5, d=diameter-17-2*tolerance);
|
||||
translate([0,0,-1]) {
|
||||
cylinder(h=10*n+7, d=diameter-20);
|
||||
}
|
||||
|
|
18
ring.scad
18
ring.scad
|
@ -1,6 +1,6 @@
|
|||
|
||||
|
||||
module ring(alphabet_length=26, dia=48, width=3, thick=2, spoke_depth=4.5, spoke_width=7, key_depth=3, key_length=4, tolerance = 0.2, indicator=false, clicker=false, $fn=60) {
|
||||
module ring(alphabet_length=26, dia=48, width=3, thick=2, spoke_depth=4.5, spoke_width=9, key_depth=3, key_length=4, tolerance = 0.2, indicator=false, clicker=false, $fn=60) {
|
||||
|
||||
difference() { // halfing
|
||||
union() {
|
||||
|
@ -23,7 +23,7 @@ module ring(alphabet_length=26, dia=48, width=3, thick=2, spoke_depth=4.5, spoke
|
|||
}
|
||||
}
|
||||
}
|
||||
cylinder(d=dia-2*spoke_depth+2*tolerance, h=width+1, center=true);
|
||||
cylinder(d=dia-2*spoke_depth+tolerance, h=width+1, center=true);
|
||||
}
|
||||
// keys
|
||||
for (i = [0:2]) {
|
||||
|
@ -35,10 +35,11 @@ module ring(alphabet_length=26, dia=48, width=3, thick=2, spoke_depth=4.5, spoke
|
|||
}
|
||||
// indicator
|
||||
translate([-dia/2,0,0]) {
|
||||
cube([1.5, width, width-4*tolerance], center=true);
|
||||
cube([2, width, width-4*tolerance], center=true);
|
||||
}
|
||||
// clicker
|
||||
if (clicker) {
|
||||
echo(floor(alphabet_length/3)*360/alphabet_length-45);
|
||||
rotate([0,0,floor(alphabet_length/3)*360/alphabet_length-45]) {
|
||||
translate([-dia/2+3,0,0]) {
|
||||
cube([3, 4, width-4*tolerance], center=true);
|
||||
|
@ -54,14 +55,11 @@ module ring(alphabet_length=26, dia=48, width=3, thick=2, spoke_depth=4.5, spoke
|
|||
}
|
||||
}
|
||||
// Ring cut
|
||||
translate([-dia/2+thick-0.5, -0.25, -width/2]) {
|
||||
cube([spoke_depth+key_depth,0.5, width]);
|
||||
translate([-dia/2-0.2, -0.25, -width/2]) {
|
||||
cube([spoke_depth+key_depth+thick,0.25, width]);
|
||||
}
|
||||
translate([-dia/2, width/2, -width/2]) {
|
||||
cube([thick,0.5, width]);
|
||||
}
|
||||
translate([-dia/2+thick-0.5, 0, -width/2]) {
|
||||
cube([0.5, width/2, width]);
|
||||
translate([-dia/2-0.2, 0, -width/2]) {
|
||||
#cube([0.25, width/2, width]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue