diff --git a/MX_DES_Standard.scad b/MX_DES_Standard.scad index 65a59fa..ca13ef4 100644 --- a/MX_DES_Standard.scad +++ b/MX_DES_Standard.scad @@ -319,12 +319,14 @@ module keycap(keyID = 0, cutLen = 0, visualizeDish = false, rossSection = false, difference(){ union(){ difference(){ - skin([for (i=[0:layers-1]) transform(translation(CapTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(CapTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); //outer shell + skin([for (i=[-1:layers-1]) transform(translation(CapTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(CapTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); //outer shell //Cut inner shell if(Stem == true){ - translate([0,0,-.001])skin([for (i=[0:layers-1]) transform(translation(InnerTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(InnerTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); + translate([0,0,-.001])skin([for (i=[-1:layers-1]) transform(translation(InnerTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(InnerTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); } + // Cut off the extra bottom due to starting at layer -1 + translate ([-50,-50,-10]) cube ([100,100,10], center=false); } if(Stem == true){ translate([0,0,StemBrimDep])rotate(stemRot)difference(){ diff --git a/MX_DES_Thumb.scad b/MX_DES_Thumb.scad index 7347c31..8810452 100644 --- a/MX_DES_Thumb.scad +++ b/MX_DES_Thumb.scad @@ -288,12 +288,14 @@ module keycap(keyID = 0, cutLen = 0, visualizeDish = false, rossSection = false, difference(){ union(){ difference(){ - skin([for (i=[0:layers-1]) transform(translation(CapTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(CapTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); //outer shell + skin([for (i=[-1:layers-1]) transform(translation(CapTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(CapTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); //outer shell //Cut inner shell if(Stem == true){ - translate([0,0,-.001])skin([for (i=[0:layers-1]) transform(translation(InnerTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(InnerTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); + translate([0,0,-.001])skin([for (i=[-1:layers-1]) transform(translation(InnerTranslation(i, keyID)) * rotation(CapRotation(i, keyID)), elliptical_rectangle(InnerTransform(i, keyID), b = CapRoundness(i,keyID),fn=fn))]); } + // Cut off the extra bottom due to starting at layer -1 + translate ([-50,-50,-10]) cube ([100,100,10], center=false); } if(Stem == true){ translate([0,0,StemBrimDep])rotate(stemRot)difference(){